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

        Activity

        Hide
        medgar Malcolm Edgar added a comment -

        Does anyone have any issues with this one, i.e. adding an actionURL
        property to the Form class to support this. I can't see any risks with
        adding this to the 1.4 code base.

        regards Malcolm Edgar

        On Feb 20, 2008 8:41 PM, Erdem Gunay (JIRA) <click-jira@avoka.com> wrote:
        >
        > Form control should provide setting custom Action Url.
        > ------------------------------------------------------
        >
        > Key: CLK-319
        > URL: http://www.avoka.com/jira/browse/CLK-319
        > Project: Click
        > Issue Type: Improvement
        > Components: core
        > Environment: Windows - Tomcat 5.0.28 - Java 5.0 - Click 1.4.-RC3
        > Reporter: Erdem Gunay
        > Assigned To: Malcolm Edgar
        >
        >
        > 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
        >
        > –
        > This message is automatically generated by JIRA.
        > -
        > If you think it was sent incorrectly contact one of the administrators: http://www.avoka.com/jira/secure/Administrators.jspa
        > -
        > For more information on JIRA, see: http://www.atlassian.com/software/jira
        >
        >
        >
        > -------------------------------------------------------------------------
        > This SF.net email is sponsored by: Microsoft
        > Defy all challenges. Microsoft(R) Visual Studio 2008.
        > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
        > _______________________________________________
        > Click-development mailing list
        > Click-development@lists.sourceforge.net
        > https://lists.sourceforge.net/lists/listinfo/click-development
        >

        -------------------------------------------------------------------------
        This SF.net email is sponsored by: Microsoft
        Defy all challenges. Microsoft(R) Visual Studio 2008.
        http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
        _______________________________________________
        Click-development mailing list
        Click-development@lists.sourceforge.net
        https://lists.sourceforge.net/lists/listinfo/click-development

        Show
        medgar Malcolm Edgar added a comment - Does anyone have any issues with this one, i.e. adding an actionURL property to the Form class to support this. I can't see any risks with adding this to the 1.4 code base. regards Malcolm Edgar On Feb 20, 2008 8:41 PM, Erdem Gunay (JIRA) <click-jira@avoka.com> wrote: > > Form control should provide setting custom Action Url. > ------------------------------------------------------ > > Key: CLK-319 > URL: http://www.avoka.com/jira/browse/CLK-319 > Project: Click > Issue Type: Improvement > Components: core > Environment: Windows - Tomcat 5.0.28 - Java 5.0 - Click 1.4.-RC3 > Reporter: Erdem Gunay > Assigned To: Malcolm Edgar > > > 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 > > – > This message is automatically generated by JIRA. > - > If you think it was sent incorrectly contact one of the administrators: http://www.avoka.com/jira/secure/Administrators.jspa > - > For more information on JIRA, see: http://www.atlassian.com/software/jira > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Click-development mailing list > Click-development@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/click-development > ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Click-development mailing list Click-development@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/click-development
        Hide
        amohombe Ahmed Mohombe added a comment -

        > Does anyone have any issues with this one, i.e. adding an actionURL
        > property to the Form class to support this. I can't see any risks with
        > adding this to the 1.4 code base.
        IMHO it should be still not done for 1.4:
        1.4 is nearing final, and the "no" new feature policy should be enforced.

        Ahmed.

        -------------------------------------------------------------------------
        This SF.net email is sponsored by: Microsoft
        Defy all challenges. Microsoft(R) Visual Studio 2008.
        http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
        _______________________________________________
        Click-development mailing list
        Click-development@lists.sourceforge.net
        https://lists.sourceforge.net/lists/listinfo/click-development

        Show
        amohombe Ahmed Mohombe added a comment - > Does anyone have any issues with this one, i.e. adding an actionURL > property to the Form class to support this. I can't see any risks with > adding this to the 1.4 code base. IMHO it should be still not done for 1.4: 1.4 is nearing final, and the "no" new feature policy should be enforced. Ahmed. ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Click-development mailing list Click-development@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/click-development
        Hide
        egunay Erdem Gunay added a comment -

        Hi Ahmed,

        I try to understand your concern, as a developer I also refused such requests sometimes,

        I would take initiative in this case and add this feature because it does not seem to require additional test effort, etc.

        anyways I respect, it's your project, your time to be considered. But would you add this feature to the project in the future releases?

        by the way, I would like to congradulate you guys for this project, because it's really easy to start working with, today is my second day and I am seriously considering to build my project on Click for user interface parts.

        thanks and regards,

        Erdem

        Show
        egunay Erdem Gunay added a comment - Hi Ahmed, I try to understand your concern, as a developer I also refused such requests sometimes, I would take initiative in this case and add this feature because it does not seem to require additional test effort, etc. anyways I respect, it's your project, your time to be considered. But would you add this feature to the project in the future releases? by the way, I would like to congradulate you guys for this project, because it's really easy to start working with, today is my second day and I am seriously considering to build my project on Click for user interface parts. thanks and regards, Erdem
        Hide
        amohombe Ahmed Mohombe added a comment -

        > But would you add this feature to the project in the future releases?
        Of course. In the next release there's no problem to add it.

        IMHO right before a final release, only bugfixes and docs updates should be done - no new features(independen on how small) in the code (AFAIK this is an established practice in most projects)

        Ahmed.

        Show
        amohombe Ahmed Mohombe added a comment - > But would you add this feature to the project in the future releases? Of course. In the next release there's no problem to add it. IMHO right before a final release, only bugfixes and docs updates should be done - no new features(independen on how small) in the code (AFAIK this is an established practice in most projects) Ahmed.
        Hide
        sabob Bob Schellink added a comment -

        Hi Erdem,

        You can just reuse your own custom Form control until this is supported in Click proper. I do this all the time

        kind regards

        bob

        Show
        sabob Bob Schellink added a comment - Hi Erdem, You can just reuse your own custom Form control until this is supported in Click proper. I do this all the time kind regards bob
        Hide
        egunay Erdem Gunay added a comment -

        I will do that,

        thanks & regards,

        ERdem Gunay

        Show
        egunay Erdem Gunay added a comment - I will do that, thanks & regards, ERdem Gunay
        Hide
        dfrizelle David Frizelle added a comment -

        This feature will be great for form based login pages which currently have to be built without using a Form Click control. This is because JEE security requries an action of 'j_security_check'. Maybe make this text a constant as a lot of web applications need to use this string at least once.

        Show
        dfrizelle David Frizelle added a comment - This feature will be great for form based login pages which currently have to be built without using a Form Click control. This is because JEE security requries an action of 'j_security_check'. Maybe make this text a constant as a lot of web applications need to use this string at least once.
        Hide
        rlecheta Ricardo R. Lecheta added a comment -

        Hi ,

        >>This feature will be great for form based login pages which currently have to be built without using a Form Click control
        yes, good use case.

        now that the 1.4 release is out, there is not problem to add this feature right?

        regards,

        Show
        rlecheta Ricardo R. Lecheta added a comment - Hi , >>This feature will be great for form based login pages which currently have to be built without using a Form Click control yes, good use case. now that the 1.4 release is out, there is not problem to add this feature right? regards,
        Hide
        sabob Bob Schellink added a comment -

        Yep it seems good.

        Show
        sabob Bob Schellink added a comment - Yep it seems good.

          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:

              Development