I don't believe @Submit or similar components accept that parameter. (double
check the docs, but I think that only applies to the @Form currently..or
various links)

On 8/20/06, Pedro Viegas <[EMAIL PROTECTED]> wrote:

Hi there.
Been trying to get a Tap4.1 form component to behave like a Tacos:AjaxForm
with no success.
If I understand correctly what I have to do is declare my form with
async="true" and have a submit with the updateComponents="some id", right?
I have the following example witch always does a normal full page submit.

test.html

<html jwcid="@Shell" title="Test page!" renderBaseTag="false"
      browserLogLevel="DEBUG" debugEnabled="true"
debugContainerId="dojoDebug"
      doctype="literal:PUBLIC html &quot;-//W3C//DTD XHTML
1.0Transitional//EN&quot;
&quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-
transitional.dtd&quot;">

<body jwcid="@Body">
    <span jwcid="@Insert" value="ognl:new java.util.Date()"
listener="formSubmit"/>
    <form jwcid="[EMAIL PROTECTED]" clientValidationEnabled="true" async="true">
               Project name: <input jwcid="[EMAIL PROTECTED]"
value="ognl:name"
validators="validators:required"/> <br/>
               Project description: <input jwcid="[EMAIL PROTECTED]"
value="ognl:description" />
        <input jwcid="@Submit" updateComponents="results"/>
    </form>
    <div id="results">
        Name: <span jwcid="@Insert" value="ognl:name" /> <br/>
        Description: <span jwcid="@Insert" value="ognl:description" />
    </div>
    <div id="dojoDebug" style="background-color: #DDD;">
       Debug goes here!
    </div>
</body>
</html>

test.page

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE page-specification PUBLIC
  "-//Apache Software Foundation//Tapestry Specification 4.0//EN"
  "http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd";>

<page-specification class="com.teamware.delegateit.view.pages.Test">
</page-specification>

test.java

public abstract class Test extends BasePageImplementation {

    @InitialValue("literal:delegateIt")
    public abstract String getName();
    @InitialValue("literal:A project management suite!")
    public abstract String getDescription();

    public void formSubmit(IRequestCycle cycle) {
        cycle.getResponseBuilder().updateComponent("results");
    }
}


The listener code with the ResponseBuilder.updateComponent is only a test
since is was not functioning. I think it should not even be necessary.
I'm using the 4.1.1SNAPSHOOT 20060815.
Anybody knows what's wrong?

Regards,


--
Pedro Viegas




--
Jesse Kuhnert
Tapestry/Dojo/(and a dash of TestNG), team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind.

Reply via email to