Please elaborate what you mean by "multi header table" because there are
several possible meanings.
邓君涛 wrote:
can any one tell me how to realize multi header table with contrib
table? I need it,thanks.
2005/8/20, Darío Vasconcelos <[EMAIL PROTECTED]>:
Oh I see. Maybe you can do this
public boolean getDocOwner() {
Table table = (Table) getRequestCycle().getPage().getNestedComponent("table");
MyObject obj = (MyObject) table.getTableRow();
int id = obj.getId();
// .. determine whether or not this is the doc owner
// ...
return docOwner;
}
don't know if using "table" inside getNestedComponent would be enough, though...
Dario
On 8/19/05, Chris Chiappone <[EMAIL PROTECTED]> wrote:
I am aware of that but the problem is I need a conditional to either
show the link or not depending on the user. Which I can't seem to
figure out.
On 8/19/05, Darío Vasconcelos <[EMAIL PROTECTED]> wrote:
If the objects in each row aren't too big, you can use
ognl:components.table.tableRow
as a parameter for your link, providing that you're using
[EMAIL PROTECTED]:Table as the name of your table.
I'm pasting this directly from the contrib:Table component reference:
<a jwcid="@DirectLink" listener="ognl:listeners.selectLocale"
parameters="ognl:components.table.tableRow">select</a>
Since tableRow returns your row object, you can extract the id or any
other fields from there.
Hope it helps,
Dario
On 8/19/05, Chris Chiappone <[EMAIL PROTECTED]> wrote:
I am having difficulty understanding how to show rows differently
using contrib table.
Lets see if I can describe what I am trying to do. I basically have a
table with 5 rows. One of the rows is a link to delete the row. The
thing is only the owner of the document can delete the row. my table
is set up like this:
<table jwcid="[EMAIL PROTECTED]:Table" source="ognl:page.docList"
columns="type", "title", "desc", "file", "id">
<span jwcid="@base:If" condition="ognl:docOwner">
<span jwcid="[EMAIL PROTECTED]'>
<span jwcid="deleteLink"/>
</span>
</span>
</table>
The issues is that docOwner needs to know the value of of the current
rows 'id' in order to validate its this users document. How would I
go about doing that?
Thanks.
--
~chris
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
I have enough money to last me the rest of my life, unless I buy something.
Jackie Mason
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
~chris
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
I have enough money to last me the rest of my life, unless I buy something.
Jackie Mason
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]