You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Nazmul Bhuiyan <Na...@nz.fujitsu.com> on 2007/10/17 02:54:12 UTC

T3: enable/disable one column according to the other columns result

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
-- 
View this message in context: http://www.nabble.com/T3%3A-enable-disable-one-column-according-to-the-other-columns-result-tf4637680.html#a13245280
Sent from the Tapestry - User mailing list archive at Nabble.com.


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


Re: T3: enable/disable one column according to the other columns result

Posted by Nazmul Bhuiyan <Na...@nz.fujitsu.com>.
Thanks a lot Nick and Paul.
Naz

Nick Westgate wrote:
> 
> 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: users-unsubscribe@tapestry.apache.org
>>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>>
>>>>>
>>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>
>>>
>> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/T3%3A-enable-disable-one-column-according-to-the-other-columns-result-tf4637680.html#a13352223
Sent from the Tapestry - User mailing list archive at Nabble.com.


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


Re: T3: enable/disable one column according to the other columns result

Posted by Nick Westgate <ni...@key-planning.co.jp>.
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: users-unsubscribe@tapestry.apache.org
>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>
>>>>
>>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>>
> 

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


Re: T3: enable/disable one column according to the other columns result

Posted by Nazmul Bhuiyan <Na...@nz.fujitsu.com>.
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: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>
>>>
>> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/T3%3A-enable-disable-one-column-according-to-the-other-columns-result-tf4637680.html#a13246418
Sent from the Tapestry - User mailing list archive at Nabble.com.


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


Re: T3: enable/disable one column according to the other columns result

Posted by Nick Westgate <ni...@key-planning.co.jp>.
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: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>>
> 

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


Re: T3: enable/disable one column according to the other columns result

Posted by Nazmul Bhuiyan <Na...@nz.fujitsu.com>.
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: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/T3%3A-enable-disable-one-column-according-to-the-other-columns-result-tf4637680.html#a13245567
Sent from the Tapestry - User mailing list archive at Nabble.com.


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


Re: T3: enable/disable one column according to the other columns result

Posted by Paul Stanton <pa...@gunnsoft.com.au>.
T5 or T4?

T4 you can do:
<a jwcid="@DirectLink" ... disabled="ognl:[condition]">Passed</a>

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: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org