Hi,
This is a known issue, there's a JIRA for it and it's marked to fix
for the 5.1 version:

https://issues.apache.org/jira/browse/TAPESTRY-1624


And i'm using the t5c library to do the ognl job:

http://code.google.com/p/tapestry5-components/

http://87.193.218.134:8080/t5c-demo/ognlbindingpage

2008/6/5 Filip S. Adamsen <[EMAIL PROTECTED]>:
> Hi,
>
> This doesn't really concern the If component, but rather the framework
> itself. You cannot call methods with arguments through the prop: binding
> prefix, at least not yet.
>
> What you should do is to make sure the current value of the loop is bound to
> a page property that you can check in a page method that returns a boolean:
>
>  @Property
>  private Node node;
>
>  public boolean isNodeSelected() {
>    return nodeSelected.getIdentifier() == node.getIdentifier();
>  }
>
> Your If will then simply become
>
>  <t:if test="nodeSelected">...</t:if>
>
> Hope this helps.
>
> -Filip
>
> On 2008-06-05 13:05, maxthesecond wrote:
>>
>>
>> Is it possible to send parameters to the if component?
>>
>> I'm in a loop component and I would like to do something like this:
>>
>> <t:Tree treeid='literal:categorytree' source="treeNodes"
>> currentNode="node">
>>            <t:eventlink t:id="tree" t:event="SelectNode"
>> context="node.identifier">
>>       <t:if test="Testj(node.identifier)">
>>              ${node.name}          <t:parameter name="else">
>>              ${node.name}          </t:parameter>       </t:if>
>> </t:eventlink>
>> </t:Tree>
>>
>>
>> And then in the java code:
>>
>> boolean Testj(int nodeid){if(nodeid==nodeSelected) return true; return
>> false; }
>>
>>
>> Is there any way to do the trick?
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
Atenciosamente,
Marcelo Lotif

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to