You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Kai Michael Bodach <ka...@condat.de> on 2003/11/20 18:35:28 UTC

Problem with Contrib:Table

Hi,

i have a little problem with a special Contrib:Table constalation. I have
build a special Table with additional columns (e.g. a column with a
@PropertySelection component).It is like the LocalList example in the
workbench of Tapestry. For a little time it seems to be work without
problem, but when i tryed to set the selected property to the picked
property before the Form was send, then it seems there is no way to do that.
After a long time of evaluation i realized, that each @PropertySelection
component in any row of my table is the same Object and so it only has a
effect, when i select a property of the last @PropertySelection. Because
this is the last value in this Object that was saved. That is why all the
Propertyselections have the selected value of the last one. I've made some
tests and the result was, outside of the Contrib:Table all the
PropertySelections are different componets (like: $PropertySelection$2,
$PropertySelection$1 and $PropertySelection) and so it runs perfect. So, why
are components in the contrib:Table, specially
in the body of the contrib:TableRows all the same components (objects) and
is there a workaround for that problem. I would like stay by the
contrib:Table component, the only way is to build my own Table, but that
isnt realy reuseable if i reinvent the wheel. For better understand i've
send the section with the table. I hope my explanation is not too confused.
Thanks for all helps and hints.

<form jwcid="form">

	<table jwcid="tableElement">
	
		<table jwcid="tableView" >
				
	        <span jwcid="tablePages@contrib:TableFormPages"/>
	        <!--span jwcid="tablePages@contrib:TablePages"/-->
	        <tr>
				<th></th>
	        	<td jwcid="tableColumns"/>
	            <th>Diensttyp</th>
                  <th>Guppe</th>
	            <th></th>
			</tr>
			
			<span jwcid="tableRows" element="tr">
            	<td><span jwcid="checkbox" disabled="ognl:'true'"/></td>
				<td jwcid="tableValues" align="center"/>
				
                <span jwcid="@RightSelector"/>
          		<td><span jwcid="@Submit" label="INFO"
listener="ognl:listeners.infoSubmitAction"/></td>

	        </span>
        </table>

        <table >
        	<span jwcid="selectAllButton" disabled="ognl:'true'"/>
    		<span jwcid="deselectAllButton" disabled="ognl:'true'"/>
            <span jwcid="showAllRights" disabled="ognl:'true'"/>
			<span jwcid="submitButton" disabled="ognl:'true'"/>
        </table> 

	</table>

</form>

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


Re: Problem with Contrib:Table

Posted by Mind Bridge <mi...@yahoo.com>.
Hi,
 
Unfortunately, I am kind of unavailable at the moment and cannot help you much directly.
 
Nevertheless the behaviour you describe appears to be normal -- if you have a PropertySelection component within a cycle, such as a Foreach, ListEdit, TableRows, etc, you will get only _one_ component, but that component will be rendered multiple times, once for each itteration.
 
Please check whether the PropertySelection's parameters are bound properly to the correct values. Basically, the parameters are typically handed different values at each iteration of the cycle depending on what the iteration refers to.
 
In the table case, you could use the value of the 'row' parameter of TableRows to determine what the currently rendered row object is and give appropriate values to the PropertySelection depending on the current row.
 
I hope this helps...

Best regards,
-mb

Kai Michael Bodach <ka...@condat.de> wrote:
Hi,

i have a little problem with a special Contrib:Table constalation. I have
build a special Table with additional columns (e.g. a column with a
@PropertySelection component).It is like the LocalList example in the
workbench of Tapestry. For a little time it seems to be work without
problem, but when i tryed to set the selected property to the picked
property before the Form was send, then it seems there is no way to do that.
After a long time of evaluation i realized, that each @PropertySelection
component in any row of my table is the same Object and so it only has a
effect, when i select a property of the last @PropertySelection. Because
this is the last value in this Object that was saved. That is why all the
Propertyselections have the selected value of the last one. I've made some
tests and the result was, outside of the Contrib:Table all the
PropertySelections are different componets (like: $PropertySelection$2,
$PropertySelection$1 and $PropertySelection) and so it runs perfect. So, why
are components in the contrib:Table, specially
in the body of the contrib:TableRows all the same components (objects) and
is there a workaround for that problem. I would like stay by the
contrib:Table component, the only way is to build my own Table, but that
isnt realy reuseable if i reinvent the wheel. For better understand i've
send the section with the table. I hope my explanation is not too confused.
Thanks for all helps and hints.












Diensttyp
Guppe








listener="ognl:listeners.infoSubmitAction"/>















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