2 Replies Latest reply on May 28, 2009 7:39 AM by ambrish_kumar

    Restricting modal panel not to update the values

    ambrish_kumar

      Hi Everyone,


      I have a modal panel on which I am submitting username,password,email,phone etc. All these field are required and i have used required attribute.


      Now required messages in RED color are displaying on the modal panel. Now suppose i close the modal panel without submitting the form.


      Next time when i am opening the page then it displays the previous entered values and label of field is marked in RED color.


      Is it possible that only required messages will be displayed in RED color and not the label of that field. In my case both label amd required message are displaying in RED color. What changes are required in edit.xhtml page?.


      Any help would be appreciated.


      Thanks


      Ambrish

        • 1. Re: Restricting modal panel not to update the values
          gonorrhea

          from Seam booking edit.xhtml:


          <div class="entry">
                  <s:label styleClass="label #{invalid?'errors':''}">
                      <ui:insert name="label"/>
                      <s:span styleClass="required" rendered="#{required}">*</s:span>
                  </s:label>
                  <span class="input #{invalid?'errors':''}">
                      <s:validateAll>
                          <ui:insert/>
                      </s:validateAll>
                  </span>
                  <s:message styleClass="error errors"/>
              </div>



          So you would want the following (pay attention to the <s:label> before and after:


          <div class="entry">
                  <s:label>
                      <ui:insert name="label"/>
                      <s:span styleClass="required" rendered="#{required}">*</s:span>
                  </s:label>
                  <span class="input #{invalid?'errors':''}">
                      <s:validateAll>
                          <ui:insert/>
                      </s:validateAll>
                  </span>
                  <s:message styleClass="error errors"/>
              </div>



          I have not tested this but give it a try!

          • 2. Re: Restricting modal panel not to update the values
            ambrish_kumar

            Hi Arbi,


            My problem is solved by using the code for edit.xhtml
            as provided by you.


            Thanks for the reply.


            Ambrish