By giving it id="myDiv" you are explicitly naming it. If I did that inside my component, and used the component multiple times on the page you would get duplicate IDs - and the 2nd instance wouldn't get updated with the results.
The real problem is when I place 2 instances of the same component on the page. The IDs are unique within the component, but not on the page. And the Tapestry ID and the HTML ID should be the same for the updateComponents to work smoothly.
Ideally I'd be able to use the component's extendedId in updateComponents and also use that as my HTML ID (so it would be unique within the page). Maybe that is a feature request or maybe there is a better way to do this?
Thanks for your help,
Michael
On 12/6/05, Andrea Chiumenti <[EMAIL PROTECTED]> wrote:
I'm doing it regularly.
first I don't use @Any into template but I define a component into my page/component
<component id="myDiv" type="Any"/>
then I reference it as
updateComponents="ongl:{ components.myDiv.id, ....otherId}"
I hope this may help.
Cheers,
kiuma
On 12/5/05, Cosmin Bucur <[EMAIL PROTECTED] > wrote:the updateComponents parameter expects a collection . Normally we set
it like this : updateComponents="ognl:{ 'yourId' , 'anotherId' }" .
Allthogh I havn't tried this yet , it seems logical for you to be able
to set updateComponents="ognl:myCollection" . Then you can manipulate
the collection in your code , and give it whatever String values
you'd like .
Hope this helps ,
Cosmin
On 12/5/05, Michael Waluk < [EMAIL PROTECTED]> wrote:
> Anyone have a solution for this?
>
> I use 2 instances of a component on a page. This component has an AjaxForm
> (search) and a <div> @Any component. I want the form's updateComponents to
> include the @Any to refresh it.
>
> How can I get the ID of the @Any id without implicitly naming it (so as not
> to hardcode the name)? I want that ID so I can give the @Any's <div> a
> matching HTML id and also to use this value in the AjaxForm's
> updateComponents parameter.
>
> Thanks for any suggestions,
> Michael
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&opclick
_______________________________________________
Tacos-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tacos-devel
