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/02/03 00:35:13 UTC

XTile help wanted!!! The simplest example (never been symler) 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="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