• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

a4j:support and javascript validation problem

 
Ranch Hand
Posts: 72
Eclipse IDE Firefox Browser Suse
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,



This does not work, i either have to remove the onclick attribute from h:commandLink , to get the a4j:support working, OR i have to remove the a4j:support tag to get the javascript validation running. If i keep both, nothing works..

Please help, Thanks.
 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi janardan

you can place your javascript validation part in a4j:support tag under onsubmit attribute


<h:commandLink action="#{myBean.myMethod}" styleClass="btn">
<f:verbatim><span></span>My Button</f:verbatim>
<a4j:support event="onclick" onsubmit="return validateGenerateCriteria('myElementId);"/>
</h:commandLink>

and use form name while accessing the form elements i.e. form:myElementId

thankyou
 
reply
    Bookmark Topic Watch Topic
  • New Topic