[JBoss Seam] - Problems using Ajax4jsf to Seam Hibernate3 sample app
by smartbinary
Hello,
I've recently worked to get the latest versions of Ajax4jsf, Seam, Hibernate-core, and Hibernate-Annotations running the Seam Hibernate3 Booking sample...persisting to an Oracle 10gR2 DB. Everything is running fine until I try to add some Ajax4jsf functionality in. I've noticed others posting Ajax4jsf w/Seam related questions here...so here's another :-)
Here's an example of what I'm running into: I'm working with the main.xhtml file and have replaced the standard jsf command buttons with the a4j:command buttons -- with a reRender to an a4j:outputPanel.
The system processes command button requests fine, but I always get a full-page redraw (instead of the desired redraw of the targeted a4j:outputPanel). If I add a , it reports that the system is always doing an extra redirect after the post -- potentially leading to the full page redraw?
Here is the updated Seam booking main.xhtml page:
<!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:a4j="https://ajax4jsf.dev.java.net/ajax"
template="template.xhtml">
<!-- content -->
<ui:define name="content">
<h:form>
<h:messages globalOnly="true"/>
<h1>Search Hotels</h1>
<h:inputText value="#{hotelBooking.searchString}" style="width: 165px;" />
<a4j:commandButton value="Find Hotels" action="#{hotelBooking.find}" styleClass="button" reRender="hotelFrm"/>
<a4j:commandButton value="Clear Results" action="#{hotelBooking.clear}" styleClass="button" reRender="hotelFrm"/>
</h:form>
<a4j:outputPanel id="hotelFrm">
<h:form>
<h:outputText value="No Hotels Found" rendered="#{hotels != null and hotels.rowCount==0}"/>
<h:dataTable value="#{hotels}" var="hot" rendered="#{hotels.rowCount>0}">
<h:column>
<f:facet name="header">Name</f:facet>
#{hot.name}
</h:column>
<h:column>
<f:facet name="header">Address</f:facet>
#{hot.address}
</h:column>
<h:column>
<f:facet name="header">City, State</f:facet>
#{hot.city}, #{hot.state}
</h:column>
<h:column>
<f:facet name="header">Zip</f:facet>
#{hot.zip}
</h:column>
<h:column>
<f:facet name="header">Action</f:facet>
<h:commandLink action="#{hotelBooking.selectHotel}">View Hotel</h:commandLink>
</h:column>
</h:dataTable>
</h:form>
<h1>Current Hotel Bookings</h1>
<h:form>
<h:outputText value="No Bookings Found" rendered="#{bookings.rowCount==0}"/>
<h:dataTable value="#{bookings}" var="book" rendered="#{bookings.rowCount>0}">
<h:column>
<f:facet name="header">Name</f:facet>
#{book.hotel.name}
</h:column>
<h:column>
<f:facet name="header">Address</f:facet>
#{book.hotel.address}
</h:column>
<h:column>
<f:facet name="header">City, State</f:facet>
#{book.hotel.city}, #{book.hotel.state}
</h:column>
<h:column>
<f:facet name="header">Check in date</f:facet>
<h:outputText value="#{book.checkinDate}">
<f:convertDateTime type="date"/>
</h:outputText>
</h:column>
<h:column>
<f:facet name="header">Check out date</f:facet>
<h:outputText value="#{book.checkoutDate}">
<f:convertDateTime type="date"/>
</h:outputText>
</h:column>
<h:column>
<f:facet name="header">Confirmation number</f:facet>
#{book.id}
</h:column>
<h:column>
<f:facet name="header">Action</f:facet>
<h:commandLink action="#{bookingList.cancel}">Cancel</h:commandLink>
</h:column>
</h:dataTable>
</h:form>
</a4j:outputPanel>
</ui:define>
<!-- sidebar -->
<ui:define name="sidebar">
</ui:define>
</ui:composition>
-----
Any advice is MUCH appreciated.
Regards,
Todd
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3974988#3974988
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3974988
19 years, 6 months
[JBoss Seam] - Issue with JSF datatable with Seam Obj.
by skr
Hi,
I am using seam + JSF datatable, i am not able to use the value of datamodle in custom jsp tags. getting exception. here is my jsf table.
monitorAction is the seam action object name. monitorReviews is the collection. Is it required to bind the action (monitorAction) in datatable value? just monitorReviews is working fine. I tried with int and String for mReview.rating. with out custom tag, it was working fine.
Please help me how can i use custom tags in jsf page with seam obj's values. Please look at the exception below the code
<h:dataTable id="MTable" border="1" width="60%" value="#{monitorAction.monitorReviews}" var="mReview">
<h:column>
<f:facet name="header">
<h:outputText value="Date"/>
</f:facet>
<h:outputText value="#{mReview.dateInFormat}"/>
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="Rating"/>
</f:facet>
<f:verbatim>
<rr:ratingImage averagerating="#{mReview.rating}" descriptionNeeded="Y"/>
</f:verbatim>
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="Subject"/>
</f:facet>
<h:outputText value="#{mReview.subject}"/>
</h:column>
</h:dataTable>
Exception:
2006-09-28 11:11:30,474 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/admin].[jsp]] Servlet.service() for servlet jsp threw exception
java.lang.NumberFormatException: For input string: "#{mReview.rating}"
at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1224)
at java.lang.Float.valueOf(Float.java:360)
at org.apache.jasper.compiler.JspUtil.coerceToPrimitiveFloat(JspUtil.java:728)
at org.apache.jasper.compiler.Generator$GenerateVisitor.convertString(Generator.java:2945)
at org.apache.jasper.compiler.Generator$GenerateVisitor.evaluateAttribute(Generator.java:2752)
at org.apache.jasper.compiler.Generator$GenerateVisitor.generateSetters(Generator.java:2858)
at org.apache.jasper.compiler.Generator$GenerateVisitor.generateCustomStart(Generator.java:2176)
at org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1685)
at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1441)
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
at org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1705)
at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1441)
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
at org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1705)
at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1441)
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
at org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1705)
at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1441)
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
at org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1705)
at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1441)
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
at org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1705)
at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1441)
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2219)
at org.apache.jasper.compiler.Node$Root.accept(Node.java:456)
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
at org.apache.jasper.compiler.Generator.generate(Generator.java:3305)
at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:198)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:295)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:276)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:264)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:563)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:303)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:415)
at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:234)
at org.jboss.seam.jsf.SeamViewHandler.renderView(SeamViewHandler.java:59)
at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:352)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
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.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)
2006-09-28 11:11:30,474 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/admin].[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
javax.faces.FacesException: Unable to compile class for JSP
at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:421)
at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:234)
at org.jboss.seam.jsf.SeamViewHandler.renderView(SeamViewHandler.java:59)
at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:352)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
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.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)
Caused by: org.apache.jasper.JasperException: Unable to compile class for JSP
at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:415)
... 22 more
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3974985#3974985
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3974985
19 years, 6 months
[JBoss jBPM] - Re: Why the jBPM example webapp doesn't have process definat
by cocampo
"yegaofei888(a)sohu.com" wrote : I got the jBPM-3.1.2, and opened the example webapp package jbpm.war. But I didn't find the process defination file, I think it should has process defination file, such as processdefination.xml.
|
| So I want to know how to control the busniess process of this webapp?
|
| Thanks!
|
|
AFAIK, the webapp is NOT related to any process, its main purpose is to serve as GUI for other processes. So, you won't find any processdefinition for this webapp.
ATMOF, I don't know if you're gonna find such a thing ever, since it is not documented anywhere such kind of "deployment"; as you can see from the folder structure created when you create a process project with GPD, you can create classes (handlers, unit tests, etc.) and deploy them with your process, but I'm not sure if you can add web capabilities to this kind of project, and then deploy it like a regular war. Maybe (I'm trying this rite now) you can create a web app that is "aware" of your process, and interact with it.
Hope this helps,
Cut.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3974980#3974980
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3974980
19 years, 6 months
[JBoss jBPM] - extending the process designer eclipse plugin to add extra f
by sunilramaiah
I am reposting paulharrington's post. I am facing the same problem. If anyone has any suggestions, it is greatly appreciated.
I am looking at extending the process designer eclipse plugin to add extra functionality.
Specifically, in the visual diagram editor I would like to add extra buttons to the list of nodes available ('start', 'state', 'fork', 'join', etc). The extra buttons would represent my own pre-defined nodes / tasks which would be extensions of the standard node. I would like provide the ability to be able to drag and drop these nodes onto to the process diagram in the normal way.
I was wondering if anyone could help out with the following questions:
- Does anyone have experience of extending the plugin? Would it be simple or complex task to do?
- Is there any specific documentation available on how this could be implemented?
Any other help/suggestions on the topic would be most welcome
thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3974979#3974979
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3974979
19 years, 6 months