Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic


greeshma silam
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,

I am writing a template for form elements and using it in my form so that I can directly pass the label name and form field element instead of repeating required field note and other styles that are common to most fields. But as our web application has to be 508 compliant I have to have a 'for' attribute for label and I am stuck to define 'for' value for each label. Please find the code below:

template code:
<ui:composition xmlns:ui="">
<div class="up">
<label class="label">
<span class="required">*</span><ui:insert name="label"/>
<span class="width"><ui:insert /></span>

jsf page
<legend>Enter Credentials</legend>
<ui:decorate template="/templates/fieldProperty.xhtml">
<ui:define name="label">Name:</ui:define>
<h:inputText value="" id="name"/>
<ui:decorate template="/templates/property.xhtml">
<ui:define name="label">Password</ui:define>
<h:inputText value="" id="password"/>
<div class="button-div">
<h:commandButton value="Login" action="welcome" />

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!