[JBoss jBPM] - jbpm3.2 beta 2 on jboss4.2.0 RC1
by michea
when deploying jbpm-enterprise.ear on a fresh jbossAS 4.2.0 I obtain few errors :
2007-03-10 23:30:49,703 FATAL [javax.enterprise.resource.webcontainer.jsf.application] JSF1029: The specified InjectionProvider implementation 'org.jboss.web.jsf.integration.injection.JBossInjectionProvider' does not implement the InjectionProvider interface.
| 2007-03-10 23:30:49,703 WARN [javax.enterprise.resource.webcontainer.jsf.application] JSF1033: Resource injection is DISABLED.
| 2007-03-10 23:30:50,984 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/jbpm-console]] Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener
| java.lang.LinkageError: loader constraints violated when linking javax/el/ExpressionFactory class
| at com.sun.faces.config.ConfigureListener.registerELResolverAndListenerWithJsp(ConfigureListener.java:1638)
| at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:455)
|
Any idea ?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4026931#4026931
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4026931
19Â years, 1Â month
[JBoss Seam] - Problem Ending a Task
by mdarr
Ok so i have followed along with the dvd-seam example.
However I am apparently doing something wrong here.
I start the task ... i can see it in the debug.seam page.
But when i go to end it. Nothing happens.
Task as defined in the xml ->
<task-node name="working" end-tasks="true">
| <task name="taskWorking" description="Tasks being worked on">
| <assignment pooled-actors="ticket-worker"/>
| </task>
|
| <transition name="next" to="finished"/>
| </task-node>
|
The code on the task list where you start the task ->
| <s:button action="#{ticketWorking.viewTask}" taskInstance="#{task}"
| value="Set Task to Working"/>
|
The Class ->
| @Stateful
| @Name("ticketWorking")
| public class TicketWorkingAction implements TicketWorking {
|
| @Logger
| Log log;
|
| @PersistenceContext(type=PersistenceContextType.EXTENDED)
| EntityManager em;
|
| @Out(required=false, scope=ScopeType.CONVERSATION)
| Ticket ticket;
|
| @In(required=false)
| Long ticketId;
|
| @In(required = false)
| String name;
|
| @In(required = false)
| String description;
|
| @In
| User authUser;
|
| @StartTask
| //@BeginTask -- i tried either or
| public String viewTask() {
| log.info("ticket working - view task - #{ticketId}");
| ticket = (Ticket) em.find(Ticket.class, ticketId);
| log.info("ticket found - #{ticket}");
| return "/ticket_work.xhtml";
| }
|
| @EndTask(transition="next")
| public String save() {
| log.info("ticket working - save");
| saveChange();
|
| return "/ticket_list.xhtml";
| }
|
| @EndTask//(transition="next")
| public String finished() {
| log.info("ticket working - finished");
| saveChange();
|
| return "/ticket_list.xhtml";
| }
|
| private void saveChange() {
| // TODO change the owner?
|
| TicketChange tChange = new TicketChange();
| tChange.setDescription(description);
| tChange.setUser(authUser);
| em.persist(tChange);
| }
|
| @Remove
| @Destroy
| public void destroy() {
|
| }
| }
|
The JSF page ->
| <f:view>
| <h:form>
| Description - <h:inputText value="#{description}"/><br/>
|
| <h:commandButton value="Save" action="#{ticketWorking.save}"/><br/>
| <h:commandButton value="Save and Send to Approval" action="#{ticketWorking.finished}"/><br/>
|
| <p>
| <s:link value="View Tickets" action="/ticket_list.xhtml"/><br/>
| </p>
| </h:form>
| </f:view>
|
.... i am hoping its just something stupid. But any ideas could help
Btw i have the two methods because I was trying both ways.
FWIW Ticket is an Entity Bean.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4026929#4026929
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4026929
19Â years, 1Â month
[JBoss Seam] - Re: Seam & Trinidad.
by adamkoprowski
Dear Petemuir,
Thank you for your fast and helpful response!
"petemuir" wrote :
| Part of the problem here is that Trinidad have taken ages to get a release out - once their 1.0.0 release is out (any day now I think) we can start improving Seam integration.
|
Great! Indeed it seems that the release is just around the corner so I'm looking forward for that! Then the stack of seam + facelets + ajax4jsf + Trinidad will be a killer!
anonymous wrote :
| "adamkoprowski" wrote : -) As I read on this forum (and experienced myself) I cannot use Seam's extended EL (parameters to methods) with Trinidad.
|
| I don't know of anyone who has got this working.
|
Too bad. Any idea what's the reason? Any hope this will be resolved at some point?
anonymous wrote :
| "adamkoprowski" wrote : -) As I'm dealing with Trinidad table @DataModel and @DataModelSelection won't work.
|
| They *should* do - and I haven't heard anyone say they don't. The current feeling is that page parameters are better than @DataModel stuff. If they aren't working with Trinidad can you file a JIRA issue, and I'll try to take a look.
|
Ok, my fault, probably they do. I just recalled reading on this forum that @DataModel does not work for Trinidad trees and assumed that this is probably the case for tables as well.
anonymous wrote :
| "adamkoprowski" wrote : -) My second idea was to use the Seam pages.xml mechanism for request parameters propagation with the following navigation entry:
| |
| | | <page view-id="/master.xhtml">
| | | <navigation>
| | | <rule if-outcome="viewDetail">
| | | <redirect view-id="/detail.xhtml">
| | | <param name="id" value="#{master.selectedEntry.id}"/>
| | | </redirect>
| | | </rule>
| | | </navigation>
| | | </page>
| | |
| | But then in selectedEntry I need to figure out which table entry was clicked but for some reason the component tree has only AjaxViewRoot root component with no children.
| | Hence my questions: is it normal that the component tree is not available in this context? If not what may I be doing wrong? If so, how can I get the id of selected table entry?
|
| I don't get *why* you need to do this. Surely with the id of the selectedEntry you can load it from the persistence context and edit it? Take a look at the way a seam-gen'd project does things - that demonstrates the use of page parameters for master/detail.
|
Ok, I guess I wasn't clear enough. What I meant is that I need to propagate the id to the detail page (and then surely I can fetch the data). Anyway I tried to take a look at how this is done by seam-gen (wasn't that easy for me as then the core of this master/detail navigation is obscured by many details). I tried to follow this approach and worked it out too a small but self contained and complete example showing the gist of my problem. There is still something I don't understand and I'd be very grateful if anybody could cast some light on me. Here we go:
Simple objects (Entry.java)
| package test;
|
| public class Entry
| {
| public Long id;
| public String name;
|
| public Entry(Long i)
| {
| id = i;
| name = "Entry #" + i;
| }
|
| public Long getId()
| {
| return id;
| }
|
| public void setId(Long id)
| {
| this.id = id;
| }
|
| public String getName()
| {
| return name;
| }
|
| public void setName(String name)
| {
| this.name = name;
| }
| }
|
Master component (Master.java)
| package test;
|
| import java.util.List;
| import java.util.Vector;
|
| import org.jboss.seam.annotations.Name;
|
| @Name("master")
| public class Master
| {
|
| public List<Entry> getEntries()
| {
| List<Entry> res = new Vector<Entry>();
| for (int i = 0; i < 50; i++)
| res.add(new Entry(new Long(i)));
| return res;
| }
|
| }
|
Detail component (Detail.java)
| package test;
|
| import org.jboss.seam.annotations.Name;
| import org.jboss.seam.annotations.RequestParameter;
|
| @Name("detail")
| public class Detail
| {
|
| @RequestParameter [1]
| Long entryId;
|
| public Long getEntryId()
| {
| return entryId;
| }
|
| public void setEntryId(Long entryId)
| {
| this.entryId = entryId;
| }
|
| public Entry getEntry()
| {
| return new Entry(entryId);
| }
|
| }
|
Master page (master.xhtml)
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
| "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
| <f:view xmlns="http://www.w3.org/1999/xhtml"
| xmlns:f="http://java.sun.com/jsf/core"
| xmlns:s="http://jboss.com/products/seam/taglib"
| xmlns:tr="http://myfaces.apache.org/trinidad"
| xmlns:trh="http://myfaces.apache.org/trinidad/html">
| <trh:html>
| <trh:body>
| <tr:form>
| <tr:table var="entry" value="#{master.entries}" rows="10">
| <tr:column>
| <f:facet name="header">
| <tr:outputText value="Entry id" />
| </f:facet>
| <s:link action="viewDetail" value="#{entry.name}">
| <f:param name="entryId" value="#{entry.id}" />
| </s:link>
| </tr:column>
| </tr:table>
| </tr:form>
| </trh:body>
| </trh:html>
| </f:view>
|
Detail page (detail.xhtml)
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
| "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
| <f:view xmlns="http://www.w3.org/1999/xhtml"
| xmlns:f="http://java.sun.com/jsf/core"
| xmlns:s="http://jboss.com/products/seam/taglib"
| xmlns:tr="http://myfaces.apache.org/trinidad"
| xmlns:trh="http://myfaces.apache.org/trinidad/html">
| <trh:html>
| <trh:body>
| <tr:outputText value="Entry id: #{detail.entry.id}" />
| <tr:outputText value="Entry name: #{detail.entry.name}" />
| </trh:body>
| </trh:html>
| </f:view>
|
pages.xml
| <!DOCTYPE pages PUBLIC
| "-//JBoss/Seam Pages Configuration DTD 1.1//EN"
| "http://jboss.com/products/seam/pages-1.1.dtd">
|
| <pages>
| <page view-id="/master.xhtml">
| <navigation>
| <rule if-outcome="viewDetail">
| <redirect view-id="/detail.xhtml" />
| </rule>
| </navigation>
| </page>
| <page view-id="/detail.xhtml">
| <param name="entryId" value="#{detail.entryId}" /> [2]
| </page>
| </pages>
|
Now the thing is that it does not work without the @RequestParameter annotation [1] (as then detail.entryId is never set), while I though that the job of initializing detail.entryId is done in pages.xml by [2]. What am I missing? Because I have to say that I am still quite confused with the concept of state propagation in Seam even though I read the documentation and played around with it for quite a while...
My guess is that this is due to the fact that page parameters like [2] are bidirectional while I only want to set the component property from the request parameter. So things would work fine if Master.java and Detail.java were kind of merged into one component. But that's not what I want since I want them to have different scopes - think of search screen/results. What's the proper way to propagate state in such scenario?
Any help appreciated!
Adam
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4026922#4026922
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4026922
19Â years, 1Â month
[JBoss Seam] - Woodstock and Seam on JBoss with Facelets, JSF 1.2
by mgrouch
I'm trying to configure Seam to use Woodstock on JBoss with Facelets, JSF 1.2. Has anyone used this combo? I've got simple page rendered with Woodstock. However I'm having troubles with invoking actions.
| 19:14:57,984 ERROR [ExceptionFilter] exception root cause
| java.lang.UnsupportedOperationException
| at org.jboss.seam.Namespace.entrySet(Namespace.java:23)
| at java.util.AbstractMap.toString(AbstractMap.java:584)
| at java.lang.String.valueOf(String.java:2615)
| at java.lang.StringBuilder.append(StringBuilder.java:116)
| at com.sun.webui.jsf.faces.UIComponentELResolver.getValue(UIComponentELResolver.java:72)
| at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:143)
| at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:64)
| at com.sun.el.parser.AstValue.getValue(AstValue.java:117)
| at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:192)
| at com.sun.faces.application.ValueBindingValueExpressionAdapter.getValue(ValueBindingValueExpressionAdapter.java:102)
| at org.jboss.seam.core.Expressions$1.getValue(Expressions.java:57)
| at org.jboss.seam.Component.getInstanceFromFactory(Component.java:1683)
| at org.jboss.seam.Component.getInstance(Component.java:1632)
| at org.jboss.seam.Component.getInstance(Component.java:1609)
| at org.jboss.seam.Component.getInstance(Component.java:1603)
| at org.jboss.seam.jsf.SeamELResolver.getValue(SeamELResolver.java:49)
| at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:143)
| at com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:65)
| at com.sun.el.parser.AstValue.getValue(AstValue.java:106)
| at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:192)
| at org.jboss.seam.util.UnifiedELValueBinding.getValue(UnifiedELValueBinding.java:34)
| at org.jboss.seam.security.Identity.evaluateExpression(Identity.java:506)
| at org.jboss.seam.security.Identity.checkRestriction(Identity.java:149)
| at org.jboss.seam.interceptors.SecurityInterceptor.aroundInvoke(SecurityInterceptor.java:35)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
| at org.jboss.seam.interceptors.RemoveInterceptor.aroundInvoke(RemoveInterceptor.java:40)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
| at org.jboss.seam.interceptors.SynchronizationInterceptor.aroundInvoke(SynchronizationInterceptor.java:31)
|
As a first step I reconfigured Seam booking demo with Sun JSF 1.2 using instructions from here http://www.jboss.com/index.html?module=bb&op=viewtopic&t=94738
I was able to get booking demo running with Sun's JSF 1.2 on JBoss 4.0.5.GA.
After that I added woodstock.taglib.xml from http://blogs.steeplesoft.com/wp-content/uploads/2007/02/woodstock.taglib.xml
into booking-demo WEB-INF, then I modified web.xml:
| <!-- Woodstock -->
| <context-param>
| <param-name>com.sun.webui.jsf.DEFAULT_THEME</param-name>
| <param-value>suntheme</param-value>
| </context-param>
|
| <context-param>
| <param-name>facelets.LIBRARIES</param-name>
| <param-value>/WEB-INF/woodstock.taglib.xml</param-value>
| </context-param>
|
| ...
|
| <!-- Theme Servlet -->
| <servlet>
| <servlet-name>ThemeServlet</servlet-name>
| <servlet-class>com.sun.webui.theme.ThemeServlet</servlet-class>
| <load-on-startup>2</load-on-startup>
| </servlet>
|
| ...
|
| <!-- Theme Servlet Mapping -->
| <servlet-mapping>
| <servlet-name>ThemeServlet</servlet-name>
| <url-pattern>/theme/*</url-pattern>
| </servlet-mapping>
|
|
| ...
|
| <!-- JSF RI -->
| <listener>
| <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
| </listener>
|
|
|
|
Added jars
dataprovider.jar
dojo-0.4.1-ajax.jar
jhall.jar
jsf-extensions-common-0.1.jar
jsf-extensions-dynamic-faces-0.1.jar
json.jar
prototype-1.5.0.jar
webui-jsf.jar
webui-jsf-suntheme.jar
into JBoss deploy\jbossweb-tomcat55.sar\jsf-libs directory
My other config files
application.xml
| <?xml version="1.0" encoding="UTF-8"?>
| <application xmlns="http://java.sun.com/xml/ns/javaee"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd"
| version="5">
| <display-name>Seam Booking</display-name>
| <module>
| <web>
| <web-uri>jboss-seam-booking.war</web-uri>
| <context-root>/seam-booking</context-root>
| </web>
| </module>
| <module>
| <ejb>jboss-seam-booking.jar</ejb>
| </module>
| <module>
| <java>jboss-seam.jar</java>
| </module>
| </application>
|
faces-config.xml
| <faces-config version="1.2"
| xmlns="http://java.sun.com/xml/ns/javaee"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
|
| <application>
| <el-resolver>org.jboss.seam.jsf.SeamELResolver</el-resolver>
| </application>
|
| <lifecycle>
| <phase-listener>org.jboss.seam.jsf.SeamPhaseListener</phase-listener>
| </lifecycle>
|
| </faces-config>
|
I've added a page with a table. This page renders fine by accessing
http://localhost:8080/seam-booking/woodstock.seam
woodstock.xhtml
| <!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:ui="http://java.sun.com/jsf/facelets"
| xmlns:h="http://java.sun.com/jsf/html"
| xmlns:f="http://java.sun.com/jsf/core"
| xmlns:risb="http://java.sun.com/jsf/ri/sandbox"
| xmlns:webuijsf="http://www.sun.com/webui/webuijsf"
| xmlns:s="http://jboss.com/products/seam/taglib">
| <f:view>
| <webuijsf:head>
| <webuijsf:link url="/style.css"/>
| </webuijsf:head>
| <webuijsf:body id="body">
| <webuijsf:form id="form">
| <webuijsf:button id="callAction" text="Action" action="#{hotelSearch.find}" />
| <webuijsf:table id="table"
|
| ...
|
| </webuijsf:table>
| </webuijsf:form>
| </webuijsf:body>
| </f:view>
| </html>
|
Any ideas how to make actions work on a form?
Thanks,
--MG
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4026921#4026921
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4026921
19Â years, 1Â month