You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Sean Schofield <se...@gmail.com> on 2004/12/21 16:11:49 UTC

Question about JspTilesViewHandlerImpl

So far I've had some success using JspTilesViewHandlerImpl but I think
I might be running into a problem.  I'd like to use a series of
"nested" tiles.  See my sample tiles-defnitions.xml below ...

  <definition name="simple.view" path="/jsp/layouts/simple-layout.jsp">
    <put name="header" value="/jsp/header.jsp" />
    <put name="status" value="/jsp/version.jsp" />
    <put name="main" value="document.view" />
  </definition>

  <definition name="document.view" path="/jsp/layouts/document-layout.jsp">
    <put name="summarySection" value="/jsp/sections/summary-section.jsp" />
    <put name="detailSection" value="/jsp/sections/detail-section.jsp" />
  </definition>

Basically, the "main" section of my one tile refers to another tile. 
I'm having problems getting this working.  Should this be possible
with JspTilesViewHandlerImpl?  Does is matter if the pages contained
in the secondary view contain faces tags or not?

Thanks,
sean

Re: Question about JspTilesViewHandlerImpl

Posted by Sean Schofield <se...@gmail.com>.
Matthias,

I finally got a chance to try your example at home.  It worked without
a hitch!  Thanks for helping me out with it.

sean


On Wed, 29 Dec 2004 14:22:55 +0100, Matthias Wessendorf
<ma...@matthias-wessendorf.de> wrote:
> BaTien,
> 
> here is an updated MyFaces Tiles sample:
> http://www.apache.org/~matzew/myfaces-tiles-example.war
> 
> It includes some <h:commandLink/>(with action) and one
> <h;commandButton/> with action AND <f:actionListener/>
> 
> It is working for me. Perhaps you give it a try.
> 
> Btw. to the logfile you sent, I saw net.sourceforge.***
> packages there. Could you please try the myfaces.jar
> from the sample? It contains apache_packages;
> It includes also the JSF_API and all extentions
> from MyFaces
> 
> Thanks,
> Matthias
> 
> > Matthias:
> >
> > Could you please put <h:commandButton> or <h:commandLink> with
> > actionListener and action attributes in header.jsp (or
> > menu.jsp) of the
> > template layout and in page1.jsp of page1.tiles and see if
> > the commands
> > under the inserted page1.jsp properly picks up the action attribute.
> >
> > Thanks. This is the minimum solution i need to get page1.tiles as a
> > portal page. Any suggestion to make jsf UI working throughout
> > page1.tiles?
> >
> > BaTien
> > DBGROUPS
> >
> > >
> > >
> > >
> > >>-----Original Message-----
> > >>From: Sean Schofield [mailto:sean.schofield@gmail.com]
> > >>Sent: Tuesday, December 21, 2004 4:12 PM
> > >>To: MyFaces Discussion
> > >>Subject: Question about JspTilesViewHandlerImpl
> > >>
> > >>
> > >>So far I've had some success using JspTilesViewHandlerImpl
> > >>but I think I might be running into a problem.  I'd like to
> > >>use a series of "nested" tiles.  See my sample
> > >>tiles-defnitions.xml below ...
> > >>
> > >>  <definition name="simple.view"
> > >>path="/jsp/layouts/simple-layout.jsp">
> > >>    <put name="header" value="/jsp/header.jsp" />
> > >>    <put name="status" value="/jsp/version.jsp" />
> > >>    <put name="main" value="document.view" />
> > >>  </definition>
> > >>
> > >>  <definition name="document.view"
> > >>path="/jsp/layouts/document-layout.jsp">
> > >>    <put name="summarySection"
> > >>value="/jsp/sections/summary-section.jsp" />
> > >>    <put name="detailSection"
> > >>value="/jsp/sections/detail-section.jsp" />
> > >>  </definition>
> > >>
> > >>Basically, the "main" section of my one tile refers to another tile.
> > >>I'm having problems getting this working.  Should this be
> > >>possible with JspTilesViewHandlerImpl?  Does is matter if the
> > >>pages contained in the secondary view contain faces tags or not?
> > >>
> > >>Thanks,
> > >>sean
> > >>
> > >>
> > >>
> > >
> > >.
> > >
> > >
> > >
> >
> 
>

