I am afraid ur suggestion although well put cannot be used by me. I already
have a EJB interacting with a Oracle8i Server. I am retrieving the interface
to the same thru a JNDI lookup in my Custom Tags. I am supposed to be
displaying the recd object ( currently in the form of a customized class )
in such a way that the designer should be able to decide where what data
comes ( a text-book implementation of the Business-Presentation Logic
Seperation ), exactly in the form i have specified in my original post.
To elborate a bit, my designer should be able to simple write in TAG's like
<%@ include file="taglibinits.jsp" %>
<html>
<table ...>
<biz:Data >
<tr>
<td>Primary Key
<td><%=PK_Value %>
</biz:Data>
</table>
</html>
and produce a table of my Data. Believe me .. my problem is far less
complicated than perhaps i made it sound. All my problem is the Data i am
acquiring in My Tag ( which is perfect !) i should be able to place INSIDE
the Tag and some Data AFTER the Tag finishes.
I hope that clarifies my question a bit
Mayuresh
> The typical approach would be to do the database query first, and store
> the result in a collection. This way you can get any error handling out
> of the way, before you start rendering the view, and you also know how
> many records you will have going in. (And avoid rendering a inexcusably
> long page to your users.-)
>
> Using that approach, the Struts custom tag library has an Iterate tag
> that you could use. In this example, meetings is now a collection (in
> any scope) of meeting beans, with code and description properties. It
> also uses another handy Struts tag, Bean.
>
> <logic:iterate id="mtg" name="meetings">
> <tr>
> <td>Meeting Code <td> <bean:write name="mtg"
> property="code">
> <td>Meeting Description <td> bean:write name="mtg"
> property="description">
> </tr>
> </logic:iterate>
>
> Struts is actually a framework, but the custom tags have uses in almost
> any Model 2 application. < http://jakarta.apache.org/struts >
>
> Just a suggestion. Your mileage may vary.
>
> -Ted.
>
> *********** REPLY SEPARATOR ***********
>
> On 1/26/2001 at 11:24 AM Mayuresh Kadu (Aftek Infosys, Pune) wrote:
>
> hello fellas
>
> have run into a small prob. I have made a custom tag that accesses a
> database and prints the same. What i need is that, as the theory says,
> to be
> able to seperate the processing logic with presentation logic. My tag
> looks
> as follows :
>
>
> <html>
>
> <mtp:meetings >
> <tr>
> <td>Meeting Code <td> /* i want title to appear here> */
> <td>Meeting Description <td> /* Description */
> </tr>
> </mtp:meetings>
>
> </html>
>
> Now, i am to get to repeat the <tr><td> to repeat for as many records
> as i
> have. However, where i am stuck is to get the data to appear in the
> place of
> comments -- any suggestions ?!!
>
> tia
>
> Mayuresh
>
> ========================================================================
> ===
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
>
>
> -- Ted Husted, Husted dot Com, Fairport NY USA.
> -- Custom Software ~ Technical Services.
> -- Tel 716 425-0252; Fax 716 223-2506.
> -- http://www.husted.com/about/struts/
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets