Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

Server validation for groups

$
0
0
SmartGWT version: SmartClient Version: v9.1p_2014-03-04/PowerEdition Deployment (built 2014-03-04)
Browser: FireFox ESR 24.3.0, with FireBug installed

I am having trouble doing server validations on a form section that depends on some values in another form section. The scenario is the following:

1) I have a layout with two groups, so I have two dynamic forms each with IsGroup set to true. The form values are all managed by a valuesManager
2) The datasource for the valuesManager contains all the fields and some of them use server validators:
Code:


<field name="abc" title="Field1" type="integer" >
<validators>
<validator type="serverCustom">
  <serverObject lookupStyle="spring" bean="abcBean"
methodName="bean Method"/><errorMessage>Some error</errorMessage></validator>
</validators>
</field>

3) When calling save, it triggers server side validator's condition method
Code:

public boolean condition(final Object value, final Validator validator, final String fieldName, final Map record, final DataSource ds, final RPCManager rpc) {...}
The server validator has the values for the current section only, and I couldn't find a way to include or get the values from some other section. Could you please help provide some hints? Thanks.

Viewing all articles
Browse latest Browse all 4756

Trending Articles