You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Darío Vasconcelos <da...@gmail.com> on 2005/07/19 02:34:59 UTC

DirectLink inside a Table with ExpressionTableColumn: special treatment?

Hi,

I've been trying unsuccessfully to add links to a Table whose columns
have been specified with ExpressionTableColumns.  My code is pretty
straightforward,

		<table jwcid="@contrib:Table" source="ognl:data"
columns="ognl:columns" border="0" cellspacing="1" cellpadding="2"
class="tabla2" width="100%">
			<span jwcid="idcColumnHeader@Block">&nbsp;</span>
			<span jwcid="idcColumnValue@Block">
				<a jwcid="@DirectLink" listener="ognl:listeners.linkEditContent"
parameters="ognl:components.table.tableRow">idc</a>
			</span>
	  </table>

The "idc" column exists, its cells are using class idcColumnValue, but
the links just don't appear.  What am I doing wrong?


-- 
Communism is man's exploitation of man. Capitalism is just the opposite.

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: DirectLink inside a Table with ExpressionTableColumn: special treatment?

Posted by Darío Vasconcelos <da...@gmail.com>.
Oops... that one should have been obvious. Thanks again!!

On 7/19/05, Mind Bridge <mi...@yahoo.com> wrote:
> The name of your table component is not currently specified. Try this:
> 
>     <table jwcid="table@contrib:Table" ...
> 
> That would make the following OGNL expression used in your code to work:
> 
>     components.table.tableRow
> 
> and it would no longer throw an exception that component 'table' is not
> present.
> 
> 
> 
> ----- Original Message -----
> From: "Darío Vasconcelos" <da...@gmail.com>
> To: "Tapestry users" <ta...@jakarta.apache.org>
> Sent: Tuesday, July 19, 2005 7:12 AM
> Subject: Re: DirectLink inside a Table with ExpressionTableColumn: special
> treatment?
> 
> 
> I followed your suggestion, but if I do
> 
>    idCol.loadSettings(this)
> 
> there's an exception:
> 
>   Component MyComponent$Enhance_11@13c5cc8[PageName] does not contain
> a component table.
> 
> Now, I tried
> 
>  col.loadSettings((Table)getComponents().get("$Table"));
> 
> I checked the values returned by getComponents() and it contains a
> $Table element. With this code, the table now displays, but still no
> links (or override for the ColumnHeader).
> 
> I also tried defining the columns with a simple string
> ("col1,col2,col3"). This works as long as I don't try to include a
> xxxColumnValue element, when I do it throws the same exception as
> before (the component does not contain a component table).
> 
> What am I missing? I already missed the loadSettings thing... but I
> can't find any docs that recommend its use.
> 
> Dario
> 
> On 7/18/05, Robert Zeigler <ro...@scazdl.org> wrote:
> > You need to use the "loadSettings" method.
> > so, if you had something like the following in your page class...
> >
> > public List getColumns() {
> >    ...
> >    ExpressionTableColumn idCol = new ExpressionTableColumn("idc","id");
> >    idCol.loadSettings(this);
> > }
> >
> > then that should do the trick for you.
> >
> > Robert
> >
> > Darío Vasconcelos wrote:
> > > Hi,
> > >
> > > I've been trying unsuccessfully to add links to a Table whose columns
> > > have been specified with ExpressionTableColumns.  My code is pretty
> > > straightforward,
> > >
> > >               <table jwcid="@contrib:Table" source="ognl:data"
> > > columns="ognl:columns" border="0" cellspacing="1" cellpadding="2"
> > > class="tabla2" width="100%">
> > >                       <span jwcid="idcColumnHeader@Block"></span>
> > >                       <span jwcid="idcColumnValue@Block">
> > >                               <a jwcid="@DirectLink"
> listener="ognl:listeners.linkEditContent"
> > > parameters="ognl:components.table.tableRow">idc</a>
> > >                       </span>
> > >         </table>
> > >
> > > The "idc" column exists, its cells are using class idcColumnValue, but
> > > the links just don't appear.  What am I doing wrong?
> > >
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >
> >
> 
> 
> --
> Communism is man's exploitation of man. Capitalism is just the opposite.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
> 
> 


-- 
Communism is man's exploitation of man. Capitalism is just the opposite.

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: DirectLink inside a Table with ExpressionTableColumn: special treatment?

Posted by Mind Bridge <mi...@yahoo.com>.
The name of your table component is not currently specified. Try this:

    <table jwcid="table@contrib:Table" ...

That would make the following OGNL expression used in your code to work:

    components.table.tableRow

and it would no longer throw an exception that component 'table' is not
present.



----- Original Message ----- 
From: "Darío Vasconcelos" <da...@gmail.com>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Tuesday, July 19, 2005 7:12 AM
Subject: Re: DirectLink inside a Table with ExpressionTableColumn: special
treatment?


I followed your suggestion, but if I do

   idCol.loadSettings(this)

there's an exception:

  Component MyComponent$Enhance_11@13c5cc8[PageName] does not contain
a component table.

Now, I tried

 col.loadSettings((Table)getComponents().get("$Table"));

I checked the values returned by getComponents() and it contains a
$Table element. With this code, the table now displays, but still no
links (or override for the ColumnHeader).

