cancel
Showing results for 
Search instead for 
Did you mean: 

Validate my custom properties.

naveenkumar
Champ in-the-making
Champ in-the-making
hi all,
In my application i need to validate a check boxs, i added two meta  properties in my workflow with type as d:boolean, when approver uncheck both the check box and he clicks approve button i need to validate and show an error message.

In few forum it mentioned validation is done by using constraints in *model.xml.. but i need to check for two properties at the same time i need to display my own error message…

Thanks
Naveen
8 REPLIES 8

naveenkumar
Champ in-the-making
Champ in-the-making
Is this possible without changing the java classes?? If its done by changing Java classes,then suggest an idea??

Thanks
Naveen

davidc
Star Contributor
Star Contributor
Cross-property constraints are not supported without changing java code.

naveenkumar
Champ in-the-making
Champ in-the-making
Can you guide me to do this using java classes?? Is there any wiki links related to this??

Thanks
Naveen

naveenkumar
Champ in-the-making
Champ in-the-making
We can do this using Java script.. I Completed and working fine.

Thanks
Naveen

suleyman
Champ in-the-making
Champ in-the-making
Nice… How did you manage to show your own error message? I would like to do this also.

riogrande
Champ in-the-making
Champ in-the-making
I'm interested too, but in thinks I will never have any answer 😕

sethatrothbury
Champ in-the-making
Champ in-the-making
I actually do UI validation through javascript in the workflow-options.jsp file(classpath:/jsp/workflow/start-workflow-wizard/workflow-options.jsp).

All, I did was attach my own validation function to the Next button's onclick(). Then I check the values in the DOM and make sure they are what I want, otherwise I don't let the user go to the next page.

Hope that helps out.

riogrande
Champ in-the-making
Champ in-the-making
I would be interested to see an example of your code if it's possible.
At the other hand, I think this more complicated to do this on a generated button (the one that you define for a transition and not just for the workflow initialisation).