Click Framework  History | Log In     View a printable version of the current page. Get help!  
Issue Details (XML | Word)

Key: CLK-319
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Malcolm Edgar
Reporter: Erdem Gunay
Votes: 1
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Click

Form control should provide setting custom Action Url.

Created: 20/Feb/08 08:39 PM   Updated: 02/Apr/08 10:45 PM
Component/s: core
Affects Version/s: None
Fix Version/s: 1.5 M1

Environment: Windows - Tomcat 5.0.28 - Java 5.0 - Click 1.4.-RC3


 Description  « Hide
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

 All   Comments   Change History      Sort Order:
Malcolm Edgar [20/Feb/08 09:13 PM]
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:8080/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:8080/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

Ahmed Mohombe [20/Feb/08 09:47 PM]
> 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

Erdem Gunay [20/Feb/08 10:38 PM]
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

Ahmed Mohombe [20/Feb/08 10:50 PM]
> 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.

Bob Schellink [21/Feb/08 12:18 AM]
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

Erdem Gunay [21/Feb/08 12:50 AM]
I will do that,

thanks & regards,

ERdem Gunay

David Frizelle [13/Mar/08 05:37 PM]
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.

Ricardo R. Lecheta [18/Mar/08 05:38 AM]
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,


Bob Schellink [18/Mar/08 05:59 AM]
Yep it seems good.