[JBoss Seam] - Strange EL problem
by mwkohout
I've got two places on a page where I iterate lists of object. For each object I output a button that allows them(in this case) to add a user and role to a domain object(in this case, a research study-I work for a university). While in both cases the datatable is populated, in the first instance when the aj4 buttons are clicked the backing actions are not called. I don't know why.
This is the nonworking instance. It displays the output of a user search. In summary, what it does is iterate through a list of members returned by the 'userHome' object. Then, in the 3rd column, I obtain a list of all possible roles and iterate over them, displaying the appropriate buttons tied to the appropriate methods.
| <rich:dataTable id="memberSelectList" value="#{userHome.findByNameOrInternetID(memberSearchName).toArray()}" var="possibleMember" rendered="#{memberSearchName.trim().length() gt 0}" rowKey="#{possibleMember.umnDID}" rowKeyVar="umnDID">
| <rich:column>
| <f:facet name="header">Name</f:facet>
| #{possibleMember.name}
| </rich:column>
| <rich:column>
| <f:facet name="header">User Name</f:facet>
| #{possibleMember.userName}
| </rich:column>
| <rich:column>
| <f:facet name="header">Add to List of Study Members</f:facet>
| <a4j:repeat value="#{studyRoleHome.getAllRoles()}" var="role" >
| possibleMember: #{possibleMember.class} role: ${role.class}
| <a4j:commandButton type="submit" value="Add as #{role.name}" reRender="memberGrid" rendered="#{!viewStudyAction.study.containsMember(possibleMember,role)}" action="#{viewStudyAction.study.addMember(possibleMember,role)}" ajaxSingle="true" />
| <a4j:commandButton type="submit" value="Remove as #{role.name}"
| reRender="memberGrid" rendered="#{viewStudyAction.study.containsMember(possibleMember,role) and not viewStudyAction.isRoleAndUser(user, possibleMember, role, administrativeRole) }"
| action="#{viewStudyAction.removeMember(possibleMember,role)}" ajaxSingle="true" />
| <a4j:commandButton type="submit" value="Remove as #{role.name}" reRender="memberGrid" rendered="#{viewStudyAction.isRoleAndUser(user, possibleMember, role, administrativeRole) and not viewStudyAction.confirmRemoveSelfAsAdmin}" action="#{viewStudyAction.setConfirmRemoveSelfAsAdmin(true)}" ajaxSingle="true" />
| <a4j:commandButton type="submit" value="Remove Yourself as #{role.name}. This cannot be undone." reRender="bodyPanel" rendered="#{viewStudyAction.isRoleAndUser(user, possibleMember, role, administrativeRole) and viewStudyAction.confirmRemoveSelfAsAdmin}" action="#{viewStudyAction.removeMember(possibleMember,role)}" ajaxSingle="true" />
| </a4j:repeat>
| </rich:column>
| </rich:dataTable>
|
|
This is the working list-it displays a list of current users. It obtains it's array/list of user and roles directly from the Study object, then iterates over them. For each returned user it also iterates over the list of roles.
| <rich:dataTable id="memberList" value="#{viewStudyAction.study.getUserAndRole().toArray()}" var="userAndRole" rowKey="#{userAndRole.user.umnDID}" rowKeyVar="umnDID" >
| <rich:column>
| <f:facet name="header">Name</f:facet>
| #{userAndRole.user.name}
| </rich:column>
| <rich:column>
| <f:facet name="header">User Name</f:facet>
| #{userAndRole.user.userName}
| </rich:column>
| <rich:column>
| <f:facet name="header">Add or Remove Users from the list of Study Members</f:facet>
| <a4j:repeat value="#{studyRoleHome.getAllRoles()}" var="role" rendered="#{studyRoleHome.containsRole(viewStudyAction.study.userAndRole, user, administrativeRole)}" >
| userAndRole.user: #{userAndRole.user.class} role: #{role.class}
| <a4j:commandButton type="submit" value="Add as #{role.name}" reRender="memberGrid" rendered="#{!viewStudyAction.study.containsMember(userAndRole.user,role)}" action="#{viewStudyAction.study.addMember(userAndRole.user,role)}" ajaxSingle="true" />
| <a4j:commandButton type="submit" value="Remove as #{role.name}" reRender="memberGrid" rendered="#{viewStudyAction.study.containsMember(userAndRole.user,role) and not viewStudyAction.isRoleAndUser(user, userAndRole.user, role, administrativeRole) }" action="#{viewStudyAction.removeMember(userAndRole.user,role)}" ajaxSingle="true" />
| <a4j:commandButton type="submit" value="Remove as #{role.name}" reRender="memberGrid" rendered="#{viewStudyAction.isRoleAndUser(user, userAndRole.user, role, administrativeRole) and not viewStudyAction.confirmRemoveSelfAsAdmin}" action="#{viewStudyAction.setConfirmRemoveSelfAsAdmin(true)}" ajaxSingle="true" />
| <a4j:commandButton type="submit" value="Remove Yourself as #{role.name}. This cannot be undone." reRender="bodyPanel" rendered="#{viewStudyAction.isRoleAndUser(user, userAndRole.user, role, administrativeRole) and viewStudyAction.confirmRemoveSelfAsAdmin}" action="#{viewStudyAction.removeMember(userAndRole.user,role)}" ajaxSingle="true" />
| </a4j:repeat>
| </rich:column>
| </rich:dataTable>
|
|
Any opinion would be welcome. This problem has stumped me for more than a couple of days.
Mike Kohout
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4099894#4099894
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4099894
18Â years, 6Â months
[JBoss Messaging] - Re: can not catch excption when jboss as is down
by nkhadakk
I am using the version of JBoss Remoting as specified in the Jboss Messaging User guide. On looking at the contents of the JBoss Remoting jar, i see that it is the version : 2.2.1 GA.
The issue JBREM-732 appears to be fixed as of 2.2.0SP1. I guess that means JBoss Remoting 2.2.1 GA contains that fix. JBREM-732 consists of 're-connect' issues after the server has bounced... whereas in my situation Jboss remoting re-connect works well with no exceptions being thrown.
Its more of a issue that my JMS Listener never gets notification regarding the JMS Provider being unavailable....AND after the JMS provider becomes available, the Listener never gets any subsequent messages.
I have tried registering JMS Exception Listeners and even these are not invoked.
What is the maximum version of JBoss remoting that is compatible with JBoss AS 4.2.1 + Jboss Messaging 1.3.0 GA ? I could try a later version of remoting if i knew that it is compatible.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4099893#4099893
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4099893
18Â years, 6Â months
[JBoss Seam] - Re: clickable dataTable problem
by asookazian
"pete.muir(a)jboss.org" wrote : "asookazian" wrote : So I have a clickable dataTable that's based on a join of two tables. There is a submit button for each row of the dataTable. I can't use the @DataModelSelection annotation (commented below) b/c the List does not consist of only one Entity class, it's based on two.
|
| Don't forget your class has an inheritance hierachy.
|
| anonymous wrote : How can I identify which row needs to be updated and get all the necessary data for the 2nd table to be persisted to DB? 1st table is read-only. sounds like @DataModelSelection is out of the question here (Java generics does not allow me to specify more than one type per Collection).
|
| Page parameters?
when you refer to inheritance hierarchy, are you referring to the two entity classes (sub-classing one from the other, which doesn't make sense in this case b/c they're unrelated in terms of one is not a shape and one is not a rectangle, or one is not a person and one is not a manager, etc.).
or are you referring to the SFSB class?
i'm thinking you're referring to the two JPA entities...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4099890#4099890
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4099890
18Â years, 6Â months