Peter Svensson wrote:
ONe thing I use sometimes is to make a new getter/setter which does not
actually have a property, where I leave the setter empty;

public String getCombined()
{
   return getLabel()+getURL();
}

public void setCombined(String s)
{

}

Remember that this is probable Not The Way To Do It  :)  But it works for
me.

The you can take away the value=".... ,label, URL, ..."  and just have
value="... , combined, ...."  in your table statement.

Cheers,
PS
Thank you!
Basically I can not just combine them into a getter, because my situation was like this:

<component id="table" type="Contrib:TableView">
  <binding name="source" value="list"/>
  <binding name="columns" value="literal:*label:A.label, href:A.url*"/>
</component>
<component id="hrefColumnValue" type="Block"/>
<component id="artistLink" type="GenericLink">
  <binding name="href" value="components.rows.tableRow.*href*"/>
</component>
<component id="label" type="Insert">
  <binding name="value" value="components.rows.tableRow.*label*"/>
</component>

But I've just get an idea and prove it work:
<component id="table" type="Contrib:TableView">
  <binding name="source" value="list"/>
  <binding name="columns" value="literal:*A*"/>
</component>
<component id="hrefColumnValue" type="Block"/>
<component id="artistLink" type="GenericLink">
  <binding name="href" value="components.rows.tableRow.*A.url*"/>
</component>
<component id="label" type="Insert">
  <binding name="value" value="components.rows.tableRow.*A.label*"/>
</component>

That is, I misunderstood the "literal:" prefix of OGNL. I thought it can only for String.

Again, thank you for your precious time. :)

   Regards,
Mike

Reply via email to