You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by ma...@mail.ru on 2007/01/29 19:34:52 UTC
XTile help wanted!!! The simplest example not working.
When listener that specified invoked (I debug it, it's
request comes to server), my javascript function does not
invoke. I do not see alert message. What I'm doing wrong???
I've spent about 2 days but I didn't find the solution for this
problem.
Thanks a lot.
Home.html
<span jwcid="@Shell" title="XTile test">
<span jwcid="@Body">
<span jwcid="@Form">
<span jwcid="@contrib:XTile" listener="listener:handleListRequest"
sendName="sendPrefix" receiveName="receiveList"/>
<span jwcid="textField1@TextField" value="ognl:textFieldProperty1"/>
<span jwcid="@Button" label="AjaxTest" onclick="return sendPrefix(document.getElementsByName('textField1')[0].value);"/>
<script type="text/javascript">
function receiveList(arr) {
alert(arr);
}
</script>
</span>
</span>
</span>
Home.java
public abstract class Home extends BasePage {
abstract public String getTextFieldProperty1();
abstract public void setTextFieldProperty1(String ccc);
public void handleListRequest(IRequestCycle cycle) {
Object[] params = cycle.getListenerParameters();
cycle.setListenerParameters(new Object[]{params[0]});
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: XTile help wanted!!! The simplest example not working.
Posted by Shing Hing Man <ma...@yahoo.com>.
Try removing the 'return' after onlick :
<span jwcid="@Button" label="AjaxTest"
onclick="return
sendPrefix(document.getElementsByName('textField1')[0].value);"/>
Shing
--- makhnist-work@mail.ru wrote:
> When listener that specified invoked (I debug it,
> it's
> request comes to server), my javascript function
> does not
> invoke. I do not see alert message. What I'm doing
> wrong???
> I've spent about 2 days but I didn't find the
> solution for this
> problem.
>
> Thanks a lot.
>
> Home.html
>
> <span jwcid="@Shell" title="XTile test">
> <span jwcid="@Body">
>
> <span jwcid="@Form">
> <span jwcid="@contrib:XTile"
> listener="listener:handleListRequest"
> sendName="sendPrefix"
> receiveName="receiveList"/>
>
> <span jwcid="textField1@TextField"
> value="ognl:textFieldProperty1"/>
>
> <span jwcid="@Button" label="AjaxTest"
> onclick="return
>
sendPrefix(document.getElementsByName('textField1')[0].value);"/>
>
> <script type="text/javascript">
> function receiveList(arr) {
> alert(arr);
> }
> </script>
> </span>
>
> </span>
> </span>
>
> Home.java
>
> public abstract class Home extends BasePage {
> abstract public String getTextFieldProperty1();
> abstract public void
> setTextFieldProperty1(String ccc);
>
> public void handleListRequest(IRequestCycle
> cycle) {
> Object[] params =
> cycle.getListenerParameters();
> cycle.setListenerParameters(new
> Object[]{params[0]});
> }
> }
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail:
> users-help@tapestry.apache.org
>
>
Home page :
http://uk.geocities.com/matmsh/index.html
___________________________________________________________
Copy addresses and emails from any email account to Yahoo! Mail - quick, easy and free. http://uk.docs.yahoo.com/trueswitch2.html
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org