05-14-2013 08:24 AM
Hi,
On Nuxeo 5.6, using Studio, about forms in accept/reject tasks : I would like through the workflow designer to make a field required, but only for the "accept" button and not for the "reject" one.
I tried something by setting the required field to false and by using conditions on transitions in a way that I "manually" check the value of a given NodeVariable, if it is empty and the user pressed "validate", the user is redirected to the same task. But this lead to a user-confusing experience I'm trying to avoid.
The nice way would be to work at the jsf form validation level so the user is not redirected to an other page. Is it possible through studio? Is it even possible outside studio?
Thanks
05-14-2013 10:52 AM
05-14-2013 10:52 AM
05-14-2013 11:18 AM
Ok, thx. I guess I ll stay with my condition trick for a while
05-16-2013 09:51 AM
Hi,
05-16-2013 10:27 AM
ok, I thought he wanted the same behavior when a person develops a classical form with the accept and cancel buttons, where the person pressing the cancel button does not matter any validation
05-16-2013 11:15 AM
Well, I understand the difference, however, the case suggested by murkein might be enough for me. In my specific case, I don't care about the field value when I reject the form.
05-16-2013 10:12 AM
You can try adding the following expression for the custom property "required" on the widget definition:
#{request.getParameter('button') == 'accept'}
Here 'accept' is the name of the button defined on the workflow.
05-16-2013 11:06 AM
thanks, it works
05-16-2013 11:17 AM
Ok, I will try this one, I thought the "required" custom property was only evaluated when the form is rendered so it's value is precalculated before the form submition. I'll see
05-16-2013 11:59 AM
well it is evaluated once, so that the form can display a "*" marker to show the user that the field is required, but it's evaluated again at submit
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.