[JBoss Seam] - Problems using a4j:support, s:selectItems and s:convertEntit
by Neiti01
Hi,
I am using two selectOneMenus with s:convertEntity. When a value is selected in the first selectOneMenu the selectItems of the second one are reloaded.
Everything works fine until i press a a4j:commandButton to reRender a dataTable based on the selected values. After pressing the button every value set from the
selectOneMenu is set to null and choosing another value in the selectOneMenu don't work.
I tried playing around with ajaxSingle, immediate and a4j:region but nothing seems to work.
Similar combinations of those items in the same application work without problems. But this particular page isn't working no matter what i'm doing.
Here is the relevant code:
View:
<a4j:commandButton actionListener="#{tool1.filterData}" value="#{labels['xrail.tool1.filter']}" reRender="detailList" status="progress"/>
|
| <a4j:region id="statusRegion">
| <a4j:status startText="#{labels['xrail.tool1.processing']}" stopText="" id="progress"/>
| </a4j:region>
| <rich:toolBar contentStyle="width: 100%">
| <h:panelGrid columns="1" style="width: 100%">
| <rich:spacer width="1" height="15" />
| <rich:dataTable id="detailList" value="#{tool1.details}" var="detail" style="width:100%" headerClass="top_align">
| <rich:column>
| <f:facet name="header">
| <h:panelGrid columns="1">
| #{labels['xrail.tool1.departure_country']}
| <h:selectOneMenu value="#{tool1.departureCountry}" id="departureCountry">
| <s:selectItems value="#{selectItems.railways}" var="railway" label="#{railway.name}" noSelectionLabel=" "/>
| <s:convertEntity />
| <a4j:support event="onchange" reRender="departureStation"/>
| </h:selectOneMenu>
| </h:panelGrid>
| </f:facet>
| <h:outputText value="#{detail.origStation.luRailway.name}"/>
| </rich:column>
| <rich:column>
| <f:facet name="header">
| <h:panelGrid columns="1">
| #{labels['xrail.tool1.departure_station']}
| <h:selectOneMenu value="#{tool1.departureStation}" id="departureStation" disabled="#{tool1.departureCountry==null}" style="font-size:10px">
| <s:selectItems value="#{tool1.departureCountry.luStations}" var="station" noSelectionLabel=" "
| label="#{station.stationCode}-#{station.name}" />
| <s:convertEntity />
| </h:selectOneMenu>
| </h:panelGrid>
| </f:facet>
| <h:outputText value="#{detail.origStation.stationCode}-#{detail.origStation.name}"/>
| </rich:column>
Helper bean to populate selectItems:
| @Name("selectItems")
| @Scope(ScopeType.EVENT)
| public class SelectItems {
|
| @In
| private EntityManager entityManager;
|
| public List getRailways() {
| return entityManager.createQuery("Select r from LuRailway r where r.isValid = true order by r.name asc").getResultList();
| }
|
| }
|
Backing bean for page:
| @Name("tool1")
| @Scope(ScopeType.PAGE)
| public class Tool1 {
|
| @In
| private EntityManager entityManager;
|
| private LuRailway departureCountry;
| private LuStation departureStation;
|
| public LuStation getDepartureStation() {
| return departureStation;
| }
|
| public void setDepartureStation(LuStation departureStation) {
| this.departureStation = departureStation;
| }
|
| public LuRailway getDepartureCountry() {
| return departureCountry;
| }
|
| public void setDepartureCountry(LuRailway departureCountry) {
| this.departureCountry = departureCountry;
| }
|
| public void filterData(ActionEvent event) {
| //Makes some sort of search request
| }
|
In both entity beans equals and hashCode are overridden but it also don't works if i don't override them.
What causes this problem?
Thanks in advance.
Markus
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4122161#4122161
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4122161
18 years, 6 months
[Security & JAAS/JBoss] - Error interface org.jboss.security.saml.SSOManagerService is
by malves
Hi,
I've configured 2 webapps with SSO Federated on JBoss. Configurations seems to be fine.
But, I've got the error below when trying to access the index page on one of webapps.
Looking for SSOManagerService on Jboss JMX Console, and there it is.
Debugging the code of SSOManager class I realized that sometimes the code works and SSOManagerService is returned, but in other cases the error occurs.
Has anybody any ideia???
thanks
10:14:33,968 ERROR [SSOAutoLogout] org.jboss.security.valve.SSOAutoLogout[/PocSSOApp1]
javax.servlet.ServletException: java.lang.IllegalArgumentException: interface org.jboss.security.saml.SSOManagerService is not visible from class loader
at org.jboss.security.valve.SSOTokenManager.invoke(SSOTokenManager.java:201)
at org.jboss.security.valve.SSOAutoLogout.invoke(SSOAutoLogout.java:172)
at org.jboss.security.valve.SSOFederationRouter.invoke(SSOFederationRouter.java:135)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:595)
10:14:33,968 ERROR [CoyoteAdapter] An exception or error occurred in the container during the request processing
javax.servlet.ServletException: java.lang.IllegalArgumentException: interface org.jboss.security.saml.SSOManagerService is not visible from class loader
at org.jboss.security.valve.SSOAutoLogout.invoke(SSOAutoLogout.java:178)
at org.jboss.security.valve.SSOFederationRouter.invoke(SSOFederationRouter.java:135)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:595)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4122160#4122160
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4122160
18 years, 6 months
[JBoss Seam] - Re: conversationId and IPC Portlets
by dcshonda
Hi everyone!
Please, help me. I have a problem with IPC Portlets. I have similar case.
But my problem is that I cannot rerender portlet B. I have a listener in portlet B, and it works fine.
My problem is that I have a <h:commandLink ...> in Portlet A, and I want to recibe a data in portlet B, when I push link in portlet A.
I am really new in JBoss Seam and portlets and I am not very sure, what is wrong...
Portlet A: (BuscadorOperacionesWindow)
|
| <h:dataTable id="tablaOperaciones" value="#{expedientes}" rows="10" class="blue-table" border="1" var="op">
| <h:column>
| <f:facet name="header">#{messages.expediente}</f:facet>
| <h:commandLink value="#{op.operacionId}" action="#gestorexpediente.enviaDatos(op.operacionId)}" >
| <f:param name="datoOp" value="#{op.operacionId}" />
| </h:commandLink>
| </h:column>
| ...
|
Portlet B: (VisorOperacionWindow)
| <h:panelGrid columns="2">
| <h:outputLabel value="#{messages.operacion}"/>
| <h:outputLabel id="datoOp"/>
| ...
|
Listener - Portlet B
| public class PortletB extends GenericPortlet
| {
| public static class Listener implements PortalNodeEventListener
| {
| public PortalNodeEvent onEvent(PortalNodeEventContext context, PortalNodeEvent event)
| {
| PortalNode node = event.getNode();
| String nodeName = node.getName();
|
| WindowActionEvent newEvent = null;
|
| if (nodeName.equals("BuscadorOperacionesWindow") && event instanceof WindowActionEvent)
| {
|
| WindowActionEvent wae = (WindowActionEvent) event;
| PortalNode windowB = node.resolve("../VisorOperacionWindow");
| if (windowB != null)
| {
| newEvent = new WindowActionEvent(windowB);
| newEvent.setMode(wae.getMode());
| newEvent.setWindowState(wae.getWindowState());
|
| Map parametros = (Map)wae.getParameters();
| for (Iterator keyValuePairs = parametros.entrySet().iterator(); keyValuePairs.hasNext();)
| {
| Map.Entry entry = (Map.Entry) keyValuePairs.next();
| Object key = entry.getKey();
| Object value = entry.getValue();
| if(key.equals("datoOp"))
| {
| HashMap param = new HashMap();
| param.put(key, value);
| newEvent.setParameters(param);
| return newEvent;
| }
| }
| return context.dispatch();
| }
| }
| return context.dispatch();
| }
| }
| }
|
Anyone, can give me an example of JSF portlet + IPC + Seam
Thanks very much
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4122158#4122158
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4122158
18 years, 6 months
Seam JNDI: javax.naming.NameNotFoundException: mtgInventory not bound
by Bram Patelski
Hi,
I'm trying to deploy an ear on JBoss 4.2.2.GA using Seam 2.0.0.GA.
Deployment is fine, no errors and I can see my EJB component loaded like
this:
12:27:50,101 INFO [Component] Component: cardsAction, scope: STATELESS,
type: STATELESS_SESSION_BEAN, class:
com.patelski.magic.inventory.action.CardActionImpl, JNDI:
mtgInventory/CardActionImpl/local
But when I try to load a page that uses this component, I get this:
12:28:10,928 WARN [lifecycle] executePhase(RENDER_RESPONSE 6,
com.sun.faces.context.FacesContextImpl@d14192) threw exception
org.jboss.seam.InstantiationException: *Could not instantiate Seam
component: cardsAction*
at org.jboss.seam.Component.newInstance(Component.java:1962)
.....
Caused by: javax.naming.NameNotFoundException: *mtgInventory not bound*
at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
.....
12:28:11,255 ERROR [ExceptionFilter] handling uncaught exception
javax.servlet.ServletException: Could not instantiate Seam component:
cardsAction
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:256)
.....
etc.
Settings I use here are:
In components.xml:
<core:init jndi-pattern="mtgInventory/#{ejbName}/local" />
I guess this has something to do with my JNDI-setting, but I don't know
what.
I've tried several things, but the Seam tutorial settings won't even deploy:
http://docs.jboss.org/seam/1.2.1.GA/reference/en/html/tutorial.html
<core:init jndi-pattern="@jndiPattern@"/>
This gives:
12:37:07,476 INFO [Initialization] reading /WEB-INF/components.xml
12:37:07,600 ERROR [[/mtg-inventory]] Exception sending context initialized
event to listener instance of class org.jboss.seam.servlet.SeamListener
java.lang.RuntimeException: error while reading /WEB-INF/components.xml
at org.jboss.seam.init.Initialization.initComponentsFromXmlDocument(
Initialization.java:136)
.....
at
org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(
AbstractDeploymentScanner.java:225)
Caused by: java.lang.IllegalArgumentException: Exception setting property
org.jboss.seam.core.init.jndiPattern on component org.jboss.seam.core.init.
*Expression @jndiPattern@ evaluated to null.*
at org.jboss.seam.init.Initialization.installComponentFromXmlElement
(Initialization.java:407)
at
org.jboss.seam.init.Initialization.installComponentsFromXmlElements(
Initialization.java:257)
at org.jboss.seam.init.Initialization.initComponentsFromXmlDocument(
Initialization.java:132)
... 92 more
Caused by: java.lang.IllegalArgumentException: null value
at org.jboss.seam.util.Conversions$FlatPropertyValue.<init>(
Conversions.java:275)
at org.jboss.seam.init.Initialization.getPropertyValue(
Initialization.java:462)
at org.jboss.seam.init.Initialization.installComponentFromXmlElement
(Initialization.java:402)
18 years, 6 months