Re: Question about JspTilesViewHandlerImpl

Posted by BaTien Duong <ba...@dbgroups.com>.
Matthias Wessendorf wrote:

>>Yahoo :-) Thanks Matthias. Which version of myfaces you are using to 
>>generate the updated Myfaces Tiles example?
>>    
>>
>
>Uhm... that on my box :-) I updated this morning
>my IDE with src from cvs.apache.org
>
>
>  
>
>>Yes. The version of myfaces i used was old and my prototype is very 
>>complex. I need to get back to the basic simple things. Based on what 
>>you put together i think myfaces + tiles (nice that it can go to 
>>non-tile page) is ready for a portal page. I will update the 
>>community 
>>    
>>
>
>you wrote about *portal* is it a web app in sort of JSR_168 ?
>If yes, are you using the bridge for MyFaces from Jetspeed2 folks?
>
>  
>
Yes, it is JSR-168 Pluto portletContainer. No i do not use Jetspeed 
portal bridge. Too much technology and patchworks are not good. I just 
want it simple and standard ;-) so the portal presentation engine is 
Jsf+Tile (NOT J2), the flow between portal layer and portlet container 
is commons-chain CoR (where Shale will fit in). Technically, we make 
portlets as a business layer, completely separated from the web layer. 
We build our own portlet framework based on request/response CoR to wrap 
around Pluto 1.1, and this is where i want struts-Jericho establish a 
de-facto portlet framework (based on CoR). I use part of J2 security 
framework and waiting for its JCR CMS. Many interesting things will happen.

BaTien
DBGROUPS

>>on my progress. Please let me know the source version of myfaces for 
>>this updated example.
>>    
>>
>
>We are about to release MyFaces_1.0.8beta
>Beta, because we haven't passed TCK yet. 
>
>The source version is an RC for 1.0.8beta :-)
>
>HTH,
>Matthias
>
>  
>
>>Thanks
>>
>>BaTien
>>DBGROUPS
>>
>>    
>>
>>>Thanks,
>>>Matthias
>>>
>>> 
>>>
>>>      
>>>
>>>>Matthias:
>>>>
>>>>Could you please put <h:commandButton> or <h:commandLink> with
>>>>actionListener and action attributes in header.jsp (or 
>>>>menu.jsp) of the 
>>>>template layout and in page1.jsp of page1.tiles and see if 
>>>>the commands 
>>>>under the inserted page1.jsp properly picks up the action attribute.
>>>>
>>>>Thanks. This is the minimum solution i need to get page1.tiles as a
>>>>portal page. Any suggestion to make jsf UI working throughout 
>>>>page1.tiles?
>>>>
>>>>BaTien
>>>>DBGROUPS
>>>>
>>>>   
>>>>
>>>>        
>>>>
>
>.
>
>  
>



RE: Question about JspTilesViewHandlerImpl

Posted by Matthias Wessendorf <ma...@matthias-wessendorf.de>.
> Yahoo :-) Thanks Matthias. Which version of myfaces you are using to 
> generate the updated Myfaces Tiles example?

Uhm... that on my box :-) I updated this morning
my IDE with src from cvs.apache.org


> Yes. The version of myfaces i used was old and my prototype is very 
> complex. I need to get back to the basic simple things. Based on what 
> you put together i think myfaces + tiles (nice that it can go to 
> non-tile page) is ready for a portal page. I will update the 
> community 

you wrote about *portal* is it a web app in sort of JSR_168 ?
If yes, are you using the bridge for MyFaces from Jetspeed2 folks?

> on my progress. Please let me know the source version of myfaces for 
> this updated example.

We are about to release MyFaces_1.0.8beta
Beta, because we haven't passed TCK yet. 

