Hi Nick,
Is there any method that I can use to create a ObjectPropertySelectionModel
model instead of StringPropertySelectionModel as below?
public static final IPropertySelectionModel theModel =
new StringPropertySelectionModel(new String[] {"a", "b", "c"});
My page displays a list of objects and I want select some of these objects
and do something about it.
Thanks
Naz
Nick Westgate wrote:
>
> You'll want to use the MultiplePropertySelection component:
> http://tapestry.apache.org/tapestry3/doc/api/org/apache/tapestry/contrib/form/MultiplePropertySelection.html
>
> If you need to change the rendering style you can just grab
> the source for the default renderer (which generates a table)
> and change it to output things differently.
>
> Cheers,
> Nick.
>
>
> Nick Westgate wrote:
>> It depends how T3's method matching works, but you might need:
>> public void formSubmit(IRequestCycle cycle)
>>
>> Note the I in IRequestCycle.
>>
>> Cheers,
>> Nick.
>>
>>
>> Nazmul Bhuiyan wrote:
>>> Hello,
>>>
>>> I’ve a list of objects displayed in a page. I want to collect ids of
>>> selected object by adding a check box for each of these objects. Then
>>> I’ll
>>> use another action event to do something with this collection of ids.
>>>
>>> But I’m getting the following error message:
>>>
>>> Unable to resolve expression 'formSubmit' for
>>> [EMAIL PROTECTED]
>>>
>>> binding: ExpressionBinding[InfringementsMaint formSubmit]
>>> location: context:/InfringementsMaint.html, line 10
>>>
>>> Can any one please help me out on this?
>>>
>>> My code below:
>>>
>>> .html
>>> <table border="1" cellpadding="1" cellspacing="0" class="jive-table">
>>> <form jwcid="@Form" listener="ognl:listeners.formSubmit">
>>> <div class="jive-contentBoxHeader">Infringement List</div>
>>> <tr class="jive-table-header">
>>> <td>Inf Type</td>
>>> <td>Tran Type</td>
>>> <td>Name</td>
>>> <td>Address</td>
>>> <td>Offence</td>
>>> <td>Reminder</td>
>>> <td>Edit/Delete</td>
>>> <td>Add to Batch</td>
>>> </tr>
>>> <tr jwcid="@Foreach" source="ognl:infringements"
>>> value="ognl:currentInfringement" element="tr">
>>> <td></td>
>>> <td></td>
>>> <td></td>
>>> <td></td>
>>> <td></td>
>>> <td></td>
>>>
>>> <td>
>>> <input type="checkbox" jwcid="@Checkbox"
>>> selected="ognl:addToBatch"/>
>>> </td>
>>> </tr>
>>> </form>
>>> </table>
>>>
>>> .page
>>> <property-specification name="addToBatch" type="boolean"
>>> persistent="yes"/>
>>>
>>> .java
>>> public abstract boolean isAddToBatch();
>>> public abstract void setAddToBatch(boolean value);
>>>
>>> public void formSubmit(RequestCycle cycle) {
>>> if (isAddToBatch()) {
>>> //Get all the infringement Id to add into Batch and add
>>> them into
>>> a collection
>>> }
>>> }
>>>
>>
>> ---------------------------------------------------------------------
>> 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]
>
>
>
--
View this message in context:
http://www.nabble.com/T3%3A-CheckBox-tf4369817.html#a12488778
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]