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]

Reply via email to