The source version is an RC for 1.0.8beta :-)

HTH,
Matthias

> Thanks
> 
> BaTien
> DBGROUPS
> 
> >Thanks,
> >Matthias
> >
> >  
> >
> >>Matthias:
> >>
> >>Could you please put <h:commandButton> or <h:commandLink> with
> >>actionListener and action attributes in header.jsp (or 
> >>menu.jsp) of the 
> >>template layout and in page1.jsp of page1.tiles and see if 
> >>the commands 
> >>under the inserted page1.jsp properly picks up the action attribute.
> >>
> >>Thanks. This is the minimum solution i need to get page1.tiles as a
> >>portal page. Any suggestion to make jsf UI working throughout 
> >>page1.tiles?
> >>
> >>BaTien
> >>DBGROUPS
> >>
> >>    
> >>
> 


Re: Question about JspTilesViewHandlerImpl

Posted by BaTien Duong <ba...@dbgroups.com>.
Matthias Wessendorf wrote:

>BaTien,
>
>here is an updated MyFaces Tiles sample:
>http://www.apache.org/~matzew/myfaces-tiles-example.war
>
>It includes some <h:commandLink/>(with action) and one
><h;commandButton/> with action AND <f:actionListener/>
>
>It is working for me. Perhaps you give it a try.
>
>  
>
Yahoo :-) Thanks Matthias. Which version of myfaces you are using to 
generate the updated Myfaces Tiles example?

>Btw. to the logfile you sent, I saw net.sourceforge.***
>packages there. Could you please try the myfaces.jar
>from the sample? It contains apache_packages;
>It includes also the JSF_API and all extentions
>from MyFaces
>
>  
>
Yes. The version of myfaces i used was old and my prototype is very 
complex. I need to get back to the basic simple things. Based on what 
you put together i think myfaces + tiles (nice that it can go to 
non-tile page) is ready for a portal page. I will update the community 
on my progress. Please let me know the source version of myfaces for 
this updated example.

Thanks

BaTien
DBGROUPS

>Thanks,
>Matthias
>
>  
>
>>Matthias:
>>
>>Could you please put <h:commandButton> or <h:commandLink> with 
>>actionListener and action attributes in header.jsp (or 
>>menu.jsp) of the 
>>template layout and in page1.jsp of page1.tiles and see if 
>>the commands 
>>under the inserted page1.jsp properly picks up the action attribute.
>>
>>Thanks. This is the minimum solution i need to get page1.tiles as a 
>>portal page. Any suggestion to make jsf UI working throughout 
>>page1.tiles?
>>
>>BaTien
>>DBGROUPS
>>
>>    
>>


RE: Question about JspTilesViewHandlerImpl

Posted by Matthias Wessendorf <ma...@matthias-wessendorf.de>.
BaTien,

here is an updated MyFaces Tiles sample:
http://www.apache.org/~matzew/myfaces-tiles-example.war

It includes some <h:commandLink/>(with action) and one
<h;commandButton/> with action AND <f:actionListener/>

It is working for me. Perhaps you give it a try.

Btw. to the logfile you sent, I saw net.sourceforge.***
packages there. Could you please try the myfaces.jar
from the sample? It contains apache_packages;
It includes also the JSF_API and all extentions
from MyFaces

Thanks,
Matthias

