Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Screen-specific function before nextScreen in Wizard
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  8 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Jones  
View profile  
 More options Oct 25 2012, 11:52 am
From: Jones <mistic.warr...@gmail.com>
Date: Thu, 25 Oct 2012 17:52:08 +0200
Local: Thurs, Oct 25 2012 11:52 am
Subject: [Lift] Screen-specific function before nextScreen in Wizard

Hello,

I am using persistence in a Wizard, and I am editing a specific entity
"Entity1" in a screen "Screen1". Before going to "Screen2", I would like to
call "Entity1.save()" (I am using Mapper). But postFinish() and finish()
both are executed at the end of the main wizard. How can I bind a function
to the end of a chosen screen?

Thanks in advance,
Jones


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
David Pollak  
View profile  
 More options Oct 25 2012, 11:56 am
From: David Pollak <feeder.of.the.be...@gmail.com>
Date: Thu, 25 Oct 2012 08:56:40 -0700
Local: Thurs, Oct 25 2012 11:56 am
Subject: Re: [Lift] Screen-specific function before nextScreen in Wizard

THere's a finish() method on each screen as well.

--
Telegram, Simply Beautiful CMS https://telegr.am
Lift, the simply functional web framework http://liftweb.net
Follow me: http://twitter.com/dpp
Blog: http://goodstuff.im

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jones  
View profile  
 More options Oct 25 2012, 12:45 pm
From: Jones <mistic.warr...@gmail.com>
Date: Thu, 25 Oct 2012 18:45:25 +0200
Local: Thurs, Oct 25 2012 12:45 pm
Subject: Re: [Lift] Screen-specific function before nextScreen in Wizard

Yes, there is. But from my observations, I believe it is not called before
the end of the wizard, is it? What if I want to save something in the
database between Screen1 and Screen2?

Thanks for your help,
Jones

On Thu, Oct 25, 2012 at 5:56 PM, David Pollak <feeder.of.the.be...@gmail.com


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jones  
View profile  
 More options Oct 27 2012, 8:51 am
From: Jones <mistic.warr...@gmail.com>
Date: Sat, 27 Oct 2012 14:50:53 +0200
Local: Sat, Oct 27 2012 8:50 am
Subject: Re: [Lift] Screen-specific function before nextScreen in Wizard

Hello,

sorry to come back on this, but I still cannot find a solution. Here is my
code:

object addEntryWizard extends Wizard {

 The idea here is that before going to the next screen ("customerScreen"),
I would like to check if what the user has entered in the form is already
existing in the database or not. If it is not, then the user needs to enter
it and therefore the screen "customerScreen" will be required. But if it
already exists in the database, I don't want to go to this screen.

How can I achieve this? I cannot find a function that is executed after the
user has clicked on next but before the next screen...

Sorry for the inconvenience and thanks for your help!
Jones


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jones  
View profile  
 More options Oct 28 2012, 9:33 am
From: Jones <mistic.warr...@gmail.com>
Date: Sun, 28 Oct 2012 14:32:57 +0100
Local: Sun, Oct 28 2012 9:32 am
Subject: Re: [Lift] Screen-specific function before nextScreen in Wizard

Okay, two things here. First of all, *I still cannot find a function that
is called when "Next" is pressed. *

Second, I realized that I could access a field in "override def
nextScreen". Say I had an Int field called "age", I could do:

> override def nextScreen = if (age.is < 18) parentsScreen else petScreen

But in my example my customer_field customized field cannot be accessed
with customer_field.is. Probably because of the autocomplete widget? Does
anybody know how I could deal with this?

Thanks for your help!
Jones

PS: moreover, even if I set "override def editable_? = false", my fields
always are editable...


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jones  
View profile  
 More options Oct 28 2012, 10:13 am
From: Jones <mistic.warr...@gmail.com>
Date: Sun, 28 Oct 2012 15:13:08 +0100
Local: Sun, Oct 28 2012 10:13 am
Subject: Re: [Lift] Screen-specific function before nextScreen in Wizard

I read the implementation of wizard and eventually found some elements.

One can override those functions: transitionIntoFrom(from: Box[Screen]),
transitionOutOfTo(to: Box[Screen]), localSetup().

*When "Next" is pressed, localSetup() of the next screen is called first,
then transitionOutOfTo, then transitionIntoFrom.*

Sorry for the inconvenience then, I missed it in the API documentation (if
we don't "open" the full description of the transitionX functions, they
only speak about notifications and it was not clear to me).

I still could not lock a field (editable_? = false is simply ignored) and
my integration of Autocomplete doesn't work with the screens.

Anyway, sorry for those unanswered e-mails.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jones  
View profile  
 More options Oct 28 2012, 12:03 pm
From: Jones <mistic.warr...@gmail.com>
Date: Sun, 28 Oct 2012 17:03:20 +0100
Local: Sun, Oct 28 2012 12:03 pm
Subject: Re: [Lift] Screen-specific function before nextScreen in Wizard

I read the implementation of wizard and eventually found some elements.

One can override those functions: transitionIntoFrom(from: Box[Screen]),
transitionOutOfTo(to: Box[Screen]), localSetup().

*When "Next" is pressed, localSetup() of the next screen is called first,
then transitionOutOfTo, then transitionIntoFrom.*

Sorry for the inconvenience then, I missed it in the API documentation (if
we don't "open" the full description of the transitionX functions, they
only speak about notifications and it was not clear to me).

I still could not lock a field (editable_? = false is simply ignored) and
my integration of Autocomplete doesn't work with the screens (it is simply
ignored by the wizard actually).

Anyway, sorry for all those questions


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
David Pollak  
View profile  
 More options Oct 29 2012, 2:27 pm
From: David Pollak <feeder.of.the.be...@gmail.com>
Date: Mon, 29 Oct 2012 11:27:17 -0700
Local: Mon, Oct 29 2012 2:27 pm
Subject: Re: [Lift] Screen-specific function before nextScreen in Wizard

The following methods on the Screens can be overridden to detect entry/exit
from a screen:

    /**
     * A notification that we are transitioning into
     * this screen.  Override this method to perform
     * some screen-specific actions
     *
     * @param from the screen we're coming from
     */
    def transitionIntoFrom(from: Box[Screen]) {
    }

    /**
     * A notification that we are transitioning out of
     * this screen.  Override this method to perform
     * some screen-specific actions
     *
     * @param to the screen we're transitioning to
     */
    def transitionOutOfTo(to: Box[Screen]) {
    }

--
Telegram, Simply Beautiful CMS https://telegr.am
Lift, the simply functional web framework http://liftweb.net
Follow me: http://twitter.com/dpp
Blog: http://goodstuff.im

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »