[prev in list] [next in list] [prev in thread] [next in thread] 

List:       japple-dev
Subject:    Re: [japple-dev] JSP includes?
From:       abishop () saucontech ! com
Date:       2002-04-19 16:10:55
[Download RAW message or body]



Matt,

The initial read of your message sounded to me like you're looking for an easy
way to keep "functional blocks" of your content encapsulated in JMO's while
using a table to format the placement of these "blocks" on the resulting page.
If this is the case, then you may accomplish this by the following:

1) set up template jmo's for each of your "functional blocks" which you want to
display on the page.
3) create HTML jmo's which contain html snippets of table tags based on how you
want the layout to look. For example, if you want the resulting content from the
templates to be displayed side by side, you could create 3 html jmo's containing
the following:
     1) <table><tr><td>
     2)</td><td>
     3)</td></tr></table>
2) create a page jmo which includes the templates and HTML jmo's, ordering the
sequence such that the templates are included in cells of the table.

In this way, your content is encapsulated in the template JMO's, and the
formatting layout is encapsulated in the page JMO. Both the templates and html
snippets are re-usable.
-Adam









"William G. Thompson, Jr." <bthompson@saucontech.com> on 04/19/2002 11:33:07 AM

Please respond to japple-dev@japple.org
                                                                                
                                                                                
                                                                                


                                                              
                                                              
                                                              
 To:      Michael Schulz <mike@mschulz.net>                   
                                                              
 cc:      japple-dev@japple.org(bcc: Adam Bishop/Saucon       
          Technologies)                                       
                                                              
                                                              
                                                              
 Subject: Re: [japple-dev] JSP includes?                      
                                                              







Michael Schulz wrote:
>
>
> But since Japple is providing the "state" area, if the JSP's use that to
> obtain their data, then using the dynamic include option (#2) should work
> just fine, right?

Yes.  The dyanmic include will run the included JSP with the same
request data so all the Japple "state" including the template will be
available.  However, no local variables from the calling JSP will be in
  scope.

Matt, have you seen the Dish List Tutorial?  This shows how folks
typically create table rows in Japple.
http://www.japple.org/tutorial/dish_list.html

Many times we move the "root" Template node to the <table> element and
create a View JMO that simply runs a DBStatement returns a complete HTML
table.  This way the View JMO is easy to reuse in other pages.  Is this
the sort of thing you are looking for?

Bill
--
William G. Thompson, Jr.
Chief Japple Evangelist | www.japple.org
Saucon Technologies
bthompson@saucontech.com | +1 908 947 7145 | www.saucontech.com



>
> -Michael Schulz
>
>
> -----Original Message-----
> From: japple-dev-admin@japple.org [mailto:japple-dev-admin@japple.org]On
> Behalf Of Jason Smith
> Sent: Friday, April 19, 2002 9:43 AM
> To: japple-dev@japple.org
> Subject: Re: [japple-dev] JSP includes?
>
>
> JSP provides 2 ways of doing includes:
>
> <%@ include file = "filename.jsp" %>
>
> and
>
> <jsp:include page="filename.jsp" />
>
> the most obvious difference is that the first method adds the jsp code
> to the file as though it were on the same page, so variables, etc, that
> are declared on the included page are available to the including page
> and vice versa.  Also, the include is static: dynamic content doesn't
> always work as you might expect.
>
> The second method is more dynamic and doesn't have the same scope as the
> the calling jsp.
>
> There are more differences, but both work with japple.
>
> see:
> http://java.sun.com/products/jsp/tags/11/syntaxref117.html#8772
> http://java.sun.com/products/jsp/tags/11/syntaxref1112.html
>
> Hope this helps,
> -Jay
>
> Matt Fausey wrote:
>
>>
>>Hello,
>>
>>Does anyone know how I can do a JSP include?  Is that not possible given
>>the way Japple works?  Even better, I would love to be able to have an
>
> HTML
>
>>table where I can drop a JMO into a cell.  How would I do that?  I'm
>>looking for a solution where I don't have to bust up the table into
>>separate JMOs where each JMO represents and incomplete and effectively
>>non-reusable HTML table.
>>
>>-Matt



_______________________________________________
japple-dev mailing list
japple-dev@japple.org
http://www.japple.org/mailman/listinfo/japple-dev



_______________________________________________
japple-dev mailing list
japple-dev@japple.org
http://www.japple.org/mailman/listinfo/japple-dev
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic