On 10/27/06, Torsten Krah <[EMAIL PROTECTED]> 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