Welcome Guest, Not a member yet? Register   Sign In
retaining a value in a controller variable
#1

[eluser]ssachan[/eluser]
Hello Developers

I am stuck at a design issue.

I have a controller class which has a variable
var id
It is set in a function A and is required in all the
functions in this controller (lets say B, C and D)

Now functions B,C,D and called for my views which leads to
reinitialization of the controller and loss of id which was
set in function A.

The only solution I see is to pass the id to my views and then
again to all the functions B, C and D whenever they are called.

But I guess is this is not the best way to do it. Is there any way
I can set the value of id and retain it till its changed the next time.


Thanks


Messages In This Thread
retaining a value in a controller variable - by El Forum - 06-19-2010, 07:29 AM
retaining a value in a controller variable - by El Forum - 06-19-2010, 07:54 AM
retaining a value in a controller variable - by El Forum - 06-19-2010, 08:32 AM
retaining a value in a controller variable - by El Forum - 06-19-2010, 08:45 AM
retaining a value in a controller variable - by El Forum - 06-19-2010, 08:58 AM
retaining a value in a controller variable - by El Forum - 06-19-2010, 10:04 AM



Theme © iAndrew 2016 - Forum software by © MyBB