Re: 答复: Reusable Components
On Fri, 11 Jul 2003, Yu Baofeng wrote: > Date: Fri, 11 Jul 2003 09:04:29 +0800 > From: Yu Baofeng <[EMAIL PROTECTED]> > Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]> > To: 'Struts Users Mailing List' <[EMAIL PROTECTED]> > Subject: [gb2312] 答复: Reusable Components > > maybe portlet is better! Better for what? If you're talking about the Portlet API (being developed under JSR-168), that only defines an API between the portal server and the portlet ... it says nothing about what a portal server does to aggregate the output and produce the resulting page. For what it's worth, onf of the changes made in the most recent EA release of JavaServer Faces was to remove direct dependency on javax.servlet.* APIs. This was deliberately done so that JavaServer Faces components can be used inside either portlets or servlets (and therefore JSP pages). This is something I think we'll need to do in Struts as well, so that Actions can be used directly from a portlet. Right now, that is a little bit awkward. Craig > > -邮件原件- > 发件人: Craig R. McClanahan [mailto:[EMAIL PROTECTED] > 发送时间: 2003年7月10日 7:34 > 收件人: Struts Users Mailing List > 主题: Re: Reusable Components > > > > > On Wed, 9 Jul 2003, Adam Hardy wrote: > > > Date: Wed, 09 Jul 2003 22:48:26 +0200 > > From: Adam Hardy <[EMAIL PROTECTED]> > > Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]> > > To: Struts Users Mailing List <[EMAIL PROTECTED]> > > Subject: Re: Reusable Components > > > > JavaServer Faces sounds like Tiles, Dynamic Forms and Validator rolled > > > into one - or does that miss the point? > > Sort of, since JavaServer Faces doesn't directly have an analog for > Tiles or the Validator Framework (although it does support per-component > validations). > > Struts does not really have any notion of a UI component that maintains > its own state, or can have child components so that you can build > complex things out of simple things. The closest analog is an > individual property in a form bean (where Struts promises to save and > restore state for you, and the HTML tags promise to render for you. The > JavaServer Faces approach to these sorts of issues is substantially more > powerful than what Struts offers -- the smallest difference being that > we wouldn't need form beans at all if Struts were built on top of Faces. > > As I've said before, it's feasible for Struts folks to treat Faces > simply as a replacement for the HTML tags, simply to get access to the > richer rendering model and complex components, while continuing to use > Struts features (tiles, validator, actions, ...). There's an > integration library already available that can do that for you: > > http://jakarta.apache.org/builds/jakarta-struts/release/struts-faces/ > > The proof of concept was to take the standard struts-example.war > sources, and convert the JSP pages (one page at a time) to use Faces > tags instead, without touching the back-end actions. > > However, if you start from scratch with JavaServer Faces, you can > achieve lots of the same separation between business logic and > presentation logic that we're all familiar with. It's worth a look so > you can start thinking about if and how to integrate this kind of thing > into your own apps once it goes final (later this year). > > Craig > > > > > > > > Craig R. McClanahan wrote: > > > > > > On Wed, 9 Jul 2003, Frédéric Dreier wrote: > > > > > > > > >>Date: Wed, 9 Jul 2003 10:13:02 +0200 > > >>From: Frédéric Dreier <[EMAIL PROTECTED]> > > >>Reply-To: Struts Users Mailing List > <[EMAIL PROTECTED]>, > > >> [EMAIL PROTECTED] > > >>To: struts user <[EMAIL PROTECTED]> > > >>Subject: Reusable Components > > >> > > >>Hi, > > >> > > >>I really need your help and hints... I was not able to found > > >>something related on internet. > > >> > > >>how can i make reusable 'high-level' components? taglib seems to be > > >>useless for such components (that already use JSP's and actions). > > >>Tiles is exactly what i need but it does not seems to work if > > >>sub-component JSPs are packed in a JAR library.. > > >> > > >>Does anyone has some link or other resources about it? or even has > > >>another solution? > > >> > > > > > > > > > Reusable user interface
答复: Reusable Components
maybe portlet is better! -邮件原件- 发件人: Craig R. McClanahan [mailto:[EMAIL PROTECTED] 发送时间: 2003年7月10日 7:34 收件人: Struts Users Mailing List 主题: Re: Reusable Components On Wed, 9 Jul 2003, Adam Hardy wrote: > Date: Wed, 09 Jul 2003 22:48:26 +0200 > From: Adam Hardy <[EMAIL PROTECTED]> > Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]> > To: Struts Users Mailing List <[EMAIL PROTECTED]> > Subject: Re: Reusable Components > > JavaServer Faces sounds like Tiles, Dynamic Forms and Validator rolled > into one - or does that miss the point? Sort of, since JavaServer Faces doesn't directly have an analog for Tiles or the Validator Framework (although it does support per-component validations). Struts does not really have any notion of a UI component that maintains its own state, or can have child components so that you can build complex things out of simple things. The closest analog is an individual property in a form bean (where Struts promises to save and restore state for you, and the HTML tags promise to render for you. The JavaServer Faces approach to these sorts of issues is substantially more powerful than what Struts offers -- the smallest difference being that we wouldn't need form beans at all if Struts were built on top of Faces. As I've said before, it's feasible for Struts folks to treat Faces simply as a replacement for the HTML tags, simply to get access to the richer rendering model and complex components, while continuing to use Struts features (tiles, validator, actions, ...). There's an integration library already available that can do that for you: http://jakarta.apache.org/builds/jakarta-struts/release/struts-faces/ The proof of concept was to take the standard struts-example.war sources, and convert the JSP pages (one page at a time) to use Faces tags instead, without touching the back-end actions. However, if you start from scratch with JavaServer Faces, you can achieve lots of the same separation between business logic and presentation logic that we're all familiar with. It's worth a look so you can start thinking about if and how to integrate this kind of thing into your own apps once it goes final (later this year). Craig > > Craig R. McClanahan wrote: > > > > On Wed, 9 Jul 2003, Frédéric Dreier wrote: > > > > > >>Date: Wed, 9 Jul 2003 10:13:02 +0200 > >>From: Frédéric Dreier <[EMAIL PROTECTED]> > >>Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>, > >> [EMAIL PROTECTED] > >>To: struts user <[EMAIL PROTECTED]> > >>Subject: Reusable Components > >> > >>Hi, > >> > >>I really need your help and hints... I was not able to found > >>something related on internet. > >> > >>how can i make reusable 'high-level' components? taglib seems to be > >>useless for such components (that already use JSP's and actions). > >>Tiles is exactly what i need but it does not seems to work if > >>sub-component JSPs are packed in a JAR library.. > >> > >>Does anyone has some link or other resources about it? or even has > >>another solution? > >> > > > > > > Reusable user interface components is what JavaServer Faces is all > > about, and it can be used with Struts: > > > > http://java.sun.com/j2ee/javaserverfaces/ > > > > One of the features is exactly what you're asking for -- the ability > > to package up components, renderers, and the corresponding tags into > > a JAR file that auto-configures itself when you drop it into > > /WEB-INF/lib. > > > > > >>Thanks in advance, > >> > >>Frederic > > > > > > Craig > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Reusable Components
On Thu, 10 Jul 2003, Erik Price wrote: > Date: Thu, 10 Jul 2003 10:08:22 -0400 > From: Erik Price <[EMAIL PROTECTED]> > Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]> > To: Struts Users Mailing List <[EMAIL PROTECTED]> > Subject: Re: Reusable Components > > > > Craig R. McClanahan wrote: > > > things out of simple things. The closest analog is an individual property > > in a form bean (where Struts promises to save and restore state for you, > > and the HTML tags promise to render for you. The JavaServer Faces > > approach to these sorts of issues is substantially more powerful than what > > Struts offers -- the smallest difference being that we wouldn't need form > > beans at all if Struts were built on top of Faces. > > If I am understanding JSF correctly, this is because the bean is only > really needed to let the Action communicate with the JSP? And in JSF, > the presentation is no longer dictated by HTML/JSP tags but rather the > Action can directly invoke presentation information via JSF library code? > Struts requires a form bean so that it can faithfully reproduce the current values in input fields when you redisplay a form (for example, if you had validation errors). Note that it doesn't matter whether you are using JSP or the Struts HTML tags -- this all happens on the server side for you. JavaServer Faces already promises you that it will maintain the state of all the UI components for you, so your application doesn't need to worry about this problem. It will be *possible* for an Action (or other Java code) to manipulate the components directly, but I would encourage most developers to stick with the separation we have today -- the Action should just set up the model data objects needed for the next page, and navigate to a JSP page (or whatever) to actually do the rendering. Otherwise, you risk mixing the presentation and business logic together too much, which makes it harder to maintain your application in the future. > > I am just getting started with the JSF tutorial now. > > > > Erik Craig - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Reusable Components
Craig R. McClanahan wrote: things out of simple things. The closest analog is an individual property in a form bean (where Struts promises to save and restore state for you, and the HTML tags promise to render for you. The JavaServer Faces approach to these sorts of issues is substantially more powerful than what Struts offers -- the smallest difference being that we wouldn't need form beans at all if Struts were built on top of Faces. If I am understanding JSF correctly, this is because the bean is only really needed to let the Action communicate with the JSP? And in JSF, the presentation is no longer dictated by HTML/JSP tags but rather the Action can directly invoke presentation information via JSF library code? I am just getting started with the JSF tutorial now. Erik - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: Reusable Components
Actually, the company where i work uses webobjects. It allows to make UI components (independant and configurable) and organize them in libraries (related to our products). Clients specific web interfaces are made of these 'standard' component + some graphic stuff. It look great on paper, but in practice... WO is a proprietary framework with a long ObjC tradition (even if it is now 100% java). It does not follow MVC model and many hacks are needed to build some basic features. Do you think that JSF[+struts] is a valuable alternative? it seems to be a very 'young' technology. or Tapesrty ? regards, Frederic -Ursprüngliche Nachricht- Von: Craig R. McClanahan [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 10. Juli 2003 01:34 An: Struts Users Mailing List Betreff: Re: Reusable Components On Wed, 9 Jul 2003, Adam Hardy wrote: > Date: Wed, 09 Jul 2003 22:48:26 +0200 > From: Adam Hardy <[EMAIL PROTECTED]> > Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]> > To: Struts Users Mailing List <[EMAIL PROTECTED]> > Subject: Re: Reusable Components > > JavaServer Faces sounds like Tiles, Dynamic Forms and Validator rolled > into one - or does that miss the point? Sort of, since JavaServer Faces doesn't directly have an analog for Tiles or the Validator Framework (although it does support per-component validations). Struts does not really have any notion of a UI component that maintains its own state, or can have child components so that you can build complex things out of simple things. The closest analog is an individual property in a form bean (where Struts promises to save and restore state for you, and the HTML tags promise to render for you. The JavaServer Faces approach to these sorts of issues is substantially more powerful than what Struts offers -- the smallest difference being that we wouldn't need form beans at all if Struts were built on top of Faces. As I've said before, it's feasible for Struts folks to treat Faces simply as a replacement for the HTML tags, simply to get access to the richer rendering model and complex components, while continuing to use Struts features (tiles, validator, actions, ...). There's an integration library already available that can do that for you: http://jakarta.apache.org/builds/jakarta-struts/release/struts-faces/ The proof of concept was to take the standard struts-example.war sources, and convert the JSP pages (one page at a time) to use Faces tags instead, without touching the back-end actions. However, if you start from scratch with JavaServer Faces, you can achieve lots of the same separation between business logic and presentation logic that we're all familiar with. It's worth a look so you can start thinking about if and how to integrate this kind of thing into your own apps once it goes final (later this year). Craig > > Craig R. McClanahan wrote: > > > > On Wed, 9 Jul 2003, Frédéric Dreier wrote: > > > > > >>Date: Wed, 9 Jul 2003 10:13:02 +0200 > >>From: Frédéric Dreier <[EMAIL PROTECTED]> > >>Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>, > >> [EMAIL PROTECTED] > >>To: struts user <[EMAIL PROTECTED]> > >>Subject: Reusable Components > >> > >>Hi, > >> > >>I really need your help and hints... I was not able to found something > >>related on internet. > >> > >>how can i make reusable 'high-level' components? taglib seems to be useless > >>for such components (that already use JSP's and actions). Tiles is exactly > >>what i need but it does not seems to work if sub-component JSPs are packed > >>in a JAR library.. > >> > >>Does anyone has some link or other resources about it? or even has another > >>solution? > >> > > > > > > Reusable user interface components is what JavaServer Faces is all about, > > and it can be used with Struts: > > > > http://java.sun.com/j2ee/javaserverfaces/ > > > > One of the features is exactly what you're asking for -- the ability to > > package up components, renderers, and the corresponding tags into a JAR > > file that auto-configures itself when you drop it into /WEB-INF/lib. > > > > > >>Thanks in advance, > >> > >>Frederic > > > > > > Craig > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Reusable Components
On Wed, 9 Jul 2003, Adam Hardy wrote: > Date: Wed, 09 Jul 2003 22:48:26 +0200 > From: Adam Hardy <[EMAIL PROTECTED]> > Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]> > To: Struts Users Mailing List <[EMAIL PROTECTED]> > Subject: Re: Reusable Components > > JavaServer Faces sounds like Tiles, Dynamic Forms and Validator rolled > into one - or does that miss the point? Sort of, since JavaServer Faces doesn't directly have an analog for Tiles or the Validator Framework (although it does support per-component validations). Struts does not really have any notion of a UI component that maintains its own state, or can have child components so that you can build complex things out of simple things. The closest analog is an individual property in a form bean (where Struts promises to save and restore state for you, and the HTML tags promise to render for you. The JavaServer Faces approach to these sorts of issues is substantially more powerful than what Struts offers -- the smallest difference being that we wouldn't need form beans at all if Struts were built on top of Faces. As I've said before, it's feasible for Struts folks to treat Faces simply as a replacement for the HTML tags, simply to get access to the richer rendering model and complex components, while continuing to use Struts features (tiles, validator, actions, ...). There's an integration library already available that can do that for you: http://jakarta.apache.org/builds/jakarta-struts/release/struts-faces/ The proof of concept was to take the standard struts-example.war sources, and convert the JSP pages (one page at a time) to use Faces tags instead, without touching the back-end actions. However, if you start from scratch with JavaServer Faces, you can achieve lots of the same separation between business logic and presentation logic that we're all familiar with. It's worth a look so you can start thinking about if and how to integrate this kind of thing into your own apps once it goes final (later this year). Craig > > Craig R. McClanahan wrote: > > > > On Wed, 9 Jul 2003, Frédéric Dreier wrote: > > > > > >>Date: Wed, 9 Jul 2003 10:13:02 +0200 > >>From: Frédéric Dreier <[EMAIL PROTECTED]> > >>Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>, > >> [EMAIL PROTECTED] > >>To: struts user <[EMAIL PROTECTED]> > >>Subject: Reusable Components > >> > >>Hi, > >> > >>I really need your help and hints... I was not able to found something > >>related on internet. > >> > >>how can i make reusable 'high-level' components? taglib seems to be useless > >>for such components (that already use JSP's and actions). Tiles is exactly > >>what i need but it does not seems to work if sub-component JSPs are packed > >>in a JAR library.. > >> > >>Does anyone has some link or other resources about it? or even has another > >>solution? > >> > > > > > > Reusable user interface components is what JavaServer Faces is all about, > > and it can be used with Struts: > > > > http://java.sun.com/j2ee/javaserverfaces/ > > > > One of the features is exactly what you're asking for -- the ability to > > package up components, renderers, and the corresponding tags into a JAR > > file that auto-configures itself when you drop it into /WEB-INF/lib. > > > > > >>Thanks in advance, > >> > >>Frederic > > > > > > Craig > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Reusable Components
JavaServer Faces sounds like Tiles, Dynamic Forms and Validator rolled into one - or does that miss the point? Craig R. McClanahan wrote: On Wed, 9 Jul 2003, Frédéric Dreier wrote: Date: Wed, 9 Jul 2003 10:13:02 +0200 From: Frédéric Dreier <[EMAIL PROTECTED]> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>, [EMAIL PROTECTED] To: struts user <[EMAIL PROTECTED]> Subject: Reusable Components Hi, I really need your help and hints... I was not able to found something related on internet. how can i make reusable 'high-level' components? taglib seems to be useless for such components (that already use JSP's and actions). Tiles is exactly what i need but it does not seems to work if sub-component JSPs are packed in a JAR library.. Does anyone has some link or other resources about it? or even has another solution? Reusable user interface components is what JavaServer Faces is all about, and it can be used with Struts: http://java.sun.com/j2ee/javaserverfaces/ One of the features is exactly what you're asking for -- the ability to package up components, renderers, and the corresponding tags into a JAR file that auto-configures itself when you drop it into /WEB-INF/lib. Thanks in advance, Frederic Craig - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Reusable Components
On Wed, 9 Jul 2003, Frédéric Dreier wrote: > Date: Wed, 9 Jul 2003 10:13:02 +0200 > From: Frédéric Dreier <[EMAIL PROTECTED]> > Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>, > [EMAIL PROTECTED] > To: struts user <[EMAIL PROTECTED]> > Subject: Reusable Components > > Hi, > > I really need your help and hints... I was not able to found something > related on internet. > > how can i make reusable 'high-level' components? taglib seems to be useless > for such components (that already use JSP's and actions). Tiles is exactly > what i need but it does not seems to work if sub-component JSPs are packed > in a JAR library.. > > Does anyone has some link or other resources about it? or even has another > solution? > Reusable user interface components is what JavaServer Faces is all about, and it can be used with Struts: http://java.sun.com/j2ee/javaserverfaces/ One of the features is exactly what you're asking for -- the ability to package up components, renderers, and the corresponding tags into a JAR file that auto-configures itself when you drop it into /WEB-INF/lib. > Thanks in advance, > > Frederic Craig - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Reusable Components
Hi, I really need your help and hints... I was not able to found something related on internet. how can i make reusable 'high-level' components? taglib seems to be useless for such components (that already use JSP's and actions). Tiles is exactly what i need but it does not seems to work if sub-component JSPs are packed in a JAR library.. Does anyone has some link or other resources about it? or even has another solution? Thanks in advance, Frederic - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Best Practice Packaging Reusable Components
Hi, I try to develop reusable components like login form, locale chooser, explorer tree, ... and I am looking for a 'nice' way to package such components (jsp,java,gifs,..) in JAR file. Or perhaps there is another way to accomplish this? Any help is welcome :-) Frederic PS: Yes i am a newbie.. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]