You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@shale.apache.org by Torsten Krah <tk...@fachschaft.imn.htwk-leipzig.de> on 2006/10/27 06:11:55 UTC

scxml dialogs and clay?

Does they work together?

I ask because from the samples i try to adapt things to mine, and now i
got something like:

scxml xmlns="http://www.w3.org/2005/01/SCXML" version="1.0"
	initialstate="checkCookie">


	<state id="checkCookie">

		<onentry>
			<var name="cookieOutcome" expr="#{loginBean.check}" />
		</onentry>

....


When i call my login page the log shows:

 WARN http-8080-Processor25
org.apache.commons.scxml.env.SimpleErrorReporter - EXPRESSION_ERROR
(Exception while invoking expression #{loginBean.check}):
 INFO http-8080-Processor25 org.apache.commons.scxml.SCXMLExecutor -
Current States: [checkCookie]
 ERROR http-8080-Processor25
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/frc-dev].[Faces Servlet] - Servlet.service() for servlet Faces Servlet threw exception
 java.lang.NullPointerException: Component not found "/checkCookie".
        at
org.apache.shale.clay.component.Clay.getRootElement(Clay.java:274)
        at
org.apache.shale.clay.component.Clay.encodeBegin(Clay.java:315)


Clay wants a component named checkCookie - but i use this "name" only
for the initial state for my login dialog, like used in the examples.
If i call my login page without initiating the dialog, clay renders the
page fine.

Are Clay and the new dialog system not compatible yet? 

Torsten


Re: scxml dialogs and clay?

Posted by Rahul Akolkar <ra...@gmail.com>.
On 10/27/06, Torsten Krah <tk...@fachschaft.imn.htwk-leipzig.de> wrote:
> Does they work together?
>
<snip/>

Yes, they address different needs (dialogs take care of the
cross-page/view controller aspects, clay is on the view side of
things) and they should work well together. If you have specific
questions or observations, please post here.

I have a couple of comments about this snippet (might help archival
when folks search for bits in a stack trace):


> I ask because from the samples i try to adapt things to mine, and now i
> got something like:
>
> scxml xmlns="http://www.w3.org/2005/01/SCXML" version="1.0"
>         initialstate="checkCookie">
>
<snap/>

Please use this case sensitive SCXML xmlns:
  http://www.w3.org/2005/07/scxml
In early examples, it may have been different, but thats the correct
one (and the next release of Commons SCXML will verify it).



>
>         <state id="checkCookie">
>
>                 <onentry>
>                         <var name="cookieOutcome" expr="#{loginBean.check}" />
>                 </onentry>
>
> ....
>
>
> When i call my login page the log shows:
>
>  WARN http-8080-Processor25
> org.apache.commons.scxml.env.SimpleErrorReporter - EXPRESSION_ERROR
> (Exception while invoking expression #{loginBean.check}):
>  INFO http-8080-Processor25 org.apache.commons.scxml.SCXMLExecutor -
> Current States: [checkCookie]
>  ERROR http-8080-Processor25
> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/frc-dev].[Faces Servlet] - Servlet.service() for servlet Faces Servlet threw exception
>  java.lang.NullPointerException: Component not found "/checkCookie".
>         at
> org.apache.shale.clay.component.Clay.getRootElement(Clay.java:274)
>         at
> org.apache.shale.clay.component.Clay.encodeBegin(Clay.java:315)
>
>
<snip/>

The top of the trace shows there was an expression error, which means either:
 * There is no managed bean called "login"
 * The signature of the method binding doesn't match the one for
action states, which takes no arguments and returns a String

This causes the dialog to stay in the "action state" and the SCXML
dialog manager tries to search for the corresponding view (which
doesn't exist). It just happens you're using Clay here.

As an aside, in the code in SVN trunk, there is also the notion of
DialogListener's which may be attached to the context of an active
dialog, which allows us to watch for exceptions during dialog
execution, amongst other things.

-Rahul



> Clay wants a component named checkCookie - but i use this "name" only
> for the initial state for my login dialog, like used in the examples.
> If i call my login page without initiating the dialog, clay renders the
> page fine.
>
> Are Clay and the new dialog system not compatible yet?
>
> Torsten
>
>

Re: scxml dialogs and clay?

Posted by Torsten Krah <tk...@fachschaft.imn.htwk-leipzig.de>.
Ignore this post - the jsp got this problem too, so maybe i really have
to wait until i've build that sample app to understand how things work.

Torsten

Am Freitag, den 27.10.2006, 06:11 +0200 schrieb Torsten Krah:
> Does they work together?
> 
> I ask because from the samples i try to adapt things to mine, and now i
> got something like:
> 
> scxml xmlns="http://www.w3.org/2005/01/SCXML" version="1.0"
> 	initialstate="checkCookie">
> 
> 
> 	<state id="checkCookie">
> 
> 		<onentry>
> 			<var name="cookieOutcome" expr="#{loginBean.check}" />
> 		</onentry>
> 
> ....
> 
> 
> When i call my login page the log shows:
> 
>  WARN http-8080-Processor25
> org.apache.commons.scxml.env.SimpleErrorReporter - EXPRESSION_ERROR
> (Exception while invoking expression #{loginBean.check}):
>  INFO http-8080-Processor25 org.apache.commons.scxml.SCXMLExecutor -
> Current States: [checkCookie]
>  ERROR http-8080-Processor25
> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/frc-dev].[Faces Servlet] - Servlet.service() for servlet Faces Servlet threw exception
>  java.lang.NullPointerException: Component not found "/checkCookie".
>         at
> org.apache.shale.clay.component.Clay.getRootElement(Clay.java:274)
>         at
> org.apache.shale.clay.component.Clay.encodeBegin(Clay.java:315)
> 
> 
> Clay wants a component named checkCookie - but i use this "name" only
> for the initial state for my login dialog, like used in the examples.
> If i call my login page without initiating the dialog, clay renders the
> page fine.
> 
> Are Clay and the new dialog system not compatible yet? 
> 
> Torsten
>