[JBoss Seam] - listener action not called
by miloslav.vlach
I have an IncidentViewAction which display detail of entitfy incident. On the page are located some button, some do action and refresh page and some redirect to page to obtain some information. Finally all action ends on the same (detail) page.
My problem is:
How to do this correctly - best practise.
When I create the entity and go to the detail page, click the button all works fine. But another buttons no nothing - only redirect the page.
I would like how to get error (or any reason of this behaviour) and best practice how do it.
| <h:form>
| <h:commandButton rendered="#{incident.reject}"
| action="#{incidentViewAction.reject(incident.id)}" value="Odmítnout" />
| </h:form>
|
| @Name("incidentViewAction")
| @Restrict("#{identity.loggedIn}")
| public class IncidentViewAction {
| @In
| Session agendaDatabase;
|
| @Out(required=false)
| Incident incident;
|
| @Logger
| Log log;
|
| @In(create = true)
| IncidentService incidentService;
|
| private Long incidentId;
|
| public void loadIncident(Long id) {
| log.info("Loading the incident...: " + id);
| incident = (Incident) agendaDatabase.load(Incident.class, id);
| }
|
| public Long getIncidentId() {
| return incidentId;
| }
|
| /** business logic */
| public String reject(Long incidentId) {
| log.info("Rejecting the incident: " + incidentId);
| this.incidentId = incidentId;
| return IncidentState.IN_REJECTED;
| }
|
|
| <!-- incident view - action execute before show -->
| <page view-id="/actions/incident/view.xhtml">
| <param name="incidentId" value="#{incident.id}" />
| <action
| execute="#{incidentViewAction.loadIncident(incident.id)}" />
|
| <navigation from-action="#{incidentViewAction.reject(incident.id)}">
| <redirect view-id="/actions/incident/reject.xhtml">
| <param name="incidentId"
| value="#{incidentViewAction.incidentId}" />
| </redirect>
| </navigation>
| .......
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4038252#4038252
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4038252
19 years, 2 months
[JBoss jBPM] - Understanding an asyncronous subflow ...
by ygiriyap
Hi All ...
I was trying to understand and build a asyncronous subflow.
My idea was to make the subflow to send a mail asyncronously.
So I built a WF as below ...
anonymous wrote : <<Mainflow "MyAsyncWFTest" starts>>
| 1. Start
| 2. Task1 - Read a variable P1
|
| 3. Process State - Call "SendMail" Subflow to send a mail (ASYNCRONOUSLY)
|
| 4. Task2 - Display variable P1
| 5. End
| <<Mainflow ends>>
I have a subflow like this ...
anonymous wrote : <<Subflow "SendMail" starts>>
| 3.1 - Task31 - Do something before sending a mail
| 3.2 - Task32 - Send Mail using mail action
| 3.3 - Task31 - Do something after sending a mail
| <<Subflow ends>>
I thought by this,I can continue with my main workflow(Task2) even before the subflow returns to the main flow(when the subflow is active and has not returned to the main flow)
But... I am able to execute the step Task2 in the main workflow only after the mailjing subflow has completed and returned to the main flow.
Is my understanding right??Please provide clarification.
Thanks in advance.
--Yash
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4038248#4038248
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4038248
19 years, 2 months