Here are a sample layouts and a screen. The navigation is not included
but has nothing special; just plain HTML. Note: the context stuff only
works with my patch.

Hope this helps.

Gabriel

------------------ layouys/Default.jsp --------------------------
<%@ page import = "org.apache.turbine.services.jsp.util.*" %>
<%@ page import = "org.apache.turbine.util.*" %>
<%@ page import = "java.util.*" %>
<%@ taglib uri='/WEB-INF/tlds/template.tld' prefix='turbine' %>
<jsp:useBean id="rundata" class="RunData" scope="request"/>
<jsp:useBean id="link" class="JspLink" scope="request"/>

<html>
<head>
  <turbine:screen section="head" />
</head>
<body<turbine:bodyAttributes />>
  <turbine:navigation template="top.jsp" />
  <hr>
  <turbine:screen section="body" />
</body>
</html>
-----------------------------------------------------------------

------------------ screens/Index.jsp ----------------------------
<%@ taglib uri='/WEB-INF/tlds/template.tld' prefix='turbine' %>
<%@ page import = "org.apache.turbine.services.jsp.util.*" %>
<%@ page import = "org.apache.velocity.context.Context" %>
<%@ page import = "java.util.*" %>
<jsp:useBean id="link" class="JspLink" scope="request"/>
<jsp:useBean id="context" class="Context" scope="request"/>

<turbine:head>
    <TITLE>Example</TITLE>
</turbine:head>

<turbine:body>
  <h1>My message is: <%= context.get("mymessage") %> </h1>
</turbine:body>
-----------------------------------------------------------------

On Tue, 2003-03-04 at 16:31, Joe Morrogh wrote:
> Gabriel,
> 
> Thanks for the reply.  I'll take a look at the patches/taglib.  I still 
> don't see my Screen classes executed though, unless I modify, or override, 
> JspLayout::doBuild() to exec the screen (Note:  This solution has other 
> problems.).  I think my problem may be that I am not using the 
> "screen_placeholder" object correctly.
> 
> Does anyone have an example of how to use "screen_placeholder"?   The 
> JavaDoc of JspScreenPlaceholder says to declare it as a bean, and use 
> "<%=screen_placeholder%>", but this just puts the Object.toString() output 
> on the page.  The only other method in JspScreenPlaceholder is exec(), which 
> looks like it would execute the JSP, but I don't see how to get the 
> generated HTML to output to the response.  An example of how to use the 
> "navigation" object (of type JspNavigation), which is also in the request, 
> would be appreciated also.
> 
> TIA,
> Joe
> 
> 
> 
> 
> 
> 
> 
> 
> 
> >From: Gabriel Moreno <[EMAIL PROTECTED]>
> >Reply-To: "Turbine Users List" <[EMAIL PROTECTED]>
> >To: Turbine Users List <[EMAIL PROTECTED]>
> >Subject: Re: Using Screen classes with JSP
> >Date: 03 Mar 2003 11:04:53 -0300
> >
> >Joe,
> >I use JSP for templates and use Screens. They do get called. I was in
> >the same situation you are--even though I prefer Velocity I had to use
> >JSP. Therefore, I added new features to enhance JSP support in Turbine,
> >making it support Context to pass data around and ActionEvents. I posted
> >this patch on the turbine-dev list.
> >
> >Gabriel
> >
> >On Fri, 2003-02-28 at 23:56, Joe Morrogh wrote:
> > > Hi,
> > >
> > > I'm new to Turbine, am trying to use JSP templates with Turbine 2.2, and
> > > could use some direction on using Screen classes.  It seems that the 
> >purpose
> > > of Screen classes is to populate the request with data for the JSP to
> > > display, and, possibly, to use the Security API to restrict access to
> > > screens.  The doBuild() method of the JspLayout class doesn't seem to
> > > execute the Screen class [i.e.
> > > ScreenLoader.getInstance().eval(data,data.getScreen());] like the
> > > DefaultLayout class does, though.  Does this mean that Screen classes 
> >are
> > > not recommended for JSP?  I also notice Jetspeed, the Jakarta portal
> > > project, seems to use Actions exclusively, not Screens.
> > >
> > > Any insight appreciated.
> > >
> > > Thanks,
> > > Joe
> > >
> > > BTW Velocity looks nice, but is not an option for this project.
> > >
> > >
> > >
> > > _________________________________________________________________
> > > The new MSN 8: advanced junk mail protection and 2 months FREE*
> > > http://join.msn.com/?page=features/junkmail
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> >--
> >Gabriel Moreno
> >ITC Soluciones
> >[EMAIL PROTECTED]
> >
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
> 
> 
> _________________________________________________________________
> The new MSN 8: smart spam protection and 2 months FREE*  
> http://join.msn.com/?page=features/junkmail
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
-- 
Gabriel Moreno
ITC Soluciones
[EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to