[JBoss Seam] - Re: Facelets: Parameters to custom tags
by niesar
Hi Marcus,
I'm not sure if I correctly understand what you try to do. But let's give it a try...
In<le:kontoname konto="#{kontozeile_iter}" liste="#{leistungsschein.kontozeilen}" />you are actually passing kind of a reference of your data (kontoname_iter) to your custom tag. In kontoname.xhtml you are then accessing "kontozeile_iter" using the name "konto".
If you also want to use "konto" aka "kontoname_iter" in the bean, you need to make "kontozeile_iter" available for the bean, too.
It's hard to guess where "kontozeile_iter" is coming from in your code, but looking at the name it sounds like you are iterating through a list of - let's say - "Kontozeile" instances. I further guess a variable like "Kontozeile kontoname_iter" is supposed to be the currently selected element of the list.
If that is the case, you may want to take a look at Seam's @DataModel/@DataModelSelection. It is used in the hotel booking example, see
http://docs.jboss.com/seam/latest/reference/en/html/tutorial.html#booking . If you take a look at HotelSearchAction.java, you will find @DataModel and @DataModelSelection.
In main.xhtml (you will find it in the booking example which comes with Seam) you can see how this is used to display a list of hotels.
Now, if you want to pass your user's selection to another Bean, you can access it from there by using a getter method.
In the booking example Bean HotelSearchingAction is annotated with @Name("hotelSearch"): @Name("hotelSearch") // !!!
| @Scope(ScopeType.SESSION)
| public class HotelSearchingAction implements HotelSearching {
| ...
| @DataModel
| private List<Hotel> hotels;
| @DataModelSelection
| private Hotel selectedHotel;
| ...
| public Hotel getSelectedHotel() { // that's the way to access the user selection
| return selectedHotel;
| }
|
If you want to access the user selection from another Bean, this could be done like this:
| @In
| private HotelSearching hotelSearch // from the @Name annotation in HotelSearchingAction.java
| [...]
| // later in your code:
| Hotel selectedHotelFromOtherBean = hotelSearch.getSelectedHotel()/;
| // now do something useful with selectedHotelFromOtherBean
|
Is this more or less what you try to do?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3959136#3959136
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3959136
19 years, 9 months
[Remoting] - configuration for sslservlet
by mazz@jboss.com
Now that we have sslservlet in addition to servlet, I'm trying to figure out the easiest way to configure my web container to support both.
Here's the use case - I have a remote client that, depending on how the customer wants to configure it - can talk unencrypted/unsecured back to the server or can talk securely via SSL. I don't want the customer to have to configure alot of things - it would be nice for the server to support both servlet and sslservlet transport and just have the remote client determine how he wants to talk back to the server.
Looking at the readme.txt in src/tests/org/jboss/test/remoting/transport/servlet/readme.txt, I see the web.xml files the tests use have basically the same servlet definition - the only difference is the locatorUrl param. What if I continue to use the older "locatorName" param and not specify locatorUrl?
This means the servlet won't know what transport it used (could be servlet or sslservlet). But I don't think it matters. So long as the request makes its way to the servlet, it will process it the same way. So, whether the request went through the SSL connector over port 8443 or over the standard port of 8080 (unsecured), it doesn't matter - the request will be processed the same.
As long as my server has both 8080 and 8443 configured properly, this should work. Is that a correct assumption?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3959135#3959135
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3959135
19 years, 9 months
[JBoss jBPM] - Re: Modeling simple process(tasks)
by dlipski
This was my mistake I used this attributes in not in <task-node>.
At the end I found solution for my problem:
mapping fragment:
| <task-node name="proposed" end-tasks="true" signal="never">
| <task name="accept">
| <assignment class="orders.workflow.OrdersAssignmentHandler"/>
| </task>
| <task name="cancel">
| <assignment class="orders.workflow.OrdersAssignmentHandler"/>
| </task>
| <transition name="accept" to="accepted"></transition>
| <transition name="cancel" to="canceled"></transition>
| </task-node>
|
Listing avaliable actions for user:
Map<ProcessInstance, List<TaskInstance>> instancesGrouped = new HashMap<ProcessInstance, List<TaskInstance>>();
| for(TaskInstance task : tasks)
| {
| ProcessInstance process = task.getToken().getProcessInstance();
| List<TaskInstance> instances = instancesGrouped.get(process);
| if(instances == null)
| {
| instances = new ArrayList<TaskInstance>();
| instancesGrouped.put(process,instances);
| }
| instances.add(task);
| }
|
After task performing:
| JbpmContext ctx = workflowConfig.createJbpmContext();
| TaskInstance task = ctx.loadTaskInstance(taskId);
| Token token = task.getToken();
| task.end();
| token.signal(task.getName());
| ctx.save(token);
| ctx.close();
|
This solution is generic, modyfing process doesn't force any changes in the client code, whats more adding new tasks requires only adding code for handling this tasks. Of course i need some mapping between task names and Java code (displaying some special UI forms) but this is obvious (for me).
I'm gratefull for any comments.
Regards
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3959132#3959132
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3959132
19 years, 9 months
[JBoss Eclipse IDE (users)] - NullPointerException when trying the create a new Pageflow
by rlhr
In Eclipse 3.1 and also 3.2 (I installed this version after having getting this expection in 3.1), I get the following exceptions when creating a new pageflow for a Seam project:
java.lang.NullPointerException
| at org.jbpm.ui.pageflow.wizard.NewPageFlowWizardPage.getRootForEmbeddingProject(Unknown Source)
| at org.jbpm.ui.pageflow.wizard.NewPageFlowWizardPage.initContainerName(Unknown Source)
| at org.jbpm.ui.pageflow.wizard.NewPageFlowWizardPage.chooseContainer(Unknown Source)
| at org.jbpm.ui.pageflow.wizard.NewPageFlowWizardPage.access$1(Unknown Source)
| at org.jbpm.ui.pageflow.wizard.NewPageFlowWizardPage$2.widgetSelected(Unknown Source)
| at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:90)
| at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
| at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
| at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3348)
| at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2968)
| at org.eclipse.jface.window.Window.runEventLoop(Window.java:820)
| at org.eclipse.jface.window.Window.open(Window.java:796)
| at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:181)
| at org.eclipse.jface.action.Action.runWithEvent(Action.java:499)
| at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:539)
| at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:488)
| at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:400)
| at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
| at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
| at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3348)
| at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2968)
| at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914)
| at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
| at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419)
| at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
| at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95)
| at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78)
| at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
| at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
| at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
| at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
| 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.core.launcher.Main.invokeFramework(Main.java:336)
| at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
| at org.eclipse.core.launcher.Main.run(Main.java:977)
| at org.eclipse.core.launcher.Main.main(Main.java:952)
|
And also:
Unhandled event loop exception
| (An exception stack trace is not available.)
Does anyone have an idea what is the cause and how to fix it?
Thanks
Richard
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3959128#3959128
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3959128
19 years, 9 months