Oh I see! I didn't really consider this (yet) as I am testing on a For which produces a single result...However, since there is only one result (therefore one id??) shouldn't this work? Or is my thinking entirely wrong? Thank you Frederic, Yiannis
-----Original Message-----
From: [EMAIL PROTECTED] on behalf of Frederic Barnabe
Sent: Fri 19/05/2006 18:15
To: [email protected]
Cc:
Subject: Re: [Tacos-devel] Component combination
Hi Yiannis,
It's because that when you put your Any component inside the For, you
end up with multiple html elements having the same id. Ids are supposed to be
unique in an HTML document. You have to specify a unique id for each row and
in the updateComponent of the link put this unique id. Check in the demo for
an example how to do this. This is in the page EffectsExample.
Frederic
On 5/19/06, Yiannis Mavroukakis <[EMAIL PROTECTED]> wrote:
Hello Frederic,
I've got a quick question about the updateComponent
parameter..When i
set the updateComponent element inside the cell that I wish to
alter to
the autocompleter, nothing seems
to happen, however when the element is enclosing the table
everything is
ok. Obviously, if I want to use more than one of these , I
can't do it
this way...This is what I've got at the moment
(which doesn't seem to do anything)
<td>
<span jwcid="@Any" id="clientUpdate">
<span jwcid="@If" condition="ognl:!clientClicked">
<a jwcid="@tacos:AjaxDirectLink"
updateComponents="ognl:{'clientUpdate'}"
listener="listener:clientClick">
<span jwcid="client">Client</span>
</a>
</span>
<span jwcid="@If" condition="ognl:clientClicked">
<a jwcid="@tacos:AjaxDirectLink"
updateComponents="ognl:{'clientUpdate'}"
listener="listener:clientClick">
<div class="note"><span class="auto_complete"
jwcid="clientAutoCompleter"/></div>
</a>
</span>
</span>
</td>
If I move <span jwcid="@Any" id="clientUpdate"> to enclose the
table ,
it works ok...any suggestions?
Thanks,
Yiannis.
________________________________
From: [EMAIL PROTECTED]
[mailto: [EMAIL PROTECTED] On Behalf Of Frederic
Barnabe
Sent: 18 May 2006 13:50
To: [email protected]
Subject: Re: [Tacos-devel] Component combination
Hi Yannis,
I don't think you could make this with an InlineEditBox (even
if it's
the same behavior), so I would try to use a ajax direct link
that
changes a boolean property of the page. In the template, you
add
conditions that either shows the link or the auto completer
depending on
the boolean value. Make sure the updateComponent of the direct
link
surrounds the conditionals. Something like :
<span jwcid="@Any" id="updated">
<span jwcid="@If" condition="ognl:!clicked">
<a jwcid="@tacos:AjaxDirectLink"
updateComponent="ognl:{'updated'}"
listener="listener:click">Click
here!</a>
</span>
<span jwcid="@If" condition="ognl:clicked">
<span jwcid="@tacos:Autocompleter"/>
</span>
</span>
There is a lot of parameters missing, but you get the idea. In
the java
class, you would have a boolean property named clicked and a
method
click() that would just set the property from false to true.
Voila.
Frederic
Note:__________________________________________________________________
This message is for the named person's use only. It may contain
confidential, proprietary or legally privileged information. No
confidentiality or privilege is waived or lost by any mistransmission.
If you receive this message in error, please immediately delete it and
all copies of it from your system, destroy any hard copies of it and
notify the sender. You must not, directly or indirectly, use, disclose,
distribute, print, or copy any part of this message if you are not the
intended recipient. Jaguar Freight Services and any of its subsidiaries
each reserve the right to monitor all e-mail communications through its
networks.
Any views expressed in this message are those of the individual sender,
except where the message states otherwise and the sender is authorized
to state them to be the views of any such entity.
________________________________________________________________________
This e-mail has been scanned for all known viruses.
<<winmail.dat>>
