This content has been marked as final.
Show 4 replies
-
1. Re: Is passing a object through el to JavaScript possible?
igx89 Oct 19, 2007 5:26 PM (in response to samdoyle)One solution would be to have something like the following in your HEAD section:
<script> var status = #{status}; </script>
and just use that var in your script.
Another possible (much more elaborate) method would be to use a4j:jsFunction -
2. Re: Is passing a object through el to JavaScript possible?
samdoyle Oct 19, 2007 6:13 PM (in response to samdoyle)Thanks for the response, I'll take a look at that the jsFunction you mentioned.
S.D."IGx89" wrote:
One solution would be to have something like the following in your HEAD section:<script> var status = #{status}; </script>
and just use that var in your script.
Another possible (much more elaborate) method would be to use a4j:jsFunction -
3. Re: Is passing a object through el to JavaScript possible?
samdoyle Oct 19, 2007 6:22 PM (in response to samdoyle)Actually the status field is a var used in interation in a rich:dataTable, in addition the JavaScript I want to pass the object to does not use AJAX put manipulates decorations on a already rendered GoogleMap.
S.D. -
4. Re: Is passing a object through el to JavaScript possible?
samdoyle Oct 19, 2007 7:34 PM (in response to samdoyle)Just tested this in my case works great! Good stuff.
<h:selectBooleanCheckbox value="#{staus.isSelected}"> <a4j:support event="onclick" onsubmit="test('#{status.statusName}')" action="#{statusAccessor.edit(status)}"/> </h:selectBooleanCheckbox>