> Matthias:
> 
> Could you please put <h:commandButton> or <h:commandLink> with 
> actionListener and action attributes in header.jsp (or 
> menu.jsp) of the 
> template layout and in page1.jsp of page1.tiles and see if 
> the commands 
> under the inserted page1.jsp properly picks up the action attribute.
> 
> Thanks. This is the minimum solution i need to get page1.tiles as a 
> portal page. Any suggestion to make jsf UI working throughout 
> page1.tiles?
> 
> BaTien
> DBGROUPS
> 
> >
> >  
> >
> >>-----Original Message-----
> >>From: Sean Schofield [mailto:sean.schofield@gmail.com]
> >>Sent: Tuesday, December 21, 2004 4:12 PM
> >>To: MyFaces Discussion
> >>Subject: Question about JspTilesViewHandlerImpl
> >>
> >>
> >>So far I've had some success using JspTilesViewHandlerImpl
> >>but I think I might be running into a problem.  I'd like to 
> >>use a series of "nested" tiles.  See my sample 
> >>tiles-defnitions.xml below ...
> >>
> >>  <definition name="simple.view"
> >>path="/jsp/layouts/simple-layout.jsp">
> >>    <put name="header" value="/jsp/header.jsp" />
> >>    <put name="status" value="/jsp/version.jsp" />
> >>    <put name="main" value="document.view" />
> >>  </definition>
> >>
> >>  <definition name="document.view"
> >>path="/jsp/layouts/document-layout.jsp">
> >>    <put name="summarySection" 
> >>value="/jsp/sections/summary-section.jsp" />
> >>    <put name="detailSection" 
> >>value="/jsp/sections/detail-section.jsp" />
> >>  </definition>
> >>
> >>Basically, the "main" section of my one tile refers to another tile.
> >>I'm having problems getting this working.  Should this be 
> >>possible with JspTilesViewHandlerImpl?  Does is matter if the 
> >>pages contained in the secondary view contain faces tags or not?
> >>
> >>Thanks,
> >>sean
> >>
> >>    
> >>
> >
> >.
> >
> >  
> >
> 


Re: Question about JspTilesViewHandlerImpl

Posted by BaTien Duong <ba...@dbgroups.com>.
Matthias Wessendorf wrote:

>Sean,
>
>I just played abit with what you posted here.
>
>I tested this:
>
>    <definition name="layout.example" path="/template/template.jsp" >
>        <put name="header" value="/common/header.jsp" />
>        <put name="menu" value="test" />
>    </definition>
>
>    <definition name="test" path="/template/t1.jsp" >
>        <put name="foo" value="/foo.jsp" />
>        <put name="bar" value="/bar.jsp" />
>    </definition>
>
>    <definition name="/page1.tiles" extends="layout.example" >
>        <put name="body" value="/page1.jsp" />
>    </definition>
>
>this is working;
>tested foo|bar with and without JSF-Tags
>btw. in t1.jsp I only used <f:subview/>
>the only file, that contains <f:view/> is template.jsp
>
>HTH,
>Matthias
>
>
>  
>
Matthias:

Could you please put <h:commandButton> or <h:commandLink> with 
actionListener and action attributes in header.jsp (or menu.jsp) of the 
template layout and in page1.jsp of page1.tiles and see if the commands 
under the inserted page1.jsp properly picks up the action attribute.

Thanks. This is the minimum solution i need to get page1.tiles as a 
portal page. Any suggestion to make jsf UI working throughout page1.tiles?

BaTien
DBGROUPS

>
>  
>
>>-----Original Message-----
>>From: Sean Schofield [mailto:sean.schofield@gmail.com] 
>>Sent: Tuesday, December 21, 2004 4:12 PM
>>To: MyFaces Discussion
>>Subject: Question about JspTilesViewHandlerImpl
>>
>>
>>So far I've had some success using JspTilesViewHandlerImpl 
>>but I think I might be running into a problem.  I'd like to 
>>use a series of "nested" tiles.  See my sample 
>>tiles-defnitions.xml below ...
>>
>>  <definition name="simple.view" 
>>path="/jsp/layouts/simple-layout.jsp">
>>    <put name="header" value="/jsp/header.jsp" />
>>    <put name="status" value="/jsp/version.jsp" />
>>    <put name="main" value="document.view" />
>>  </definition>
>>
>>  <definition name="document.view" 
>>path="/jsp/layouts/document-layout.jsp">
>>    <put name="summarySection" 
>>value="/jsp/sections/summary-section.jsp" />
>>    <put name="detailSection" 
>>value="/jsp/sections/detail-section.jsp" />
>>  </definition>
>>
>>Basically, the "main" section of my one tile refers to another tile. 
>>I'm having problems getting this working.  Should this be 
>>possible with JspTilesViewHandlerImpl?  Does is matter if the 
>>pages contained in the secondary view contain faces tags or not?
>>
>>Thanks,
>>sean
>>
>>    
>>
>
>.
>
>  
>


RE: Question about JspTilesViewHandlerImpl

Posted by Matthias Wessendorf <ma...@matthias-wessendorf.de>.
Sean,

I just played abit with what you posted here.

I tested this:

    <definition name="layout.example" path="/template/template.jsp" >
        <put name="header" value="/common/header.jsp" />
        <put name="menu" value="test" />
    </definition>

    <definition name="test" path="/template/t1.jsp" >
        <put name="foo" value="/foo.jsp" />
        <put name="bar" value="/bar.jsp" />
    </definition>

    <definition name="/page1.tiles" extends="layout.example" >
        <put name="body" value="/page1.jsp" />
    </definition>

this is working;
tested foo|bar with and without JSF-Tags
btw. in t1.jsp I only used <f:subview/>
the only file, that contains <f:view/> is template.jsp

HTH,
Matthias




> -----Original Message-----
> From: Sean Schofield [mailto:sean.schofield@gmail.com] 
> Sent: Tuesday, December 21, 2004 4:12 PM
> To: MyFaces Discussion
> Subject: Question about JspTilesViewHandlerImpl
> 
> 
> So far I've had some success using JspTilesViewHandlerImpl 
> but I think I might be running into a problem.  I'd like to 
> use a series of "nested" tiles.  See my sample 
> tiles-defnitions.xml below ...
> 
>   <definition name="simple.view" 
> path="/jsp/layouts/simple-layout.jsp">
>     <put name="header" value="/jsp/header.jsp" />
>     <put name="status" value="/jsp/version.jsp" />
>     <put name="main" value="document.view" />
>   </definition>
> 
>   <definition name="document.view" 
> path="/jsp/layouts/document-layout.jsp">
>     <put name="summarySection" 
> value="/jsp/sections/summary-section.jsp" />
>     <put name="detailSection" 
> value="/jsp/sections/detail-section.jsp" />
>   </definition>
> 
> Basically, the "main" section of my one tile refers to another tile. 
> I'm having problems getting this working.  Should this be 
> possible with JspTilesViewHandlerImpl?  Does is matter if the 
> pages contained in the secondary view contain faces tags or not?
> 
> Thanks,
> sean
> 


RE: Question about JspTilesViewHandlerImpl

Posted by Matthias Wessendorf <ma...@matthias-wessendorf.de>.
Sean,

did you get an exception,
when you are using "nested" tiles?

Regards,
Matthias


> -----Original Message-----
> From: Sean Schofield [mailto:sean.schofield@gmail.com] 
> Sent: Tuesday, December 21, 2004 4:12 PM
> To: MyFaces Discussion
> Subject: Question about JspTilesViewHandlerImpl
> 
> 
> So far I've had some success using JspTilesViewHandlerImpl 
> but I think I might be running into a problem.  I'd like to 
> use a series of "nested" tiles.  See my sample 
> tiles-defnitions.xml below ...
> 
>   <definition name="simple.view" 
> path="/jsp/layouts/simple-layout.jsp">
>     <put name="header" value="/jsp/header.jsp" />
>     <put name="status" value="/jsp/version.jsp" />
>     <put name="main" value="document.view" />
>   </definition>
> 
>   <definition name="document.view" 
> path="/jsp/layouts/document-layout.jsp">
>     <put name="summarySection" 
> value="/jsp/sections/summary-section.jsp" />
>     <put name="detailSection" 
> value="/jsp/sections/detail-section.jsp" />
>   </definition>
> 
> Basically, the "main" section of my one tile refers to another tile. 
> I'm having problems getting this working.  Should this be 
> possible with JspTilesViewHandlerImpl?  Does is matter if the 
> pages contained in the secondary view contain faces tags or not?
> 
> Thanks,
> sean
>