Params

Use this tag form add extra parameters to command and send to data provider for use in generate data process. also this tag can use form send non-graceful xml format data. Parameters add to params tag as add child elements.

structure of params tag
1
2
3
<params>
   <add/>
</params>

Important

The params tag has no attributes.

Tags

add optional multi

Use add tag for add extra parameters as key value pair. for more details see Add

Remarks

As mentioned in Source Commands, we can use unknowns-attributes and send more data to data providers like this:

1
2
3
<basis core='dbsource' name='db' run='atclient' source='basiscore' mid='10' lid='1' userid='122504' ownerid='7660' rkey='289979947718473-59625461925771' dmnid='4312'>
   <member name='product-list' type='list' link='/owner_profile.bc' propertyid='8139,8140,87816,87817,87881' order='id desc' perpage='30' pageno='1' />
</basis>

But in some case value is not well-formatted. for example suppose we change above command to send user input to data provider.

1
2
3
<basis core='dbsource' name='db' source='basiscore' user-input='[##cms.form.code##]' >
   <member name='product-list'  />
</basis>

Now if code field of form is:

hi man

Every things is ok, because after data injection, command is:

1
2
3
<basis core='dbsource' name='db' source='basiscore' user-input='hi man' >
   <member name='product-list'  />
</basis>

But if user enter some things like this:

amir's father say: "hi man"

Now after inject data, command is:

1
2
3
<basis core='dbsource' name='db' source='basiscore' user-input='amir's father say: "hi man"' >
   <member name='product-list'  />
</basis>

And this xml is not well-formatted and my be case error in underlying data provider. In this case, we use params tag. So let change command for using param tag:

1
2
3
4
5
6
<basis core='dbsource' name='db' source='basiscore' >
   <params>
      <add name='user-input' value='[##cms.form.code##]'>
   </params>
   <member name='product-list'  />
</basis>

params tag send to data providers in seperated way and so, no error happen in parse command xml.

Related Topics