2 Replies Latest reply on Apr 28, 2009 1:35 PM by consapro

    why s:button doesn't work

    consapro

      Hi,


      I've a here a code snipplet which doesn't work - but I dont know why...
      The target is to cancel a action and go back to the index.xhtml view.
      Neither the button inside the form nor the one outside works. But the s:link works?!?!?!
      (And I need a button design)


      <h:form id="location" style="width: 700px;">
              <s:button view="/index.xhtml"  value="cancel1" propagation="end"/>
      </h:form>
      <s:button view="/index.xhtml" value="cancel2" propagation="end" />
      <s:link view="/index.xhtml" value="cancel3" propagation="end" />




      Thanks a lot!

        • 1. Re: why s:button doesn't work
          mcalpay

          Changing the id of the form solves the problem on my machine. I think location id is used somewhere in the javascripts therefore it causes a problem...
          cheers

          • 2. Re: why s:button doesn't work
            consapro

            Wow - thanks for your fast response - and it works.
            But I don't know why.
            This is the only location form and I scanned the html-source...


            But maybe it's a problem with the html location.href and it's an Reserved Word...


            ingo