File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes Refresh jsf validator component on rerender Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Refresh jsf validator component on rerender " Watch "Refresh jsf validator component on rerender " New topic
Author

Refresh jsf validator component on rerender

Steven De Groote
Greenhorn

Joined: Nov 23, 2006
Posts: 16
Hi,

I have an issue with the attributes values of a validator component.
Apparently the validator is created when I first visit a page.

Please see my code below:



The inputText component is rerendered through ajax but apparently, including the value that is displayed.
Unfortunately, the qsetting.minValue and qsetting.maxValue are not refreshed, causing my validator to not work correctly.

Is there a possibility to refresh the validator, to make sure it re-retrieves its attributes or to just create a new instance of the validator?
The validator class itself is currently implementing "Validator, Serializable".
Also, I'm using jsf1.2 with facelets...

Thanks,
Steven

Web developer / SCEA / Owner http://www.f1technical.net
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16061
    
  21

Not all attributes are dynamic. Usually a JSP or JSP tag's documentation will include a column indicating whether dynamic EL expressions are allowable.


Customer surveys are for companies who didn't pay proper attention to begin with.
Steven De Groote
Greenhorn

Joined: Nov 23, 2006
Posts: 16
In facelets they are.

The problem I'm having is that the min and max value setter methods are only called upon page load, not when I perform a reRender or an action function to the same page.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16061
    
  21

Steven De Groote wrote:In facelets they are.

The problem I'm having is that the min and max value setter methods are only called upon page load, not when I perform a reRender or an action function to the same page.


I don't think that Facelets is entitled to override the abilities of components that aren't part of the Facelets tagset. However, Facelets does have an irritating habit of taking things that would be fatal on a non-facelets page and silently ignoring them.

Incidentally, I ran into the same problem you have about a month or 2 back. I don't think I came up with an easy solution.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Refresh jsf validator component on rerender