Hi Shoan,

the purpose of slots is to create reusable components. They can have  
their own logic, but this is in no way required. If you're worried  
about the overhead of an action execution with validation etc. you can  
mark an action as "simple" by defining the method as follows:

class FooAction
{
    ....
     public function isSimple()
     {
         return true;
     }
     ....
}

This will skip all validation and action execution and will pass  
control to the view returned from the actions 'getDefaultView' method.

It's a design decision to have a single mechanism for providing  
reusable components instead of having slots, partials, etc that all do  
something similar. This was you can enhance your component later on  
without changing the way it is used.

So yes, slots are the way to go.

cheers

felix


On Aug 26, 2009, at 5:02 AM, Shoan Motwani wrote:

> Hi,
>
> How do I embed one view into another view of the same action? I am
> building a search engine and by default would like to display only the
> search box. But after searching, would like to see the search box on
> top of the table of results. Currently the search box is the 'Input'
> view and the tabular results is the 'ListView'. I looked at slots, but
> it felt like the purpose of slots was to embed one action into an
> another.
>
> Is there a cleaner way to do this other than using slots?
>
> Peace,
> Shoan.
>
>
>
> _______________________________________________
> users mailing list
> [email protected]
> http://lists.agavi.org/mailman/listinfo/users
>

--
Felix Gilcher

Bitextender GmbH
Paul-Heyse-Str. 6
D-80336 München

T: +49 89 57 08 15 16
F: +49 89 57 08 15 17
M: +49 172 840 88 28

[email protected]
http://bitextender.com/

Amtsgericht München, HRB 174280
Geschäftsführer: David Zülke, Florian Clever


_______________________________________________
users mailing list
[email protected]
http://lists.agavi.org/mailman/listinfo/users

Reply via email to