Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Refresh jsf validator component on rerender

 
Steven De Groote
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Tim Holloway
Saloon Keeper
Posts: 18365
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not all attributes are dynamic. Usually a JSP or JSP tag's documentation will include a column indicating whether dynamic EL expressions are allowable.
 
Steven De Groote
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 18365
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic