[JBossWS] - Re: Ejb3 JMSTransportSupport
by jgilbert
I extended JMSTransportSupport and overrode processSOAPMessage() to get something to work with Ejb3 MDBs.
For starters the the WebService is implements per usual as a SLSB. I am just using the MDB as an alternate path in the WebService.
The MDB just defines the ObjectName for the real web service.
| @MessageDriven(activationConfig = {...})
| public class AuthorizationCallbackMDB extends MyJmsTransportSupport implements
| MessageListener {
| ObjectName getObjectName() {
| try {
| return new ObjectName(
| "jboss.ws:context=payment-authorizer-0,endpoint=AuthorizationCallbackServiceMockBean");
| } catch (Exception e) {
| throw new RuntimeException(e);
| }
| }
| }
|
| public abstract class MyJmsTransportSupport extends JMSTransportSupport {
|
| private static final long serialVersionUID = 1L;
|
| abstract ObjectName getObjectName();
|
| protected SOAPMessage processSOAPMessage(String fromName,
| InputStream reqMessage) throws SOAPException, IOException,
| RemoteException {
| try {
| ServiceEndpointManagerFactory factory = ServiceEndpointManagerFactory
| .getInstance();
| ServiceEndpointManager epManager = factory
| .getServiceEndpointManager();
| ServiceEndpoint sep = epManager
| .getServiceEndpointByID(getObjectName());
| return sep.handleRequest(null, null, reqMessage);
| } catch (BindingException ex) {
| throw new WSException("Cannot bind incomming soap message", ex);
| }
| }
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3986246#3986246
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3986246
19Â years, 7Â months
[JBoss Seam] - Possible bug in remoting with POJO backing bean w/ interface
by andrew.rw.robinson
Seam 1.0.1 GA
My remoting just stopped working on my POJO:
java.lang.RuntimeException: No compatible method found.
| at org.jboss.seam.remoting.Call.execute(Call.java:118)
| at org.jboss.seam.remoting.ExecutionHandler.handle(ExecutionHandler.java:92)
After looking at the code, the problem is with:
if (component.getBusinessInterfaces().size() > 0)
| {
| // Get the local interface for the component - this is the type that we're
| // going to assume we're invoking against.
| type = component.getBusinessInterfaces().iterator().next();
| }
If my bean is a POJO with an interface, the "type" will be that interface. Since this is not a session bean, and this is not a local or remote interface, it should not be looking for an interface right?
Before I had the interface on the class everything worked fine. My method signature:
@WebRemote
| public double getEditValue(int gridX, int gridY) {...}
Class signature:
@Name("liveReportBean")
| @LoggedIn
| @Scope(ScopeType.CONVERSATION)
| public class LiveReportBean
| implements UserContextChangeListener {...}
"UserContextChangeListener" is what Call.java finds instead of "LiveReportBean".
I will make a workaround by making an inner class that implements my interface so that it will work, but wanted to bring this up in case it is a bug.
Is this intentional or a bug?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3986245#3986245
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3986245
19Â years, 7Â months
[JBoss Seam] - Re: more seam resolver issues - how to handle a list that is
by gavin.kingï¼ jboss.com
You wasted two weeks, and you didn't even bother to look at the examples???!!
You have multiple trivial errors here, all of which would be obvious if you looked at examples:
<h:dataTable var="aDriver" value="#{dpsDriversList[currentDpsDriver]}" rendered="#{not empty dpsDriversList[dpsDriversFound]}">
Should be:
<h:dataTable var="aDriver" value="#{dpsDriversFound}" rendered="#{not empty dpsDriversFound}">
And
<td class="formFieldColumn"><h:inputText id="driverName" value="#{dpsDriversList[dpsDriverCriteria].DriverName}"/></td>
should be:
<td class="formFieldColumn"><h:inputText id="driverName" value="#{dpsDriverCriteria.driverName}"/></td>
And
<h:outputText value="#{aDriver.DriverName}"/>
should be:
<h:outputText value="#{aDriver.driverName}"/>
And
q.setParameter("@pDtDOB", dpsDriverCriteria.getDriverDob());
should not have an @ in it.
I recommend actually trying to learn JSF and Seam before typing random things into your editor. Geez!!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3986238#3986238
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3986238
19Â years, 7Â months
[JBoss Seam] - more seam resolver issues - how to handle a list that isn't
by arnieAustin
I am trying to build a simple, two page app that performs a login and if valid, proceeds to the second form that has search fields across the top and displays any valid records below the form (if any).
The login works fine and forwards to the 2nd page. I would expect seam not to find anything in the "conversation" (rather than sesssion) since the user hasn't entered anything. But when I do type in something and press Search, I get:
| 2006-11-15 10:53:25,546 DEBUG [org.jboss.seam.contexts.Lifecycle] >>> Begin web request
| 2006-11-15 10:53:25,578 DEBUG [org.jboss.seam.Component] instantiating Seam component: org.jboss.seam.core.manager
| 2006-11-15 10:53:25,578 DEBUG [org.jboss.seam.core.Manager] No stored conversation
| 2006-11-15 10:53:25,578 DEBUG [org.jboss.seam.contexts.Contexts] found in application context: org.jboss.seam.core.init
| 2006-11-15 10:53:25,578 DEBUG [org.jboss.seam.jsf.AbstractSeamPhaseListener] After restoring conversation context: ConversationContext(3)
| 2006-11-15 10:53:25,578 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolving name: dpsDriversList
| 2006-11-15 10:53:25,578 DEBUG [org.jboss.seam.Component] instantiating Seam component: dpsDriversList
| 2006-11-15 10:53:25,578 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
| 2006-11-15 10:53:25,578 DEBUG [org.hibernate.impl.SessionImpl] opened session at timestamp: 4766144944447488
| 2006-11-15 10:53:25,578 DEBUG [org.hibernate.jdbc.JDBCContext] TransactionFactory reported no active transaction; Synchronization not registered
| 2006-11-15 10:53:25,578 DEBUG [org.hibernate.ejb.AbstractEntityManagerImpl] Looking for a JTA transaction to join
| 2006-11-15 10:53:25,578 DEBUG [org.hibernate.jdbc.JDBCContext] successfully registered Synchronization
| 2006-11-15 10:53:25,593 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolved name to seam component
| 2006-11-15 10:53:25,593 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolving name: dpsDriversFound
| 2006-11-15 10:53:25,593 DEBUG [org.jboss.seam.Component] seam component not found: dpsDriversFound
| 2006-11-15 10:53:25,593 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] could not resolve name
| 2006-11-15 10:53:25,593 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolving name: dpsDriversList
| 2006-11-15 10:53:25,593 DEBUG [org.jboss.seam.contexts.Contexts] found in conversation context: dpsDriversList
| 2006-11-15 10:53:25,593 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolved name to seam component
| 2006-11-15 10:53:25,593 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolving name: dpsDriversFound
| 2006-11-15 10:53:25,593 DEBUG [org.jboss.seam.Component] seam component not found: dpsDriversFound
| 2006-11-15 10:53:25,593 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] could not resolve name
| 2006-11-15 10:53:25,593 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolving name: dpsDriversList
| 2006-11-15 10:53:25,593 DEBUG [org.jboss.seam.contexts.Contexts] found in conversation context: dpsDriversList
| 2006-11-15 10:53:25,593 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolved name to seam component
| 2006-11-15 10:53:25,593 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolving name: dpsDriverCriteria
| 2006-11-15 10:53:25,593 DEBUG [org.jboss.seam.Component] seam component not found: dpsDriverCriteria
| 2006-11-15 10:53:25,593 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] could not resolve name
| 2006-11-15 10:53:25,656 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolving name: dpsDriversList
| 2006-11-15 10:53:25,656 DEBUG [org.jboss.seam.contexts.Contexts] found in conversation context: dpsDriversList
| 2006-11-15 10:53:25,656 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolved name to seam component
| 2006-11-15 10:53:25,656 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolving name: dpsDriverCriteria
| 2006-11-15 10:53:25,656 DEBUG [org.jboss.seam.Component] seam component not found: dpsDriverCriteria
| 2006-11-15 10:53:25,656 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] could not resolve name
| 2006-11-15 10:53:25,656 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolving name: dpsDriversList
| 2006-11-15 10:53:25,656 DEBUG [org.jboss.seam.contexts.Contexts] found in conversation context: dpsDriversList
| 2006-11-15 10:53:25,656 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolved name to seam component
| 2006-11-15 10:53:25,656 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolving name: dpsDriverCriteria
| 2006-11-15 10:53:25,656 DEBUG [org.jboss.seam.Component] seam component not found: dpsDriverCriteria
| 2006-11-15 10:53:25,656 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] could not resolve name
| 2006-11-15 10:53:25,671 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolving name: dpsDriversList
| 2006-11-15 10:53:25,671 DEBUG [org.jboss.seam.contexts.Contexts] found in conversation context: dpsDriversList
| 2006-11-15 10:53:25,671 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolved name to seam component
| 2006-11-15 10:53:25,671 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolving name: dpsDriverCriteria
| 2006-11-15 10:53:25,671 DEBUG [org.jboss.seam.Component] seam component not found: dpsDriverCriteria
| 2006-11-15 10:53:25,671 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] could not resolve name
| 2006-11-15 10:53:25,671 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolving name: dpsDriversList
| 2006-11-15 10:53:25,671 DEBUG [org.jboss.seam.contexts.Contexts] found in conversation context: dpsDriversList
| 2006-11-15 10:53:25,671 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolved name to seam component
| 2006-11-15 10:53:25,671 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolving name: dpsDriverCriteria
| 2006-11-15 10:53:25,671 DEBUG [org.jboss.seam.Component] seam component not found: dpsDriverCriteria
| 2006-11-15 10:53:25,671 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] could not resolve name
| 2006-11-15 10:53:25,671 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolving name: dpsDriversList
| 2006-11-15 10:53:25,671 DEBUG [org.jboss.seam.contexts.Contexts] found in conversation context: dpsDriversList
| 2006-11-15 10:53:25,671 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolved name to seam component
| 2006-11-15 10:53:25,671 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolving name: dpsDriversFound
| 2006-11-15 10:53:25,671 DEBUG [org.jboss.seam.Component] seam component not found: dpsDriversFound
| 2006-11-15 10:53:25,671 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] could not resolve name
| 2006-11-15 10:53:25,671 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolving name: dpsDriversList
| 2006-11-15 10:53:25,671 DEBUG [org.jboss.seam.contexts.Contexts] found in conversation context: dpsDriversList
| 2006-11-15 10:53:25,671 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolved name to seam component
| 2006-11-15 10:53:25,671 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolving name: dpsDriversFound
| 2006-11-15 10:53:25,671 DEBUG [org.jboss.seam.Component] seam component not found: dpsDriversFound
| 2006-11-15 10:53:25,671 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] could not resolve name
| 2006-11-15 10:53:25,671 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
| 2006-11-15 10:53:25,671 DEBUG [org.jboss.seam.jsf.SeamExtendedManagedPersistencePhaseListener] committing transaction after phase: PROCESS_VALIDATIONS(3)
| 2006-11-15 10:53:25,671 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
| 2006-11-15 10:53:25,671 DEBUG [org.hibernate.jdbc.JDBCContext] TransactionFactory reported no active transaction; Synchronization not registered
| 2006-11-15 10:53:25,671 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
| 2006-11-15 10:53:25,671 DEBUG [org.jboss.seam.jsf.SeamExtendedManagedPersistencePhaseListener] beginning transaction prior to phase: RENDER_RESPONSE(6)
| 2006-11-15 10:53:25,671 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
| 2006-11-15 10:53:25,671 DEBUG [org.jboss.seam.Component] instantiating Seam component: facesMessages
| 2006-11-15 10:53:25,687 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolving name: dpsDriversList
| 2006-11-15 10:53:25,687 DEBUG [org.jboss.seam.contexts.Contexts] found in conversation context: dpsDriversList
| 2006-11-15 10:53:25,687 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolved name to seam component
| 2006-11-15 10:53:25,687 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolving name: dpsDriversFound
| 2006-11-15 10:53:25,687 DEBUG [org.jboss.seam.Component] seam component not found: dpsDriversFound
| 2006-11-15 10:53:25,687 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] could not resolve name
| 2006-11-15 10:53:25,687 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolving name: dpsDriversList
| 2006-11-15 10:53:25,687 DEBUG [org.jboss.seam.contexts.Contexts] found in conversation context: dpsDriversList
| 2006-11-15 10:53:25,687 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolved name to seam component
| 2006-11-15 10:53:25,687 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolving name: dpsDriversFound
| 2006-11-15 10:53:25,687 DEBUG [org.jboss.seam.Component] seam component not found: dpsDriversFound
| 2006-11-15 10:53:25,687 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] could not resolve name
| 2006-11-15 10:53:25,687 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolving name: dpsDriversList
| 2006-11-15 10:53:25,687 DEBUG [org.jboss.seam.contexts.Contexts] found in conversation context: dpsDriversList
| 2006-11-15 10:53:25,687 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolved name to seam component
| 2006-11-15 10:53:25,687 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolving name: dpsDriversFound
| 2006-11-15 10:53:25,687 DEBUG [org.jboss.seam.Component] seam component not found: dpsDriversFound
| 2006-11-15 10:53:25,687 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] could not resolve name
| 2006-11-15 10:53:25,687 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolving name: dpsDriversList
| 2006-11-15 10:53:25,687 DEBUG [org.jboss.seam.contexts.Contexts] found in conversation context: dpsDriversList
| 2006-11-15 10:53:25,687 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolved name to seam component
| 2006-11-15 10:53:25,687 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolving name: dpsDriversFound
| 2006-11-15 10:53:25,687 DEBUG [org.jboss.seam.Component] seam component not found: dpsDriversFound
| 2006-11-15 10:53:25,687 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] could not resolve name
| 2006-11-15 10:53:25,687 DEBUG [org.jboss.seam.core.Manager] Discarding conversation state: 3
| 2006-11-15 10:53:25,687 DEBUG [org.jboss.seam.contexts.Lifecycle] flushing page context
| 2006-11-15 10:53:25,718 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
| 2006-11-15 10:53:25,718 DEBUG [org.jboss.seam.jsf.SeamExtendedManagedPersistencePhaseListener] committing transaction after phase: RENDER_RESPONSE(6)
| 2006-11-15 10:53:25,718 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
| 2006-11-15 10:53:25,718 DEBUG [org.jboss.seam.contexts.Lifecycle] After render response, destroying contexts
| 2006-11-15 10:53:25,718 DEBUG [org.jboss.seam.contexts.Lifecycle] destroying event context
| 2006-11-15 10:53:25,718 DEBUG [org.jboss.seam.contexts.Contexts] destroying: org.jboss.seam.core.manager
| 2006-11-15 10:53:25,718 DEBUG [org.jboss.seam.contexts.Contexts] destroying: org.apache.myfaces.application.jsp.JspStateManagerImpl.SERIALIZED_VIEW
| 2006-11-15 10:53:25,718 DEBUG [org.jboss.seam.contexts.Contexts] destroying: com.sun.facelets.legacy.ELCONTEXT
| 2006-11-15 10:53:25,718 DEBUG [org.jboss.seam.contexts.Lifecycle] destroying conversation context
| 2006-11-15 10:53:25,718 DEBUG [org.jboss.seam.contexts.Contexts] destroying: facesMessages
| 2006-11-15 10:53:25,718 DEBUG [org.jboss.seam.contexts.Contexts] destroying: dpsDriversList
| 2006-11-15 10:53:25,718 DEBUG [org.jboss.ejb3.entity.ExtendedPersistenceContextPropagationInterceptor] ++++ LongLivedSessionPropagationInterceptor
| 2006-11-15 10:53:25,718 DEBUG [org.hibernate.jdbc.JDBCContext] TransactionFactory reported no active transaction; Synchronization not registered
| 2006-11-15 10:53:25,718 DEBUG [org.hibernate.ejb.AbstractEntityManagerImpl] Looking for a JTA transaction to join
| 2006-11-15 10:53:25,718 DEBUG [org.hibernate.jdbc.JDBCContext] successfully registered Synchronization
| 2006-11-15 10:53:25,718 DEBUG [org.hibernate.jdbc.JDBCContext] TransactionFactory reported no active transaction; Synchronization not registered
| 2006-11-15 10:53:25,718 DEBUG [org.hibernate.jdbc.JDBCContext] TransactionFactory reported no active transaction; Synchronization not registered
| 2006-11-15 10:53:25,718 DEBUG [org.jboss.seam.contexts.Lifecycle] flushing server-side conversation context
| 2006-11-15 10:53:25,718 DEBUG [org.jboss.seam.contexts.Lifecycle] <<< End web request
|
I've got the seam.properties file in the root of the EJB archive. This is working since the user login page was able to resolve the class to authenticate the user against.
Here's my quandry:
The concept of a DpsDriver (class) is an Entity since they exist in a table. That same object should store the users search parameters (private DpsDriver dpsDriverCriteria;) and of course a List of them is what should be returned from the database. I have no way of knowing if the following class and page would even work since seam cannot find the classes.
According to the tutorial on pages 13 and 14, the form references the @DataModel and @DataModelSelection properties and NOT the encompassing class:
| this:
| <td class="formFieldColumn"><h:inputText id="driverName" value="#{dpsDriverCriteria.DriverName}"/></td>
|
| not this:
| <td class="formFieldColumn"><h:inputText id="driverName" value="#{dpsDriversList[dpsDriverCriteria].DriverName}"/></td>
|
|
I'm sure I have some aspect of the syntax wrong up there. But I've tried every variation I could think of.
Seam is complaining that it cannot find an object - when the name its looking for is property of an object. What have I setup wrong?!
| class:
|
| package us.tx.state.oag.DPSLicenseInquiry.business;
|
| import java.io.Serializable;
| import java.util.List;
|
| import javax.ejb.Remove;
| import javax.ejb.Stateful;
| import javax.persistence.EntityResult;
| import javax.persistence.EntityManager;
| import javax.persistence.EntityManagerFactory;
| import javax.persistence.Persistence;
| import javax.persistence.PersistenceContext;
| import javax.persistence.PersistenceContextType;
| import javax.persistence.PersistenceUnit;
| import javax.persistence.Query;
|
| import org.jboss.seam.ScopeType;
| import org.jboss.seam.annotations.Conversational;
| import org.jboss.seam.annotations.Destroy;
| import org.jboss.seam.annotations.Factory;
| import org.jboss.seam.annotations.In;
| import org.jboss.seam.annotations.Name;
| import org.jboss.seam.annotations.Out;
| import org.jboss.seam.annotations.Scope;
| import org.jboss.seam.annotations.datamodel.DataModel;
| import org.jboss.seam.annotations.datamodel.DataModelSelection;
|
| import us.tx.state.oag.DPSLicenseInquiry.business.DpsDriver;
| import us.tx.state.oag.DPSLicenseInquiry.business.DpsDriversList;
| import us.tx.state.oag.DPSLicenseInquiry.business.User;
|
| @Stateful
| @Name("dpsDriversList")
| @Scope(ScopeType.CONVERSATION)
| @Conversational(ifNotBegunOutcome="userLogin")
| public class DpsDriversListAction implements DpsDriversList, Serializable {
|
| @In(create=false, required=true)
| private User user;
|
| @DataModel
| private List<DpsDriver> dpsDriversFound;
|
| @DataModelSelection
| private DpsDriver currentDpsDriver;
|
| public DpsDriver getCurrentDpsDriver() {
| return currentDpsDriver;
| }
|
| @In(create=true)
| @Out(scope=ScopeType.CONVERSATION,required=false)
| private DpsDriver dpsDriverCriteria;
|
| @In
| @PersistenceContext(type=PersistenceContextType.EXTENDED)
| @PersistenceUnit(unitName="PuDpsLicenseInquiry")
| private EntityManager DpsLicenseDb;
|
| public DpsDriversListAction() {
| // constructor
| }
|
| @Remove @Destroy
| public void destroy() {}
|
| //@Factory("dpsDriversList")
| public String findDpsDrivers() {
| try {
| Query q = DpsLicenseDb.createNamedQuery("txdlinquiry_spr");
| q.setParameter("@pDtDOB", dpsDriverCriteria.getDriverDob());
| q.setParameter("@pTxtAddress", dpsDriverCriteria.getDriverAddress());
| q.setParameter("@pTxtCityName", dpsDriverCriteria.getDriverCity());
| q.setParameter("@pTxtDLnumber", dpsDriverCriteria.getLicenseNumber());
| q.setParameter("@pTxtName", dpsDriverCriteria.getDriverName());
| dpsDriversFound = q.getResultList();
| return "success";
| } catch (Exception e) {
| return "failure";
| }
| }
|
| }
|
| Form:
|
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
| "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
| <html 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"
| xmlns:h="http://java.sun.com/jsf/html">
| <head>
| <f:loadBundle basename="messages" var="msgs" />
| <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
| <title>OAG / DPS License Inquiry</title>
| <link href="stylesheet/theme.css" rel="stylesheet" type="text/css" />
| </head>
| <body>
| <div id="pgHeader">
| <img src="images/banner.jpg" alt="OAG Banner" width="800px"/>
| </div>
| <div id="pgHeaderText">Office of the Attorney General</div>
|
| <div class="pgHorizSpace"> </div>
|
| <div id="pgMessages">
| <h:messages globalOnly="true"/>
| </div>
|
| <div class="pgHorizSpace"> </div>
|
| <div id="pgContent">
| <h:form>
| <fieldset>
| <legend>Enter your Search Criteria</legend>
| <table class="formInput">
| <tr><td> </td></tr>
| <tr><td colspan="6">NOTE: License number searches are exclusive, other fields may be used interchangebly.</td></tr>
| <tr><td class="formColumnRight">DL#</td>
| <td class="formColumnRight">Last, First Name</td>
| <td class="formColumnRight">Address</td>
| <td class="formColumnRight">City</td>
| <td class="formColumnRight">DOB</td>
| </tr>
| <tr><td> </td></tr>
|
| <tr><td class="formFieldColumn"><h:inputText id="driverLicenseNumber" value="#{dpsDriversList[dpsDriverCriteria].LicenseNumber}"/></td>
| <td class="formFieldColumn"><h:inputText id="driverName" value="#{dpsDriversList[dpsDriverCriteria].DriverName}"/></td>
| <td class="formFieldColumn"><h:inputText id="driverAddress" value="#{dpsDriversList[dpsDriverCriteria].DriverAddress}"/></td>
| <td class="formFieldColumn"><h:inputText id="driverCity" value="#{dpsDriversList[dpsDriverCriteria].DriverCity}"/></td>
| <td class="formFieldColumn"><h:inputText id="driverDob" value="#{dpsDriversList[dpsDriverCriteria].DriverDob}"/></td>
| </tr>
|
| <tr><td class="formFieldColumn"><h:commandButton styleClass="formButton" action="#{dpsDriversList.findDpsDrivers}" value="Search"/></td>
| </tr>
| </table>
| </fieldset>
| </h:form>
| <h:outputText value="No records to display" rendered="#{empty dpsDriversList[dpsDriversFound]}"/>
| <h:dataTable var="aDriver" value="#{dpsDriversList[currentDpsDriver]}" rendered="#{not empty dpsDriversList[dpsDriversFound]}">
| <h:column>
| <f:facet name="header">
| <h:outputText value="DL Number"/>
| </f:facet>
| <h:outputText value="#{aDriver.LicenseNumber}"/>
| </h:column>
| <h:column>
| <f:facet name="header">
| <h:outputText value="Name"/>
| </f:facet>
| <h:outputText value="#{aDriver.DriverName}"/>
| </h:column>
| <h:column>
| <f:facet name="header">
| <h:outputText value="Address"/>
| </f:facet>
| <h:outputText value="#{aDriver.DriverAddress}"/>
| </h:column>
| <h:column>
| <f:facet name="header">
| <h:outputText value="City"/>
| </f:facet>
| <h:outputText value="#{aDriver.DriverCity}"/>
| </h:column>
| <h:column>
| <f:facet name="header">
| <h:outputText value="DOB"/>
| </f:facet>
| <h:outputText value="#{aDriver.DriverDob}"/>
| </h:column>
| </h:dataTable>
| </div>
| <div class="pgHorizSpace"> </div>
| <div id="pgFooter">
| <p>(no footer text)</p>
| <p class="copyright">© 2006 Office of the Attorney General</p>
| </div>
| </body>
| </html>
|
Please help! I've wasted nearly two weeks trying to get this to work.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3986232#3986232
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3986232
19Â years, 7Â months
[JNDI/Naming/Network] - Re: How to develop portal
by PeterJ
I assume that you mean you want to create a custom portal which when used by your customers displays your portal, and not the default portal. If so, here is what I would do:
1) Make a copy of jboss-portal.sar
2) Edit jboss-portal.sar/conf/data/default-object.xml to contain your portal's layout (keep the portal name as 'default', though)
3) Delete jboss-portal.sar/portal-samples.war/WEB-INF/default-object.xml (this file defines the Test page, which you will not want)
4) If your portal contains custom portlets, places their war files under jboss-portal.sar (this is required only if you reference the portlets in the default-object.xml from step 2)
5) Create your own custom theme (so you portal announces itself as your portal and not the JBoss Portal) The Portal docs contains a detailed chapter on designing a theme, or you could make a copy of one of the existing themes at jboss-portal.sar/portal-core.war/themes and then use GIMP or Photoshop to edit the existing images.
6) Starting with a clean database and JBoss server, deploy the updated jboss-portal.sar.
I hope I didn't forget any steps, but I think that the above is all you need to know.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3986230#3986230
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3986230
19Â years, 7Â months