[JBoss Seam] - Re: Pageflow executed before the model values are applied
by hazlorealidad
Disable htm didnt work either
Using vi to replace less thans and greater thans with the character entities
<?xml version="1.0"?>
<pageflow-definition name="documentRegisterEntry">
<start-page name="type" view-id="/documentOrRegister.xhtml">
<redirect/>
<transition name="next" to="checkType" />
</start-page>
<decision name="checkType" expression="#{documentRegister.type}">
<transition name="document" to="document"/>
<transition name="register" to="register">
</transition>
</decision>
<page name="register" view-id="/register.xhtml">
<redirect/>
<transition name="prev" to="type"/>
<transition name="next" to="documents"/>
</page>
<page name="document" view-id="/document.xhtml">
<redirect/>
<transition name="prev" to="type"/>
<transition name="next" to="documents">
<action expression="#{documentRegister.save}"/>
</transition>
</page>
<page name="documents" view-id="/documents.xhtml">
<redirect/>
<transition name="prev" to="document"/>
<transition name="next" to="complete">
</transition>
</page>
<page name="complete" view-id="/new_complete.xhtml">
<redirect/>
<end-conversation/>
</page>
</pageflow-definition>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3971359#3971359
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3971359
19 years, 7 months
[JBoss Seam] - Pageflow executed before the model values are applied
by hazlorealidad
I am seeing a problem in that the pageflow seems to be executed before the model values are
applied, is this a bug or is it a problem with my configuration.
//the page is first requested
14:03:23,365 INFO [DocumentRegisterEntryBean] Start called
14:03:23,380 INFO [DocumentRegisterEntryBean] getType null
14:03:23,402 INFO [DocumentRegisterEntryBean] getType null
//the form is submitted, getType is called by the pageflow before the set method.
14:03:27,340 INFO [DocumentRegisterEntryBean] getType null
14:03:27,341 INFO [DocumentRegisterEntryBean] setType register
14:03:27,342 ERROR [SeamExceptionFilter] uncaught exception handled by Seam
javax.servlet.ServletException
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:156)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain
........
Caused by: org.jbpm.JbpmException: decision expression '#{documentRegister.type}' returned null
at org.jbpm.graph.node.Decision.execute(Decision.java:110)
... 46 more
The form
<h:form>
<h:outputText value="#{messages.itIsA}"/>
<h:selectOneRadio value="#{documentRegisterEntry.type}">
<f:selectItem
itemValue="document" itemLabel="#{messages.document}"/>
<f:selectItem
itemValue="register" itemLabel="#{messages.register}"/>
</h:selectOneRadio>
<h:commandButton action="next" value="#{messages.next}" />
</h:form>
The code
@Scope(SESSION)
@Name("documentRegisterEntry")
public class DocumentRegisterEntryBean implements Serializable, DocumentRegisterEntry
{
private String type;
@Logger
private Log logger;
@In(create=true)
private Document document;
@PersistenceContext()//type=EXTENDED)
private EntityManager em;
@Create
//@Begin()
@Begin(pageflow="documentRegisterEntry")
public void start()
{
logger.info("Start called");
}
@End
// @Transactional()
public void save()
{
logger.info("Save called");
}
@Remove @Destroy
public void destroy()
{
logger.info("Destroy called");
}
public Document getDocument()
{
logger.info("getDocument "+document);
return document;
}
public void setDocument(Document document)
{
logger.info("setDocument "+document);
this.document = document;
}
public String getType()
{
logger.info("getType "+type);
return type;
}
public void setType(String type)
{
logger.info("setType "+type);
this.type = type;
}
The pageflow
<?xml version="1.0"?>
<pageflow-definition name="documentRegisterEntry">
<start-page name="type" view-id="/documentOrRegister.xhtml">
</start-page>
<!-- action is never triggered -->
<page name="register" view-id="/register.xhtml">
<page name="document" view-id="/document.xhtml">
Thanks in advance
Andy Bailey
www.hazlorealidad.com
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3971355#3971355
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3971355
19 years, 7 months
[Security & JAAS/JBoss] - need advice
by kosl
Hi,
I need advice. I'm working on security and the standard resouce securying via web.xml and j_security_check doesn't fit my needs. I would like to achieve such goals:
- Change the standard scenario: when user tries to access secured area he is redirected to login page - and then after successful authentication - get's access to secured resources. I would like to be able to redirect him sometimes first to some other page - for instance page forcing him to change the password - and only then to the requested resource,
- be able to put the login-form on any page and after logging in redirecting back to that page,
- requesting re-authentication for specific resources (and protecting access to them via SSL
- etc.
I've developed my own LoginModule and it's working perfectly but the standard solution with j_security_check and tomcat doesn't seem to fit my needs.
My question is where should I look for any information about how to achieve my goals? I've looked to the Jboss administraiton guide but still I'm not sure what to do.
Will I have to change/add something to JBoss source code?
I would be very grateful for any advice.
With Kind Regards,
Karol Oslowski
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3971354#3971354
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3971354
19 years, 7 months