There is a Conditional component:
http://tapestry.apache.org/tapestry3/doc/ComponentReference/Conditional.html

But much more useful are the If, Else and For components here:
http://www.t-deli.com/

If you want to disable links then Paul has already given you the solution.
DirectLink has a boolean disabled parameter:
http://tapestry.apache.org/tapestry3/doc/ComponentReference/DirectLink.html

So use something like:
disabled="ognl:currentBatch.bchPassFailInd.equals('Failed')"

Cheers,
Nick.


Nazmul Bhuiyan wrote:
There is no @if in T3

I need to disable the direct link fields on the last column according to the
2nd column's value. e.g. if table's 2nd column value is 'Failed' of any row then I want to
disable the last field of that row.
And if 2nd column value is 'Passed' then I want to leave enable the field.

I don't know how to do this in HTML

Thanks

Naz


Nick Westgate wrote:
It's not clear what you mean by enable/disable.
You can use @If when you want to include/exclude content.

Cheers,
Nick.


Nazmul Bhuiyan wrote:
I'm using T3.

I'm trying to enable/disable last table cell according to my 2nd column
value.
My code below:

<tr jwcid="@Foreach" source="ognl:batches" value="ognl:currentBatch"
element="tr">
        <td>-span jwcid="@Insert" value="ognl:currentBatch.bchBatchId">Id</td>  
     
        <td>-span jwcid="@Insert"
value="ognl:currentBatch.bchPassFailInd">Pass</td>
        <td>
a jwcid="@DirectLink" listener="ognl:listeners.batchProcessPassedAction" parameters="ognl:currentBatch.bchBatchId" title="Processed"
               /a>           
                &nbsp;&nbsp;
a jwcid="@DirectLink" listener="ognl:listeners.batchProcessFailedAction" parameters="ognl:currentBatch.bchBatchId" title="Unsigned"
                /a>          
        </td>
Thanks


Paul Stanton-2 wrote:
T5 or T4?

T4 you can do:
Passed
Nazmul Bhuiyan wrote:
Hi,

I'm displaying a list of data in a table.
e.g.
Id    Status      DirectLink
1     Passed      Passed - Failed
2     Failed        Passed - Failed

I want to enable/disable 3rd column 'DirectLink' column according to
the
2nd
column 'Status'.

Is there any one know how to do this?

Thanks

Naz

---------------------------------------------------------------------
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]

Reply via email to