Re: Choose witch Component to use by a String

2011-06-16 Thread Bo Gao
Thanks On Jun 17, 2011, at 10:37 AM, Thiago H. de Paula Figueiredo wrote: > On Thu, 16 Jun 2011 23:21:27 -0300, Bo Gao wrote: > >> I tried this approach. >> Is this means I must put all my components in a page. >> Is their a performance problem if i have many components in one page? > > No. >

Re: Choose witch Component to use by a String

2011-06-16 Thread Thiago H. de Paula Figueiredo
On Thu, 16 Jun 2011 23:21:27 -0300, Bo Gao wrote: I tried this approach. Is this means I must put all my components in a page. Is their a performance problem if i have many components in one page? No. How to pass parameter to the component I get in this way. Use the Environment service.

Re: Choose witch Component to use by a String

2011-06-16 Thread Bo Gao
> You can use ComponentSource to grab other pages, and then grab components off > of those pages. > I've used this approach for plugin-style apps where the components to use for > a given data type are determined at runtime and can be "plugged-in". I tried this approach. Is this means I must pu

Re: Choose witch Component to use by a String

2011-06-15 Thread Thiago H. de Paula Figueiredo
On Wed, 15 Jun 2011 15:37:55 -0300, Robert Zeigler wrote: You can use ComponentSource to grab other pages, and then grab components off of those pages. I've used this approach for plugin-style apps where the components to use for a given data type are determined at runtime and can be "pl

Re: Choose witch Component to use by a String

2011-06-15 Thread Robert Zeigler
You can use ComponentSource to grab other pages, and then grab components off of those pages. I've used this approach for plugin-style apps where the components to use for a given data type are determined at runtime and can be "plugged-in". Robert On Jun 15, 2011, at 6/151:31 PM , Bo Gao wrote

Re: Choose witch Component to use by a String

2011-06-15 Thread Bo Gao
Thanks. > You can't choose your components at runtime. Although, if you have a > set of known components that you want to choose from you can put your > components in and load the block by id. If there are too many known components, I don't want to put so many components in on page. I have an

Re: Choose witch Component to use by a String

2011-06-15 Thread Josh Canfield
> I want to use a component in a page, but i don't know which to use, > I only know a String at Runtime, How can I do this. http://tapestry.apache.org/principles.html Principle 1 – Static Structure, Dynamic Behavior You can't choose your components at runtime. Although, if you have a set of know

Choose witch Component to use by a String

2011-06-15 Thread Bo Gao
I want to use a component in a page, but i don't know which to use, I only know a String at Runtime, How can I do this. I add to a .tml file, "component1" is the Component Class name. I try to add a method getComponentName() to the java file, then i can control which component to use, but i fa