Joomla! Discussion Forums



It is currently Wed Nov 25, 2009 10:54 am (All times are UTC )

 




Post new topic Reply to topic  [ 7 posts ] 
Author Message
Posted: Fri Nov 06, 2009 12:24 pm 
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Wed Oct 10, 2007 9:46 am
Posts: 144
Location: Israel, TA
Hello
I build a component which the controller make some actions which return array with values. Those values need to manipulate the page that open after the controller make the actions.
I need some action to pass values to the model or view directly without setRedirect method. How could I do that?

Thanks

_________________
my blog: http://oc666.net


Top
  E-mail  
 
Posted: Fri Nov 06, 2009 2:42 pm 
Joomla! Explorer
Joomla! Explorer
Offline

Joined: Mon Aug 11, 2008 1:16 am
Posts: 312
oc666 wrote:
Hello
I build a component which the controller make some actions which return array with values. Those values need to manipulate the page that open after the controller make the actions.
I need some action to pass values to the model or view directly without setRedirect method. How could I do that?

Thanks

set a task for the controller to intercept and process.
use JReqest::getVar() to capture POST vars.
use setVar() to set what view or layout you want.


Top
  E-mail  
 
Posted: Fri Nov 06, 2009 4:42 pm 
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Wed Oct 10, 2007 9:46 am
Posts: 144
Location: Israel, TA
becyn wrote:
set a task for the controller to intercept and process.
use JReqest::getVar() to capture POST vars.
use setVar() to set what view or layout you want.


Could you give me an example or some more info, please?

Thanks

_________________
my blog: http://oc666.net


Top
  E-mail  
 
Posted: Fri Nov 06, 2009 7:36 pm 
Joomla! Explorer
Joomla! Explorer
Offline

Joined: Mon Aug 11, 2008 1:16 am
Posts: 312
oc666 wrote:
becyn wrote:
set a task for the controller to intercept and process.
use JReqest::getVar() to capture POST vars.
use setVar() to set what view or layout you want.


Could you give me an example or some more info, please?

Thanks


See the tutorials and API
http://docs.joomla.org/
A good book on this is "Mastering Joomla 1.5".


Top
  E-mail  
 
Posted: Sat Nov 07, 2009 2:01 pm 
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Wed Oct 10, 2007 9:46 am
Posts: 144
Location: Israel, TA
becyn wrote:

See the tutorials and API
http://docs.joomla.org/
A good book on this is "Mastering Joomla 1.5".


I read about it and I've one last question. If I use JReqest::setVar() and then redirect to other page. Could I use the variables I set in the page I redirect into?

Thanks

_________________
my blog: http://oc666.net


Top
  E-mail  
 
Posted: Sat Nov 07, 2009 4:43 pm 
Joomla! Explorer
Joomla! Explorer
Offline

Joined: Mon Aug 11, 2008 1:16 am
Posts: 312
oc666 wrote:
becyn wrote:

See the tutorials and API
http://docs.joomla.org/
A good book on this is "Mastering Joomla 1.5".


I read about it and I've one last question. If I use JReqest::setVar() and then redirect to other page. Could I use the variables I set in the page I redirect into?

Thanks


If you mean the variables collected from a post method, the answer is yes. Assign the references in the the layout view.
Note that the contents of the last post operation is what will be in the array.
The best way to get a feel for it is to do some experimentation to find out how these things work.


Top
  E-mail  
 
Posted: Sun Nov 08, 2009 7:20 pm 
Joomla! Fledgling
Joomla! Fledgling
Offline

Joined: Mon Apr 14, 2008 8:56 am
Posts: 3
maybe this could help

$view=&$this->getView($viewName,$viewType);
$view->assignRef('mBooks', $mBooks);
$view->assignRef('mWorks', $mWorks);

you set new var mWorks and give it value of $mWorks

_________________
Taras Remez
http://taraska.ru


Top
  E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

Quick reply

 



Who is online

Users browsing this forum: oxidia, Sergey Romanov, suketuparikh and 37 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group