[JBoss Seam] - Re: two @datamodel in one sessionbean?
by jacob.orshalick
Okay, I now understand the issue...
I will explain this from my understanding and maybe a member of the Seam team can validate (or invalidate) this. The use of <s:link>, @DataModel, and @DataModelSelection can get complicated.
| <s:link value="#{item}" view="/page2.xhtml"/>
|
executes a GET request which will not process the INVOKE_APPLICATION phase but will propagate the conversation. This is similar to the first invocation of a JSF page, but maintains conversation state across the GET request.
By specifying an action, this indicates to Seam that the entire JSF lifecycle should be processed for the GET. Thus, the INVOKE_APPLICATION phase gets executed. This is when the @DataModelSelection is populated, explaining why scenario 2 works:
| <s:link value="#{item}" view="/page2.xhtml" action="#{myObject.select()}" />
|
I believe you will have to invoke an action to retrieve the @DataModelSelection. To my knowledge, all the examples show it this way...
In regards to multiple actions for one action, why don't you inject any other components into the component being called on and execute actions from that component. For example, if I have myObject,
| ...
| @In
| SecondObject secondObject;
| ...
| public void select() {
| // do something
| secondObject.function();
| }
| ...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4084834#4084834
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4084834
18 years, 9 months
[JBoss AOP] - Interceptor is applied 16 times instead of 1
by thomas.larsson@jayway.se
Hi everyone,
We have a number of Stateless Session Beans (EJB3) for which we want to apply a logging interceptor. When we run a call to the bean, the aspect is applied 16 times for some reason.
Here is our aop.xml
| <?xml version="1.0"?>
| <aop>
| <bind pointcut="execution(public * com.dts.*->*($instanceof{com.dts.commons.serviceplatform.DTSMessage}))">
| <interceptor class="com.dts.serviceplatform.interceptors.impl.DTSLoggingInterceptor" scope="PER_VM"/>
| </bind>
| </aop>
|
Here is the interceptor
| public class DTSLoggingInterceptor implements Interceptor {
|
| public Object invoke(Invocation invocation) throws Throwable {
|
| Object param = ((MethodInvocation)invocation).getArguments()[0];
| System.out.println("Request: " + IOUtil.toXML(param));
|
| Object result = invocation.invokeNext();
| if(result!=null) {
| System.out.println("Response: " +IOUtil.toXML(result));
| }
| return result;
| }
|
| public String getName() {
| return "DTSBusinessMessageLogInterceptor";
| }
| }
|
We are using Jboss AS 4.2.1.GA with jboss-aop 1.5.0.GA with JDK1.5.0_11.
Any tips?
-Thomas
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4084833#4084833
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4084833
18 years, 9 months
[JBoss Seam] - Re: two @datamodel in one sessionbean?
by oblivion1200
Hmm...
So, I have a class myObject
| ...
| @DataModel(value="list1")
| private List<String> list1;
|
| @DataModelSelection(value="list1")
| @Out(required=false, value="focusList1")
| private String focusList1;
| ...
| public void select() {
| log.info("User selected something!");
| }
| ...
|
a page, for example
| <h:dataTable value="#{list1}" var="item">
| <h:column>
| <s:link value="#{item}" view="/page2.xhtml"/>
| </h:column>
| </h:dataTable>
|
then I click on selected item link and page2.xhtml is
| <h:outputText value="#{focusList1}">
|
here I have no focusList1 outjected.
When I use and click:
| <h:dataTable value="#{list1}" var="item">
| <h:column>
| <s:link value="#{item}" view="/page2.xhtml" action="#{myObject.select()}" />
| </h:column>
| </h:dataTable>
|
I have focusList1 outjected and all is OK.
Is it possible to have it outjected without using action="#{myObject.select()}"
Is there better way to do it?
I need sometimes to action property perform diffrent function for example #{secondObject.function()} and can I place both functions in one action property like action="#{secondObject.function()} , #{myObject.select()}" or similar?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4084832#4084832
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4084832
18 years, 9 months
[JBoss jBPM] - Re: The org.xml.sax.SAXNotRecognizedException:
by SidKennedy
Hello to all,
I have to re-open this thread again, because I got the exception even so I'm using jdk 1.6. I want to post my Exception:
[INFO] JbpmConfiguration - -using jbpm configuration resource 'jbpm.cfg.xml'
[WARN] JpdlParser - -couldn't set xml parser property 'http://java.sun.com/xml/jaxp/properties/schemaLanguage' to 'http://www.w3.org/2001/XMLSchema' <org.xml.sax.SAXNotRecognizedException: http://java.sun.com/xml/jaxp/properties/schemaLanguage>org.xml.sax.SAXNotRecognizedException: http://java.sun.com/xml/jaxp/properties/schemaLanguage
at org.apache.xerces.framework.XMLParser.setProperty(XMLParser.java:1626)
at org.apache.xerces.parsers.SAXParser.setProperty(SAXParser.java:770)
at org.apache.xerces.jaxp.SAXParserImpl.setProperty(SAXParserImpl.java:183)
at org.jbpm.jpdl.xml.JpdlParser.createXmlReader(JpdlParser.java:77)
at org.jbpm.jpdl.xml.JpdlParser.createSaxReader(JpdlParser.java:62)
at org.jbpm.jpdl.xml.JpdlParser.parse(JpdlParser.java:56)
at org.jbpm.jpdl.xml.JpdlXmlReader.readProcessDefinition(JpdlXmlReader.java:138)
at org.sureal_projekt.eclipse.workflowtools.popup.actions.AddProcessToViewAction.run(AddProcessToViewAction.java:53)
at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:256)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:545)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:490)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:402)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3682)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:153)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:504)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:443)
at org.eclipse.equinox.launcher.Main.run(Main.java:1169)
at org.eclipse.equinox.launcher.Main.main(Main.java:1144)
so now my question. Can I resolve the problem if I use a new xerces-j api(2.9.2)? And if so, how can I use this instead of the classes contained in the jdk1.6? I tried to add the xml-apis.jar(xerces-j 2.9.1) to my classpath but it didn't help. Or can I do something with that 'jbpm.cfg.xml' mentioned in the [info] above?
hope you can help me.
greetz
Sid
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4084831#4084831
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4084831
18 years, 9 months