|
View:
New views
9 Messages
—
Rating Filter:
Alert me
|
|
|
|
|||||||||||
|
|
Re: [Woodstock] customised validator messageHello Robert,
Have you tried it without the AJAX to see what the results would look like? I would try to subscribe to the <domNode>.event.validation.endTopic to capture any results any display them in a JavaScript alert to see what you get. If you are satisfied with the response, set the props on the Woodstock alert. John On Tue, Dec 2, 2008 at 8:42 PM, <robert.hook@...> wrote: I have looked at the notes by Dmitry Kushner (http://blogs.sun.com/dmitry/entry/few_details_of_dynamic_functionality) and got my -- John Yeary -- http://javaevangelist.blogspot.com "Far better it is to dare might things, to win glorious triumphs, even though checkered by failure, than to take rank with those poor spirits who neither enjoy much nor suffer much, because they live in the grey twilight that knows not victory nor defeat." -- Theodore Roosevelt |
|||||||||||
|
|
Re: [Woodstock] customised validator messageUseful staff about validation here:
http://www.netbeans.org/kb/docs/web/convert-validate.html See "Doing More: Customizing a Standard Validator Message" section... Hope this will help ;-) Regards Tony robert.hook@... wrote: > I have looked at the notes by Dmitry Kushner (http://blogs.sun.com/dmitry/entry/few_details_of_dynamic_functionality) and got my > page correctly invoking the validator on a text field on change of that text field, via Ajax. The trouble I now face is that the > validator is a simple Woodstock LongRangeValidator, and I cannot find any way to override or customise the error message it > produces. Particularly, in my JSP I have: > > <webuijsf:textField binding="#{AddDatasource.textField5}" columns="4" id="textField5" maxLength="8" > autoValidate="true" > notify="form1:alert1" > required="true" > style="position: absolute; left: 264px; top: 192px" > text="#{SessionBean1.currentDataSource.port}" > toolTip="#{resources['tooltip.datasources.port']}" > validatorExpression="#{AddDatasource.longRangeValidator1.validate}"/> > > <webuijsf:alert id="alert1" visible="false" > summary="#{resources['tooltip.datasources.port.brief']}" > detail="#{resources['tooltip.datasources.port']}" > style="height: 118px; left: 672px; top: 168px; position: absolute; width: 238px"/> > > however the specified summary and detail are ignored and not displayed, instead the spectacularly unfriendly message > "form1:textField5: Validation Error: Specified attribute is not between the expected values of 1,024 and 65,535." is displayed twice. > > Dmitry's notes suggest that it is possible to display customised messages - has anyone done this, and can point to examples? Is it a > case that the only way to do it is to build your own validator, rather than using the provided LongRangeValidator? --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|||||||||||
|
|
Re: [Woodstock] customised validator messageHi Tony, I also have troubles with this issue. I use a text field with a Double Range Validator. The customized validators work for the "REQUIRED" and the "NOT_IN_RANGE" validation check, but not for the TYPE check..if I prompt same letters into the text field the original validator messages from woodstock. Any ideas? Thanks, Daniel
Useful staff about validation here: http://www.netbeans.org/kb/docs/web/convert-validate.html See "Doing More: Customizing a Standard Validator Message" section... Hope this will help ;-) Regards Tony robert.hook@... wrote: > I have looked at the notes by Dmitry Kushner (http://blogs.sun.com/dmitry/entry/few_details_of_dynamic_functionality) and got my > page correctly invoking the validator on a text field on change of that text field, via Ajax. The trouble I now face is that the > validator is a simple Woodstock LongRangeValidator, and I cannot find any way to override or customise the error message it > produces. Particularly, in my JSP I have: > > <webuijsf:textField binding="#{AddDatasource.textField5}" columns="4" id="textField5" maxLength="8" > autoValidate="true" > notify="form1:alert1" > required="true" > style="position: absolute; left: 264px; top: 192px" > text="#{SessionBean1.currentDataSource.port}" > toolTip="#{resources['tooltip.datasources.port']}" > validatorExpression="#{AddDatasource.longRangeValidator1.validate}"/> > > <webuijsf:alert id="alert1" visible="false" > summary="#{resources['tooltip.datasources.port.brief']}" > detail="#{resources['tooltip.datasources.port']}" > style="height: 118px; left: 672px; top: 168px; position: absolute; width: 238px"/> > > however the specified summary and detail are ignored and not displayed, instead the spectacularly unfriendly message > "form1:textField5: Validation Error: Specified attribute is not between the expected values of 1,024 and 65,535." is displayed twice. > > Dmitry's notes suggest that it is possible to display customised messages - has anyone done this, and can point to examples? Is it a > case that the only way to do it is to build your own validator, rather than using the provided LongRangeValidator? --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|||||||||||
|
|
Re: [Woodstock] customised validator messageHi,
I know a "must work" approach, but it's really not nice solution... I hope, there is another way - but I'm a newbie in woodstock. Locate webui-jsf-suntheme.jar in your system. I have it here: /export/home/phobos/netbeans-6.1/visualweb2/modules/ext/ Unzip it and locate a file which contains the message, you want to modify. There is a good chance, that it is in: com/sun/webui/jsf/suntheme4_2-080320/messages/messages.properties But it's easy to grep for the message. Modify the message, zip the file again and replace the original webui-jsf-suntheme.jar. Don't forget to backup the original webui-jsf-suntheme.jar. As I wrote - I believe, that there is a nicer solution... Regards Tony daniel.jank@... wrote: > > Hi Tony, > > I also have troubles with this issue. I use a text field with a Double > Range Validator. > The customized validators work for the "REQUIRED" and the "NOT_IN_RANGE" > validation check, but not for the TYPE check..if I prompt same letters > into the text field the original > validator messages from woodstock. > > Any ideas? > > Thanks, Daniel > > > > *Antonin Karasek <tonda@...>* > > 03.12.2008 08:36 > Please respond to > users@... > > > > To > users@... > cc > > Subject > Re: [Woodstock] customised validator message > > > > > > > > > Useful staff about validation here: > > http://www.netbeans.org/kb/docs/web/convert-validate.html > > See "Doing More: Customizing a Standard Validator Message" section... > > Hope this will help ;-) > > Regards > Tony > > robert.hook@... wrote: > > I have looked at the notes by Dmitry Kushner > (http://blogs.sun.com/dmitry/entry/few_details_of_dynamic_functionality) > and got my > > page correctly invoking the validator on a text field on change of > that text field, via Ajax. The trouble I now face is that the > > validator is a simple Woodstock LongRangeValidator, and I cannot find > any way to override or customise the error message it > > produces. Particularly, in my JSP I have: > > > > <webuijsf:textField binding="#{AddDatasource.textField5}" columns="4" > id="textField5" maxLength="8" > > autoValidate="true" > > notify="form1:alert1" > > required="true" > > style="position: absolute; left: 264px; top: 192px" > > text="#{SessionBean1.currentDataSource.port}" > > toolTip="#{resources['tooltip.datasources.port']}" > > > validatorExpression="#{AddDatasource.longRangeValidator1.validate}"/> > > > > <webuijsf:alert id="alert1" visible="false" > > summary="#{resources['tooltip.datasources.port.brief']}" > > detail="#{resources['tooltip.datasources.port']}" > > style="height: 118px; left: 672px; top: 168px; position: > absolute; width: 238px"/> > > > > however the specified summary and detail are ignored and not > displayed, instead the spectacularly unfriendly message > > "form1:textField5: Validation Error: Specified attribute is not > between the expected values of 1,024 and 65,535." is displayed twice. > > > > Dmitry's notes suggest that it is possible to display customised > messages - has anyone done this, and can point to examples? Is it a > > case that the only way to do it is to build your own validator, > rather than using the provided LongRangeValidator? > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@... > For additional commands, e-mail: users-help@... > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|||||||||||
|
|
common Task custom IconHi, is there a possibility to set custom icons for objects (in my case a common task)?... When I submit the relative path as a string for the .setIcon() procedure nothing happens... The problem is I need an icon and the text nearby... so the solution with .setImageUrl() is not suitable for me. Thanks! Regards Daniel |
|||||||||||
|
|
|
|||||||||||
|
|
Re: [Woodstock] customised validator messageHello Robert,
Very cool! Thanks for posting your code for everyone. It is complete and looks well done. I like the fact that you included an example of how to use it too. John
On Thu, Dec 4, 2008 at 6:11 PM, <robert.hook@...> wrote: Thanks for the input on this folks, I stepped back and had a think about it and came up with a solution that works for me based on -- John Yeary -- http://javaevangelist.blogspot.com "Far better it is to dare might things, to win glorious triumphs, even though checkered by failure, than to take rank with those poor spirits who neither enjoy much nor suffer much, because they live in the grey twilight that knows not victory nor defeat." -- Theodore Roosevelt |
|||||||||||
|
|
|
| Free embeddable forum powered by Nabble | Forum Help |