Announcement Announcement Module
No announcement yet.
Doubt in submitting spring form values using hyperlink Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Doubt in submitting spring form values using hyperlink

    Hi All,
    I have the requirement where a hyperlink is provided for spring webflow execution with the appropriate event_id parameter.
    I cant figure out how to submit the spring form data associated on clicking of the hyperlink without associating SPRING WEBFLOW event as the EVENT is already triggered on clicking of hyperlink.
    Is it possible just to submit the Spring form data in jsp?
    Tried using javascript manual submission
    document.getElementByName(myFormName).submit for onclick event of hyperlink.but it does not work

    Any help would be useful to me

  • #2
    I would consider looking into FlowExecutionListenerAdapter and creating a listener in your app during each of the Webflow phases the abstract class has. Some of the cases you can consider placing code so duplicate form submissions do not occur is during the requestSubmitted and requestProcessed phase. You may also look into the other phases and code accordingly. Hopefully this helps.


    • #3
      Thanks for the reply.I actually need for one specific case
      and is there any way to accompolish it using javascript only for it?

      and also Form submission event is different from the hyperlink event.
      for only 1 particular case or form.

      Am not able to post the code as I am not sure of my company policies


      • #4
        If you just click a hyperlink, no form binding will be done. In other words, the values in your form fields will not be bound to your form-backing model attribute. I am not sure what exactly you are trying to do, but one way to manually communicate your flow event Id and selected params via a hyperlink would be by doing something like this...

        href="${flowExecutionUrl}&_eventId=${yourEventId}&param1=${yourParam1}...etc.">Your link caption</a>


        • #5
          Thanks for replying.
          I have a SPRING FORM bound by a model attribute.
          A Dropdown is also there on Spring form and the SELECTED value of dropdown
          depends on the value of Model Attribute.

          Now if I use hyperlink the values/DropDown SELECTED do not get submitted to the model attibute.

          Now if the same form is displayed to the User after some Navigation in webflow
          (ie) going though different view states and returning to the ORIGINAL spring Form/View state the value of DropDown SELECTED by the user is not correctly reflected.

          I have right now resolved it by submitting the form instead of using hyperlink.

          Thanks also for you suggestion (ie) taking the model attribute and storing it as param value and then storing the param value as some conversation scope variable...

          This link also points to issue of similiar kind