RE: [JSF] Tiles and Reusable Template

2006-02-24 Thread CONNER, BRENDAN \(SBCSI\)
It all depends on what you want to vary.  We've set up our pages to take
the title from the tiles definition, not the other way around.  That's
because some of our pages are re-used by different tiles (e.g., Adding a
customer name and adding a supplier name use the same JSP but in
different contexts), and we want them to have different titles when used
within different tiles.

Also, remember that you can have tiles that extend other tiles, in case
you have an entire set of pages that have common elements.  And you can
define variables in tiles (e.g., title) that can be referenced within
the JSP itself (if you give them request scope).

- Brendan

-Original Message-
From: Garner, Shawn [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 24, 2006 2:03 PM
To: 'MyFaces Discussion'
Subject: RE: [JSF] Tiles and Reusable Template







This is the part I want to avoid if at all possible.
I don't want to have to declare this in the xml file for every jsp page.

So if you have two more pages you need










This is very repetitive and you will end up with a giant def file if you
have a lot of pages and I don't see why you need it.

How hard is it to do something like this:







...controls and content for add_user.jsp...



The title, header, and footer would come from the default.
You would set the title and body in the jsp page.

Shawn


-Original Message-
From: CONNER, BRENDAN (SBCSI) [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 24, 2006 1:20 PM
To: MyFaces Discussion
Subject: RE: [JSF] Tiles and Reusable Template

I don't know what you mean by a "bunch of xml files."  We have a
tiles-def.xml file that contains the tiles definitions, plus a layout
jsp used by the tiles definitions.  For example, a tiles-def.xml file
could contain the following entries:






 








where myLayout.jsp has the following entries (typically with a lot of
 formatting to make the menu, body, and footer fit in where
you want them):








...



...



...



...



...




Then your home.jsp file is a regular JSF file that fits into the layout
specified above.

- Brendan

-Original Message-
From: Garner, Shawn [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 24, 2006 11:33 AM
To: 'MyFaces Discussion'
Subject: RE: [JSF] Tiles and Reusable Template


I've used struts template tags a little.  
I've just used tiles on a new struts project recently.
Don't know if I did it the "correct" way both times but it works without
a
bunch of xml definitions files.  

The main problem with tiles in JSF is that it is writing the content to
my
tables out before my tables are written.  

Well it says to do a f:verbatim or h:outputText.  But I don't want to do
that every time I want to write out text or HTML text.  Seems like extra
effort that is not needed.

Also I didn't want to write a new page.tiles xml definition for every
JSP
page.  Also I find it very html designer unfriendly.


I like the facelets approach but I would kind of like to stick with an
Apache product if Clay in Shale would do the same thing with about the
same
amount of work.


Shawn
-Original Message-
From: CONNER, BRENDAN (SBCSI) [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 24, 2006 11:23 AM
To: MyFaces Discussion
Subject: RE: [JSF] Tiles and Reusable Template

The O'Reilly book "JavaServer Faces" has a section in "Chapter 12: Odds
and Ends" called "Combining JSF Views with Other Content."  That gives
an example of how to use Tiles in JSF.  Also the book "Core JavaServer
Faces" has a Chapter entitled "Subviews and Tiles."

Are you familiar with using Tiles outside of JSF?  If so, we can
concentrate on how to use it within JSF.  Otherwise, you may need some
background on Tiles itself (regardless of its integration with JSF).

- Brendan

-Original Message-----
From: Garner, Shawn [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 24, 2006 10:38 AM
To: 'MyFaces Discussion'
Subject: RE: [JSF] Tiles and Reusable Template


So

RE: [JSF] Tiles and Reusable Template

2006-02-24 Thread Garner, Shawn





This is the part I want to avoid if at all possible.
I don't want to have to declare this in the xml file for every jsp page.

So if you have two more pages you need










This is very repetitive and you will end up with a giant def file if you
have a lot of pages and I don't see why you need it.

How hard is it to do something like this:







...controls and content for add_user.jsp...



The title, header, and footer would come from the default.
You would set the title and body in the jsp page.

Shawn


-Original Message-
From: CONNER, BRENDAN (SBCSI) [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 24, 2006 1:20 PM
To: MyFaces Discussion
Subject: RE: [JSF] Tiles and Reusable Template

I don't know what you mean by a "bunch of xml files."  We have a
tiles-def.xml file that contains the tiles definitions, plus a layout
jsp used by the tiles definitions.  For example, a tiles-def.xml file
could contain the following entries:






 








where myLayout.jsp has the following entries (typically with a lot of
 formatting to make the menu, body, and footer fit in where
you want them):








...



...



...



...



...




Then your home.jsp file is a regular JSF file that fits into the layout
specified above.

- Brendan

-Original Message-
From: Garner, Shawn [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 24, 2006 11:33 AM
To: 'MyFaces Discussion'
Subject: RE: [JSF] Tiles and Reusable Template


I've used struts template tags a little.  
I've just used tiles on a new struts project recently.
Don't know if I did it the "correct" way both times but it works without
a
bunch of xml definitions files.  

The main problem with tiles in JSF is that it is writing the content to
my
tables out before my tables are written.  

Well it says to do a f:verbatim or h:outputText.  But I don't want to do
that every time I want to write out text or HTML text.  Seems like extra
effort that is not needed.

Also I didn't want to write a new page.tiles xml definition for every
JSP
page.  Also I find it very html designer unfriendly.


I like the facelets approach but I would kind of like to stick with an
Apache product if Clay in Shale would do the same thing with about the
same
amount of work.


Shawn
-Original Message-
From: CONNER, BRENDAN (SBCSI) [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 24, 2006 11:23 AM
To: MyFaces Discussion
Subject: RE: [JSF] Tiles and Reusable Template

The O'Reilly book "JavaServer Faces" has a section in "Chapter 12: Odds
and Ends" called "Combining JSF Views with Other Content."  That gives
an example of how to use Tiles in JSF.  Also the book "Core JavaServer
Faces" has a Chapter entitled "Subviews and Tiles."

Are you familiar with using Tiles outside of JSF?  If so, we can
concentrate on how to use it within JSF.  Otherwise, you may need some
background on Tiles itself (regardless of its integration with JSF).

- Brendan

-Original Message-
From: Garner, Shawn [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 24, 2006 10:38 AM
To: 'MyFaces Discussion'
Subject: RE: [JSF] Tiles and Reusable Template


Somebody posted that page but I don't quite get how it works.

Shawn
-Original Message-----
From: CONNER, BRENDAN (SBCSI) [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 23, 2006 1:08 PM
To: MyFaces Discussion
Subject: RE: [JSF] Tiles and Reusable Template

We're using Tiles with JSF and have no problems.  Works wonderfully, in
fact.  We just needed to code up a tilesDispatch.jsp to avoid having to
create a page for every tile.  (One of the other threads on the subject
gives a link for how to do this.  If you can't find the link, let me
know.  I think it was on java.net.)

- Brendan

-Original Message-
From: Garner, Shawn [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 23, 2006 12:51 PM
To: 'MyFaces Discussion'
Subject: RE: [JSF] Tiles and Reusable Template


I looked at Clay and it looks like it will work but I wa

RE: [JSF] Tiles and Reusable Template

2006-02-24 Thread CONNER, BRENDAN \(SBCSI\)
I don't know what you mean by a "bunch of xml files."  We have a
tiles-def.xml file that contains the tiles definitions, plus a layout
jsp used by the tiles definitions.  For example, a tiles-def.xml file
could contain the following entries:






 








where myLayout.jsp has the following entries (typically with a lot of
 formatting to make the menu, body, and footer fit in where
you want them):








...



...



...



...



...




Then your home.jsp file is a regular JSF file that fits into the layout
specified above.

- Brendan

-Original Message-
From: Garner, Shawn [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 24, 2006 11:33 AM
To: 'MyFaces Discussion'
Subject: RE: [JSF] Tiles and Reusable Template


I've used struts template tags a little.  
I've just used tiles on a new struts project recently.
Don't know if I did it the "correct" way both times but it works without
a
bunch of xml definitions files.  

The main problem with tiles in JSF is that it is writing the content to
my
tables out before my tables are written.  

Well it says to do a f:verbatim or h:outputText.  But I don't want to do
that every time I want to write out text or HTML text.  Seems like extra
effort that is not needed.

Also I didn't want to write a new page.tiles xml definition for every
JSP
page.  Also I find it very html designer unfriendly.


I like the facelets approach but I would kind of like to stick with an
Apache product if Clay in Shale would do the same thing with about the
same
amount of work.


Shawn
-Original Message-
From: CONNER, BRENDAN (SBCSI) [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 24, 2006 11:23 AM
To: MyFaces Discussion
Subject: RE: [JSF] Tiles and Reusable Template

The O'Reilly book "JavaServer Faces" has a section in "Chapter 12: Odds
and Ends" called "Combining JSF Views with Other Content."  That gives
an example of how to use Tiles in JSF.  Also the book "Core JavaServer
Faces" has a Chapter entitled "Subviews and Tiles."

Are you familiar with using Tiles outside of JSF?  If so, we can
concentrate on how to use it within JSF.  Otherwise, you may need some
background on Tiles itself (regardless of its integration with JSF).

- Brendan

-Original Message-
From: Garner, Shawn [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 24, 2006 10:38 AM
To: 'MyFaces Discussion'
Subject: RE: [JSF] Tiles and Reusable Template


Somebody posted that page but I don't quite get how it works.

Shawn
-Original Message-
From: CONNER, BRENDAN (SBCSI) [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 23, 2006 1:08 PM
To: MyFaces Discussion
Subject: RE: [JSF] Tiles and Reusable Template

We're using Tiles with JSF and have no problems.  Works wonderfully, in
fact.  We just needed to code up a tilesDispatch.jsp to avoid having to
create a page for every tile.  (One of the other threads on the subject
gives a link for how to do this.  If you can't find the link, let me
know.  I think it was on java.net.)

- Brendan

-Original Message-
From: Garner, Shawn [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 23, 2006 12:51 PM
To: 'MyFaces Discussion'
Subject: RE: [JSF] Tiles and Reusable Template


I looked at Clay and it looks like it will work but I want to examine
facelets more first.

The facelets tutorial says it does easy templating but there were no
examples on how to do it and I couldn't find one in the documentation.
Is there an example of this somewhere?


Shawn
-Original Message-----
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Laurie Harper
Sent: Wednesday, February 22, 2006 6:44 PM
To: users@myfaces.apache.org
Subject: Re: [JSF] Tiles and Reusable Template

Garner, Shawn wrote:
> I tried using tiles with JSF and found it does not work very well.
> 
> You end up having to define every page in the tiles.xml file that you
want
> to use the template for.
> 
> Are there any other approaches to creating a reusable template that
uses
> multiple jsp pages?
> 
> Seems like I should be able to just include a page and override the
body,
> title portion without redef

RE: [JSF] Tiles and Reusable Template

2006-02-24 Thread Gary VanMatre

No, that's the facelets composition mechanism.  
Using Clay, you would need a separate HTML template for the body.
 
 


 
   
 

 
This type of top-level definition works best when you use inheritance so that
you can define default symbol value and only override the needed
customizations.  The templates can also exist in the class path 
"classpath*:com/acme/templates/body.html".
 
/body.html:

mock title
    
   [EMAIL PROTECTED]}>
   

 
-- Original message -- From: "Garner, Shawn" <[EMAIL PROTECTED]> 




Can I do this?
 
addUserPage.jsp:
 

 
   
 
    
    ...
        
   

 
 
 

Shawn 
 




From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, February 24, 2006 11:57 AMTo: MyFaces DiscussionSubject: RE: [JSF] Tiles and Reusable Template
 

>From: "Garner, Shawn" <[EMAIL PROTECTED]> >> Alright, I looked at the symbols example in the usecases example. > Thing I don't like about usecases is it tries to show ever feature and its > hard for me to tell one feature from another. Even with the clay example > there are 4 different options displayed and I can't separate them. >

 

I think that's a common comment.  Outside a creating more example,

and better documentation, I'm not sure what the answer is but

we can always use more help here.  

 

> I like the idea of layout.html in the symbols but I don't like the way it > uses the html body. I'm also not fond of declaring a bunch of panels and > things inside an XML file. I would rather it was in a JSP file. > > I would like to be able to use the layout.html but then be able to tie this > to a JSP View and supply the title and body content in this JSP body. > 

 

A limitation that Clay has is that you are not able to include a JSP from 

a Clay XML definition or HTML template.  This is a reflection on the 

fact that the JSF/JSP tags are not designed to be mixed with other view 

types.

 

However, you could use JSP as your entry point and include a Clay subview

using the "clay:clay" tag.  

 

page1.jsp:

 



   


   



 

or 

 

page1.jsp:

 




   


   



 

Clay XML Config:

 

                                http://struts.apache.org/images/struts.gif"/ >                

 

 

The catch is that you can not include another JSP from 

within the "layout.html".  The JSP page would only be

the page entry point.

 

Anything included in the "layout.html" has to use clay HTML

templates or XML config definitions.

 

Originally, the JSP page entry point was the only option. 

This might make a nice sample applicaiton?

 

The option that is the most like tiles is to use an XML config as the

entry point.  The symbols "page1.xml" and "page2.xml" usecase

example shows how this works.  Both definitions are found in a 

common XML.  But, the same rule about including JSP applies

here too.

 

I've been trying to figure out how to include a JSP from a clay template

but the JSP Tag is not standardized in this area.  I've been thinking about

trying to create a decorated view root and swap out the view root before

including the jsp and then swapping it back. 

 

Most people seem interested in a non-jsp solution so I haven't put much

time into this hack.

> Can anybody help me piece (pun intended) this together? > 

 

Hope that helps.

> Shawn 

 

 

Gary
 
This email may contain confidential material. If you were not an intended recipient, Please notify the sender and delete all copies. We may monitor email to and from our network.
 *** 
 


RE: [JSF] Tiles and Reusable Template

2006-02-24 Thread Garner, Shawn








Can I do this?

 

addUserPage.jsp:

 



 

   

 

    

    ...

        

  




 

 

 



Shawn 



 









From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 24, 2006
11:57 AM
To: MyFaces Discussion
Subject: RE: [JSF] Tiles and
Reusable Template



 



>From: "Garner, Shawn" <[EMAIL PROTECTED]> 
>
> Alright, I looked at the symbols example in the usecases example. 
> Thing I don't like about usecases is it tries to show ever feature and its

> hard for me to tell one feature from another. Even with the clay example 
> there are 4 different options displayed and I can't separate them. 
>





 





I think that's a common comment.  Outside a creating more example,





and better documentation, I'm not sure what the answer is but





we can always use more help here.  





 





 
> I like the idea of layout.html in the symbols but I don't like the way it 
> uses the html body. I'm also not fond of declaring a bunch of panels and 
> things inside an XML file. I would rather it was in a JSP file. 
> 
> I would like to be able to use the layout.html but then be able to tie
this 
> to a JSP View and supply the title and body content in this JSP body. 
> 





 





A limitation that Clay has is that you are not able to include a
JSP from 





a Clay XML definition or HTML template.  This is a reflection on
the 





fact that the JSF/JSP tags are not designed to be mixed with
other view 





types.





 





However, you could use JSP as your entry point and include a Clay
subview





using the "clay:clay" tag.  





 





page1.jsp:





 











  








   













 





or 





 





page1.jsp:





 













   







   













 





Clay XML Config:





 





    
    
   
   
   
   
   
   
   
   http://struts.apache.org/images/struts.gif"/
>
   
      
   
    





 





 







The catch is that you can not include another JSP from 





within the "layout.html".  The JSP page would only be





the page entry point.





 





Anything included in the "layout.html" has to use clay HTML





templates or XML config definitions.





 





Originally, the JSP page entry point was the only option. 





This might make a nice sample applicaiton?





 





The option that is the most like tiles is to use an XML config as the





entry point.  The symbols "page1.xml" and
"page2.xml" usecase





example shows how this works.  Both definitions are found in a 





common XML.  But, the same rule about including JSP applies





here too.





 





I've been trying to figure out how to include a JSP from a clay
template





but the JSP Tag is not standardized in this area.  I've
been thinking about





trying to create a decorated view root and swap out the view root
before





including the jsp and then swapping it back. 





 





Most people seem interested in a non-jsp solution so I haven't put much





time into this hack.






> Can anybody help me piece (pun intended) this together? 
> 





 





Hope that helps.






> Shawn 





 





 





Gary






 

This email may contain confidential material. If you were not 
an intended recipient, Please notify the sender and delete all copies. 
We may monitor email to and from our network.
 *** 

 





Re: [JSF] Tiles and Reusable Template

2006-02-24 Thread Gary VanMatre

>From: "Mike Kienenberger" <[EMAIL PROTECTED]> >> In my opinion, you're better off using facelets. > > Facelets appears to be more widely-accepted than Clay. For instance, > Oracle ADF Faces supports facelets out of the box. Jenia4Faces > supports facelets. Exadel supports facelets. I don't think any of > them provide support for Clay. On the other hand, perhaps no such > support is needed -- I haven't really used Clay. My monitoring of > the mailing list leads me to believe otherwise, though. > > Facelets appears to have a much larger user base than Clay. That's > just my general opinion having monitored both Shale and Facelets since > last May. > 
 
I think we are growing.  Hopefully that just means there is more 
opportunity to attract participants :-)
> Facelets is maintained primarily by two JSF Expert Group members. > Facelets activity appears to be actively monitored by two other > high-profile JSF EG members. > 
 
It's hard to argue against that.  It's easier to get a community rolling
when you have several heavy weights that are actively spreading
the gospel.
 
Clay had a late start under Struts Shale.  I had to hang out for 6 
months before given the karma to really move it forward.  At the
same time, I couldn't have launched something on my own.  I'm
glad for the opportunity to be an apache struts committer.
 
> Facelets fixes a number of JSF 1.1 issues by providing JSF 1.2 behavior. > > I know Gary has put a lot of work into Clay, but I think the forward > momentum is in favor of facelets. I would not be surprised to see > facelets included as part of a JSF 2.0 specification. > 
 
I wouldn't be surprised if that happened too due to the tie with the 
Sun RI team.  I would like to be on the EG :-)
 
The inheritance bit in Clay would introduce some challenges for 
tool developers.  The XML requirement of facelets is more
mainstream for tool support.
 
Gary
 


RE: [JSF] Tiles and Reusable Template

2006-02-24 Thread Gary VanMatre

>From: "Garner, Shawn" <[EMAIL PROTECTED]> >> Alright, I looked at the symbols example in the usecases example. > Thing I don't like about usecases is it tries to show ever feature and its > hard for me to tell one feature from another. Even with the clay example > there are 4 different options displayed and I can't separate them. >
 
I think that's a common comment.  Outside a creating more example,
and better documentation, I'm not sure what the answer is but
we can always use more help here.  
 
 > I like the idea of layout.html in the symbols but I don't like the way it > uses the html body. I'm also not fond of declaring a bunch of panels and > things inside an XML file. I would rather it was in a JSP file. > > I would like to be able to use the layout.html but then be able to tie this > to a JSP View and supply the title and body content in this JSP body. > 
 
A limitation that Clay has is that you are not able to include a JSP from 
a Clay XML definition or HTML template.  This is a reflection on the 
fact that the JSF/JSP tags are not designed to be mixed with other view 
types.
 
However, you could use JSP as your entry point and include a Clay subview
using the "clay:clay" tag.  
 
page1.jsp:
 

   

   

 
or 
 
page1.jsp:
 


   

   

 
Clay XML Config:
 
                                http://struts.apache.org/images/struts.gif"/
 >                
 
 
The catch is that you can not include another JSP from 
within the "layout.html".  The JSP page would only be
the page entry point.
 
Anything included in the "layout.html" has to use clay HTML
templates or XML config definitions.
 
Originally, the JSP page entry point was the only option. 
This might make a nice sample applicaiton?
 
The option that is the most like tiles is to use an XML config as the
entry point.  The symbols "page1.xml" and "page2.xml" usecase
example shows how this works.  Both definitions are found in a 
common XML.  But, the same rule about including JSP applies
here too.
 
I've been trying to figure out how to include a JSP from a clay template
but the JSP Tag is not standardized in this area.  I've been thinking about
trying to create a decorated view root and swap out the view root before
including the jsp and then swapping it back. 
 
Most people seem interested in a non-jsp solution so I haven't put much
time into this hack.
> Can anybody help me piece (pun intended) this together? > 
 
Hope that helps.
> Shawn 
 
 
Gary


Re: [JSF] Tiles and Reusable Template

2006-02-24 Thread Mike Kienenberger
In my opinion, you're better off using facelets.

Facelets appears to be more widely-accepted than Clay.   For instance,
Oracle ADF Faces supports facelets out of the box.  Jenia4Faces
supports facelets.   Exadel supports facelets.  I don't think any of
them provide support for Clay.  On the other hand, perhaps no such
support is needed -- I haven't really used Clay.   My monitoring of
the mailing list leads me to believe otherwise, though.

Facelets appears to have a much larger user base than Clay.   That's
just my general opinion having monitored both Shale and Facelets since
last May.

Facelets is maintained primarily by two JSF Expert Group members.  
Facelets activity appears to be actively monitored by two other
high-profile JSF EG members.

Facelets fixes a number of JSF 1.1 issues by providing JSF 1.2 behavior.

I know Gary has put a lot of work into Clay, but I think the forward
momentum is in favor of facelets.   I would not be surprised to see
facelets included as part of a JSF 2.0 specification.

On 2/24/06, Garner, Shawn <[EMAIL PROTECTED]> wrote:
> I've used struts template tags a little.
> I've just used tiles on a new struts project recently.
> Don't know if I did it the "correct" way both times but it works without a
> bunch of xml definitions files.
>
> The main problem with tiles in JSF is that it is writing the content to my
> tables out before my tables are written.
>
> Well it says to do a f:verbatim or h:outputText.  But I don't want to do
> that every time I want to write out text or HTML text.  Seems like extra
> effort that is not needed.
>
> Also I didn't want to write a new page.tiles xml definition for every JSP
> page.  Also I find it very html designer unfriendly.
>
>
> I like the facelets approach but I would kind of like to stick with an
> Apache product if Clay in Shale would do the same thing with about the same
> amount of work.
>
>
> Shawn
> -Original Message-
> From: CONNER, BRENDAN (SBCSI) [mailto:[EMAIL PROTECTED]
> Sent: Friday, February 24, 2006 11:23 AM
> To: MyFaces Discussion
> Subject: RE: [JSF] Tiles and Reusable Template
>
> The O'Reilly book "JavaServer Faces" has a section in "Chapter 12: Odds
> and Ends" called "Combining JSF Views with Other Content."  That gives
> an example of how to use Tiles in JSF.  Also the book "Core JavaServer
> Faces" has a Chapter entitled "Subviews and Tiles."
>
> Are you familiar with using Tiles outside of JSF?  If so, we can
> concentrate on how to use it within JSF.  Otherwise, you may need some
> background on Tiles itself (regardless of its integration with JSF).
>
> - Brendan
>
> -Original Message-
> From: Garner, Shawn [mailto:[EMAIL PROTECTED]
> Sent: Friday, February 24, 2006 10:38 AM
> To: 'MyFaces Discussion'
> Subject: RE: [JSF] Tiles and Reusable Template
>
>
> Somebody posted that page but I don't quite get how it works.
>
> Shawn
> -Original Message-
> From: CONNER, BRENDAN (SBCSI) [mailto:[EMAIL PROTECTED]
> Sent: Thursday, February 23, 2006 1:08 PM
> To: MyFaces Discussion
> Subject: RE: [JSF] Tiles and Reusable Template
>
> We're using Tiles with JSF and have no problems.  Works wonderfully, in
> fact.  We just needed to code up a tilesDispatch.jsp to avoid having to
> create a page for every tile.  (One of the other threads on the subject
> gives a link for how to do this.  If you can't find the link, let me
> know.  I think it was on java.net.)
>
> - Brendan
>
> -Original Message-
> From: Garner, Shawn [mailto:[EMAIL PROTECTED]
> Sent: Thursday, February 23, 2006 12:51 PM
> To: 'MyFaces Discussion'
> Subject: RE: [JSF] Tiles and Reusable Template
>
>
> I looked at Clay and it looks like it will work but I want to examine
> facelets more first.
>
> The facelets tutorial says it does easy templating but there were no
> examples on how to do it and I couldn't find one in the documentation.
> Is there an example of this somewhere?
>
>
> Shawn
> -Original Message-
> From: news [mailto:[EMAIL PROTECTED] On Behalf Of Laurie Harper
> Sent: Wednesday, February 22, 2006 6:44 PM
> To: users@myfaces.apache.org
> Subject: Re: [JSF] Tiles and Reusable Template
>
> Garner, Shawn wrote:
> > I tried using tiles with JSF and found it does not work very well.
> >
> > You end up having to define every page in the tiles.xml file that you
> want
> > to use the template for.
> >
> > Are there any other approaches to creating a reusable template that
> uses
> > multiple jsp pages?
> >
> > Seems like I should be able to ju

RE: [JSF] Tiles and Reusable Template

2006-02-24 Thread Garner, Shawn
I've used struts template tags a little.  
I've just used tiles on a new struts project recently.
Don't know if I did it the "correct" way both times but it works without a
bunch of xml definitions files.  

The main problem with tiles in JSF is that it is writing the content to my
tables out before my tables are written.  

Well it says to do a f:verbatim or h:outputText.  But I don't want to do
that every time I want to write out text or HTML text.  Seems like extra
effort that is not needed.

Also I didn't want to write a new page.tiles xml definition for every JSP
page.  Also I find it very html designer unfriendly.


I like the facelets approach but I would kind of like to stick with an
Apache product if Clay in Shale would do the same thing with about the same
amount of work.


Shawn
-Original Message-
From: CONNER, BRENDAN (SBCSI) [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 24, 2006 11:23 AM
To: MyFaces Discussion
Subject: RE: [JSF] Tiles and Reusable Template

The O'Reilly book "JavaServer Faces" has a section in "Chapter 12: Odds
and Ends" called "Combining JSF Views with Other Content."  That gives
an example of how to use Tiles in JSF.  Also the book "Core JavaServer
Faces" has a Chapter entitled "Subviews and Tiles."

Are you familiar with using Tiles outside of JSF?  If so, we can
concentrate on how to use it within JSF.  Otherwise, you may need some
background on Tiles itself (regardless of its integration with JSF).

- Brendan

-Original Message-
From: Garner, Shawn [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 24, 2006 10:38 AM
To: 'MyFaces Discussion'
Subject: RE: [JSF] Tiles and Reusable Template


Somebody posted that page but I don't quite get how it works.

Shawn
-Original Message-
From: CONNER, BRENDAN (SBCSI) [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 23, 2006 1:08 PM
To: MyFaces Discussion
Subject: RE: [JSF] Tiles and Reusable Template

We're using Tiles with JSF and have no problems.  Works wonderfully, in
fact.  We just needed to code up a tilesDispatch.jsp to avoid having to
create a page for every tile.  (One of the other threads on the subject
gives a link for how to do this.  If you can't find the link, let me
know.  I think it was on java.net.)

- Brendan

-Original Message-
From: Garner, Shawn [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 23, 2006 12:51 PM
To: 'MyFaces Discussion'
Subject: RE: [JSF] Tiles and Reusable Template


I looked at Clay and it looks like it will work but I want to examine
facelets more first.

The facelets tutorial says it does easy templating but there were no
examples on how to do it and I couldn't find one in the documentation.
Is there an example of this somewhere?


Shawn
-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Laurie Harper
Sent: Wednesday, February 22, 2006 6:44 PM
To: users@myfaces.apache.org
Subject: Re: [JSF] Tiles and Reusable Template

Garner, Shawn wrote:
> I tried using tiles with JSF and found it does not work very well.
> 
> You end up having to define every page in the tiles.xml file that you
want
> to use the template for.
> 
> Are there any other approaches to creating a reusable template that
uses
> multiple jsp pages?
> 
> Seems like I should be able to just include a page and override the
body,
> title portion without redefining the template for every page.

You may be able to do what you want with Tiles using the JSP tags 
instead of the XML file. Alternatively, take a look at Facelets or Shale

Clay.

L.


 
This email may contain confidential material. 
If you were not an intended recipient, 
Please notify the sender and delete all copies. 
We may monitor email to and from our network. 




 
This email may contain confidential material. 
If you were not an intended recipient, 
Please notify the sender and delete all copies. 
We may monitor email to and from our network. 



 
This email may contain confidential material. 
If you were not an intended recipient, 
Please notify the sender and delete all copies. 
We may monitor email to and from our network. 



RE: [JSF] Tiles and Reusable Template

2006-02-24 Thread CONNER, BRENDAN \(SBCSI\)
The O'Reilly book "JavaServer Faces" has a section in "Chapter 12: Odds
and Ends" called "Combining JSF Views with Other Content."  That gives
an example of how to use Tiles in JSF.  Also the book "Core JavaServer
Faces" has a Chapter entitled "Subviews and Tiles."

Are you familiar with using Tiles outside of JSF?  If so, we can
concentrate on how to use it within JSF.  Otherwise, you may need some
background on Tiles itself (regardless of its integration with JSF).

- Brendan

-Original Message-
From: Garner, Shawn [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 24, 2006 10:38 AM
To: 'MyFaces Discussion'
Subject: RE: [JSF] Tiles and Reusable Template


Somebody posted that page but I don't quite get how it works.

Shawn
-Original Message-
From: CONNER, BRENDAN (SBCSI) [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 23, 2006 1:08 PM
To: MyFaces Discussion
Subject: RE: [JSF] Tiles and Reusable Template

We're using Tiles with JSF and have no problems.  Works wonderfully, in
fact.  We just needed to code up a tilesDispatch.jsp to avoid having to
create a page for every tile.  (One of the other threads on the subject
gives a link for how to do this.  If you can't find the link, let me
know.  I think it was on java.net.)

- Brendan

-Original Message-
From: Garner, Shawn [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 23, 2006 12:51 PM
To: 'MyFaces Discussion'
Subject: RE: [JSF] Tiles and Reusable Template


I looked at Clay and it looks like it will work but I want to examine
facelets more first.

The facelets tutorial says it does easy templating but there were no
examples on how to do it and I couldn't find one in the documentation.
Is there an example of this somewhere?


Shawn
-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Laurie Harper
Sent: Wednesday, February 22, 2006 6:44 PM
To: users@myfaces.apache.org
Subject: Re: [JSF] Tiles and Reusable Template

Garner, Shawn wrote:
> I tried using tiles with JSF and found it does not work very well.
> 
> You end up having to define every page in the tiles.xml file that you
want
> to use the template for.
> 
> Are there any other approaches to creating a reusable template that
uses
> multiple jsp pages?
> 
> Seems like I should be able to just include a page and override the
body,
> title portion without redefining the template for every page.

You may be able to do what you want with Tiles using the JSP tags 
instead of the XML file. Alternatively, take a look at Facelets or Shale

Clay.

L.


 
This email may contain confidential material. 
If you were not an intended recipient, 
Please notify the sender and delete all copies. 
We may monitor email to and from our network. 




 
This email may contain confidential material. 
If you were not an intended recipient, 
Please notify the sender and delete all copies. 
We may monitor email to and from our network. 




RE: [JSF] Tiles and Reusable Template

2006-02-24 Thread Garner, Shawn
Somebody posted that page but I don't quite get how it works.

Shawn
-Original Message-
From: CONNER, BRENDAN (SBCSI) [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 23, 2006 1:08 PM
To: MyFaces Discussion
Subject: RE: [JSF] Tiles and Reusable Template

We're using Tiles with JSF and have no problems.  Works wonderfully, in
fact.  We just needed to code up a tilesDispatch.jsp to avoid having to
create a page for every tile.  (One of the other threads on the subject
gives a link for how to do this.  If you can't find the link, let me
know.  I think it was on java.net.)

- Brendan

-Original Message-
From: Garner, Shawn [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 23, 2006 12:51 PM
To: 'MyFaces Discussion'
Subject: RE: [JSF] Tiles and Reusable Template


I looked at Clay and it looks like it will work but I want to examine
facelets more first.

The facelets tutorial says it does easy templating but there were no
examples on how to do it and I couldn't find one in the documentation.
Is there an example of this somewhere?


Shawn
-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Laurie Harper
Sent: Wednesday, February 22, 2006 6:44 PM
To: users@myfaces.apache.org
Subject: Re: [JSF] Tiles and Reusable Template

Garner, Shawn wrote:
> I tried using tiles with JSF and found it does not work very well.
> 
> You end up having to define every page in the tiles.xml file that you
want
> to use the template for.
> 
> Are there any other approaches to creating a reusable template that
uses
> multiple jsp pages?
> 
> Seems like I should be able to just include a page and override the
body,
> title portion without redefining the template for every page.

You may be able to do what you want with Tiles using the JSP tags 
instead of the XML file. Alternatively, take a look at Facelets or Shale

Clay.

L.


 
This email may contain confidential material. 
If you were not an intended recipient, 
Please notify the sender and delete all copies. 
We may monitor email to and from our network. 



 
This email may contain confidential material. 
If you were not an intended recipient, 
Please notify the sender and delete all copies. 
We may monitor email to and from our network. 



RE: [JSF] Tiles and Reusable Template

2006-02-24 Thread Garner, Shawn
Alright, I looked at the symbols example in the usecases example.
Thing I don't like about usecases is it tries to show ever feature and its
hard for me to tell one feature from another.  Even with the clay example
there are 4 different options displayed and I can't separate them.

I like the idea of layout.html in the symbols but I don't like the way it
uses the html body.  I'm also not fond of declaring a bunch of panels and
things inside an XML file.  I would rather it was in a JSP file.

I would like to be able to use the layout.html but then be able to tie this
to a JSP View and supply the title and body content in this JSP body.

Can anybody help me piece (pun intended) this together?
 
Shawn
-Original Message-
From: Garner, Shawn 
Sent: Thursday, February 23, 2006 12:51 PM
To: 'MyFaces Discussion'
Subject: RE: [JSF] Tiles and Reusable Template

I looked at Clay and it looks like it will work but I want to examine
facelets more first.

The facelets tutorial says it does easy templating but there were no
examples on how to do it and I couldn't find one in the documentation.
Is there an example of this somewhere?


Shawn
-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Laurie Harper
Sent: Wednesday, February 22, 2006 6:44 PM
To: users@myfaces.apache.org
Subject: Re: [JSF] Tiles and Reusable Template

Garner, Shawn wrote:
> I tried using tiles with JSF and found it does not work very well.
> 
> You end up having to define every page in the tiles.xml file that you want
> to use the template for.
> 
> Are there any other approaches to creating a reusable template that uses
> multiple jsp pages?
> 
> Seems like I should be able to just include a page and override the body,
> title portion without redefining the template for every page.

You may be able to do what you want with Tiles using the JSP tags 
instead of the XML file. Alternatively, take a look at Facelets or Shale 
Clay.

L.



This email may contain confidential material. 
If you were not an intended recipient, 
Please notify the sender and delete all copies. 
We may monitor email to and from our network. 


 
This email may contain confidential material. 
If you were not an intended recipient, 
Please notify the sender and delete all copies. 
We may monitor email to and from our network. 



RE: [JSF] Tiles and Reusable Template

2006-02-24 Thread CONNER, BRENDAN \(SBCSI\)
Can you give an example of what you're trying to do that shows the issue
you're encountering?

- Brendan

-Original Message-
From: Garner, Shawn [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 23, 2006 4:29 PM
To: 'MyFaces Discussion'
Subject: RE: [JSF] Tiles and Reusable Template


Not speaking my language here good buddy.  
I'm not sure which part of the post you are talking about and I don't
really see how it is applicable to my situation.

Shawn




From: CONNER, BRENDAN (SBCSI) [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 22, 2006 2:49 PM
To: MyFaces Discussion
Subject: RE: [JSF] Tiles and Reusable Template

See http://forum.java.sun.com/thread.jspa?forumID=427&threadID=540153 on
how to define a central tiles dispatch page

- Brendan

-Original Message-
From: Garner, Shawn [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 22, 2006 11:56 AM
To: 'MyFaces Discussion'
Subject: [JSF] Tiles and Reusable Template
I tried using tiles with JSF and found it does not work very well.
You end up having to define every page in the tiles.xml file that you
want to use the template for.
Are there any other approaches to creating a reusable template that uses
multiple jsp pages?
Seems like I should be able to just include a page and override the
body, title portion without redefining the template for every page.


Shawn


 
This email may contain confidential 
material. If you were not an intended recipient, 
Please notify the sender and delete all copies. 
We may monitor email to and from our network.
 

*** 


 
This email may contain confidential 
material. If you were not an intended recipient, 
Please notify the sender and delete all copies. 
We may monitor email to and from our network.
 

*** 


RE: [JSF] Tiles and Reusable Template

2006-02-23 Thread CONNER, BRENDAN \(SBCSI\)
We're using Tiles with JSF and have no problems.  Works wonderfully, in
fact.  We just needed to code up a tilesDispatch.jsp to avoid having to
create a page for every tile.  (One of the other threads on the subject
gives a link for how to do this.  If you can't find the link, let me
know.  I think it was on java.net.)

- Brendan

-Original Message-
From: Garner, Shawn [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 23, 2006 12:51 PM
To: 'MyFaces Discussion'
Subject: RE: [JSF] Tiles and Reusable Template


I looked at Clay and it looks like it will work but I want to examine
facelets more first.

The facelets tutorial says it does easy templating but there were no
examples on how to do it and I couldn't find one in the documentation.
Is there an example of this somewhere?


Shawn
-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Laurie Harper
Sent: Wednesday, February 22, 2006 6:44 PM
To: users@myfaces.apache.org
Subject: Re: [JSF] Tiles and Reusable Template

Garner, Shawn wrote:
> I tried using tiles with JSF and found it does not work very well.
> 
> You end up having to define every page in the tiles.xml file that you
want
> to use the template for.
> 
> Are there any other approaches to creating a reusable template that
uses
> multiple jsp pages?
> 
> Seems like I should be able to just include a page and override the
body,
> title portion without redefining the template for every page.

You may be able to do what you want with Tiles using the JSP tags 
instead of the XML file. Alternatively, take a look at Facelets or Shale

Clay.

L.


 
This email may contain confidential material. 
If you were not an intended recipient, 
Please notify the sender and delete all copies. 
We may monitor email to and from our network. 




RE: [JSF] Tiles and Reusable Template

2006-02-23 Thread Garner, Shawn
Title: Message










Not speaking my language here good buddy. 


I'm not sure which part of the post
you are talking about and I don't really see how it is applicable to my
situation.

 

Shawn



 









From: CONNER, BRENDAN
(SBCSI) [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 22, 2006
2:49 PM
To: MyFaces Discussion
Subject: RE: [JSF] Tiles and
Reusable Template



 



See http://forum.java.sun.com/thread.jspa?forumID=427&threadID=540153 on
how to define a central tiles dispatch page





 





- Brendan





 





-Original Message-
From: Garner, Shawn
[mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 22, 2006
11:56 AM
To: 'MyFaces Discussion'
Subject: [JSF] Tiles and Reusable
Template





I tried using tiles with JSF and found it does not work very
well.

You end up having to define every page in the tiles.xml file
that you want to use the template for.

Are there any other approaches to creating a reusable
template that uses multiple jsp pages?

Seems like I should be able to just include a page and
override the body, title portion without redefining the template for every
page.

 

 

Shawn

 




This
email may contain confidential 
material. If you were not an intended recipient, 
Please notify the sender and delete all copies. 
We may monitor email to and from our network.

 ***




 








 

This email may contain confidential material. If you were not 
an intended recipient, Please notify the sender and delete all copies. 
We may monitor email to and from our network.
 *** 

 





Re: [JSF] Tiles and Reusable Template

2006-02-23 Thread Mike Kienenberger
I started a facelets wiki page on facelets articles:

http://wiki.java.net/bin/view/Projects/FaceletsArticles

Feel free to add more as you come across them.   Not sure if the JSF
central article is significantly different than the blog article on
templating.

On 2/23/06, Mike Kienenberger <[EMAIL PROTECTED]> wrote:
> On 2/23/06, Garner, Shawn <[EMAIL PROTECTED]> wrote:
> > I looked at Clay and it looks like it will work but I want to examine
> > facelets more first.
> >
> > The facelets tutorial says it does easy templating but there were no
> > examples on how to do it and I couldn't find one in the documentation.
> > Is there an example of this somewhere?
>
> This is an old one.
>
> http://hookom.blogspot.com/2005/05/facelets-templating.html
>
> There's probably more out there by now.
>


Re: [JSF] Tiles and Reusable Template

2006-02-23 Thread Mike Kienenberger
On 2/23/06, Garner, Shawn <[EMAIL PROTECTED]> wrote:
> I looked at Clay and it looks like it will work but I want to examine
> facelets more first.
>
> The facelets tutorial says it does easy templating but there were no
> examples on how to do it and I couldn't find one in the documentation.
> Is there an example of this somewhere?

This is an old one.

http://hookom.blogspot.com/2005/05/facelets-templating.html

There's probably more out there by now.


RE: [JSF] Tiles and Reusable Template

2006-02-23 Thread Adam Brod

https://facelets.dev.java.net/nonav/docs/dev/docbook.html#template

Adam Brod
Product Development Team




"Garner, Shawn"
<[EMAIL PROTECTED]> 
02/23/2006 01:50 PM



Please respond to
"MyFaces Discussion" 





To
'MyFaces Discussion' 


cc



Subject
RE: [JSF] Tiles and Reusable
Template








I looked at Clay and it looks like it will work but
I want to examine
facelets more first.

The facelets tutorial says it does easy templating but there were no
examples on how to do it and I couldn't find one in the documentation.
Is there an example of this somewhere?


Shawn
-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Laurie Harper
Sent: Wednesday, February 22, 2006 6:44 PM
To: users@myfaces.apache.org
Subject: Re: [JSF] Tiles and Reusable Template

Garner, Shawn wrote:
> I tried using tiles with JSF and found it does not work very well.
> 
> You end up having to define every page in the tiles.xml file that
you want
> to use the template for.
> 
> Are there any other approaches to creating a reusable template that
uses
> multiple jsp pages?
> 
> Seems like I should be able to just include a page and override the
body,
> title portion without redefining the template for every page.

You may be able to do what you want with Tiles using the JSP tags 
instead of the XML file. Alternatively, take a look at Facelets or Shale

Clay.

L.



This email may contain confidential material. 
If you were not an intended recipient, 
Please notify the sender and delete all copies. 
We may monitor email to and from our network. 



RE: [JSF] Tiles and Reusable Template

2006-02-23 Thread Garner, Shawn
I looked at Clay and it looks like it will work but I want to examine
facelets more first.

The facelets tutorial says it does easy templating but there were no
examples on how to do it and I couldn't find one in the documentation.
Is there an example of this somewhere?


Shawn
-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Laurie Harper
Sent: Wednesday, February 22, 2006 6:44 PM
To: users@myfaces.apache.org
Subject: Re: [JSF] Tiles and Reusable Template

Garner, Shawn wrote:
> I tried using tiles with JSF and found it does not work very well.
> 
> You end up having to define every page in the tiles.xml file that you want
> to use the template for.
> 
> Are there any other approaches to creating a reusable template that uses
> multiple jsp pages?
> 
> Seems like I should be able to just include a page and override the body,
> title portion without redefining the template for every page.

You may be able to do what you want with Tiles using the JSP tags 
instead of the XML file. Alternatively, take a look at Facelets or Shale 
Clay.

L.

 
This email may contain confidential material. 
If you were not an intended recipient, 
Please notify the sender and delete all copies. 
We may monitor email to and from our network. 



RE: [JSF] Tiles and Reusable Template

2006-02-22 Thread CONNER, BRENDAN \(SBCSI\)
Title: Message



See http://forum.java.sun.com/thread.jspa?forumID=427&threadID=540153 on 
how to define a central tiles dispatch page
 
- 
Brendan
 
-Original Message-From: Garner, 
Shawn [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 22, 
2006 11:56 AMTo: 'MyFaces Discussion'Subject: [JSF] Tiles 
and Reusable Template

  
  I tried using tiles with JSF and 
  found it does not work very well.
  You end up having to define every 
  page in the tiles.xml file that you want to use the template 
  for.
  Are there any other approaches to 
  creating a reusable template that uses multiple jsp pages?
  Seems like I should be able to 
  just include a page and override the body, title portion without redefining 
  the template for every page.
   
   
  Shawn
   
   
  
  This email may contain confidential material. If you were 
  not an intended recipient, Please notify the sender and delete all copies. 
  We may monitor email to and from our network.
   *** 
  
   


Re: [JSF] Tiles and Reusable Template

2006-02-22 Thread Laurie Harper

Garner, Shawn wrote:

I tried using tiles with JSF and found it does not work very well.

You end up having to define every page in the tiles.xml file that you want
to use the template for.

Are there any other approaches to creating a reusable template that uses
multiple jsp pages?

Seems like I should be able to just include a page and override the body,
title portion without redefining the template for every page.


You may be able to do what you want with Tiles using the JSP tags 
instead of the XML file. Alternatively, take a look at Facelets or Shale 
Clay.


L.



[JSF] Tiles and Reusable Template

2006-02-22 Thread Garner, Shawn








I tried using tiles with JSF and found it does not work very
well.

You end up having to define every page in the tiles.xml file
that you want to use the template for.

Are there any other approaches to creating a reusable
template that uses multiple jsp pages?

Seems like I should be able to just include a page and
override the body, title portion without redefining the template for every page.

 

 

Shawn

 




 

This email may contain confidential material. If you were not 
an intended recipient, Please notify the sender and delete all copies. 
We may monitor email to and from our network.
 ***