On 4/12/07, samju <[EMAIL PROTECTED]> wrote:

Hi Rahul,
the message / literal for "Login.4" return the method "success" !
i implemented the "dataClassName" in my <dialog> and the code work.
<snip/>

While using the "dialog scope" to store data is a very useful pattern,
I do not think that the absence of dataClassName, by itself, should
result in an error condition. Was that the only reason?


but now i get a new problem. i do like so: my aim is to get the Field input
data from jsp
via shale Dialog "dataClassName" and store the input data (user, pass) using
hibernate like this(only if the user submit finish).

public String finish ()
    {
                                final FacesContext context =
FacesContext.getCurrentInstance();
                final DialogContext dcontext = 
DialogHelper.getDialogContext(context);
                final logindata currentuser = (logindata) dcontext.getData();

                Configuration config = new 
Configuration().addClass(logindata.class);
                SessionFactory factory = config.buildSessionFactory();
                // get a session
                Session sess = factory.openSession();

                Transaction t = sess.beginTransaction();
                sess.saveOrUpdate(currentuser);
                t.commit();
                sess.close();
        return Messages.getString("Login.1");//finished
}
and her are my console output

bad output:Cannot find transition 'success' for state 'main' of dialog
'logon'
good output:org.hibernate.cfg.Configuration addClass
bO:Error calling action method of component with id form:finish
Exception while invoking expression #{login.finish}

<snap/>

The error message seems fairly clear in whats going on (no transition
for logical outcome of 'success'). There also seems to be an exception
invoking the MBE, which needs to be investigated, and fixed (either
the cause itself or the corresponding outcome), before we can go on.

-Rahul

Reply via email to