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

Form control should provide setting custom Action Url.

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.5 M1
    • Component/s: core
    • Labels:
      None
    • Environment:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: