As I know it is not yet implemented, I guess there are no such parameters (async, updateComponents) for Submit, LinkSubmit, etc. yet.

Regards,
Norbi

Denis Souza wrote:
I'm still having the same problem as Pedro. Submitting a form with ajax only
works when I use @EventListener. Using async=true and updateComponents on
the form component seem to have no effect. The form is always submitted
normally (without ajax). Tried it with the latest snapshot
(4.1.1-20060822.021102-19) and still no go.

-----Original Message-----
From: Jesse Kuhnert [mailto:[EMAIL PROTECTED] Sent: segunda-feira, 21 de agosto de 2006 23:14
To: Tapestry users
Subject: Re: Async form in Tap4.1 does not work...

Fixed.

On 8/21/06, Pedro Viegas <[EMAIL PROTECTED]> wrote:
btw: tried it with the fresh SNAPSHOT of 20060819 and the result is still
the same!

On 8/21/06, Pedro Viegas <[EMAIL PROTECTED]> wrote:
I've been browsing the TimeTracker source to see if I can sort things
out.
I've found the parameter I mentioned... the shell's ajaxEnabled="true".
I
set it up in my test code and no change. Huess it's allready true by
default.
Since http://tapestry.apache.org/tapestry4.1/components/Shell.html does
not mention it I'm only guessing.
By what I gather from the TimeTracker code no ajax like form submission
is
implemented. All ajax calls are made by @EventListener's setups. Is the
form
ajax submit working? Has anybody got it working?

Thanks,


On 8/21/06, Pedro Viegas <[EMAIL PROTECTED]> wrote:
Yep, sorry, I was messing things up a bit.
I corrected several errors I had on the code.
The form submits fine, all works but not asyncronously. It does a
normal
submit and not an ajax one.
The client side form validation is also not working. Only server side.
So async mode is apparently not activating.
Any clues why? I seem to remember something on the mailing list a
while
back of activating ajax globally... maybe on the shell component?
Something
like that?

My testcode is as follows...


.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()"/>
    <form jwcid="[EMAIL PROTECTED]" clientValidationEnabled="ognl:true"
          async="ognl:true" updateComponents="ognl:{'results'}"
listener="listener:formSubmit">

               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"/>

    </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>

 .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) {
        getLogger().debug("Entered formSubmit");
        getLogger().debug("Name: "+getName());
        getLogger().debug("Description: "+getDescription());
    }
}

Thanks,



On 8/20/06, Jesse Kuhnert <[EMAIL PROTECTED]> wrote:
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.


--
Pedro Viegas


--
Pedro Viegas


--
Pedro Viegas






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to