Re: updating a zone inside of an ajaxformloop

2011-07-13 Thread Mark
nly >> update the zone within the row of the select menu triggering it.  If you >> select an option in the first select menu / first row, it will only update >> the zone in the first row and not the last row. >> >> -- >> View this message in context: >> http

Re: updating a zone inside of an ajaxformloop

2011-07-12 Thread Ray Nicholus
elect an option in the first select menu / first row, it will only update > the zone in the first row and not the last row. > > -- > View this message in context: > http://tapestry.1045711.n5.nabble.com/updating-a-zone-inside-of-an-ajaxformloop-tp4575519p4579967.html > Sent from the

Re: updating a zone inside of an ajaxformloop

2011-07-12 Thread George Christman
pdate the zone in the first row and not the last row. -- View this message in context: http://tapestry.1045711.n5.nabble.com/updating-a-zone-inside-of-an-ajaxformloop-tp4575519p4579967.html Sent from the Tapestry - User mailing list archive at Nabbl

Re: updating a zone inside of an ajaxformloop

2011-07-12 Thread Ray Nicholus
seRequest = new PurchaseRequest(); >return newPurchaseRequest; >} > >Object onValueChanged() { >return loopZone.getBody(); >} > >public String getLoopZoneId() { >return "purchaseRequest-" + getEncoder().toClient(purchaseRe

Re: updating a zone inside of an ajaxformloop

2011-07-12 Thread George Christman
return newPurchaseRequest; } Object onValueChanged() { return loopZone.getBody(); } public String getLoopZoneId() { return "purchaseRequest-" + getEncoder().toClient(purchaseRequest); } -- View this message in context: http://tapestry.1045711.n5.nabble.com/updati

Re: updating a zone inside of an ajaxformloop

2011-07-11 Thread Thiago H. de Paula Figueiredo
On Mon, 11 Jul 2011 17:46:58 -0300, Ray Nicholus wrote: It seems like zone updates on form elements are quite difficult to perfect in tapestry. Yep, not easy. Putting a whole form inside a zone is trivial, though. I simply want to update a select via a zone update I guess Tapestry shou

Re: updating a zone inside of an ajaxformloop

2011-07-11 Thread Ray Nicholus
It seems like zone updates on form elements are quite difficult to perfect in tapestry. I simply want to update a select via a zone update and I'm finding myself attempting to work around the framework to get this to happen. I have a counter variable in my loop that is used when rendering all of

Re: updating a zone inside of an ajaxformloop

2011-07-11 Thread Thiago H. de Paula Figueiredo
On Mon, 11 Jul 2011 15:54:02 -0300, Ray Nicholus wrote: Note: I just noticed that the select component page for the select element includes an example that illustrates updating a select inside of a form via a zone update. I'm essentially trying to do the same thing, only with dynamical

Re: updating a zone inside of an ajaxformloop

2011-07-11 Thread Ray Nicholus
Note: I just noticed that the select component page for the select element includes an example that illustrates updating a select inside of a form via a zone update. I'm essentially trying to do the same thing, only with dynamically generated selects. On Mon, Jul 11, 2011 at 1:48 PM, Ray Nicholus

Re: updating a zone inside of an ajaxformloop

2011-07-11 Thread Ray Nicholus
Actually, in this case, I have a zone including a form field inside a loop, there are no nested zones. I was worried that I would have to revert to custom javascript, but I'm hoping that isn't true. I'm not quite sure why this doesn't work, but once the 2nd select in the form (the one inside the

Re: updating a zone inside of an ajaxformloop

2011-07-11 Thread Thiago H. de Paula Figueiredo
On Mon, 11 Jul 2011 15:34:58 -0300, Ray Nicholus wrote: No, indeed it looks like I cannot use a submit button here. Surely I can't be the first person who wanted to update a select via a zone update inside of a loop. Isn't there a straightforward way to make this happen? As I've writ

Re: updating a zone inside of an ajaxformloop

2011-07-11 Thread Josh Canfield
:) I guess it depends on what you consider simple. As my co-worker often says "It's just SMOPs" (http://en.wikipedia.org/wiki/Small_matter_of_programming) You need to provide more information for us to understand what you are getting hung up on. On Mon, Jul 11, 2011 at 11:16 AM, Ray Nicholus wr

Re: updating a zone inside of an ajaxformloop

2011-07-11 Thread George Christman
Please post your code and I'll help you. -- View this message in context: http://tapestry.1045711.n5.nabble.com/updating-a-zone-inside-of-an-ajaxformloop-tp4575519p4576086.html Sent from the Tapestry - User mailing list archive at Nabbl

Re: updating a zone inside of an ajaxformloop

2011-07-11 Thread Ray Nicholus
No, indeed it looks like I cannot use a submit button here. Surely I can't be the first person who wanted to update a select via a zone update inside of a loop. Isn't there a straightforward way to make this happen? On Mon, Jul 11, 2011 at 1:16 PM, Ray Nicholus wrote: > Eh, it may be because I

Re: updating a zone inside of an ajaxformloop

2011-07-11 Thread Ray Nicholus
It sounds like I can't use a submit button at all in this case. If I update the first select this in turn updates the 2nd select via a zone update. Then, when I choose a new value in the 2nd select and hit submit, my newly selected value is not persisted. Instead, the default value of the select

Re: updating a zone inside of an ajaxformloop

2011-07-11 Thread Ray Nicholus
Eh, it may be because I'm not updating the correct currentSetting object. The behavior I want to support is fairly simple, but seems to be quite complex to get working in Tapestry, unless I'm missing something. On Mon, Jul 11, 2011 at 1:12 PM, Ray Nicholus wrote: > It sounds like I can't use a

Re: updating a zone inside of an ajaxformloop

2011-07-11 Thread Josh Canfield
> Sorry for not noticing that. IFIAK you wont be able to use loop > variable(value parameter in loop or ajaxforloop) during a non-submission > ajax call. You can use the variable, you just can't count on it being set for you when you're using it out of context of the loop. Encode enough informatio

Re: updating a zone inside of an ajaxformloop

2011-07-11 Thread Josh Canfield
> I guess I'm confused about why I need to worry about any of this.  Without > the zone parameter, I have no problem changing values of my selects. You have to worry about it because without the zone parameter you aren't doing an ajax request back to your component when the select changes. When yo

Re: updating a zone inside of an ajaxformloop

2011-07-11 Thread Ray Nicholus
Ouch. That's not good news. What can I do to make this work? Just to restate again, after changing the value of the first select, I need to update the options in the second select in the same row. Then, when I submit, I need all values reflected in the UI to be persisted. I am using Hibernate,

Re: updating a zone inside of an ajaxformloop

2011-07-11 Thread George Christman
could you post your code? Also, are you using hibernate? -- View this message in context: http://tapestry.1045711.n5.nabble.com/updating-a-zone-inside-of-an-ajaxformloop-tp4575519p4575918.html Sent from the Tapestry - User mailing list archive at Nabble.com

Re: updating a zone inside of an ajaxformloop

2011-07-11 Thread Taha Hafeez
Sorry for not noticing that. IFIAK you wont be able to use loop variable(value parameter in loop or ajaxforloop) during a non-submission ajax call. In case of a loop, the context of each iteration(i.e the loop variable) is stored in hidden fields in the form. A value-encoder is used to convert the

Re: updating a zone inside of an ajaxformloop

2011-07-11 Thread Ray Nicholus
I'm not sure what variable you are talking about. Do you mean "currentSetting"? There is no "currentSettings" variable. If so, currentSetting is the variable set by the ajaxformloop so there is nothing for me to initialize there. On Mon, Jul 11, 2011 at 12:04 PM, Taha Hafeez wrote: > My first

Re: updating a zone inside of an ajaxformloop

2011-07-11 Thread Taha Hafeez
My first question was where have you initialized currentSettings. Say you have initialized it in onPrepare(), then during an ajax call, this method is not called and so currentSettings is not initialized for that request. If you are setting it in setupRender() of the main component, then as only an

Re: updating a zone inside of an ajaxformloop

2011-07-11 Thread Ray Nicholus
t; and your going to need to persist autoImportFileMetadataModel selectModel. > > -- > View this message in context: > http://tapestry.1045711.n5.nabble.com/updating-a-zone-inside-of-an-ajaxformloop-tp4575519p4575734.html > Sent from the Tapestry - User

Re: updating a zone inside of an ajaxformloop

2011-07-11 Thread Ray Nicholus
MetadataModel selectModel. > > -- > View this message in context: > http://tapestry.1045711.n5.nabble.com/updating-a-zone-inside-of-an-ajaxformloop-tp4575519p4575734.html > Sent from the Tapestry - User mailing list archive at Nabble.com. > >

Re: updating a zone inside of an ajaxformloop

2011-07-11 Thread Ray Nicholus
Hello Taha, I guess I'm confused about why I need to worry about any of this. Without the zone parameter, I have no problem changing values of my selects. However, I need the zone so that I can change the available options in the 2nd select after the value changes in the first select. Shouldn't

Re: updating a zone inside of an ajaxformloop

2011-07-11 Thread George Christman
I think your going to want to set a unique id for your fileMetadataSelectZone Zone example and your going to need to persist autoImportFileMetadataModel selectModel. -- View this message in context: http://tapestry.1045711.n5.nabble.com/updating-a-zone-inside-of-an-ajaxformloop

Re: updating a zone inside of an ajaxformloop

2011-07-11 Thread Taha Hafeez
Hi Ray, Where are you initializing currentSetting.fileMetadataTyp?e and is this value @Persisted as you are using it across multiple requests. regards Taha On Mon, Jul 11, 2011 at 9:19 PM, Ray Nicholus wrote: > Here is a fragment of some template code inside of a tapestry form: > > value="cur

updating a zone inside of an ajaxformloop

2011-07-11 Thread Ray Nicholus
Here is a fragment of some template code inside of a tapestry form: .. As soon as I add the zone parameter to the 1st select & reload, I get a NPE when I attempt to change the value in the 1st select. It claims that the currentSe