Thanks Josh, I guess my approach was probably wrong to begin with, but this
looks good, will give it a try. I also agree the checkbox could do with another
attribute perhaps a context? which would make it a little easier to work with.
Thanks everyone for your responses!
Peter
- Original
Sorry, let me try rephrasing my question:
When I click on the checkbox, how do I modify the corresponding object
in the loop? The only way I can see of doing this is to iterate
manually, in which case a Tapestry checkbox component is not usable in a
loop.
Peter
Peter Stavrinides wrote:
Hi
Perhaps some code would help us out.
.tml loop checkbox snippet
.java index getter setter snippet
? I can only try
On Thu, Apr 24, 2008 at 10:54 AM, Peter Stavrinides
[EMAIL PROTECTED] wrote:
I have also noticed that the value parameter on the checkbox component is
a read only boolean,
Peter Stavrinides wrote:
Hi All
I this scenario:
t:loop source=myDOA value=selectedDOA encoder=encoder
t:checkbox t:id=archived /
/t:loop
Have you tried something like this:
in .tml:
t:loop source=myDOA value=selectedDOA encoder=encoder
t:checkbox t:id=archived
Hi Nicholas
This is simply boilerplate code:
t:loop source=myDOA value=selectedDOA encoder=encoder
t:checkbox t:id=archived value=archive /
/t:loop
Archive is a read only boolean (no setter permitted), no model or encoder is
available, which = no easy way to update like say if this was a
Hi Ivan
This is precisely what I tried.
- Original Message -
From: Ivan Dubrov [EMAIL PROTECTED]
To: Tapestry users users@tapestry.apache.org
Sent: Thursday, 24 April, 2008 1:59:10 PM GMT +02:00 Athens, Beirut, Bucharest,
Istanbul
Subject: Re: How to update a list from a checkbox in a
Perhaps trimming it back to the minimum might help... if it doesn't fix it,
it might help diagnosis.
I don't know why this isn't working.
1) remove the id attribute from the checkbox. T5 will generate one, and it
will be unique
2) remove the encoder. Just because _I_ don't understand it... and I
Hi Nicholas
An encoder is a fundamental Tapestry concept, used when you need to bind your
implementation of a translator to a component, it has no effect in this
example. The reason why it is not working is because the value property on the
checkbox is limited to read only boolean (a getter
The way checkbox works out of the box you need to coordinate with the
loop via the index or value parameter, as others have suggested. This
works but can be dangerous if your loop source happens to change
between the form render and the form submit. Try this extension so you
can bind a data value
Hi All
I this scenario:
t:loop source=myDOA value=selectedDOA encoder=encoder
t:checkbox t:id=archived /
/t:loop
How do I use the checkbox correctly when the user clicks it? 'I want to
associate it with an object' via a primary key perhaps...but the
checkbox only seems to have a
try adding an index to the loop, and then using this index to do the
translation b/n the getters/setters.
(but I don't know anything about encoders)
--nK
On Wed, Apr 23, 2008 at 3:24 PM, Peter Stavrinides
[EMAIL PROTECTED] wrote:
Hi All
I this scenario:
t:loop source=myDOA
11 matches
Mail list logo