Thank you so much Billy Ray, I will try later tonight and let the group
know.

Thanks again!

Best regards, Chris

On Mon, May 17, 2010 at 4:32 PM, BillyRay <wbehy...@fuse.net> wrote:

> Chris, a couple of things...
>
> I noticed in books.jspx you used mixed case for the "onSale" element
> tags. Try changing these as well as the references to them to all
> lowercase.  So your definition in books.jspx will read: <onsale>$
> {book.onSale}</onsale> and to retrieve this value in bookcatalog.jsp
> you'd use <x:out select="${book/onsale}" />, for example.
>
> I also noticed that in bookcatalog.jsp where you retrieve the xml
> value of onsale and assign it to sale, you have <x:out select="${book/
> @onsale}" /> rather than <x:out select="${book/onsale}" />.
>
> Hope this helps...
>
> BillyRay
>
>
> On May 17, 1:21 pm, Chris Kellawan <ckella...@gmail.com> wrote:
> > Hmmm, still no dice.  Here is my Books.jspx:
> >
> > <books
> >      xmlns:jsp="http://java.sun.com/JSP/Page";
> >      xmlns:c="http://java.sun.com/jsp/jstl/core";
> >  >
> > <jsp:useBean id="bookDB" class="database.BookDB" scope="page" >
> > <jsp:setProperty name="bookDB" property="database" value="${bookDBAO}" />
> > </jsp:useBean>
> >
> > <c:forEach var="book" begin="0" items="${bookDB.books}">
> > <book id="${book.bookId}" >
> > <surname>${book.surname}</surname>
> > <firstname>${book.firstName}</firstname>
> > <title>${book.title}</title>
> > <price>${book.price}</price>
> > <onSale>${book.onSale}</onSale>
> > <year>${book.year}</year>
> > <description>${book.description}</description>
> > <inventory>${book.inventory}</inventory>
> > </book>
> > </c:forEach>
> > </books>
> >
> > Here is bookcatelog.jsp, the portion below only shows the table
> > generation, I have placed ${sale} in a cell just to see if I have access
> > but still nothing when I run the file. I believe I should see the string
> > 'true' or 'false' next to the prices.
> >
> > <x:forEach var="book" select="$applicationScope:booklist/books/*">
> >
> > <tr>
> > <c:set var="bookId">
> > <x:out select="$book/@id"/>
> > </c:set>
> > <td bgcolor="#ffffaa">
> > <c:url var="url" value="/bookdetails" >
> > <c:param name="bookId" value="${bookId}" />
> > <c:param name="Clear" value="0" />
> > </c:url>
> > <a href="${url}"><strong><x:out
> > select="$book/title"/>&nbsp;</strong></a></td>
> > <td bgcolor="#ffffaa" rowspan=2>
> > <c:set var="price">
> > <x:out select="$book/price"/>
> > </c:set>
> > <c:set var="sale">
> > <x:out select="$book/@onSale"/>
> > </c:set>
> > <fmt:formatNumber value="${price}" type="currency"/> ${sale}
> > &nbsp;</td>
> > <td bgcolor="#ffffaa" rowspan=2>
> > <c:url var="url" value="/bookcatalog" >
> > <c:param name="Add" value="${bookId}" />
> > </c:url>
> > <p><strong><a href="${url}">&nbsp;<fmt:message
> > key="CartAdd"/>&nbsp;</a></td></tr>
> >
> > <tr>
> > <td bgcolor="#ffffff">
> > &nbsp;&nbsp;<fmt:message key="By"/> <em><x:out
> > select="$book/firstname"/>&nbsp;<x:out
> > select="$book/surname"/></em></td></tr>
> > </x:forEach>
> >
> > </table>
> > </center>
> >
> > Thanks again to all who can help.
> >
> > Chris
> >
> > On 5/17/2010 9:43 AM, ckellawan wrote:
> >
> >
> >
> >
> >
> > > Thank you BillyRay, nice to know I'm not going crazy!  I was able to
> > > do it using other tags in other projects but I through a lot of trial
> > > and error I figured it was specific to the XML.  I will try that later
> > > tonight.
> >
> > > Best regards,
> >
> > > Chris
> >
> > > On Sun, May 16, 2010 at 5:26 PM, BillyRay <wbehy...@fuse.net
> > > <mailto:wbehy...@fuse.net>> wrote:
> >
> > >     The Bookstore5 example maps the database to an xml document. If I
> > >     recall correctly, the "onSale" column is not mapped to an element
> --
> > >     you'll have to add it to books.jspx.
> >
> > >     BillyRay
> >
> > >     On May 16, 11:59 am, Chris K <ckella...@gmail.com
> > >     <mailto:ckella...@gmail.com>> wrote:
> > >     > Thank you for the feedback.  What I don't seem to understand is
> > >     that is the
> > >     > original code in Bookstore5, I simply added
> > >     > <jsp:setProperty name="addedBook" property="onSale" value='$
> > >     > {onSale}' />
> >
> > >     > to have access to the boolean variable book.onSale?  Any idea
> > >     how I can gain
> > >     > access to this property?
> >
> > >     > Thanks.
> >
> > >     > Best regards,
> >
> > >     > Chris
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Java EE (J2EE) Programming with Passion!" group.
> > To post to this group, send email to
> > java-ee-j2ee-programming-with-passion@googlegroups.com
> > To unsubscribe from this group, send email to
> > java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com<java-ee-j2ee-programming-with-passion%2bunsubscr...@googlegroups.com>
> > For more options, visit this group athttp://
> groups.google.com/group/java-ee-j2ee-programming-with-passion?...- Hide
> quoted text -
> >
> > - Show quoted text -
>
> --
> You received this message because you are subscribed to the Google
> Groups "Java EE (J2EE) Programming with Passion!" group.
> To post to this group, send email to
> java-ee-j2ee-programming-with-passion@googlegroups.com
> To unsubscribe from this group, send email to
> java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com<java-ee-j2ee-programming-with-passion%2bunsubscr...@googlegroups.com>
> For more options, visit this group at
>
> http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en?hl=en
>



-- 
Chris Kellawan
ckella...@gmail.com

-- 
You received this message because you are subscribed to the Google
Groups "Java EE (J2EE) Programming with Passion!" group.
To post to this group, send email to
java-ee-j2ee-programming-with-passion@googlegroups.com
To unsubscribe from this group, send email to
java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en?hl=en

Reply via email to