tmoes
July 20, 2010, 6:28pm
1
Hello @all ,
How can I set the pickListCriteria-Field with a reference to the same sentence, field formattyp. Hello, how can i realize this?
I tried: $DStxCamt056Row.formattyp , but without success.
<DataSource
schema="appl"
dbName="Mysql"
tableName="tx_camt_056"
ID="DStxCamt056"
dataSourceVersion="1"
recordName="DStxCamt056Row"
serverType="sql">
<fields>
<field hidden="true" required="false" detail="true" title="pkID" primaryKey="true" name="pkid" type="sequence"></field>
<field detail="true" title="Environment" name="environment" type="text"></field>
<field hidden="true" required="false" detail="true" title="CT oder DD" name="formattyp" length="2" type="text"></field>
<field hidden="false" required="false" detail="false" title="Cancellation Reason Code" name="utxinfcxlrsninfrsncd" length="4" type="text"
optionDataSource="reasoncodes" valueField="code" displayField="code">
<pickListCriteria>
<level>T</level>
<service>$DStxCamt056Row.formattyp</service>
</pickListCriteria>
</field>
</fields>
</DataSource>
=== 2010-07-20 19:18:58,168 [l0-4] DEBUG RPCManager - Request #1 (DSRequest) payload: {
criteria:{
camt_056:"TRUE",
type:"Cd",
level:"T",
service:"$DStxCamt056Row.formattyp"
},
Thanks,
tmoes
i used swartGWT EE eval. 20100717
tmoes
July 21, 2010, 10:09pm
2
or as an alternative:
can i use “operationId” within a “optionDataSource” definition in ds.xml?
thanks for your help.
It’s not really clear what you’re asking, but here is an example of adding required criteria to a query.
Another way is to add <criteria fieldName=“fieldName ” value=“Velocity Expression ”/> to your <operationBinding>
tmoes
July 21, 2010, 10:30pm
4
I try to explain it otherwise.
I want to use dynamic data as “pickListCriteria” but apparently that only works with constants (e.g. <level>T</level>) . I want to fill “service” with the contents of another field (e.g. formattyp from this row) and NOT with a constant.
I tried (<service>$DStxCamt056Row.formattyp</service>) without success.
<field hidden="false" required="false" detail="false" title="Cancellation Reason Code" name="utxinfcxlrsninfrsncd" length="4" type="text"
optionDataSource="reasoncodes" valueField="code" displayField="code">
<pickListCriteria>
<level>T</level>
<service>$DStxCamt056Row.formattyp</service>
</pickListCriteria>
</field>
thanks
p.s.: It should be define in ds.xml and not in java.
pickListCriteria is not settable in .ds.xml.
See previous post for two ways to dynamically affect criteria based on .ds.xml.
See the DataBound Dependent Selects examples (both grid and form) for dynamically providing criteria client-side.
tmoes
July 21, 2010, 10:50pm
6
Now I’m totally confused. In the thread
http://forums.smartclient.com/showthread.php?t=11497&highlight=picklistcriteria
you had written it, it works generally.
It can be used, as a shortcut which is basically something of a hack, for static values only. It does not make sense for your use case. Look at the approaches we have pointed out here instead.
tmoes
July 21, 2010, 10:59pm
8
ok, thanks for the clarification.
cheers