Hi guys!
I 'm just starting to learn how to develop using jboss seams & facelets ejb3
and i ran into some problems, so im posting here if somebody can help this
little girl
If I have a list of objects "CaroTypeGroup" as I describe here, (this is when
u check the object with the eclipse inspector)
- groups=ArrayList
- elementData=Object[10]
- CAROTypeGroup
+ code="NAME001"
+ subTypes=PersistenceSet(id 602)
+ description="description 1"
+ id="id001"
- CAROTypeGroup
+ code="NAME002"
+ subTypes=PersistenceSet(id 603)
+ description="description 2"
+ id="id002"
... etc
Well this is my ejb Bean
| @Stateful
| @Name("caroGroups")
| @Scope(ScopeType.CONVERSATION)
| @Interceptor(SeamInterceptor.class)
| public class CaroTypeGroupListAction implements Serializable,
| CaroTypeGroupList {
|
| @PersistenceContext
| private Session session;
|
| @DataModel
| private List<CaroTypeGroup> groups;
|
| @DataModelSelectionIndex
| private int groupsIndex;
|
| @DataModelSelection
| private CaroTypeGroup selectedGroup;
|
| @Out(required = false)
| private CaroTypeGroup group;
|
| public String findCaroGroups() {
| groups = session.createCriteria(CaroTypeGroup.class).list();
| return "success";
| }
|
| @Begin
| public String setCaroGroup() {
| group = selectedGroup;
| return "success";
| }
|
----
As a Starting point, I just want to print that list (groups) to a page with a
data table that contains the following code:
| <h:dataTable value="#{groups}" var="g">
|
| <h:column>
| <f:facet name="header">Code</f:facet>
| #{g.code}
| </h:column>
|
| <h:column>
| <f:facet name="header">Actions</f:facet>
| <h:commandButton value="See"
action="#{caroGroups.setCaroGroup}" />
| </h:column>
|
| </h:dataTable>
|
The problem is that it doesn't print anything, like the atribute code is
empty, so I dunno if im using seam datamodel in the correct way or... what
could be my problem here? what am i doing wrong?..
Thanks
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3914467#3914467
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3914467
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user