I don't understand why the jwcid and the id have to match .

So tapestry won't render the page if your components have
subcomponents which end up having the same name ? that sux

Anywais , I never needed to do this , but I do have lists in my apps ,
and within the listable components I make , the subcomponents tend to
be identic . However I never declare these subcomponents in my jwc ,
forcing them to have a jwcid name . Instead I do this

<span id="ognl:val1" jwcid="@Insert" value="ognl:val1" />
<span id="ognl:val2" jwcid="@Insert" value="ognl:val1" />

...

Would that approach not work ?

On 12/6/05, Michael Waluk <[EMAIL PROTECTED]> wrote:
> That works fine for the HTML ID, but how to get the jwcid to match?  And
> more importantly, how to make them unique within the page?  I've tried using
> ognl inside the jwcid attribute value before, but haven't had any luck.
>
> What I have working now is
> letting tapestry create the sub-component's Tapestry id. This makes it
> unique within the component, but not the page.
> giving the HTML id the value of this sub-component's extendedId.  This makes
> it unique within the page.
> Use this same extendedId in the updateComponents.
> This works, but I have to use some dirty tricks to find the sub-component's
> id or extended id.  I guess my questions now are:
>
> a) Does the tapestry ID and the HTML ID have to match?  How else could the
> AjaxDirectService figure out what portion of the page to return?
>
> b) Is there a much more obvious way to accomplish this?  It seems like a
> common thing to do -  use custom components multiple times in a page and
> have thier sub-components contain unique IDs.
>
> I would have thought that Tapestry would give them unique IDs if I left them
> anonymous by using jwcid="@Any".  It only seems to do it per-level (within
> page, within component, etc.) but not for the page as a whole.
>
> Thanks again for your efforts,
> Michael
>
>
>
>
> On 12/6/05, Cosmin Bucur <[EMAIL PROTECTED]> wrote:
> >
> > Won't it work if you give it a dynamic id value with ognl
> > id="ognl:myFirstId"  ?
> >
> > On 12/6/05, Michael Waluk < [EMAIL PROTECTED]> wrote:
> > > 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
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
> > -------------------------------------------------------
> > 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
> >
>
>


-------------------------------------------------------
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&op=click
_______________________________________________
Tacos-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tacos-devel

Reply via email to