In this case you can use:
yourBean.getYourModel.getRowData();
| yourBean.getYourModel.getRowIndex();
|
But you should not create DataModel each time in a getter.
I use it something like this:
private DataModel dm = null;
|
| public DataModel getDetails() {
|
8 wrote :
| However, when I do this, I don't seem to be getting the DataModel, but
rather the actual List itself. This is evidenced by the fact that a method in
the class that uses the DataModelSelection is always stuck at pointing to the
first item in the List list...
|
Can you
You should use it like this #{list}, because when you use @DataModel Seam
outjected wrapper into the current context with name of the property (list in
your case)
Another way you should wrap it by yourself, only then you can use it the way
#{YourBean.YourModel}
View the original post :
denis-karpov wrote : You should use it like this #{list}, because when you
use @DataModel Seam outjected wrapper into the current context with name of the
property (list in your case)
Right.
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=3971501#3971501
It would be nice to change the Seam spec such that one can apply the DataModel
annotation to the getter method of the list so that one can use the DataModel
in multiple roles without explicitly wrapping the list (in the source code) in
a DataModel object. I guess I'm suggesting this because
You can use @DataModel on a getter method.
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=3971619#3971619
Reply to the post :
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3971619
___
jboss-user
[EMAIL PROTECTED] wrote : You can use @DataModel on a getter method.
Hi Gavin,
I understand you can use the DataModel annotation on the getter method, but if
you have two instances of this component alive at the same time, with one
component associated with the default component name and the
I think the only way to do this is to create a getter that returns the already
wrapped field and then use the parent components name , something like
|public DataModel getListModel() {
| return new ListDataModel(list);
|
then #{component1.listModel} and #{component2.listModel}
I hate to move this thread up (and it's probably bad etiquette), but I would
really appreciate some help here. I'm really at a lost here and I certainly
don't want to explicitly wrap the List object in a DataModel object... I don't
think it should take too long to respond either - please tell