Results 1 to 5 of 5

Thread: Parent/Child display on same JSP

  1. #1

    Default Parent/Child display on same JSP

    Hi folks,

    sorry for asking such a dumb question on this forum, but I'm starting to pull my hair out. I've a very simple domain with two objects. The parent contains a set of child objects and what I'd like to do is show the attributes of the parent as well as a table of the child objects on one show jsp.

    Code:
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <div xmlns:field="urn:jsptagdir:/WEB-INF/tags/form/fields" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:page="urn:jsptagdir:/WEB-INF/tags/form" version="2.0">
        <jsp:output omit-xml-declaration="yes"/>
        <page:show id="ps_com_kramkroc_client_domain_LeadService" object="${leadservice}" path="/leadservices" z="7EyZvt4+s9UZsJvpwtOZX6FmXr0=">
            <field:display field="msisdn" id="s_com_kramkroc_client_domain_LeadService_msisdn" object="${leadservice}" z="E8McP/O03SYXN1sUbjFJtBrMGGQ="/>
            <field:display field="active" id="s_com_kramkroc_client_domain_LeadService_active" object="${leadservice}" z="bmUYbpLwJTORVjXzxkCidICxUwg="/>
            <table:table data="${leadlists}" id="l_com_kramkroc_client_domain_LeadList" path="/leadlists" typeIdFieldName="leadListId">
                <table:column id="c_com_kramkroc_client_domain_LeadList_firstDate" property="firstDate"/>
                <table:column id="c_com_kramkroc_client_domain_LeadList_lastDate" property="lastDate"/>
                <table:column id="c_com_kramkroc_client_domain_LeadList_startTime" property="startTime"/>
                <table:column id="c_com_kramkroc_client_domain_LeadList_endTime" property="endTime"/>
                <table:column id="c_com_kramkroc_client_domain_LeadList_weekDays" property="weekDays"/>
            </table:table>
        </page:show>
    </div>
    But when I load the page I get the following exception:

    Code:
    SEVERE: Servlet.service() for servlet client threw exception
    org.apache.jasper.JasperException: /WEB-INF/views/leadservices/show.jspx(7,188) The prefix "table" for element "table:table" is not bound.
    	at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
    	at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
    	at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:88)
    	at org.apache.jasper.compiler.JspDocumentParser.parse(JspDocumentParser.java:214)
    	at org.apache.jasper.compiler.ParserController.doParse(ParserController.java:239)
    	at org.apache.jasper.compiler.ParserController.parseDirectives(ParserController.java:120)
    	at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:180)
    	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:347)
    Any suggestions on how to achieve this?

    /KramKroc

  2. #2

    Default

    Doh! Hightlighting my own supidity there. Forgot to include the correct tag for tables:

    xmlns:table="urn:jsptagdir:/WEB-INF/tags/form/fields"

    So no I have the parents details being displayed as expected as well as a table of child objects, but the table is empty. Not sure why this is the case. Any ideas folks?

    /KramKroc

  3. #3

    Default Solved....

    Sorry folks,

    too little sleep and too much pressure. The reason the table was empty was because I hadn't populated the model with the child objects.

    /Mark

  4. #4
    Join Date
    Jun 2010
    Posts
    440

    Default Roo UI

    Can you share a screen capture of how it looks now that is working...

    Thx in advance

  5. #5

    Default

    Will do when n the way at present.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •