er, you have to use my cool superclass.  :-P

     public NSArray associations()
     {
         return _keyAssociations.allValues();
     }


Chuck


On Dec 14, 2008, at 5:18 PM, Johan Henselmans wrote:


On 14 dec 2008, at 21:42, Chuck Hill wrote:


On Dec 14, 2008, at 11:51 AM, Johan Henselmans wrote:

(Had the error in 5.4.3 and 5.3.3, latest WOLips and Wonder)

I had an error in an old project, so I wanted to fix that, but while testing it, somewhere else in the code I suddenly got this error that seems to be saying it can not find a component called PrintTicketForm, which is a WOForm in the Component PrintTickets.wo.

I looked at it, and looked at it. It is there, I can see it, I looked at UTF gremlins, none around.

If it makes you feel any better, I can see it to. :-) Try logging out associations() from PrintTickets and see if that matches the WOD or produces a more useful error.


What do you mean by associations? How do I provoke these things to come up?
<pastedGraphic.png>


The second one seems not too good a reference...


The only thing that I can imagine is that the PrintTickets component does not like to be an extension of another component (WebStoreComponent) which is an extension of WOComponent.

I do multi-level inheritance like that all the time, that should not be the problem.


Does anybody know any other reason why the webobjects parser is not able to find this, but used to like this in the old days (let's say the end of 2006?).

I can't think of anything.


Chuck


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      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net

This email sent to ch...@global-village.net


--
Chuck Hill             Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects







Regards,

Johan Henselmans
http://www.netsense.nl
Tel: +31-20-6267538
Fax: +31-20-6279159




--
Chuck Hill             Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects






_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to