Try to just make the listener take an Object argument, like public void
myListener(Object o)  and the cast it to what you think it should be later
on. Maybe you could use the actual class instead of Object, I can't remember
at the moment.

To see the value and make it clickabel (should have thought of this earlier
:), do;

<div jwcid="[EMAIL PROTECTED]" ...>
   <div jwcid="@Directlink ...>
       <div jwcid="@Insert" value="ognl:components.table.taleRow"/>
   </div>
</div>

Cheers,

PS

On 6/2/06, Rui Pacheco <[EMAIL PROTECTED]> wrote:

Peter,

Dont apologize, we're all busy here.

Two more questions and I should be done:
How do I catch the object on my listener? I tried passing a Table, a
Component and a TableRow as a parameter but I don't know how to reach the
object that contains the field I need.

Another thing, how do I make a value in the middle of the table clickable
while maintaining its value? If I use a Block component it will overwrite
whats on the source for my table.

On 6/2/06, Peter Svensson < [EMAIL PROTECTED]> wrote:
>
> I might have made some mistake, Rui, since I typed it from memory, as I
> don't have a static table left in my app. Sorry in that case.
>
> But I might help anyway, the line you ask about from the other mail;
>
> <a jwcid="@DirectLink" listener="ognl:listeners.selectLocale "
> parameters="ognl:components.table.tableRow">select</a>
>
> the last ognl statement expands to;
> getComponents().getTable().getTableRow(), where getComponents() is a
> method
> which must exist in your current page class.  And it does! Since your
page
>
> class is most probably derived from BaseComponent, which implenents
> getComponents.
>
> That's actually a very usefull method, since you easily gains access to
> all
> you components in the page from your java code.
>
> And I would also recommend you to pass the current object directly as an
> argument in the link, instead of just the ID, so you don't have to go
dig
> for it later;
>
> Argh!!!!  Now I see my fault. I'm so used working with trails, where you
> just say the name of the property and be done with it, the proper syntax
> to
> override the contrib:Table column is of course;
>
> <div jwcid="[EMAIL PROTECTED]>
>
>
> Sorry!!
>
> Cheers,
> PS
>
>
> On 6/2/06, Rui Pacheco <[EMAIL PROTECTED]> wrote:
> >
> > In this example, how do you reach the object components.table.tableRow
?
> >
> > I'm trying to do the exact same thing, but I dont know how to attach
the
>
> > ID
> > of the row to the DirectLink. I always end up with 0 and never the
real
> > ID.
> >
> > What is the components object? Is table the name of the table that was
> > just
> > declared or is that string just an example without any real meaning?
> >
> > Thanks for any help
> > Rui
> >
> >
> >
> > On 6/2/06, Eric Fesler <[EMAIL PROTECTED]> wrote:
> > >
> > > From the Tapestry 3 component reference
> > > (
> > >
> >
>
http://jakarta.apache.org/tapestry/3.0.4/doc/ComponentReference/contrib.Table.html
> > > ):
> > >
> > > <style> td { text-align: center } </style>
> > > <table jwcid="[EMAIL PROTECTED]:Table" width="90%"
> > >     source="ognl:@[EMAIL PROTECTED]()"
> > >     columns="Locale:toString(), Language, Country, Variant,
> > ISO3Language,
> > > ISO3Country, !select"/>
> > > <span jwcid="[EMAIL PROTECTED]">&nbsp;</span>
> > > <span jwcid="[EMAIL PROTECTED]">
> > >     <a jwcid="@DirectLink" listener="ognl:listeners.selectLocale"
> > > parameters="ognl:components.table.tableRow ">select</a>
> > > </span>
> > >
> > >
> > > --ERic
> > >
> > >
> > >
---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> >
> > --
> > Cumprimentos,
> > Rui Pacheco
> >
> >
>
>


--
Cumprimentos,
Rui Pacheco


Reply via email to