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
Tips: Controllers
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
  1 message - 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
 
DavidNia  
View profile  
 More options Jan 6 2010, 5:06 pm
From: DavidNia <da...@3dex.com>
Date: Wed, 6 Jan 2010 14:06:14 -0800 (PST)
Local: Wed, Jan 6 2010 5:06 pm
Subject: Tips: Controllers
init() is a reserved method for Controllers in Induction.  It is
treated differently than other functions.  Example, a non-init
function in a Controller can have the regular Induction models
injected into it...but the init() method can only get the stuff that
is regularly valid to be injected into the constructor...if i am not
mistaken it is only application-scope models.

I found out about this when in my code I wrote:

return new Redirect( TestController.class, "init" );

and to my surprise a session-scope model that I had injected was null.
I renamed init to something else and it worked.

david


 
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 »