[richfaces-issues] [JBoss JIRA] (RF-12116) RF 4.2 : jquery not generated for function
Brian Leathem (JIRA)
jira-events at lists.jboss.org
Mon Apr 2 14:16:47 EDT 2012
[ https://issues.jboss.org/browse/RF-12116?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Brian Leathem updated RF-12116:
-------------------------------
Description:
This code doesn t generate javascript expected
{code:title=Facelet markup}
<rich:jQuery name="selectNewMsg" query="addClass('curmsg');" />
{code}
{code:title=Generated javascript}
<script type="text/javascript">selectNewMsgee = RichFaces.jQuery.createFunction({"query":"addClass('curmsg');"} );</script>
{code}
{code:tilte=Expected javascript}
<script type="text/javascript">//<![CDATA[
function selectNewMsg(elm, param) {
var selector = "";
try {
selector = eval("");
} catch (e) {}
jQuery(elm || selector).parent().parent().addClass('curmsg');
}
//]]>
</script>
{code}
was:
This code doesn t generate javascript expected
<rich:jQuery name="selectNewMsg" query="addClass('curmsg');" />
Code generated in html page
<script type="text/javascript">selectNewMsgee = RichFaces.jQuery.createFunction({"query":"addClass('curmsg');"} );</script>
Expected something like :
<script type="text/javascript">//<![CDATA[
function selectNewMsg(elm, param) {
var selector = "";
try {
selector = eval("");
} catch (e) {}
jQuery(elm || selector).parent().parent().addClass('curmsg');
}
//]]></script>
Labels: rich:jquery waiting_on_user (was: rich:jquery)
Component/s: component-misc
Forum Reference: https://community.jboss.org/thread/197492?tstart=0 (was: https://community.jboss.org/thread/197492?tstart=0)
You've omitted the selector in your rich:jQuery tag. See:
http://showcase.richfaces.org/richfaces/component-sample.jsf?demo=jquery
http://docs.jboss.org/richfaces/latest_4_X/vdldoc/rich/jQuery.html
the selector defines which elements to which the query applies.
> RF 4.2 : jquery not generated for function
> ------------------------------------------
>
> Key: RF-12116
> URL: https://issues.jboss.org/browse/RF-12116
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: component-misc
> Affects Versions: 4.2.0.Final
> Environment: JBoss 7.1 /RF4.2
> Reporter: Adrien Adrien
> Labels: rich:jquery, waiting_on_user
>
> This code doesn t generate javascript expected
> {code:title=Facelet markup}
> <rich:jQuery name="selectNewMsg" query="addClass('curmsg');" />
> {code}
> {code:title=Generated javascript}
> <script type="text/javascript">selectNewMsgee = RichFaces.jQuery.createFunction({"query":"addClass('curmsg');"} );</script>
> {code}
> {code:tilte=Expected javascript}
> <script type="text/javascript">//<![CDATA[
> function selectNewMsg(elm, param) {
> var selector = "";
> try {
> selector = eval("");
> } catch (e) {}
> jQuery(elm || selector).parent().parent().addClass('curmsg');
> }
> //]]>
> </script>
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the richfaces-issues
mailing list