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.1 and > 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]