2 Replies Latest reply on Apr 15, 2007 8:20 AM by Tony Herstell

    Form submit using javascript and how to send to a handler?

    Tony Herstell Master


      <h:selectOneRadio id="advertType" required="true"
      value="#{advertisingCampaignController.campaign.advert.type}" onchange="doSubmit()">
       <s:selectItems value="#{advertisingCampaignController.campaign.advert.advertTypes}"
       var="advertType" label="#{messages[advertType.label]}" />
       <s:convertEnum />

      I want to do a form sumbit on the change event to a handler (advertisingCampaignController.handleAdvertChoiceChange) so that I can re-display a page which will contain the updated model...

      This allows me to hide components I don't want displayed

      <s:fragment rendered="#{advertisingCampaignController.campaign.advert.type == advertisingCampaignController.campaign.advert.advertTypes[0]}">

      [0] maps to the first choice from the selectOneRadio as it maps to an enum.

      Anyon know who I can do this?