You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Valerie Wagner <va...@sri.com> on 2013/04/16 01:06:26 UTC

help generating dynamic content

I'm just getting started with learning Tapestry and am struggling a bit 
with the "static structure, dynamic behavior." We are developing an 
application that is going to allow plugins from third-parties. For 
example, the plugins will each provide a capability and have their own 
settings. We want each plugin to be able to provide its own Tapestry 
Component to allow the user to configure the plugin. For example, I may 
have a page that renders all the settings of all plugins (or perhaps the 
user selects a plugin from a list & views on that setting).

I'm doing as much reading as I can through the documentation and 
examples, but it's just not clear to me how to structure this. If my 
application doesn't know the complete list of Components ahead of time, 
I haven't thought of a way to dynamically render them. I've been looking 
at delegates, form injection, filtering...but none of it seems 
appropriate to me.

I'd appreciate any help or thoughts on this. What I need is something 
along the lines of:

foreach plugin in our list
     render the "settings" component for that plugin
end

or

render the "settings" component for plugin with id X

thanks,
Valerie


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: help generating dynamic content

Posted by Howard Lewis Ship <hl...@gmail.com>.
I'd caution that it isn't a beginner's exercise to accomplish this in
Tapestry any more than it would be in straight servlets or SpringMVC or any
other framework.  Try to get comfortable building "flat" pages a bit before
launching into something so meta-.


On Tue, Apr 16, 2013 at 6:14 AM, Robert Zeigler <robert.zeigler@roxanemy.com
> wrote:

> Hi Valerie,
>
> I would suggest taking a look at the BeanEditor and related components +
> services. That would be the best starting place for something like this, in
> terms of understanding how a component can components at runtime that were
> unknown by the original component authors.
>
> Cheers,
>
> Robert
>
> On Apr 15, 2013, at 4/156:06 PM , Valerie Wagner <va...@sri.com>
> wrote:
>
> >
> > I'm just getting started with learning Tapestry and am struggling a bit
> with the "static structure, dynamic behavior." We are developing an
> application that is going to allow plugins from third-parties. For example,
> the plugins will each provide a capability and have their own settings. We
> want each plugin to be able to provide its own Tapestry Component to allow
> the user to configure the plugin. For example, I may have a page that
> renders all the settings of all plugins (or perhaps the user selects a
> plugin from a list & views on that setting).
> >
> > I'm doing as much reading as I can through the documentation and
> examples, but it's just not clear to me how to structure this. If my
> application doesn't know the complete list of Components ahead of time, I
> haven't thought of a way to dynamically render them. I've been looking at
> delegates, form injection, filtering...but none of it seems appropriate to
> me.
> >
> > I'd appreciate any help or thoughts on this. What I need is something
> along the lines of:
> >
> > foreach plugin in our list
> >    render the "settings" component for that plugin
> > end
> >
> > or
> >
> > render the "settings" component for plugin with id X
> >
> > thanks,
> > Valerie
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

Re: help generating dynamic content

Posted by Robert Zeigler <ro...@roxanemy.com>.
Hi Valerie,

I would suggest taking a look at the BeanEditor and related components + services. That would be the best starting place for something like this, in terms of understanding how a component can components at runtime that were unknown by the original component authors.

Cheers,

Robert

On Apr 15, 2013, at 4/156:06 PM , Valerie Wagner <va...@sri.com> wrote:

> 
> I'm just getting started with learning Tapestry and am struggling a bit with the "static structure, dynamic behavior." We are developing an application that is going to allow plugins from third-parties. For example, the plugins will each provide a capability and have their own settings. We want each plugin to be able to provide its own Tapestry Component to allow the user to configure the plugin. For example, I may have a page that renders all the settings of all plugins (or perhaps the user selects a plugin from a list & views on that setting).
> 
> I'm doing as much reading as I can through the documentation and examples, but it's just not clear to me how to structure this. If my application doesn't know the complete list of Components ahead of time, I haven't thought of a way to dynamically render them. I've been looking at delegates, form injection, filtering...but none of it seems appropriate to me.
> 
> I'd appreciate any help or thoughts on this. What I need is something along the lines of:
> 
> foreach plugin in our list
>    render the "settings" component for that plugin
> end
> 
> or
> 
> render the "settings" component for plugin with id X
> 
> thanks,
> Valerie
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: help generating dynamic content

Posted by Kalle Korhonen <ka...@gmail.com>.
Sort of like Wordpress or Jenkins plugins right? Yeah it's probably not the
easiest thing to get started learning Tapestry with this problem but we
should have some better answers for you than "don't do it". How the
BeanEditor works is you contribute page blocks to handle specific types of
input fields (or your override specific input instances on per page basis),
however in this case I'd perhaps try to structure it so that you'd dictate
some loose structure for each plugin - for example each needs to have a
PluginSettings page with a Settings block. They'd also contribute some
information about the plugin to a PluginConfiguration. Finally, in your
plugin container application, you'd collect and render these blocks on
Plugins page. I haven't tried building anything like that so you'll
probably run into issues. However, I think it's a pretty common use case
and it'd be great to have some best practice answers for it.

Kalle


On Mon, Apr 15, 2013 at 4:06 PM, Valerie Wagner <va...@sri.com>wrote:

>
> I'm just getting started with learning Tapestry and am struggling a bit
> with the "static structure, dynamic behavior." We are developing an
> application that is going to allow plugins from third-parties. For example,
> the plugins will each provide a capability and have their own settings. We
> want each plugin to be able to provide its own Tapestry Component to allow
> the user to configure the plugin. For example, I may have a page that
> renders all the settings of all plugins (or perhaps the user selects a
> plugin from a list & views on that setting).
>
> I'm doing as much reading as I can through the documentation and examples,
> but it's just not clear to me how to structure this. If my application
> doesn't know the complete list of Components ahead of time, I haven't
> thought of a way to dynamically render them. I've been looking at
> delegates, form injection, filtering...but none of it seems appropriate to
> me.
>
> I'd appreciate any help or thoughts on this. What I need is something
> along the lines of:
>
> foreach plugin in our list
>     render the "settings" component for that plugin
> end
>
> or
>
> render the "settings" component for plugin with id X
>
> thanks,
> Valerie
>
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.**apache.org<us...@tapestry.apache.org>
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>