The error:
[2008-12-14 20:22:51 CET] <WorkerThread0>
<com.webobjects.appserver._private.WOComponentRequestHandler>:
Exception occurred while handling request:
com.webobjects.foundation.NSForwardException
[com.webobjects.appserver._private.WODeclarationFormatException]
<WOHTMLTemplateParser> no declaration for dynamic element (or
component) named PrintTicketForm:
<com.webobjects.appserver._private.WOComponentDefinition: Error
parsing template for Component : 'file:/Users/johan/projecten/
Theater/EclipseWorkSpaceTheater/kassa/build/kassa.woa/Contents/
Resources/PrintTickets.wo':
com.webobjects.appserver._private.WODeclarationFormatException:
<WOHTMLTemplateParser> no declaration for dynamic element (or
component) named PrintTicketForm
[2008-12-14 20:22:51 CET] <WorkerThread0>
com.webobjects.foundation.NSForwardException for
com.webobjects.appserver._private.WODeclarationFormatException:
<WOHTMLTemplateParser> no declaration for dynamic element (or
component) named PrintTicketForm
at
com
.webobjects
.appserver
._private
.WOHTMLWebObjectTag
._elementWithDeclaration(WOHTMLWebObjectTag.java:212)
at
com
.webobjects
.appserver
._private
.WOHTMLWebObjectTag.dynamicElement(WOHTMLWebObjectTag.java:122)
at
com
.webobjects
.appserver
._private
.WOHTMLTemplateParser
.didParseClosingWebObjectTag(WOHTMLTemplateParser.java:52)
at
com
.webobjects
.appserver
._private
.WOHTMLParser.didParseClosingWebObjectTag(WOHTMLParser.java:183)
at
com
.webobjects
.appserver
._private.WOHTMLParser.endOfWebObjectTag(WOHTMLParser.java:150)
at
com
.webobjects
.appserver._private.WOHTMLParser.parseHTML(WOHTMLParser.java:67)
at
com
.webobjects
.appserver
._private
.WOHTMLTemplateParser.parseHTML(WOHTMLTemplateParser.java:81)
at
com
.webobjects
.appserver
._private.WOHTMLTemplateParser.parse(WOHTMLTemplateParser.java:95)
at
com
.webobjects
.appserver
._private.WOParser.templateWithHTMLAndDeclaration(WOParser.java:71)
at
com
.webobjects
.appserver
._private
.WOComponentDefinition.template(WOComponentDefinition.java:288)
at
com
.webobjects
.appserver.WOComponent.templateWithName(WOComponent.java:597)
at
com.webobjects.appserver.WOComponent.template(WOComponent.java:507)
at
com
.webobjects
.appserver.WOComponent.appendToResponse(WOComponent.java:982)
at
com
.webobjects
.appserver
._private
.WOComponentReference.appendToResponse(WOComponentReference.java:
111)
at
com
.webobjects
.appserver
._private
.WODynamicGroup.appendChildrenToResponse(WODynamicGroup.java:121)
at
com
.webobjects
.appserver
._private.WODynamicGroup.appendToResponse(WODynamicGroup.java:130)
at
com
.webobjects
.appserver.WOComponent.appendToResponse(WOComponent.java:992)
at
com
.webobjects.appserver.WOSession.appendToResponse(WOSession.java:
1200)
at
com
.webobjects
.appserver.WOApplication.appendToResponse(WOApplication.java:1418)
at
com
.webobjects
.appserver
._private
.WOComponentRequestHandler
._dispatchWithPreparedPage(WOComponentRequestHandler.java:230)
at
com
.webobjects
.appserver
._private
.WOComponentRequestHandler
._dispatchWithPreparedSession(WOComponentRequestHandler.java:287)
at
com
.webobjects
.appserver
._private
.WOComponentRequestHandler
._dispatchWithPreparedApplication(WOComponentRequestHandler.java:
322)
at
com
.webobjects
.appserver
._private
.WOComponentRequestHandler
._handleRequest(WOComponentRequestHandler.java:358)
at
com
.webobjects
.appserver
._private
.WOComponentRequestHandler
.handleRequest(WOComponentRequestHandler.java:432)
at
com
.webobjects
.appserver.WOApplication.dispatchRequest(WOApplication.java:1306)
at
com
.webobjects
.appserver._private.WOWorkerThread.runOnce(WOWorkerThread.java:173)
at
com
.webobjects
.appserver._private.WOWorkerThread.run(WOWorkerThread.java:254)
at java.lang.Thread.run(Thread.java:613)
The java code:
import com.webobjects.foundation.*;
import com.webobjects.appserver.*;
import com.webobjects.eocontrol.*;
import com.webobjects.eoaccess.*;
import java.io.*;
import nl.netsense.theater.Order;
public class PrintTickets extends WebStoreComponent {
private static final long serialVersionUID = 1L;
protected boolean hasEntryError;
private Order order;
protected NSDictionary currentCartItem;
public PrintTickets(WOContext context) {
super(context);
// System.out.println("[ into printticket]\n");
// order = Order.createAndInsertOrder(currentAdress(),
cart().cartItems(), sess().defaultEditingContext());
}
public WOComponent updatequantity()
{
return null;
}
}
The html:
<webobject name = "PrintTicketForm">
<p></p>
<table border="1" width="100%">
<tr><td align="right" colspan="4">Totaal:</td><td><webobject
name="CartCartTotal"/></td></tr>
<tr><th>Voorstelling</th><th>Datum</th><th>Kaartje</
th><th>Aantal</th><th>Prijs</th></tr>
<webobject name = "CartCartItems">
<tr><td><webobject name =
"CurrentCartItemPerformanceShowInfoShowName"/></td><td
rowspan="2"><webobject name =
"CurrentCartItemPerformancePerformanceDateString"/></td><td
rowspan="2"><webobject name =
"CurrentCartItemProductProductDescription"/></td><td rowspan="2">
<webobject name = "CurrentCartItemQty"/></td><td rowspan="2">
<webobject name = "CurrentCartItemTotal"/></td></tr>
<tr><td><webobject name =
"CurrentCartItemShowattendantAchternaam"/></td></tr>
</webobject>
<tr><td align="right" colspan="4">Totaal:</td><td><webobject name
= "CartCartTotal1"/></td></tr>
</table>
</webobject>
the wod:
PrintTicketForm : WOForm {
multipleSubmit = true;
}
CartCartItems : WORepetition {
item = currentCartItem;
list = cart.cartItems;
}
CurrentCartItemPerformanceShowInfoShowName: WOString {
value = currentCartItem.performance.showInfo.showName;
}
CurrentCartItemPerformancePerformanceDateString: WOString {
value = currentCartItem.performance.performanceDateString;
}
CurrentCartItemProductProductDescription: WOString {
value = currentCartItem.product.productDescription;
}
CurrentCartItemQty: WOString {
value = currentCartItem.qty;
}
CurrentCartItemTotal: WOString {
value = currentCartItem.total;
formatter = session.localFormat;
}
CartCartTotal: WOString {
value = cart.cartTotal;
formatter = session.localFormat;
}
CurrentCartItemShowattendantAchternaam: WOString {
value = currentCartItem.showattendant.achternaam;
}
CartCartTotal1: WOString {
value = cart.cartTotal;
formatter = session.localFormat;
}
The woo:
{"WebObjects Release" = "WebObjects 5.0"; encoding = "UTF-8"; }
Regards,
Johan Henselmans
http://www.netsense.nl
Tel: +31-20-6267538
Fax: +31-20-6279159
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden