[JBoss Seam] - Re: Time Zone Issue
by bengao
Here is my JSF Code.
|
|
| <!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:ui="http://java.sun.com/jsf/facelets"
| xmlns:h="http://java.sun.com/jsf/html"
| xmlns:f="http://java.sun.com/jsf/core"
| xmlns:s="http://jboss.com/products/seam/taglib"
| xmlns:a="https://ajax4jsf.dev.java.net/ajax"
| xmlns:rich="http://richfaces.ajax4jsf.org/rich"
| template="template.xhtml">
|
|
| <ui:define name="content">
| <div class="section">
| <h1>Transaction Detail</h1>
| </div>
| <div class="section">
|
| <h:form id="register">
| <fieldset>
|
| <div class="entry">
| <div class="label">Transaction Number:</div>
| <div class="output">#{transaction.txNumber}</div>
| </div>
|
| <div class="entry">
| <div class="label">Veteran SSN:</div>
| <div class="output">#{transaction.vetSSN}</div>
| </div>
|
| <div class="entry">
| <div class="label">Veteran Name</div>
| <div class="output">#{veteran.vetFirstName} #{veteran.vetLastName}</div>
| </div>
|
| <div class="entry">
| <div class="label">Date Received:</div>
| <div class="output">
| <h:outputText value="#{transaction.txDateReceived}">
| <s:convertDateTime pattern="MM/dd/yyyy"/>
| </h:outputText>
|
| </div>
| </div>
|
| <div class="entry">
| <div class="label">Date Due:</div>
| <div class="output">
| <h:outputText value="#{transaction.txDateDue}">
| <s:convertDateTime pattern="MM/dd/yyyy"/>
| </h:outputText>
|
|
| </div>
| </div>
|
| <div class="entry">
| <div class="label">Transaction Assigned:</div>
| <div class="output">#{transaction.txPersonAssigned} </div>
| </div>
|
| <div class="entry">
| <div class="label">Date Closed</div>
| <div class="output">
| <h:outputText value="#{transaction.txDateClosed}">
| <s:convertDateTime pattern="MM/dd/yyyy"/>
| </h:outputText>
| </div>
| </div>
|
| <div class="entry">
| <div class="label">Remarks:</div>
| <div class="output">#{transaction.txRemarks} </div>
| </div>
|
| <s:validateAll>
|
| <f:facet name="aroundInvalidField">
| <s:span styleClass="errors"/>
| </f:facet>
|
|
|
| </s:validateAll>
|
| <div class="entry errors">
| <h:messages globalOnly="true"/>
| </div>
|
| <div class="entry">
| <div class="label"> </div>
| <div class="input">
| <h:commandButton id="admin" value="Admin" action="#{adminbean.adminTX(transaction)}" rendered="#{sessionstatus.isSup}"/>
| </div>
| </div>
|
| </fieldset>
|
| </h:form>
|
| </div>
| <div class="section">
| <br/>
| <br/>
| Detail Transaction History
| <h:form>
| <rich:datascroller for="eventList" maxPages="20" />
| <rich:spacer height="5" />
| <rich:dataTable id="eventList" rows="5" columnClasses="col"
| value="#{txEventList}" var="txevent">
| <f:facet name="header">
| <rich:columnGroup>
| <h:column>
| <h:outputText styleClass="headerText" value="Date" />
| </h:column>
| <h:column>
| <h:outputText styleClass="headerText" value="Time" />
| </h:column>
| <h:column>
| <h:outputText styleClass="headerText" value="User" />
| </h:column>
| <h:column>
| <h:outputText styleClass="headerText" value="Operation" />
| </h:column>
| <h:column>
| <h:outputText styleClass="headerText" value="Remarks" />
| </h:column>
| </rich:columnGroup>
| </f:facet>
|
| <h:column>
| <h:outputText value="#{txevent.eventTime}">
| <f:convertDateTime dateStyle="short" pattern="MM/dd/yyyy"/>
| </h:outputText>
|
| </h:column>
|
| <h:column>
| <h:outputText value="#{txevent.eventTime}">
| <f:convertDateTime timeStyle="short" pattern="h:mm:ss a"/>
| </h:outputText>
|
| </h:column>
|
| <h:column>
| <h:outputText value="#{txevent.eventActor}" />
| </h:column>
| <h:column>
| <h:outputText value="#{txevent.eventType}" />
| </h:column>
| <h:column>
| <h:outputText value="#{txevent.eventDescription}" />
| </h:column>
|
| </rich:dataTable>
| <br/>
| <h:outputLink value="RetrieveReport" >
| <f:param name="type" value="txDetail" />
| <f:param name="tx" value="#{transaction.txNumber}" />
| <h:outputText value="Print Transaction History ->"/>
| </h:outputLink>
| </h:form>
|
| </div>
|
| </ui:define>
|
| </ui:composition>
|
Thanks,
Ben
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4036468#4036468
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4036468
19 years
[JBoss jBPM] - Problem using mysql
by jcv
Hi, i've followed the steps to user mysql instead of hypersonic, i can upload process, and work with them, but i'm keep getting this error:
13:13:49,906 WARN [JDBCExceptionReporter] SQL Error: 1064, SQLState: 42000
| 13:13:49,906 ERROR [JDBCExceptionReporter] You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1 job0_.ID_ as ID1_26_, job0_.VERSION_ as VERSION3_26_, job0_.DUEDATE_ as DUEDAT' at line 1
| 13:13:49,906 ERROR [JobSession] org.hibernate.exception.SQLGrammarException: could not execute query
| 13:13:49,906 ERROR [JobExecutorThread] exception in job executor thread. waiting 40000 milliseconds
| org.jbpm.JbpmException: couldn't get acquirable jobs
| at org.jbpm.db.JobSession.getFirstAcquirableJob(JobSession.java:44)
| at org.jbpm.job.executor.JobExecutorThread.acquireJobs(JobExecutorThread.java:111)
| at org.jbpm.job.executor.JobExecutorThread.run(JobExecutorThread.java:56)
| Caused by: org.hibernate.exception.SQLGrammarException: could not execute query
| at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:67)
| at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
| at org.hibernate.loader.Loader.doList(Loader.java:2147)
| at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2028)
| at org.hibernate.loader.Loader.list(Loader.java:2023)
| at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:393)
| at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)
| at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
| at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
| at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
| at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:780)
| at org.jbpm.db.JobSession.getFirstAcquirableJob(JobSession.java:40)
| ... 2 more
| Caused by: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1 job0_.ID_ as ID1_26_, job0_.VERSION_ as VERSION3_26_, job0_.DUEDATE_ as DUEDAT' at line 1
| at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936)
| at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2941)
| at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1623)
| at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1715)
| at com.mysql.jdbc.Connection.execSQL(Connection.java:3249)
| at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1268)
| at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1403)
| at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:236)
| at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:186)
| at org.hibernate.loader.Loader.getResultSet(Loader.java:1668)
| at org.hibernate.loader.Loader.doQuery(Loader.java:662)
| at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
| at org.hibernate.loader.Loader.doList(Loader.java:2144)
| ... 11 more
|
any hints on why is this happening?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4036456#4036456
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4036456
19 years
[JBoss Seam] - Missing something basic with regards to bijection
by mlh496
Hey there,
Suppose you have a Stateful bean called "PersonManager" that handles both the CRUD and search features for the "Person" entity. I'm using Session scope. I have the following in the "PersonManager"
| @DataModel
| List<Person> people;
|
| @DataModelSelection
| Person selectedPerson;
|
| // Person property
| private Person person;
| public void setPerson(Person person) { this.person = person; }
| public Person getPerson() { return person; }
|
| public void clickPerson() {
| person = selectedPerson;
| return "edit";
| }
|
When I display a clickable data table with a command link to clickPerson, the selectedPerson does get injected into the PersonManager. I then assign this to the "person" property. Now if I go to a page to edit the Person, expressions like #{personManager.person.firstName} fails. HOWEVER, if I use an expression like #{personManager.selectedPerson.firstName} it works.
Why doesn't it stick when I copy the selectedPerson to the property?
-Michael
PS: I'm using the edit page to also create new people. This is why I wanted to bind the edit page to a property and not a selected item.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4036455#4036455
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4036455
19 years
[JBoss Seam] - Form not submitting using PageFlows
by smithbstl
I have a weird problem using pageflows. I have a h:commandLink in a datatable that has an action pointing to a transition in a pageflow. When just the action of the commandLink is set, the form never gets submitted and hence my DataModelSelection component is not set. When I throw in an arbitrary actionListener on the commandLink, the form is submitted and all is well. I think I am missing something surely fundamental but can't see it.
When I take out the actionListener, selectedRequest is null, when I put it back in, selectedRequest returns the selected row of the DataModel
Here is the commandLink
<h:commandLink action="viewRequest" actionListener="#{requestEntry.printSelectedRequest}"
| value="#{msgs['ServiceRequestList.viewRequest']}"/>
The pageFlow
<pageflow-definition
| xmlns="http://jboss.com/products/seam/pageflow"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation= "http://jboss.com/products/seam/pageflow http://jboss.com/products/seam/pageflow-1.2.xsd"
| name="serviceRequestCreation">
|
| <start-page name="addressSearch" view-id="/AddressLookup.xhtml">
| <transition name="viewRequests" to="requestListing"/>
| </start-page>
| <page name="requestListing" view-id="/AddressRequestListing.xhtml">
| <redirect/>
| <transition name="viewRequest" to="serviceRequest"/>
| </page>
| <page name="serviceRequest" view-id="/ServiceRequest.xhtml">
| <redirect/>
| </page>
|
| </pageflow-definition>
Here is the SFSB
@Stateful
| @Name("requestEntry")
| @Scope(ScopeType.CONVERSATION)
| public class RequestEntryAction implements com.stlouiscity.csb.ejb.action.RequestEntry {
|
| @PersistenceContext(unitName="CSB_Oracle", type=PersistenceContextType.EXTENDED)
| private EntityManager em;
|
| @In(create=true)
| private Address address;
|
| @DataModel("addresses")
| private List<ParcelAddress> addresses;
|
| @DataModelSelection(value="addresses")
| @Out(required=false)
| private ParcelAddress selectedAddress;
|
| @DataModel("requests")
| private List<ServiceRequest> requests;
|
| @DataModelSelection(value="requests")
| private ServiceRequest selectedRequest;
|
| public RequestEntryAction() {
| }
|
| public void findAddresses() {
| if (address.getStreetName() != null) {
| System.out.println("Address Is NOT NULL");
| //Find ParcelAddress
| Query q = em.createQuery("Select a From ParcelAddress a Where" +
| " (a.structureAddress.nlc.streetDirection = :streetDirection OR :streetDirection IS NULL) AND" +
| " (lower(a.structureAddress.nlc.streetName) LIKE :street) AND" +
| " (((a.structureAddress.structureAddressPK.houseNumber = :houseNumber) OR" +
| " (:houseNumber BETWEEN a.structureAddress.houseLow AND a.structureAddress.houseHigh)) OR (:houseNumber IS NULL))");
| q.setParameter("houseNumber",address.getHouseNumber());
| q.setParameter("streetDirection",address.getStreetDirection());
| q.setParameter("street",address.getStreetName().toLowerCase() + "%");
| addresses = q.getResultList();
| } else {
| System.out.println("Address IS NULL");
| }
| }
|
| public void viewRequests() {
| System.out.println("**********Started PageFlow*************");
| findRequests(selectedAddress);
| }
|
| public void findRequests(ParcelAddress address) {
| System.out.println("**********Entered findRequests*************");
| System.out.println("**********Selected Address: " + address.toString());
| Query q = em.createQuery("Select s From ServiceRequest s Where" +
| " s.parcelAddress.parcelAddressPK.houseNumber = :houseNumber AND" +
| " s.parcelAddress.parcelAddressPK.houseSuffix = :houseSuffix AND" +
| " s.parcelAddress.parcelAddressPK.nlc = :nlc AND" +
| " s.parcelAddress.parcelAddressPK.cityBlock = :cityBlock AND" +
| " s.parcelAddress.parcelAddressPK.parcelNumber = :parcelNumber)");
| q.setParameter("houseNumber", address.getParcelAddressPK().getHouseNumber());
| q.setParameter("houseSuffix", address.getParcelAddressPK().getHouseSuffix());
| q.setParameter("nlc", address.getParcelAddressPK().getNlc());
| q.setParameter("cityBlock", address.getParcelAddressPK().getCityBlock());
| q.setParameter("parcelNumber", address.getParcelAddressPK().getParcelNumber());
| requests = q.getResultList();
| }
| }
|
| public void printSelectedRequest() {
| System.out.println("Selected Request: " + getSelectedRequest().toString());
| }
|
| @Remove @Destroy
| public void destroy() {
|
| }
|
| public ServiceRequest getSelectedRequest() {
| return selectedRequest;
| }
|
| public void setSelectedRequest(ServiceRequest selectedRequest) {
| this.selectedRequest = selectedRequest;
| }
|
TIA
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4036454#4036454
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4036454
19 years
[EJB 3.0] - Fix to EJBTHREE-424 forces use of @Clustered annotation
by lizmstanley
I'm running JBoss 4.2.0 CR1. This is a result of the fix to JIRA issue EJBTHREE-424. In BaseSessionProxyFactory.substituteSystemProperty, the StringPropertyReplacer is used to allow the substitution of a partition name for the @Clustered annotation. However, if there is no such annotation in the bean, StringPropertyReplacer throws a NullPointerException as there is no value to replace. As a result, the bean is not deployed and the following messages are output:
10:10:53,005 WARN [BaseSessionProxyFactory] Unable to replace @Clustered partition attribute null. Caused by class java.lang.NullPointerException null
| 10:10:53,005 WARN [ServiceController] Problem starting service jboss.j2ee:ear=MyEar.ear,jar=beans.jar,name=MyBean,service=EJB3
| javax.naming.NameNotFoundException: null not bound
|
My goal here is not to include any vendor-specific annotations like @Clustered in the code. Instead we prefer to specify that type of information in deployment descriptors that can be included at runtime so we could deploy to different platforms if desired, without having to change the code itself.
In the earlier version of JBoss we were running (4.0.4), we were forced to use DefaultPartition as the name of the cluster, but were able to specify the clustering attributes in the deployment descriptor, such whether the bean is to be clustered, and the load balancing scheme. Now we are able to specify a different partition name, but are no longer able to use the deployment descriptor as the sole source of clustering information. This is undesirable as it defeats any possibility of platform-independent code.
http://jira.jboss.com/jira/browse/EJBTHREE-424
http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbossas/branches/JEE5_TCK/ejb3...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4036452#4036452
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4036452
19 years
[EJB 3.0] - Deploy EJB3 App (Jdeveloper JSF)
by lrocholl
Hi, i'm trying to deploy a EJB3-JSF web application developed with JDeveloper 10.1.3.2. I'm using Oracle's EJB implementation (Toplink)
I have added all the required jars:
jnpserver.jar
jbossall-client.jar
jboss-client.jar
jboss-common.jar
jboss-ejb3.jar
jboss-aspect-library-jdk50.jar
However, the deploy fails with the following message:
ObjectName: persistence.units:ear=sipe.ear,jar=sipemodel.jar,unitName=Model
State: FAILED
Reason: org.hibernate.MappingException: property mapping has wrong number of columns: model.Vistacalificacionadjudicacionproveedor.codigo_proveedor type: object I Depend On:
jboss.jca:service=ManagedConnectionFactory,name=DefaultDS
Depends On Me:
jboss.j2ee:ear=sipe.ear,jar=sipemodel.jar,name=SessionEJB,service=EJB3
Any advice would be very helpful.
Regards,
Luis R.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4036451#4036451
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4036451
19 years