[richfaces-issues] [JBoss JIRA] Commented: (RF-4429) outputLink and reRender. parameters string generated wrong.
Darryl Smith (JIRA)
jira-events at lists.jboss.org
Tue Feb 24 08:36:44 EST 2009
[ https://jira.jboss.org/jira/browse/RF-4429?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12453962#action_12453962 ]
Darryl Smith commented on RF-4429:
----------------------------------
Matt,
I actually came up with a similar workaround using only javascript / jQuery, also it handles the %2338
template.xhtml (in head)
-----------------------------------
function get_func_body(func) {
var str_func = func + '';
var braceOpen = str_func.indexOf('{') + 1;
var braceClose = str_func.lastIndexOf('}');
return str_func.substring(braceOpen, braceClose);
}
function fixAjaxLoadLinksForWebkit(){
if(!jQuery.browser.safari){
return;
}
jQuery("a[href]").each(function () {
this.href = this.href.replace(/#38;/g,'').replace(/%2338;/g,'');
});
jQuery(":button[onclick]").each(function (){
var newFn = get_func_body(this.onclick).replace(/#38;/g,'').replace(/%2338;/g,'');
this.onclick = new Function(newFn);
});
}
template.xhtml (in body)
-----------------------------------
<a4j:outputPanel ajaxRendered="true">
<script type="text/javascript">
jQuery(document).ready(function () {
fixAjaxLoadLinksForWebkit();
});
</script>
</a4j:outputPanel>
> outputLink and reRender. parameters string generated wrong.
> -----------------------------------------------------------
>
> Key: RF-4429
> URL: https://jira.jboss.org/jira/browse/RF-4429
> Project: RichFaces
> Issue Type: Bug
> Affects Versions: 3.2.1
> Environment: Safary 3.1.1
> Reporter: Ilya Shaikovsky
> Assignee: Nick Belaevski
> Fix For: Future
>
> Attachments: richfacesLinkBugWorkaround.txt
>
>
> <a4j:form>
> <a4j:commandLink reRender="link" value="reRnder"></a4j:commandLink>
> <h:outputLink value="#" id="link">
> <h:outputText value="link"/>
> <f:param value="a" name="a"/>
> <f:param value="b" name="b"/>
> </h:outputLink>
> </a4j:form>
> 1) click outputLink
> ---In address bar you could see #?a=a&b=b appears
> 2) click reRender link and then outputLink again
> ---now #?a=a&%2338;b=b in address bar
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the richfaces-issues
mailing list