I also tried defining the columns with a simple string
("col1,col2,col3"). This works as long as I don't try to include a
xxxColumnValue element, when I do it throws the same exception as
before (the component does not contain a component table).

What am I missing? I already missed the loadSettings thing... but I
can't find any docs that recommend its use.

Dario

On 7/18/05, Robert Zeigler <ro...@scazdl.org> wrote:
> You need to use the "loadSettings" method.
> so, if you had something like the following in your page class...
>
> public List getColumns() {
>    ...
>    ExpressionTableColumn idCol = new ExpressionTableColumn("idc","id");
>    idCol.loadSettings(this);
> }
>
> then that should do the trick for you.
>
> Robert
>
> Darío Vasconcelos wrote:
> > Hi,
> >
> > I've been trying unsuccessfully to add links to a Table whose columns
> > have been specified with ExpressionTableColumns.  My code is pretty
> > straightforward,
> >
> >               <table jwcid="@contrib:Table" source="ognl:data"
> > columns="ognl:columns" border="0" cellspacing="1" cellpadding="2"
> > class="tabla2" width="100%">
> >                       <span jwcid="idcColumnHeader@Block">&nbsp;</span>
> >                       <span jwcid="idcColumnValue@Block">
> >                               <a jwcid="@DirectLink"
listener="ognl:listeners.linkEditContent"
> > parameters="ognl:components.table.tableRow">idc</a>
> >                       </span>
> >         </table>
> >
> > The "idc" column exists, its cells are using class idcColumnValue, but
> > the links just don't appear.  What am I doing wrong?
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>


-- 
Communism is man's exploitation of man. Capitalism is just the opposite.

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: DirectLink inside a Table with ExpressionTableColumn: special treatment?

Posted by Darío Vasconcelos <da...@gmail.com>.
I followed your suggestion, but if I do

   idCol.loadSettings(this)

there's an exception: 

  Component MyComponent$Enhance_11@13c5cc8[PageName] does not contain
a component table.

Now, I tried 

 col.loadSettings((Table)getComponents().get("$Table"));

I checked the values returned by getComponents() and it contains a
$Table element. With this code, the table now displays, but still no
links (or override for the ColumnHeader).

I also tried defining the columns with a simple string
("col1,col2,col3"). This works as long as I don't try to include a
xxxColumnValue element, when I do it throws the same exception as
before (the component does not contain a component table).

What am I missing? I already missed the loadSettings thing... but I
can't find any docs that recommend its use.

Dario

On 7/18/05, Robert Zeigler <ro...@scazdl.org> wrote:
> You need to use the "loadSettings" method.
> so, if you had something like the following in your page class...
> 
> public List getColumns() {
>    ...
>    ExpressionTableColumn idCol = new ExpressionTableColumn("idc","id");
>    idCol.loadSettings(this);
> }
> 
> then that should do the trick for you.
> 
> Robert
> 
> Darío Vasconcelos wrote:
> > Hi,
> >
> > I've been trying unsuccessfully to add links to a Table whose columns
> > have been specified with ExpressionTableColumns.  My code is pretty
> > straightforward,
> >
> >               <table jwcid="@contrib:Table" source="ognl:data"
> > columns="ognl:columns" border="0" cellspacing="1" cellpadding="2"
> > class="tabla2" width="100%">
> >                       <span jwcid="idcColumnHeader@Block">&nbsp;</span>
> >                       <span jwcid="idcColumnValue@Block">
> >                               <a jwcid="@DirectLink" listener="ognl:listeners.linkEditContent"
> > parameters="ognl:components.table.tableRow">idc</a>
> >                       </span>
> >         </table>
> >
> > The "idc" column exists, its cells are using class idcColumnValue, but
> > the links just don't appear.  What am I doing wrong?
> >
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
> 


-- 
Communism is man's exploitation of man. Capitalism is just the opposite.

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: DirectLink inside a Table with ExpressionTableColumn: special treatment?

Posted by Robert Zeigler <ro...@scazdl.org>.
You need to use the "loadSettings" method.
so, if you had something like the following in your page class...

public List getColumns() {
   ...
   ExpressionTableColumn idCol = new ExpressionTableColumn("idc","id");
   idCol.loadSettings(this);
}

then that should do the trick for you.

Robert

Darío Vasconcelos wrote:
> Hi,
> 
> I've been trying unsuccessfully to add links to a Table whose columns
> have been specified with ExpressionTableColumns.  My code is pretty
> straightforward,
> 
> 		<table jwcid="@contrib:Table" source="ognl:data"
> columns="ognl:columns" border="0" cellspacing="1" cellpadding="2"
> class="tabla2" width="100%">
> 			<span jwcid="idcColumnHeader@Block">&nbsp;</span>
> 			<span jwcid="idcColumnValue@Block">
> 				<a jwcid="@DirectLink" listener="ognl:listeners.linkEditContent"
> parameters="ognl:components.table.tableRow">idc</a>
> 			</span>
> 	  </table>
> 
> The "idc" column exists, its cells are using class idcColumnValue, but
> the links just don't appear.  What am I doing wrong?
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org