<div class=Section1>
<p class=MsoNormal>Since I went along to see what it takes to write the
javascript equivalent of the f<span class=GramE>:<st1:City w:st="on"><st1:place
w:st="on">ajax</st1:place></st1:City> </span><span
style='mso-spacerun:yes'> </span>client behaviour .</p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>Related with original example from Step1</p>
<p class=MsoNormal><span style='mso-spacerun:yes'> </span><h<span
class=GramE>:inputText</span> id="title"
value="#{welcome.title}" label="Title"><o:p></o:p></p>
<p class=MsoNormal style='text-indent:.5in'><f<span class=GramE>:<st1:place
w:st="on"><st1:City w:st="on">ajax</st1:City></st1:place> execute="</span><b
style='mso-bidi-font-weight:normal'>@this name employer</b>" render="<b
style='mso-bidi-font-weight:normal'>:messages</b>"/><o:p></o:p></p>
<p class=MsoNormal></h<span class=GramE>:inputText</span>></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>Becomes</p>
<p class=MsoNormal><h<span class=GramE>:inputText</span>
id="title" value="#{welcome.title}" label="Title"<o:p></o:p></p>
<p class=MsoNormal><span style='mso-spacerun:yes'> </span><span
style='mso-spacerun:yes'> </span><span class=GramE>onchange</span>="jsf2lab1.ajaxRequest(this,
event, '<b style='mso-bidi-font-weight:normal'>@this form1:name form1:employer'</b>,
'<b style='mso-bidi-font-weight:normal'>messages</b>'); return false"/></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal><span class=GramE>I <span
style='mso-spacerun:yes'> </span>noticed</span> some differences : with the f:<st1:City
w:st="on"><st1:place w:st="on">ajax</st1:place></st1:City> <span
style='mso-spacerun:yes'> </span>client behaviour you don’t have to mention the
form name , but tou have to add the extra semicolon for the absolute id. </p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>Also jsf2lab1.ajaxRequest is like this </p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal><script type="text/javascript"><o:p></o:p></p>
<p class=MsoNormal><span style='mso-spacerun:yes'> </span><span
class=GramE>var</span> jsf2lab1 = {};<o:p></o:p></p>
<p class=MsoNormal><span style='mso-spacerun:yes'> </span><o:p></o:p></p>
<p class=MsoNormal><span style='mso-spacerun:yes'>
</span>jsf2lab1.ajaxRequest = function (source, event, execute, render<span
class=GramE>){</span><o:p></o:p></p>
<p class=MsoNormal><span style='mso-spacerun:yes'> </span><span
class=GramE>var</span> options={};<o:p></o:p></p>
<p class=MsoNormal><span style='mso-spacerun:yes'>
</span>options.execute = execute;<o:p></o:p></p>
<p class=MsoNormal><span style='mso-spacerun:yes'>
</span>options.render = render;<o:p></o:p></p>
<p class=MsoNormal><span style='mso-spacerun:yes'> </span><span
class=GramE>jsf.ajax.request(</span>source,event,options);<o:p></o:p></p>
<p class=MsoNormal><span style='mso-spacerun:yes'> </span>};<o:p></o:p></p>
<p class=MsoNormal><span style='mso-spacerun:yes'>
</span></script><br clear=all style='mso-special-character:line-break;
page-break-before:always'>
</p>
</div>
[Message sent by forum member 'movemountfuji' (movemountfuji_at_gmail.com)]
http://forums.java.net/jive/thread.jspa?messageID=381857