[JBoss Seam] - What the heck!!!!????
by samdoyle
I'm really starting to lose faith in Seam as I go beyond the simple tutorials and examples.
| javax.el.PropertyNotFoundException: /notificationAdmin.xhtml @50,99
| value="#{notificationManager.agencyIncidentTypes}": The
| class 'org.javassist.tmp.java.lang.Object_$$_javassist_1' does not have
| the property 'agencyIncidentTypes'.
|
And clearly notificationManager does!!
| @Stateful
| @Name("notificationManager")
| @Scope(ScopeType.CONVERSATION)
| @Restrict("#{s:hasRole('ultra-user')}")
| public class NotificationManagerBean
| implements NotificationManagerLocal {
|
| @DataModel
| private List<Agency> agencies;
|
| @EJB
| private AgencyFacadeLocal agencyFacade;
|
| @Out(scope=ScopeType.CONVERSATION)
| private List<IncidentType> agencyIncidentTypes =
| new ArrayList<IncidentType>();
|
| /** Creates a new instance of NotificationManagerBean */
| public NotificationManagerBean() {
| }
|
| @Begin(join=true) // Start the conversation.
| @Factory("agencies") // for #{agencies} as done now
| public void factoryAgencies()
| {
| this.agencies =
| agencyFacade.findAll();
| }
|
| public void getAgencyIncidentTypes( Agency selectedAgency )
| {
| this.agencyIncidentTypes = selectedAgency.getAgencyIncidentTypes();
| }
|
| // Ends the conversation via cancel operation.
| @End
| public void cancel() {}
|
| // Ends the conversation via the apply operation.
| @End
| public void apply() {}
|
| @Remove
| public void destroy() {}
|
| }
|
Here is the xhtml
| <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
| "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
| <ui:composition xmlns="http://www.w3.org/1999/xhtml"
| xmlns:s="http://jboss.com/products/seam/taglib"
| xmlns:ui="http://java.sun.com/jsf/facelets"
| xmlns:f="http://java.sun.com/jsf/core"
| xmlns:h="http://java.sun.com/jsf/html"
| xmlns:rich="http://richfaces.ajax4jsf.org/rich"
| xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
| xmlns:c="http://java.sun.com/jstl/core"
| template="layout/template3col.xhtml">
|
| <h:messages globalOnly="true" styleClass="message"/>
|
| <ui:param name="activeTab" value="NotificationAdmin"/>
|
|
| <ui:define name="leftsidebar">
| <rich:panel>
| <h:form>
| <rich:dataTable id="agencies"
| var="agency" value="#{agencies}">
|
| <f:facet name="header">
| <rich:columnGroup>
| <rich:column>
| <h:outputText value="Agency Name" />
| </rich:column>
| </rich:columnGroup>
| </f:facet>
|
| <rich:column>
| <a4j:commandLink type="submit"
| value="#{agency.agencyName}"
| reRender="incidenttypes"
| action="#{notificationManager.getAgencyIncidentTypes(agency)}"/>
| <!-- s:link action="#{notificationManager.getAgencyIncidentTypes(agency)}" value="#{agency.agencyName}"/ -->
| <!-- h:outputText value="#{agency.agencyName}" / -->
| </rich:column>
|
| </rich:dataTable>
| </h:form>
| </rich:panel>
| </ui:define>
|
| <ui:define name="content">
| <rich:panel>
| <h:form>
| <rich:dataTable id="incidenttypes"
| var="incidentType" value="#{notificationManager.agencyIncidentTypes}">
|
| <f:facet name="header">
| <rich:columnGroup>
| <rich:column>
| <h:outputText value="Incident Type" />
| </rich:column>
| </rich:columnGroup>
| </f:facet>
|
| <rich:column>
| <h:outputText value="#{incidentType.description}" />
| </rich:column>
|
| </rich:dataTable>
| </h:form>
| </rich:panel>
| </ui:define>
|
| <ui:define name="rightsidebar">
| </ui:define>
|
| </ui:composition>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4090818#4090818
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4090818
18Â years, 6Â months
[EJB 3.0] - Re: JBoss 4.2.1 and EJB 3.0 Redeployment
by nhelder
Thanks for that link jaikiran, it pointed me in the right direction.
For those curious, here's how I applied the details from that link to a ejb/war setting:
Create one (NetBeans) EJB project that contains only:
ejb.test.SessionBean.java
Create a second EJB project that contains:
ejb.test.interfaces.SessionLocal.java
ejb.test.interfaces.SessionRemote.java
And then a war project that attempts to make use of the local interface.
The build file for the interfaces project produces a .jar with only the Local and Remote classes (no .xml files or other items), and deploys that .jar file to %JBOSS_HOME%/server/default/deploy
The build file for the bean project produces a .jar with the SessionBean.class file and any other items needed to deploy the bean (i.e. jboss.xml) and deploys that .jar file to the same location as the previous.
Both the bean project and the war project include references to the interfaces .jar (so they can be compiled), but don't package the interfaces .jar into their own .jar/.war files.
Deploy the interfaces first...
Then the bean...
Then the war...
And everything works fine.
Redeploy just the bean project, and everything still works fine - no ClassCastExceptions encountered.
So yeah, thanks again!
- Nathan
PS. In my first stab, both the interfaces and the bean files had the same package - ejb.test. This created problems when it came time for the war file to do its lookup (ClassCastExceptions once again). Splitting the interfaces and bean classes into two separate packages resolved that problem.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4090815#4090815
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4090815
18Â years, 6Â months
[JBoss Seam] - Logging in and null outjected objects
by oblivion1200
Hello, I have problem with logging in and outjected objects.
I have two xhtml pages. First is visible for all, second only to logged users. The first page has link to second page. When I click on that link, user object is outjected
@Out(required=false,scope=ScopeType.SESSION)
| private Users user;
The second page has to display info about this user.
I have restriced acces to second page
<page view-id="/user.xhtml" login-required="true" />
so now when I click on link and I am not logged in I get redirected to login page. Then I log in and there is no user object outjected. Second page displays invalid data (nulls).
If I log in first and after that go to first page and click the link, it works ok.
Is there any way to solve this problem?
Thanks in advance
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4090808#4090808
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4090808
18Â years, 6Â months