Jesse, I've enable debug but it is only working when something bad happens. The last system I've developed (the chat application) I was using ajax, but bare, on the hand dealing with all dom elements. Is it possible to do so? I guess that's what I was asking in another thread, about having other functions called after the response from the server.
I'll keep looking for more tracing on this :) Thanks again folks Regards On 9/12/06, Denis Souza <[EMAIL PROTECTED]> wrote:
I guess you can always refresh the entire table. I do it in one of my pages and it works pretty well. The downside is that on a really large table it would defeat part of the purpose of using ajax in the first place since it wouldn't be so efficient. -----Original Message----- From: Jesse Kuhnert [mailto:[EMAIL PROTECTED] Sent: terça-feira, 12 de setembro de 2006 13:39 To: Tapestry users Subject: Re: Asynchronous form submission Does the server return valid html in your areas though? FireBug or tapestry browser debug (via Shell) should be able to show you this. Either way I don't think you can add tr elements like this in IE anyways..You'd have to do it through the dom interface. On 9/12/06, Vinicius Carvalho <[EMAIL PROTECTED]> wrote: > > Hum, thanks Denis, that almos did the trick :) > > I guess the updateComponent does not work the way I expected, I was > misunderstanding it... > > Here's what's happening using Denis' solution: > Let's say the list was empty, so no rows are displayed on the table > ok. So the user add a row. Since the @Any is surrounding the <tr @For> > element, it writes the <td> elements outside the tr, messing the whole > document format. So let's say the user leaves the page and comes back. > This time, when the for renders, it displays the values (ok expected > :) ) but a side effect comes when the user add another value, the > whole list is displayed on top of the previous. > I guess the whole problem I'm having is that I'm not being able to > refresh the for inner elements. > I'll keep trying different stuff here and let you know. > > Thanks for all the support > > On 9/12/06, Jesse Kuhnert <[EMAIL PROTECTED]> wrote: > > Ahh..Good call..You can also give For the "element" parameter to have it > > render itself as an html dom node. > > > > On 9/12/06, Denis Souza <[EMAIL PROTECTED]> wrote: > > > > > > I think the problem is the way that the "For" component renders. > You're > > > trying to update a component named "userList" where: > > > > > > <span jwcid="[EMAIL PROTECTED]" source="ognl:users" > value="ognl:userDetail"> > > > <tr> > > > ... > > > </tr> > > > </span> > > > > > > My guess is the for component is rendering it's body but not it's own > tag. > > > Usually the component's name is placed on the id property on the > > > component's > > > tag. When the ajax/js logic runs it looks for a tag which > id="userList". > > > In > > > this case it probably can't find "userList" because it's not there, > the > > > For > > > component didn't render it. > > > Try using wrapping another component around it and naming it > "userList". > > > I guess something like this would work: > > > > > > <span jwcid="[EMAIL PROTECTED]"> > > > <tr jwcid="@For" source="ognl:users" value="ognl:userDetail" > > > element="tr"> > > > ... > > > </tr> > > > </span> > > > > > > -----Original Message----- > > > From: Vinicius Carvalho [mailto:[EMAIL PROTECTED] > > > Sent: terça-feira, 12 de setembro de 2006 11:42 > > > To: Tapestry users > > > Subject: Re: Asynchronous form submission > > > > > > Hum, thanks but nope. Didn't work either. I can't get the @For to get > > > updated. When I nested it inside an @Any, it almost work :). I mean > > > that because it only the last value inserted in the list is returned. > > > Even with the list being persisted to the session. > > > > > > Anyone done this before? > > > > > > > > > Regards > > > > > > On 9/12/06, Chaitanya Jeerage <[EMAIL PROTECTED]> wrote: > > > > not sure if the same applies to 4.1, but using "action" instead of > > > > "listener" in your form submit should solve the problem of list not > > > > being populated > > > > > > > > action="listener:formSubmit" > > > > > > > > instead of > > > > > > > > listener="listener:formSubmit" > > > > > > > > -Chaitanya > > > > > > > > On 9/12/06, Vinicius Carvalho <[EMAIL PROTECTED]> wrote: > > > > > Well the synchronous submission was fixed after I updated my > version > > > :P > > > But > > > > > I still get no updates on my list, event setting it as a > persistent > > > > > property. I'm adding values, and they are not being updated. As it > is > > > a > > > > > persistent property I was hoping that re-loading the page would > set it > > > > > values, but they come blank again. > > > > > > > > > > Any hint? > > > > > > > > > > Regards > > > > > > > > > > On 9/11/06, Vinicius Carvalho <[EMAIL PROTECTED]> wrote: > > > > > > > > > > > > Hi there! I'm trying to get two things to work with Tapestryt > 4.1and > > > > > > Ajax support: > > > > > > > > > > > > 1st a master detail form > > > > > > 2nd a auto populated form from server (I'll explain it better) > > > > > > > > > > > > > > > > > > The first one is pretty easy, but its reloading the entire page, > > > I've > > > > > > checked the list and saw some discussions about it, I tried but > it > > > > > > seems not to be working: > > > > > > > > > > > > <html jwcid="@Shell" debugEnabled="true" > > > debugContainerId="dojoDebug" > > > > > > title="AjaxForm" disableCaching="true"> > > > > > > <body jwcid="@Body" > > > > > > > <form jwcid="[EMAIL PROTECTED]" async="true" > > > > > > updateComponents="ognl:{'userList'}"> > > > > > > <table> > > > > > > <tr> > > > > > > <td>Name:</td> > > > > > > <td><input type="text" > > > jwcid=" > > > > > > [EMAIL PROTECTED]" > > > > > > value="ognl:user.name"/></td> > > > > > > </tr> > > > > > > <tr> > > > > > > <td>Email:</td> > > > > > > <td><input type="text" > > > jwcid=" > > > > > > [EMAIL PROTECTED]" > > > > > > value="ognl:user.email"/></td> > > > > > > </tr> > > > > > > <tr> > > > > > > <td>Age:</td> > > > > > > <td><input type="text" > > > jwcid=" > > > > > > [EMAIL PROTECTED]" > > > > > > value="ognl:user.age > > > > > > "/></td> > > > </tr> > > > > > > <tr> > > > > > > <td colspan="2"><span > > > jwcid=" > > > > > > [EMAIL PROTECTED]" > > > > > > listener="listener:formSubmit"/></td> > > > > > > </tr> > > > > > > </table> > > > > > > </form> > > > > > > <table border=1> > > > > > > <tr> > > > > > > <td > > > > > > style="background-color:aqua">Name</td> > > > > > > <td > > > > > > style="background-color:aqua">Email</td> > > > > > > <td > > > style="background-color:aqua">Age</td> > > > > > > </tr> > > > > > > <span jwcid="[EMAIL PROTECTED]" > > > source="ognl:users" > > > > > > value="ognl:userDetail"> > > > > > > <tr> > > > > > > <td > > > > > > style="background-color:aqua"><span jwcid="@Insert" > > > > > > value="ognl:userDetail.name"/></td> > > > > > > <td > > > > > > style="background-color:aqua"><span jwcid="@Insert" > > > > > > value="ognl:userDetail.email"/></td> > > > > > > <td > > > > > > style="background-color:aqua"><span jwcid="@Insert" > > > > > > value="ognl:userDetail.age"/></td> > > > > > > </tr> > > > > > > </span> > > > > > > </table> > > > > > > </body> > > > > > > </html> > > > > > > > > > > > > public abstract class Home extends BasePage{ > > > > > > @InitialValue("new java.util.ArrayList()") > > > > > > public abstract List<User> getUsers(); > > > > > > @InitialValue("new com.mgjug.tapestry.model.User()") > > > > > > public abstract User getUser(); > > > > > > @InitialValue("new com.mgjug.tapestry.model.User()") > > > > > > public abstract User getUserDetail(); > > > > > > > > > > > > public void formSubmit(IRequestCycle cycle){ > > > > > > ResponseBuilder builder = > cycle.getResponseBuilder > > > (); > > > > > > getUsers().add(getUser()); > > > > > > } > > > > > > > > > > > > } > > > > > > > > > > > > I'm guessing the problem is withing the submit button that will > > > submit > > > > > > the form, bypassing any javascript. > > > > > > > > > > > > Another question is about the state of my list. Do i need to use > a > > > > > > persist model for that? I'm worried about the amount of stuff > that > > > > > > will be set on the session, or if not, the number of fetches on > the > > > DB > > > > > > will be needed ex: > > > > > > setUsers(dao.getOldValues()) > > > > > > getUsers.add(getUser()); > > > > > > > > > > > > know what I mean? > > > > > > > > > > > > 2nd is pretty much like this one, but I need a form that will > have > > > > > > almost all the fields set to read only. The user enters the id, > and > > > > > > clicks on the TAB button, it will fetch the values from the > server > > > and > > > > > > populate it and setting all the fields back to editable form. > > > > > > > > > > > > I guess my question here is: how do I interact with local > javascript > > > > > > using @EventListener? > > > > > > > > > > > > I'm creating examples with those to use at my company, in a > Tapestry > > > > > > 4.1 presentation, as soon as I get it done, would be a pleasure > to > > > > > > share with anyone interested. > > > > > > > > > > > > Regards > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > -- > > Jesse Kuhnert > > Tapestry/Dojo/(and a dash of TestNG), team member/developer > > > > Open source based consulting work centered around > > dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Jesse Kuhnert Tapestry/Dojo/(and a dash of TestNG), team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]