Feb 14, 2012, 12:00 PM
64 Posts
topic has been resolvedResolved

Equivalent of the f:attribute JSF tag in Xpages

  • Category: Custom JSF code (Eclipse IDE)
  • Platform: Windows
  • Release: 8.5.2
  • Role: Developer
  • Tags: validator,attribute,JSF,Xpages
  • Replies: 3
Hey Guys and Gals!  Happy Valentine's Day...  Be nice your girl or partner or next door neighbour today, I mean it, I can see you, the Love Police will come and get ya!  Hee hee...
Anyway, look it, I am trying to write an email confirmation for one of our Apps, using below URL sample.  I can't seem to find an equivalence to the f:attribute that is standard is JSF, can you help? 
    <f:validator validatorId="confirmPasswordValidator" /> 
<f:attribute name="passwordComponent" value="#{passwordComponent}" />
I did find a xp:dojoAttribute but that did not do ther trick, or perhaps I just don't know how to use it.  Would you please help this Cupid?
Any reference you have will be sufficient.... thanks!  
Feb 15, 2012, 5:11 AM
272 Posts
Re: Equivalent of the f:attribute JSF tag in Xpages
with the f:attribute-Tag you can assign a value to a component. In this case the attribute is used to tell the validator which input field has to be validated.

Hope this helps
Sorry, the code was for validating emails... Don't know why. But please have a look in the page about validators.
Feb 15, 2012, 10:21 AM
64 Posts
Re: Equivalent of the f:attribute JSF tag in Xpages
no apologies necessary, you actually saved me here...  I think what I need is this: 
        if (getComponent("Password").getSubmittedValue() != getComponent("ConfirmPassword").getSubmittedValue()) 
          return false; 
          return true; 
Should help load the Java code through, I suspect I should be okay... Will play around with it and post the finished product.
Good to know of the SSJS option...  Steering away from SSJS embedded Xpages UIs for this project, but it can be of good use for others. 
Thank you kindly:-)