Uploaded image for project: 'Click'
  1. Click
  2. CLK-319

Form control should provide setting custom Action Url.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.5 M1
    • core
    • None
    • Windows - Tomcat 5.0.28 - Java 5.0 - Click 1.4.-RC3

    Description

      Hi,

      I needed to change the action url of a form object but currnetly it's not supported by Form class.

      What i need is something like this
      Form form = new Form();
      form.setAction("some_different_action"); //new method requested.
      .....

      in the Form.java class the getActionURL() method would be modified as follows

      public String getActionURL()

      { HttpServletRequest request = getContext().getRequest(); HttpServletResponse response = getContext().getResponse(); // use action property if specified by the user, otherwise use default request URI String actionStr = action; //action is a new property added to Form class if (action == null) actionStr = request.getRequestURI(); return response.encodeURL(actionStr); }

      regards,

      ERdem Gunay

      Attachments

        Activity

          People

            medgar Malcolm Edgar
            egunay Erdem Gunay
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: