the ' characters around contentForm:hiddenCategory are not being escaped, that 
could  be causing a problem.

>onclick="#{'forms[\'contentForm\'].elements['contentForm:hiddenCategory'].value='+cat.id}"




-----Original Message-----
From: Michal Malecki [mailto:[EMAIL PROTECTED]
Sent: Friday, February 18, 2005 3:01 AM
To: myfaces
Subject: extending f:param (EL bug?)


Hello,
yestarday I was trying to make my app as friendly as it could be.
Unfortunatelly i failed ;) Here is what I have
one big dataTable, and nested inside two simple datatables (my renderer,
only to list elements, similarly to foreach). You can click on the elements
listed by nested dataTables (categories and authors), and of course I want
to know what was clicked. Now I add f:param to the link, and in code I found
that component and read its value. In that way I can't use converters. So I
wanted to do the following - add inputHidden outside dataTables, and using
javascript set the right value. It looks ugly and it's not working :((
onclick="#{'forms[\'contentForm\'].elements['contentForm:hiddenCategory'].va
lue='+cat.id}"
Unfortunatelly the ' is not escaped before contentForm. So is it possible to
do that?

And second thought - would it be useful (and possible?) to create x:param,
which instead of setting value in the request, would set that value to the
value binding e.g. <x:param value="#{cat.id}"
beanValue="#{category.currentCategory}"> - after cl8icking on the link
cat.id value would be set to the currentCategory of the category bean.
What do you think?

Michał Małecki


Reply via email to