Ray,
I think the ValueEncoder is doing what you are looking for in George's
example. When the loop is rendered the encoder helps figure out a
unique id to encode into the form so that when you make a change an
trigger the zone update, that id is handed back to the encoder and it
sets purchaseRequ
When the select in your loopZone reloads after the zone update, it uses
purchaseRequest to determine it's value. However, after the loop has
already executed, purchaseRequest, which you persist, points to the last
purchaseRequest instant enountered by the ajaxformloop. Correct?
On Tue, Jul 12, 2
I might not be understanding your question completely, so please correct me
if I'm misunderstanding you. The sample code I posted enables you to only
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
t
Unless I'm missing something, it looks like this will have the
same problem I've been battling. After the loop executes and the zone is
updated, the purchaseRequest, in this case, will always be the last
purchaseRequest encountered by the loop. Please correct me if I am
incorrect.
At this time,
Ray, I'm not sure if this helps, but here is an example of a AjaxFormLoop
with a nested select / zone and nested within the zone is another select.
The tempId in the value encoder is just a @Transient UUID generated from
your entity class. Hope it helps.
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
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
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
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
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
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
:) 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
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 Nabble.com.
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
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
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
> 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
> 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
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,
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.
-
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
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
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
I'm also not quite sure how I can set a unique ID to my zone and then
retrieve this zone id in the previous select.
On Mon, Jul 11, 2011 at 11:45 AM, George Christman
wrote:
> I think your going to want to set a unique id for your
> fileMetadataSelectZone
> Zone example
>
> and your going to nee
I do not need to persist the "currentSettings" variable?
On Mon, Jul 11, 2011 at 11:45 AM, George Christman
wrote:
> 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.
>
> -
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
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-tp4575519p45757
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
28 matches
Mail list logo