5 Replies Latest reply on Feb 17, 2008 2:36 PM by Pete Muir

    s:decorate question

    Bradley Smith Master

      I've been trying to use s:decorate in a form. Here is the fragment I am using to 'decorate':

      <ui:composition ...>
       <s:div id="#{id}" style="margin-bottom:9px;">
       <label class="topLabel">
       <ui:insert name="label">Field Label</ui:insert>
       <ui:insert name="field">Form Field</ui:insert>
       <s:span styleClass="required" rendered="#{required}">*</s:span>
       <s:message styleClass="invalid"/>

      and in my form, I'm using this with s:decorate like such:

       <a4j:form id="newApplication">
       <s:decorate template="/WEB-INF/view/components/label-on-top-fieldset.xhtml">
       <ui:param name="id" value="nameRow"/>
       <ui:define name="label">Name:</ui:define>
       <ui:define name="field">
       <h:inputText id="name" value="#{appToEdit.name}"
       styleClass="textField" style="font-weight:bold;"
       size="32" required="true"/>

      The problem I am having is that in addition to a submit button, I want to use a cancel button (or link); no matter which technique (button or link) I use, validation is invoked and thus I can never 'cancel' out of my form.

      Is there a way to tell s:decorate to not invoke validate for a JSF request?

      Brad Smith