You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Heath Borders-Wing (JIRA)" <in...@incubator.apache.org> on 2005/02/23 23:52:53 UTC
[jira] Created: (MYFACES-111) Exposed/refactored renderClearFormOnClick for subclass chaining in HtmlButtonRendererBase
Exposed/refactored renderClearFormOnClick for subclass chaining in HtmlButtonRendererBase
-----------------------------------------------------------------------------------------
Key: MYFACES-111
URL: http://issues.apache.org/jira/browse/MYFACES-111
Project: MyFaces
Type: Improvement
Versions: 1.0.8 beta
Environment: WSAD 5.1.2, IE6
Reporter: Heath Borders-Wing
Priority: Minor
The current HtmlButtonRendererBase does not allow for easy additions to the rendered onclick attribute. This refactoring makes this possible.
Now, the renderClearFormOnClick() is defined as:
protected StringBuffer buildOnClick(UIComponent uiComponent, FacesContext facesContext, ResponseWriter writer);
This way, subclasses may call the superclass implementation and add any additional javascript before onclick is rendered.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
[jira] Commented: (MYFACES-111) Exposed/refactored renderClearFormOnClick for subclass chaining in HtmlButtonRendererBase
Posted by "Heath Borders-Wing (JIRA)" <in...@incubator.apache.org>.
[ http://issues.apache.org/jira/browse/MYFACES-111?page=comments#action_60055 ]
Heath Borders-Wing commented on MYFACES-111:
--------------------------------------------
You are correct, both of those are exposed. However, if someone wants to build a custom CommandButton and wants it to extend the 'ext' HtmlCommandButton to have some javascript automatically embedded in the 'onclick' attribute after whatever is passed in the jsp, this facilitates it.
For example, right now, HtmlCommandButton and HtmlCommandLink are rendered with javascript to properly setup which ActionEvent should be fired. HtmlCommandButton clears the HtmlForm's hiddenCommandLinkField, so that only the HtmlCommandButton's action is fired (by the browser putting the clientId on the request), and the HtmlCommandLink uses javascript to add its clientId to the HtmlForm's hiddenCommandLinkField.
This javascript is appeneded to whatever the user provides and both of those are rendered to the HTML onclick attribute.
If I want additional javascript to be appended/prepended, this refactoring allows me to.
If you're curious, I was to write out some client-side code that ignores user-clicks after a commandButton or commandLink has been clicked.
This could be userful for other things though, maybe you want to update the statusbar to saying loading... after a commandButton has been clicked. Now, you can just update the StringBuffer that commandButton generates, rather than having to rewrite the whole renderer.
> Exposed/refactored renderClearFormOnClick for subclass chaining in HtmlButtonRendererBase
> -----------------------------------------------------------------------------------------
>
> Key: MYFACES-111
> URL: http://issues.apache.org/jira/browse/MYFACES-111
> Project: MyFaces
> Type: Improvement
> Versions: 1.0.8 beta
> Environment: WSAD 5.1.2, IE6
> Reporter: Heath Borders-Wing
> Priority: Minor
> Attachments: HtmlButtonRendererBase.java, HtmlButtonRendererBaseDiff.java
>
> The current HtmlButtonRendererBase does not allow for easy additions to the rendered onclick attribute. This refactoring makes this possible.
> Now, the renderClearFormOnClick() is defined as:
> protected StringBuffer buildOnClick(UIComponent uiComponent, FacesContext facesContext, ResponseWriter writer);
> This way, subclasses may call the superclass implementation and add any additional javascript before onclick is rendered.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
[jira] Commented: (MYFACES-111) Exposed/refactored renderClearFormOnClick for subclass chaining in HtmlButtonRendererBase
Posted by "sean schofield (JIRA)" <in...@incubator.apache.org>.
[ http://issues.apache.org/jira/browse/MYFACES-111?page=comments#action_60052 ]
sean schofield commented on MYFACES-111:
----------------------------------------
Doesn't the "ext" version of commandButton already allow you to add your own onclick javascript through the tag attribute? I know that commandLink does this. What extra functionality will this provide?
> Exposed/refactored renderClearFormOnClick for subclass chaining in HtmlButtonRendererBase
> -----------------------------------------------------------------------------------------
>
> Key: MYFACES-111
> URL: http://issues.apache.org/jira/browse/MYFACES-111
> Project: MyFaces
> Type: Improvement
> Versions: 1.0.8 beta
> Environment: WSAD 5.1.2, IE6
> Reporter: Heath Borders-Wing
> Priority: Minor
> Attachments: HtmlButtonRendererBase.java, HtmlButtonRendererBaseDiff.java
>
> The current HtmlButtonRendererBase does not allow for easy additions to the rendered onclick attribute. This refactoring makes this possible.
> Now, the renderClearFormOnClick() is defined as:
> protected StringBuffer buildOnClick(UIComponent uiComponent, FacesContext facesContext, ResponseWriter writer);
> This way, subclasses may call the superclass implementation and add any additional javascript before onclick is rendered.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
[jira] Updated: (MYFACES-111) Exposed/refactored renderClearFormOnClick for subclass chaining in HtmlButtonRendererBase
Posted by "Heath Borders-Wing (JIRA)" <in...@incubator.apache.org>.
[ http://issues.apache.org/jira/browse/MYFACES-111?page=history ]
Heath Borders-Wing updated MYFACES-111:
---------------------------------------
Attachment: HtmlButtonRendererBaseDiff.java
These are the code changes to the java file.
> Exposed/refactored renderClearFormOnClick for subclass chaining in HtmlButtonRendererBase
> -----------------------------------------------------------------------------------------
>
> Key: MYFACES-111
> URL: http://issues.apache.org/jira/browse/MYFACES-111
> Project: MyFaces
> Type: Improvement
> Versions: 1.0.8 beta
> Environment: WSAD 5.1.2, IE6
> Reporter: Heath Borders-Wing
> Priority: Minor
> Attachments: HtmlButtonRendererBase.java, HtmlButtonRendererBaseDiff.java
>
> The current HtmlButtonRendererBase does not allow for easy additions to the rendered onclick attribute. This refactoring makes this possible.
> Now, the renderClearFormOnClick() is defined as:
> protected StringBuffer buildOnClick(UIComponent uiComponent, FacesContext facesContext, ResponseWriter writer);
> This way, subclasses may call the superclass implementation and add any additional javascript before onclick is rendered.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
[jira] Updated: (MYFACES-111) Exposed/refactored renderClearFormOnClick for subclass chaining in HtmlButtonRendererBase
Posted by "Heath Borders-Wing (JIRA)" <in...@incubator.apache.org>.
[ http://issues.apache.org/jira/browse/MYFACES-111?page=history ]
Heath Borders-Wing updated MYFACES-111:
---------------------------------------
Attachment: HtmlButtonRendererBase.java
This is the new file in its entirety.
> Exposed/refactored renderClearFormOnClick for subclass chaining in HtmlButtonRendererBase
> -----------------------------------------------------------------------------------------
>
> Key: MYFACES-111
> URL: http://issues.apache.org/jira/browse/MYFACES-111
> Project: MyFaces
> Type: Improvement
> Versions: 1.0.8 beta
> Environment: WSAD 5.1.2, IE6
> Reporter: Heath Borders-Wing
> Priority: Minor
> Attachments: HtmlButtonRendererBase.java, HtmlButtonRendererBaseDiff.java
>
> The current HtmlButtonRendererBase does not allow for easy additions to the rendered onclick attribute. This refactoring makes this possible.
> Now, the renderClearFormOnClick() is defined as:
> protected StringBuffer buildOnClick(UIComponent uiComponent, FacesContext facesContext, ResponseWriter writer);
> This way, subclasses may call the superclass implementation and add any additional javascript before onclick is rendered.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
[jira] Commented: (MYFACES-111) Exposed/refactored renderClearFormOnClick for subclass chaining in HtmlButtonRendererBase
Posted by "sean schofield (JIRA)" <in...@incubator.apache.org>.
[ http://issues.apache.org/jira/browse/MYFACES-111?page=comments#action_60071 ]
sean schofield commented on MYFACES-111:
----------------------------------------
OK makes sense. +1
> Exposed/refactored renderClearFormOnClick for subclass chaining in HtmlButtonRendererBase
> -----------------------------------------------------------------------------------------
>
> Key: MYFACES-111
> URL: http://issues.apache.org/jira/browse/MYFACES-111
> Project: MyFaces
> Type: Improvement
> Versions: 1.0.8 beta
> Environment: WSAD 5.1.2, IE6
> Reporter: Heath Borders-Wing
> Priority: Minor
> Attachments: HtmlButtonRendererBase.java, HtmlButtonRendererBaseDiff.java
>
> The current HtmlButtonRendererBase does not allow for easy additions to the rendered onclick attribute. This refactoring makes this possible.
> Now, the renderClearFormOnClick() is defined as:
> protected StringBuffer buildOnClick(UIComponent uiComponent, FacesContext facesContext, ResponseWriter writer);
> This way, subclasses may call the superclass implementation and add any additional javascript before onclick is rendered.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira