You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Vinicius Carvalho <ja...@gmail.com> on 2006/09/11 19:26:50 UTC

Asynchronous form submission

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="ajaxForm@Form"  async="true"
updateComponents="ognl:{'userList'}">
			<table>
				<tr>
					<td>Name:</td>
					<td><input type="text" jwcid="name@TextField"
value="ognl:user.name"/></td>
				</tr>
				<tr>
					<td>Email:</td>
					<td><input type="text" jwcid="email@TextField"
value="ognl:user.email"/></td>
				</tr>
				<tr>
					<td>Age:</td>
					<td><input type="text" jwcid="age@TextField"
value="ognl:user.age"/></td>									</tr>
				<tr>
					<td colspan="2"><span jwcid="submit@Submit"
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="userList@For" 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: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


RE: Expired Session message

Posted by Mark Stang <ms...@pingidentity.com>.
In your web.xml:

    <session-config>
         <!-- Default to 30 minute session timeouts -->
         <session-timeout>30</session-timeout>
    </session-config>

You probably want something less...

Mark J. Stang
Senior Engineer/Architect
office: +1 303.468.2900
mobile: +1 303.507.2833
Ping Identity



-----Original Message-----
From: Greg.L.Cormier@servicecanada.gc.ca [mailto:Greg.L.Cormier@servicecanada.gc.ca]
Sent: Thu 9/14/2006 7:00 AM
To: users@tapestry.apache.org
Subject: RE: Expired Session message
 
Sorry Bryan, you're correct - it IS in my BorderEngine.class : (public class BorderEngine extends BaseEngine).

My application has 1 menu item, Login. Once you log-in, it's replaced with your real menu containing a dozen items.

Basically when I time-out my session (anyone know a quicker way to test this then waiting 20 minutes?!), the next menu item I click on, the menu goes back to the single "Login" item, and I get the message "You don't have permission to do that."

This is because the validate() method of the page I suppose. It's checking what permissions are stored in the Visit object, which is nothing when it's expired. So you have no permissions to view any pages.

I've tried checking the methods in BasePage, but I see no way to determine if a session is expired (and skip the error checking). Perhaps this validate is somehow overriding the Engine, although you would think the Engine method is called first?

I've attached my validate() code below.

Thanks,
Greg

////////////////
  // Validates the permission of the page.
  public void validate(IRequestCycle cycle)
  {
    if (requiredPermission != null)
    {
      AdminVisit theVisit = (AdminVisit) getVisit();
      if (!theVisit.hasPermission(requiredPermission))
      {
        IPage permDenied = cycle.getPage("PermissionDenied");
        PropertyUtils.write(permDenied, "permissionRequired", requiredPermission);
        throw new PageRedirectException(permDenied);
      }
    }
    super.validate(cycle);
  }
//////////////////


-----Original Message-----
From: Bryan Lewis [mailto:bryan@maine.rr.com]
Sent: Thursday, September 14, 2006 8:49 AM
To: Tapestry users
Subject: Re: Expired Session message


Hmm, I thought from your previous post that this method was in your
custom Engine class.  The handleStaleSessionException() method in the
Engine is what gets called when the exception occurs.  If this method is
in a page or component it won't be called.

Still, if you named your exception-reporting page "StaleSession", it
should've been invoked by the built-in error reporter even if this new
method wasn't being called.

What do you mean by "doesn't work"?



Greg.L.Cormier@servicecanada.gc.ca wrote:
> Okay, I've taken both suggestions. I've renamed my page to "StaleSession", and altered my code slightly. It still doesn't seem to work.
>
>   protected void handleStaleSessionException(IRequestCycle cycle, StaleSessionException exception) throws IOException
>   {
>     cycle.activate("StaleSession");
>     renderResponse(cycle);
>   }
>
>
> This is in my Border.java file.
>
>
> However, all of my pages subclass an abstract class I've made for BasePage. This overrides the validate() method of the page to check if the user has permissions for that particular page. Could that be messing something up? Should I put something in the validate() method? Is there some sort of getExpired() function?
>
> Thanks,
> Greg
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org



RE: Expired Session message

Posted by Gr...@servicecanada.gc.ca.
I still have been unable to get this to work unfortunately and it's been thrown in the "Low priority" pile :(

-----Original Message-----
From: karthik.nar [mailto:karthik.nar@gmail.com]
Sent: Friday, September 22, 2006 1:35 AM
To: users@tapestry.apache.org
Subject: Re: Expired Session message



Hey Greg,

Just curious - did you eventually solve this?  If so can you paste your
solution?

Thanks, Karthik.
-- 
View this message in context: http://www.nabble.com/Asynchronous-form-submission-tf2253801.html#a6441359
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Expired Session message

Posted by "karthik.nar" <ka...@gmail.com>.
Hey Greg,

Just curious - did you eventually solve this?  If so can you paste your
solution?

Thanks, Karthik.
-- 
View this message in context: http://www.nabble.com/Asynchronous-form-submission-tf2253801.html#a6441359
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Expired Session message

Posted by Bryan Lewis <br...@maine.rr.com>.
Is the Engine method being called first?  Is a StaleSessionException in
fact happening?  I'm not sure you can rely on that exception happening
any time the session has timed out, for all possible sequences of user
actions.

Thoughts...

* You could make your StaleSession page not do the validation, not
derive it from your validating page class, if the problem is that the
StaleSession page is being invoked.  Not sure about that.

* You could check directly whether the session has expired.

    @InjectObject("infrastructure:request")
    public abstract WebRequest getWebRequest();

                WebSession session = getWebRequest().getSession(false);
                if (session == null) {
                    log.debug("-- null session");
                }
                else if (session.isNew()) {
                    log.debug("-- session isNew");
                }

* You could make validate() do something different if the user has *no*
permissions, or define a special permission that a new visit gets
initialized with before login.

* You could add a sessionDestroyed() event listener method that would
get called by your servlet container when the session times out, and set
some sort of ThreadLocal variable that your page could check.



Greg.L.Cormier@servicecanada.gc.ca wrote:
> Sorry Bryan, you're correct - it IS in my BorderEngine.class : (public class BorderEngine extends BaseEngine).
>
> My application has 1 menu item, Login. Once you log-in, it's replaced with your real menu containing a dozen items.
>
> Basically when I time-out my session (anyone know a quicker way to test this then waiting 20 minutes?!), the next menu item I click on, the menu goes back to the single "Login" item, and I get the message "You don't have permission to do that."
>
> This is because the validate() method of the page I suppose. It's checking what permissions are stored in the Visit object, which is nothing when it's expired. So you have no permissions to view any pages.
>
> I've tried checking the methods in BasePage, but I see no way to determine if a session is expired (and skip the error checking). Perhaps this validate is somehow overriding the Engine, although you would think the Engine method is called first?
>
> I've attached my validate() code below.
>
> Thanks,
> Greg
>
> ////////////////
>   // Validates the permission of the page.
>   public void validate(IRequestCycle cycle)
>   {
>     if (requiredPermission != null)
>     {
>       AdminVisit theVisit = (AdminVisit) getVisit();
>       if (!theVisit.hasPermission(requiredPermission))
>       {
>         IPage permDenied = cycle.getPage("PermissionDenied");
>         PropertyUtils.write(permDenied, "permissionRequired", requiredPermission);
>         throw new PageRedirectException(permDenied);
>       }
>     }
>     super.validate(cycle);
>   }
> //////////////////
>
>
> -----Original Message-----
> From: Bryan Lewis [mailto:bryan@maine.rr.com]
> Sent: Thursday, September 14, 2006 8:49 AM
> To: Tapestry users
> Subject: Re: Expired Session message
>
>
> Hmm, I thought from your previous post that this method was in your
> custom Engine class.  The handleStaleSessionException() method in the
> Engine is what gets called when the exception occurs.  If this method is
> in a page or component it won't be called.
>
> Still, if you named your exception-reporting page "StaleSession", it
> should've been invoked by the built-in error reporter even if this new
> method wasn't being called.
>
> What do you mean by "doesn't work"?
>
>
>
> Greg.L.Cormier@servicecanada.gc.ca wrote:
>   
>> Okay, I've taken both suggestions. I've renamed my page to "StaleSession", and altered my code slightly. It still doesn't seem to work.
>>
>>   protected void handleStaleSessionException(IRequestCycle cycle, StaleSessionException exception) throws IOException
>>   {
>>     cycle.activate("StaleSession");
>>     renderResponse(cycle);
>>   }
>>
>>
>> This is in my Border.java file.
>>
>>
>> However, all of my pages subclass an abstract class I've made for BasePage. This overrides the validate() method of the page to check if the user has permissions for that particular page. Could that be messing something up? Should I put something in the validate() method? Is there some sort of getExpired() function?
>>
>> Thanks,
>> Greg
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>   
>>     
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>   


RE: Expired Session message

Posted by Gr...@servicecanada.gc.ca.
Sorry Bryan, you're correct - it IS in my BorderEngine.class : (public class BorderEngine extends BaseEngine).

My application has 1 menu item, Login. Once you log-in, it's replaced with your real menu containing a dozen items.

Basically when I time-out my session (anyone know a quicker way to test this then waiting 20 minutes?!), the next menu item I click on, the menu goes back to the single "Login" item, and I get the message "You don't have permission to do that."

This is because the validate() method of the page I suppose. It's checking what permissions are stored in the Visit object, which is nothing when it's expired. So you have no permissions to view any pages.

I've tried checking the methods in BasePage, but I see no way to determine if a session is expired (and skip the error checking). Perhaps this validate is somehow overriding the Engine, although you would think the Engine method is called first?

I've attached my validate() code below.

Thanks,
Greg

////////////////
  // Validates the permission of the page.
  public void validate(IRequestCycle cycle)
  {
    if (requiredPermission != null)
    {
      AdminVisit theVisit = (AdminVisit) getVisit();
      if (!theVisit.hasPermission(requiredPermission))
      {
        IPage permDenied = cycle.getPage("PermissionDenied");
        PropertyUtils.write(permDenied, "permissionRequired", requiredPermission);
        throw new PageRedirectException(permDenied);
      }
    }
    super.validate(cycle);
  }
//////////////////


-----Original Message-----
From: Bryan Lewis [mailto:bryan@maine.rr.com]
Sent: Thursday, September 14, 2006 8:49 AM
To: Tapestry users
Subject: Re: Expired Session message


Hmm, I thought from your previous post that this method was in your
custom Engine class.  The handleStaleSessionException() method in the
Engine is what gets called when the exception occurs.  If this method is
in a page or component it won't be called.

Still, if you named your exception-reporting page "StaleSession", it
should've been invoked by the built-in error reporter even if this new
method wasn't being called.

What do you mean by "doesn't work"?



Greg.L.Cormier@servicecanada.gc.ca wrote:
> Okay, I've taken both suggestions. I've renamed my page to "StaleSession", and altered my code slightly. It still doesn't seem to work.
>
>   protected void handleStaleSessionException(IRequestCycle cycle, StaleSessionException exception) throws IOException
>   {
>     cycle.activate("StaleSession");
>     renderResponse(cycle);
>   }
>
>
> This is in my Border.java file.
>
>
> However, all of my pages subclass an abstract class I've made for BasePage. This overrides the validate() method of the page to check if the user has permissions for that particular page. Could that be messing something up? Should I put something in the validate() method? Is there some sort of getExpired() function?
>
> Thanks,
> Greg
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Expired Session message

Posted by Bryan Lewis <br...@maine.rr.com>.
Hmm, I thought from your previous post that this method was in your
custom Engine class.  The handleStaleSessionException() method in the
Engine is what gets called when the exception occurs.  If this method is
in a page or component it won't be called.

Still, if you named your exception-reporting page "StaleSession", it
should've been invoked by the built-in error reporter even if this new
method wasn't being called.

What do you mean by "doesn't work"?



Greg.L.Cormier@servicecanada.gc.ca wrote:
> Okay, I've taken both suggestions. I've renamed my page to "StaleSession", and altered my code slightly. It still doesn't seem to work.
>
>   protected void handleStaleSessionException(IRequestCycle cycle, StaleSessionException exception) throws IOException
>   {
>     cycle.activate("StaleSession");
>     renderResponse(cycle);
>   }
>
>
> This is in my Border.java file.
>
>
> However, all of my pages subclass an abstract class I've made for BasePage. This overrides the validate() method of the page to check if the user has permissions for that particular page. Could that be messing something up? Should I put something in the validate() method? Is there some sort of getExpired() function?
>
> Thanks,
> Greg
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


RE: Expired Session message

Posted by Gr...@servicecanada.gc.ca.
Okay, I've taken both suggestions. I've renamed my page to "StaleSession", and altered my code slightly. It still doesn't seem to work.

  protected void handleStaleSessionException(IRequestCycle cycle, StaleSessionException exception) throws IOException
  {
    cycle.activate("StaleSession");
    renderResponse(cycle);
  }


This is in my Border.java file.


However, all of my pages subclass an abstract class I've made for BasePage. This overrides the validate() method of the page to check if the user has permissions for that particular page. Could that be messing something up? Should I put something in the validate() method? Is there some sort of getExpired() function?

Thanks,
Greg

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: DojoAjaxResponseBuilder i18n problem

Posted by Jesse Kuhnert <jk...@gmail.com>.
Sure. If you open a JIRA issue I'll remember it. You may run into other
issues with this though, as all the client encoding is done in utf 8.

On 9/13/06, Manri Offermann <ta...@eastbeam.co.jp> wrote:
>
> Hi everybody,
>
> I have some trouble with the DojoAjaxResponseBuilder. My webapp is using
> Shift_JIS as the output character enconding.
> A DirectLink component with async="true" works in Firefox but fails in IE.
> I
> had a closer look and replaced UTF-8 with Shift_JIS:
>
>     void beginResponse()
>     {
>         _writer.printRaw("<?xml version=\"1.0\"
> encoding=\"Shift_JIS\"?>");
>
> in the DojoAjaxResponseBuilder implementation and my problem is solved.
> Can
> this be changed somehow, that it can be configured or that
> "org.apache.tapestry.output-encoding" is used?
>
> Best regards,
>
>
> Manri Offermann
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


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

DojoAjaxResponseBuilder i18n problem

Posted by Manri Offermann <ta...@eastbeam.co.jp>.
Hi everybody,

I have some trouble with the DojoAjaxResponseBuilder. My webapp is using 
Shift_JIS as the output character enconding.
A DirectLink component with async="true" works in Firefox but fails in IE. I 
had a closer look and replaced UTF-8 with Shift_JIS:

    void beginResponse()
    {
        _writer.printRaw("<?xml version=\"1.0\" encoding=\"Shift_JIS\"?>");

in the DojoAjaxResponseBuilder implementation and my problem is solved. Can 
this be changed somehow, that it can be configured or that 
"org.apache.tapestry.output-encoding" is used?

Best regards,


Manri Offermann



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Expired Session message

Posted by Peter Dawn <pe...@gmail.com>.
neat. i forgot about t-deli.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Expired Session message

Posted by andyhot <an...@di.uoa.gr>.
Mark Stang wrote:
> I was looking at the 3.x one on t-deli.  Are they the same?  Is 3.x supported in contrib?  Is it shipped as part of Contrib?
>   
Well, mindbridge (& friends) had written those components for 3.0.x
He later adapted them to 4.0.x and added them in contrib (4.0.x)
So, they're really the same.

Perhaps you should contact him directly and ask about the 3.0.x versions.
> thanks,
>
> Mark
>
> Mark J. Stang
> Senior Engineer/Architect
> office: +1 303.468.2900
> mobile: +1 303.507.2833
> Ping Identity
>
>
>
> -----Original Message-----
> From: Jesse Kuhnert [mailto:jkuhnert@gmail.com]
> Sent: Wed 9/13/2006 10:44 AM
> To: Tapestry users
> Subject: Re: Expired Session message
>  
> Since it's sitting in the tapestry repos under contrib it ~better~ be asf 2
> ;)
>
> On 9/13/06, Mark Stang <ms...@pingidentity.com> wrote:
>   
>> Does anyone know the license on Xtile:Timeout?
>>
>> thanks,
>>
>> Mark
>>
>> Mark J. Stang
>> Senior Engineer/Architect
>> office: +1 303.468.2900
>> mobile: +1 303.507.2833
>> Ping Identity
>>
>>
>>
>> -----Original Message-----
>> From: andyhot [mailto:andyhot@di.uoa.gr]
>> Sent: Tue 9/12/2006 5:09 PM
>> To: Tapestry users
>> Subject: Re: Expired Session message
>>
>> Peter Dawn wrote:
>>     
>>> what about tap3. any way of implementing this in the older version.
>>>       
>> no need to...
>> http://t-deli.com/
>>     
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>
>>>       
>> --
>> Andreas Andreou - andyhot@apache.org - http://andyhot.di.uoa.gr
>> Tapestry / Tacos developer
>> Open Source / J2EE Consulting
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>>
>>
>>     
>
>
>   


-- 
Andreas Andreou - andyhot@apache.org - http://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / J2EE Consulting 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


RE: Expired Session message

Posted by Mark Stang <ms...@pingidentity.com>.
I was looking at the 3.x one on t-deli.  Are they the same?  Is 3.x supported in contrib?  Is it shipped as part of Contrib?

thanks,

Mark

Mark J. Stang
Senior Engineer/Architect
office: +1 303.468.2900
mobile: +1 303.507.2833
Ping Identity



-----Original Message-----
From: Jesse Kuhnert [mailto:jkuhnert@gmail.com]
Sent: Wed 9/13/2006 10:44 AM
To: Tapestry users
Subject: Re: Expired Session message
 
Since it's sitting in the tapestry repos under contrib it ~better~ be asf 2
;)

On 9/13/06, Mark Stang <ms...@pingidentity.com> wrote:
>
> Does anyone know the license on Xtile:Timeout?
>
> thanks,
>
> Mark
>
> Mark J. Stang
> Senior Engineer/Architect
> office: +1 303.468.2900
> mobile: +1 303.507.2833
> Ping Identity
>
>
>
> -----Original Message-----
> From: andyhot [mailto:andyhot@di.uoa.gr]
> Sent: Tue 9/12/2006 5:09 PM
> To: Tapestry users
> Subject: Re: Expired Session message
>
> Peter Dawn wrote:
> > what about tap3. any way of implementing this in the older version.
> no need to...
> http://t-deli.com/
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>
>
> --
> Andreas Andreou - andyhot@apache.org - http://andyhot.di.uoa.gr
> Tapestry / Tacos developer
> Open Source / J2EE Consulting
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
>
>


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


Re: Expired Session message

Posted by Jesse Kuhnert <jk...@gmail.com>.
Since it's sitting in the tapestry repos under contrib it ~better~ be asf 2
;)

On 9/13/06, Mark Stang <ms...@pingidentity.com> wrote:
>
> Does anyone know the license on Xtile:Timeout?
>
> thanks,
>
> Mark
>
> Mark J. Stang
> Senior Engineer/Architect
> office: +1 303.468.2900
> mobile: +1 303.507.2833
> Ping Identity
>
>
>
> -----Original Message-----
> From: andyhot [mailto:andyhot@di.uoa.gr]
> Sent: Tue 9/12/2006 5:09 PM
> To: Tapestry users
> Subject: Re: Expired Session message
>
> Peter Dawn wrote:
> > what about tap3. any way of implementing this in the older version.
> no need to...
> http://t-deli.com/
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>
>
> --
> Andreas Andreou - andyhot@apache.org - http://andyhot.di.uoa.gr
> Tapestry / Tacos developer
> Open Source / J2EE Consulting
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
>
>


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

RE: Expired Session message

Posted by Mark Stang <ms...@pingidentity.com>.
Does anyone know the license on Xtile:Timeout?

thanks,

Mark

Mark J. Stang
Senior Engineer/Architect
office: +1 303.468.2900
mobile: +1 303.507.2833
Ping Identity



-----Original Message-----
From: andyhot [mailto:andyhot@di.uoa.gr]
Sent: Tue 9/12/2006 5:09 PM
To: Tapestry users
Subject: Re: Expired Session message
 
Peter Dawn wrote:
> what about tap3. any way of implementing this in the older version.
no need to...
http://t-deli.com/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Andreas Andreou - andyhot@apache.org - http://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / J2EE Consulting 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org



Re: Expired Session message

Posted by andyhot <an...@di.uoa.gr>.
Peter Dawn wrote:
> what about tap3. any way of implementing this in the older version.
no need to...
http://t-deli.com/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Andreas Andreou - andyhot@apache.org - http://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / J2EE Consulting 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Expired Session message

Posted by Peter Dawn <pe...@gmail.com>.
what about tap3. any way of implementing this in the older version.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Expired Session message

Posted by andyhot <an...@di.uoa.gr>.
Daniel Jue wrote:
> I would also like to see how this is done.  Perhaps even with a
> javascript popup telling the user the session is about to/has expired.
> I imagine this type of "active checking" could be done through ajax,
> or through a client side timer, rather than waiting for the user to
> refresh a page and find out then.
4.0 already has this...
http://tapestry.apache.org/tapestry4/tapestry-contrib/ComponentReference/Timeout.html
>
> Dan
>
> On 9/12/06, Greg.L.Cormier@servicecanada.gc.ca
> <Gr...@servicecanada.gc.ca> wrote:
>> Hi.
>>
>> When the session expires, how can I handle this and redirect to a
>> customized page saying "Your session has expired"
>>
>> In my BorderEngine class, I've tried this but maybe it's the wrong
>> way, or the wrong place to put it
>>
>>  protected void handleStaleSessionException(IRequestCycle cycle,
>> StaleSessionException exception) throws IOException
>>  {
>>    cycle.activate("Expired");  // Trigger my customized
>> session-expired page.
>>  }
>>
>>
>>
>> Thanks,
>> Greg
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Andreas Andreou - andyhot@apache.org - http://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / J2EE Consulting 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Expired Session message

Posted by Daniel Jue <te...@gmail.com>.
I would also like to see how this is done.  Perhaps even with a
javascript popup telling the user the session is about to/has expired.
 I imagine this type of "active checking" could be done through ajax,
or through a client side timer, rather than waiting for the user to
refresh a page and find out then.

Dan

On 9/12/06, Greg.L.Cormier@servicecanada.gc.ca
<Gr...@servicecanada.gc.ca> wrote:
> Hi.
>
> When the session expires, how can I handle this and redirect to a customized page saying "Your session has expired"
>
> In my BorderEngine class, I've tried this but maybe it's the wrong way, or the wrong place to put it
>
>  protected void handleStaleSessionException(IRequestCycle cycle, StaleSessionException exception) throws IOException
>  {
>    cycle.activate("Expired");  // Trigger my customized session-expired page.
>  }
>
>
>
> Thanks,
> Greg
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Asynchronous form submission

Posted by Vinicius Carvalho <ja...@gmail.com>.
Forget about debug, sorry, just saw the browserLogLevel option :P



On 9/12/06, Vinicius Carvalho <ja...@gmail.com> wrote:
> 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 <de...@camerum.com.br> 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:jkuhnert@gmail.com]
> > 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 <ja...@gmail.com> 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 <jk...@gmail.com> 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 <de...@camerum.com.br> 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="userList@For" 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="userList@Any">
> > > > >    <tr jwcid="@For" source="ognl:users" value="ognl:userDetail"
> > > > > element="tr">
> > > > >    ...
> > > > >    </tr>
> > > > > </span>
> > > > >
> > > > > -----Original Message-----
> > > > > From: Vinicius Carvalho [mailto:java.vinicius@gmail.com]
> > > > > 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 <cj...@gmail.com> 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 <vi...@gmail.com> 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 <ja...@gmail.com> 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="ajaxForm@Form"  async="true"
> > > > > > > > updateComponents="ognl:{'userList'}">
> > > > > > > >                         <table>
> > > > > > > >                                 <tr>
> > > > > > > >                                         <td>Name:</td>
> > > > > > > >                                         <td><input type="text"
> > > > > jwcid="
> > > > > > > > name@TextField"
> > > > > > > > value="ognl:user.name"/></td>
> > > > > > > >                                 </tr>
> > > > > > > >                                 <tr>
> > > > > > > >                                         <td>Email:</td>
> > > > > > > >                                         <td><input type="text"
> > > > > jwcid="
> > > > > > > > email@TextField"
> > > > > > > > value="ognl:user.email"/></td>
> > > > > > > >                                 </tr>
> > > > > > > >                                 <tr>
> > > > > > > >                                         <td>Age:</td>
> > > > > > > >                                         <td><input type="text"
> > > > > jwcid="
> > > > > > > > age@TextField"
> > > > > > > > value="ognl:user.age
> > > > > > > > "/></td>
> > > > > </tr>
> > > > > > > >                                 <tr>
> > > > > > > >                                         <td colspan="2"><span
> > > > > jwcid="
> > > > > > > > submit@Submit"
> > > > > > > > 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="userList@For"
> > > > > 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: users-unsubscribe@tapestry.apache.org
> > > > > > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > > > >
> > > > > >
> > > > >
> > > > > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > > >
> > > > >
> > > > > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > 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: users-unsubscribe@tapestry.apache.org
> > > For additional commands, e-mail: users-help@tapestry.apache.org
> > >
> > >
> >
> >
> > --
> > 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: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Expired Session message

Posted by andyhot <an...@di.uoa.gr>.
There's another way...
Create a custom page in your application, named "StaleSession"

Bryan Lewis wrote:
> The one difference I see between your code and what's been working for
> me in my custom Engine class is one more line:
>
>             cycle.activate(page);
>             renderResponse(cycle);
>
>
> Greg.L.Cormier@servicecanada.gc.ca wrote:
>   
>> Hi.
>>
>> When the session expires, how can I handle this and redirect to a customized page saying "Your session has expired"
>>
>> In my BorderEngine class, I've tried this but maybe it's the wrong way, or the wrong place to put it
>>
>>   protected void handleStaleSessionException(IRequestCycle cycle, StaleSessionException exception) throws IOException
>>   {
>>     cycle.activate("Expired");	// Trigger my customized session-expired page.
>>   }
>>
>>
>>
>> Thanks,
>> Greg
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>   
>>     
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
>   


-- 
Andreas Andreou - andyhot@apache.org - http://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / J2EE Consulting 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Expired Session message

Posted by Bryan Lewis <br...@maine.rr.com>.
The one difference I see between your code and what's been working for
me in my custom Engine class is one more line:

            cycle.activate(page);
            renderResponse(cycle);


Greg.L.Cormier@servicecanada.gc.ca wrote:
> Hi.
>
> When the session expires, how can I handle this and redirect to a customized page saying "Your session has expired"
>
> In my BorderEngine class, I've tried this but maybe it's the wrong way, or the wrong place to put it
>
>   protected void handleStaleSessionException(IRequestCycle cycle, StaleSessionException exception) throws IOException
>   {
>     cycle.activate("Expired");	// Trigger my customized session-expired page.
>   }
>
>
>
> Thanks,
> Greg
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Expired Session message

Posted by Gr...@servicecanada.gc.ca.
Hi.

When the session expires, how can I handle this and redirect to a customized page saying "Your session has expired"

In my BorderEngine class, I've tried this but maybe it's the wrong way, or the wrong place to put it

  protected void handleStaleSessionException(IRequestCycle cycle, StaleSessionException exception) throws IOException
  {
    cycle.activate("Expired");	// Trigger my customized session-expired page.
  }



Thanks,
Greg

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Asynchronous form submission

Posted by Vinicius Carvalho <ja...@gmail.com>.
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 <de...@camerum.com.br> 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:jkuhnert@gmail.com]
> 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 <ja...@gmail.com> 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 <jk...@gmail.com> 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 <de...@camerum.com.br> 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="userList@For" 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="userList@Any">
> > > >    <tr jwcid="@For" source="ognl:users" value="ognl:userDetail"
> > > > element="tr">
> > > >    ...
> > > >    </tr>
> > > > </span>
> > > >
> > > > -----Original Message-----
> > > > From: Vinicius Carvalho [mailto:java.vinicius@gmail.com]
> > > > 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 <cj...@gmail.com> 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 <vi...@gmail.com> 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 <ja...@gmail.com> 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="ajaxForm@Form"  async="true"
> > > > > > > updateComponents="ognl:{'userList'}">
> > > > > > >                         <table>
> > > > > > >                                 <tr>
> > > > > > >                                         <td>Name:</td>
> > > > > > >                                         <td><input type="text"
> > > > jwcid="
> > > > > > > name@TextField"
> > > > > > > value="ognl:user.name"/></td>
> > > > > > >                                 </tr>
> > > > > > >                                 <tr>
> > > > > > >                                         <td>Email:</td>
> > > > > > >                                         <td><input type="text"
> > > > jwcid="
> > > > > > > email@TextField"
> > > > > > > value="ognl:user.email"/></td>
> > > > > > >                                 </tr>
> > > > > > >                                 <tr>
> > > > > > >                                         <td>Age:</td>
> > > > > > >                                         <td><input type="text"
> > > > jwcid="
> > > > > > > age@TextField"
> > > > > > > value="ognl:user.age
> > > > > > > "/></td>
> > > > </tr>
> > > > > > >                                 <tr>
> > > > > > >                                         <td colspan="2"><span
> > > > jwcid="
> > > > > > > submit@Submit"
> > > > > > > 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="userList@For"
> > > > 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: users-unsubscribe@tapestry.apache.org
> > > > > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > > >
> > > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > >
> > > >
> > >
> > >
> > > --
> > > 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: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>
>
> --
> 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: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


RE: Asynchronous form submission

Posted by Denis Souza <de...@camerum.com.br>.
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:jkuhnert@gmail.com] 
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 <ja...@gmail.com> 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 <jk...@gmail.com> 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 <de...@camerum.com.br> 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="userList@For" 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="userList@Any">
> > >    <tr jwcid="@For" source="ognl:users" value="ognl:userDetail"
> > > element="tr">
> > >    ...
> > >    </tr>
> > > </span>
> > >
> > > -----Original Message-----
> > > From: Vinicius Carvalho [mailto:java.vinicius@gmail.com]
> > > 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 <cj...@gmail.com> 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 <vi...@gmail.com> 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 <ja...@gmail.com> 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="ajaxForm@Form"  async="true"
> > > > > > updateComponents="ognl:{'userList'}">
> > > > > >                         <table>
> > > > > >                                 <tr>
> > > > > >                                         <td>Name:</td>
> > > > > >                                         <td><input type="text"
> > > jwcid="
> > > > > > name@TextField"
> > > > > > value="ognl:user.name"/></td>
> > > > > >                                 </tr>
> > > > > >                                 <tr>
> > > > > >                                         <td>Email:</td>
> > > > > >                                         <td><input type="text"
> > > jwcid="
> > > > > > email@TextField"
> > > > > > value="ognl:user.email"/></td>
> > > > > >                                 </tr>
> > > > > >                                 <tr>
> > > > > >                                         <td>Age:</td>
> > > > > >                                         <td><input type="text"
> > > jwcid="
> > > > > > age@TextField"
> > > > > > value="ognl:user.age
> > > > > > "/></td>
> > > </tr>
> > > > > >                                 <tr>
> > > > > >                                         <td colspan="2"><span
> > > jwcid="
> > > > > > submit@Submit"
> > > > > > 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="userList@For"
> > > 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: users-unsubscribe@tapestry.apache.org
> > > > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > >
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > For additional commands, e-mail: users-help@tapestry.apache.org
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > For additional commands, e-mail: users-help@tapestry.apache.org
> > >
> > >
> >
> >
> > --
> > 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: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
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: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Asynchronous form submission

Posted by Jesse Kuhnert <jk...@gmail.com>.
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 <ja...@gmail.com> 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 <jk...@gmail.com> 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 <de...@camerum.com.br> 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="userList@For" 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="userList@Any">
> > >    <tr jwcid="@For" source="ognl:users" value="ognl:userDetail"
> > > element="tr">
> > >    ...
> > >    </tr>
> > > </span>
> > >
> > > -----Original Message-----
> > > From: Vinicius Carvalho [mailto:java.vinicius@gmail.com]
> > > 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 <cj...@gmail.com> 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 <vi...@gmail.com> 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 <ja...@gmail.com> 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="ajaxForm@Form"  async="true"
> > > > > > updateComponents="ognl:{'userList'}">
> > > > > >                         <table>
> > > > > >                                 <tr>
> > > > > >                                         <td>Name:</td>
> > > > > >                                         <td><input type="text"
> > > jwcid="
> > > > > > name@TextField"
> > > > > > value="ognl:user.name"/></td>
> > > > > >                                 </tr>
> > > > > >                                 <tr>
> > > > > >                                         <td>Email:</td>
> > > > > >                                         <td><input type="text"
> > > jwcid="
> > > > > > email@TextField"
> > > > > > value="ognl:user.email"/></td>
> > > > > >                                 </tr>
> > > > > >                                 <tr>
> > > > > >                                         <td>Age:</td>
> > > > > >                                         <td><input type="text"
> > > jwcid="
> > > > > > age@TextField"
> > > > > > value="ognl:user.age
> > > > > > "/></td>
> > > </tr>
> > > > > >                                 <tr>
> > > > > >                                         <td colspan="2"><span
> > > jwcid="
> > > > > > submit@Submit"
> > > > > > 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="userList@For"
> > > 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: users-unsubscribe@tapestry.apache.org
> > > > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > >
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > For additional commands, e-mail: users-help@tapestry.apache.org
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > For additional commands, e-mail: users-help@tapestry.apache.org
> > >
> > >
> >
> >
> > --
> > 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: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


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

Re: Asynchronous form submission

Posted by Vinicius Carvalho <ja...@gmail.com>.
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 <jk...@gmail.com> 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 <de...@camerum.com.br> 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="userList@For" 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="userList@Any">
> >    <tr jwcid="@For" source="ognl:users" value="ognl:userDetail"
> > element="tr">
> >    ...
> >    </tr>
> > </span>
> >
> > -----Original Message-----
> > From: Vinicius Carvalho [mailto:java.vinicius@gmail.com]
> > 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 <cj...@gmail.com> 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 <vi...@gmail.com> 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 <ja...@gmail.com> 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="ajaxForm@Form"  async="true"
> > > > > updateComponents="ognl:{'userList'}">
> > > > >                         <table>
> > > > >                                 <tr>
> > > > >                                         <td>Name:</td>
> > > > >                                         <td><input type="text"
> > jwcid="
> > > > > name@TextField"
> > > > > value="ognl:user.name"/></td>
> > > > >                                 </tr>
> > > > >                                 <tr>
> > > > >                                         <td>Email:</td>
> > > > >                                         <td><input type="text"
> > jwcid="
> > > > > email@TextField"
> > > > > value="ognl:user.email"/></td>
> > > > >                                 </tr>
> > > > >                                 <tr>
> > > > >                                         <td>Age:</td>
> > > > >                                         <td><input type="text"
> > jwcid="
> > > > > age@TextField"
> > > > > value="ognl:user.age
> > > > > "/></td>
> > </tr>
> > > > >                                 <tr>
> > > > >                                         <td colspan="2"><span
> > jwcid="
> > > > > submit@Submit"
> > > > > 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="userList@For"
> > 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: users-unsubscribe@tapestry.apache.org
> > > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > > >
> > > > >
> > > >
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > For additional commands, e-mail: users-help@tapestry.apache.org
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>
>
> --
> 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: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Asynchronous form submission

Posted by Jesse Kuhnert <jk...@gmail.com>.
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 <de...@camerum.com.br> 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="userList@For" 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="userList@Any">
>    <tr jwcid="@For" source="ognl:users" value="ognl:userDetail"
> element="tr">
>    ...
>    </tr>
> </span>
>
> -----Original Message-----
> From: Vinicius Carvalho [mailto:java.vinicius@gmail.com]
> 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 <cj...@gmail.com> 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 <vi...@gmail.com> 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 <ja...@gmail.com> 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="ajaxForm@Form"  async="true"
> > > > updateComponents="ognl:{'userList'}">
> > > >                         <table>
> > > >                                 <tr>
> > > >                                         <td>Name:</td>
> > > >                                         <td><input type="text"
> jwcid="
> > > > name@TextField"
> > > > value="ognl:user.name"/></td>
> > > >                                 </tr>
> > > >                                 <tr>
> > > >                                         <td>Email:</td>
> > > >                                         <td><input type="text"
> jwcid="
> > > > email@TextField"
> > > > value="ognl:user.email"/></td>
> > > >                                 </tr>
> > > >                                 <tr>
> > > >                                         <td>Age:</td>
> > > >                                         <td><input type="text"
> jwcid="
> > > > age@TextField"
> > > > value="ognl:user.age
> > > > "/></td>
> </tr>
> > > >                                 <tr>
> > > >                                         <td colspan="2"><span
> jwcid="
> > > > submit@Submit"
> > > > 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="userList@For"
> 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: users-unsubscribe@tapestry.apache.org
> > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > >
> > > >
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


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

Re: Asynchronous form submission

Posted by Jesse Kuhnert <jk...@gmail.com>.
Hmmm...

If you have debug turned on you should be able to see the content returned
by the server...Does it return a partial list or everything you expected? If
it's returning content for the area you are requesting but the content isn't
exactly what you expect it's possible you are having "other" issues specific
to the For loop that aren't as relevant to ajax updates...Then again it
could be a bug, I just want to be sure we know which..

On 9/12/06, Vinicius Carvalho <ja...@gmail.com> wrote:
>
> 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 <cj...@gmail.com> 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 <vi...@gmail.com> 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 <ja...@gmail.com> 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="ajaxForm@Form"  async="true"
> > > > updateComponents="ognl:{'userList'}">
> > > >                         <table>
> > > >                                 <tr>
> > > >                                         <td>Name:</td>
> > > >                                         <td><input type="text"
> jwcid="
> > > > name@TextField"
> > > > value="ognl:user.name"/></td>
> > > >                                 </tr>
> > > >                                 <tr>
> > > >                                         <td>Email:</td>
> > > >                                         <td><input type="text"
> jwcid="
> > > > email@TextField"
> > > > value="ognl:user.email"/></td>
> > > >                                 </tr>
> > > >                                 <tr>
> > > >                                         <td>Age:</td>
> > > >                                         <td><input type="text"
> jwcid="
> > > > age@TextField"
> > > > value="ognl:user.age
> > > >
> "/></td>                                                                    </tr>
> > > >                                 <tr>
> > > >                                         <td colspan="2"><span
> jwcid="
> > > > submit@Submit"
> > > > 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="userList@For"
> 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: users-unsubscribe@tapestry.apache.org
> > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > >
> > > >
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


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

RE: Asynchronous form submission

Posted by Denis Souza <de...@camerum.com.br>.
I think the problem is the way that the "For" component renders. You're
trying to update a component named "userList" where:

<span jwcid="userList@For" 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="userList@Any">
   <tr jwcid="@For" source="ognl:users" value="ognl:userDetail"
element="tr">
   ...
   </tr>
</span>

-----Original Message-----
From: Vinicius Carvalho [mailto:java.vinicius@gmail.com] 
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 <cj...@gmail.com> 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 <vi...@gmail.com> 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 <ja...@gmail.com> 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="ajaxForm@Form"  async="true"
> > > updateComponents="ognl:{'userList'}">
> > >                         <table>
> > >                                 <tr>
> > >                                         <td>Name:</td>
> > >                                         <td><input type="text" jwcid="
> > > name@TextField"
> > > value="ognl:user.name"/></td>
> > >                                 </tr>
> > >                                 <tr>
> > >                                         <td>Email:</td>
> > >                                         <td><input type="text" jwcid="
> > > email@TextField"
> > > value="ognl:user.email"/></td>
> > >                                 </tr>
> > >                                 <tr>
> > >                                         <td>Age:</td>
> > >                                         <td><input type="text" jwcid="
> > > age@TextField"
> > > value="ognl:user.age
> > > "/></td>
</tr>
> > >                                 <tr>
> > >                                         <td colspan="2"><span jwcid="
> > > submit@Submit"
> > > 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="userList@For" 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: users-unsubscribe@tapestry.apache.org
> > > For additional commands, e-mail: users-help@tapestry.apache.org
> > >
> > >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Asynchronous form submission

Posted by Vinicius Carvalho <ja...@gmail.com>.
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 <cj...@gmail.com> 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 <vi...@gmail.com> 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 <ja...@gmail.com> 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="ajaxForm@Form"  async="true"
> > > updateComponents="ognl:{'userList'}">
> > >                         <table>
> > >                                 <tr>
> > >                                         <td>Name:</td>
> > >                                         <td><input type="text" jwcid="
> > > name@TextField"
> > > value="ognl:user.name"/></td>
> > >                                 </tr>
> > >                                 <tr>
> > >                                         <td>Email:</td>
> > >                                         <td><input type="text" jwcid="
> > > email@TextField"
> > > value="ognl:user.email"/></td>
> > >                                 </tr>
> > >                                 <tr>
> > >                                         <td>Age:</td>
> > >                                         <td><input type="text" jwcid="
> > > age@TextField"
> > > value="ognl:user.age
> > > "/></td>                                                                    </tr>
> > >                                 <tr>
> > >                                         <td colspan="2"><span jwcid="
> > > submit@Submit"
> > > 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="userList@For" 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: users-unsubscribe@tapestry.apache.org
> > > For additional commands, e-mail: users-help@tapestry.apache.org
> > >
> > >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Asynchronous form submission

Posted by Chaitanya Jeerage <cj...@gmail.com>.
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 <vi...@gmail.com> 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 <ja...@gmail.com> 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="ajaxForm@Form"  async="true"
> > updateComponents="ognl:{'userList'}">
> >                         <table>
> >                                 <tr>
> >                                         <td>Name:</td>
> >                                         <td><input type="text" jwcid="
> > name@TextField"
> > value="ognl:user.name"/></td>
> >                                 </tr>
> >                                 <tr>
> >                                         <td>Email:</td>
> >                                         <td><input type="text" jwcid="
> > email@TextField"
> > value="ognl:user.email"/></td>
> >                                 </tr>
> >                                 <tr>
> >                                         <td>Age:</td>
> >                                         <td><input type="text" jwcid="
> > age@TextField"
> > value="ognl:user.age
> > "/></td>                                                                    </tr>
> >                                 <tr>
> >                                         <td colspan="2"><span jwcid="
> > submit@Submit"
> > 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="userList@For" 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: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Asynchronous form submission

Posted by Vinicius Carvalho <vi...@gmail.com>.
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 <ja...@gmail.com> 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="ajaxForm@Form"  async="true"
> updateComponents="ognl:{'userList'}">
>                         <table>
>                                 <tr>
>                                         <td>Name:</td>
>                                         <td><input type="text" jwcid="
> name@TextField"
> value="ognl:user.name"/></td>
>                                 </tr>
>                                 <tr>
>                                         <td>Email:</td>
>                                         <td><input type="text" jwcid="
> email@TextField"
> value="ognl:user.email"/></td>
>                                 </tr>
>                                 <tr>
>                                         <td>Age:</td>
>                                         <td><input type="text" jwcid="
> age@TextField"
> value="ognl:user.age
> "/></td>                                                                    </tr>
>                                 <tr>
>                                         <td colspan="2"><span jwcid="
> submit@Submit"
> 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="userList@For" 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: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>