ListPropertySelectionModel and NamedListItem are regular a classes.
Put them wherever you like.
To use them, create your model from a list of objects that implement
the NamedListItem interface.
selectionModel = new ListPropertySelectionModel(itemList);
Cheers,
Nick.
Nazmul Bhuiyan wrote:
Hi Nick,
Few more basic questions:
To use contrib's component I have added the following lines in my
.application file as below:
<library id="contrib"
specification-path="/org/apache/tapestry/contrib/Contrib.library" />
How should I define the path to use the ListPropertySelectionModel as there
is no library.
I'm getting path exception.
<library id="tasselListSelection"
specification-path="/org/rz/tapestryutils/ListPropertySelectionModel.class"/>
Can you please please give me some example how should I use this
ListPropertySelectionModel? I'm not using Palette.
Thanks
Nick Westgate wrote:
You can write your own selection model, or of course use what others have
already written to address this problem.
Check out this thread:
http://www.nabble.com/Multiple-Select-tf144431.html#a400648
Since you are using a list it's easiest to use Robert's
ListPropertySelectionModel.
http://www.tapestrycomponents.org/Tassel/app?service=external/ViewComponent&sp=SListPropertySelectionModel
Cheers,
Nick.
Nazmul Bhuiyan wrote:
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]
---------------------------------------------------------------------
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]