• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem disabling validation with Javascript in JSF

 
Juan Porras Antonio
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi forum.
I have a problem with jsf validation.
I need to disable components, this components has JSF validation and I disabled those using javascript. When I do submit, disable components do validation, still I disabled them!.

However, when I disabled component using 'disabled' tag (without javascript), all works fine.
What's wrong?.



 
Tim Holloway
Saloon Keeper
Pie
Posts: 18098
50
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you may need a little translation help there. The question did not entirely make sense.

However, I think you're having problems because of the differences between JSF disable and JavaScript disable.

JSF disable works on the JSF component. JavaScript cannot directly access the JSF component. It can only access the HTML that got generated by the JSF component, since JSF doesn't get sent to the browser, only the HTML that the JSF causes to be created.

One of the biggest problems I had in this regard was that I couldn't use JavaScript to enable a component that had been disabled using a JSF disabled= attribute. That's because the JSF HTML generator didn't generate the HTML that the JavaScript wanted to notify, since the control was disabled by JSF.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic