On Apr 14, 2008, at 7:31 AM, Yung-Luen Lan wrote:
Hi,

I leveraged the Ajax support in ProjectWonder into my project recently and have several questions:

1. It will automatically include prototype + scriptaculous in the header of output html. However, my html have jquery included, and they will conflict! The $() have different semantics in jquery and prototype. Using the AjaxUpdatingArea will render my existing javascript useless. (Say, $ ('#id') no longer find the correct element.) Is re-writing all my javascript with prototype + scriptaculous the only way I can fix that?

I'd see if jquery can be configured to use a different symbol. The $ is used extensively throughout the JS that Wonder uses.


2. This question is not about ProjectWonder. I want to have my WO app look consistent without copy-n-paste html code on each page, so I make a component like this:

Template.html
================================
<html>
    <head>
         // other css and js stuff
         <title><webobject name="Title" /></title>
    </head>
    <body>
        // page structure
        <webobject name="Content" />
    </body>
</html>
================================

Template.wod
================================
Content: WOComponentContent {}
Title: WOString { value = title; }
================================

In each page, I could simply write

<webobject name="Template">
    // This page's content here
</webobject>

My problem is, using this method, I can't break my css into little part and assign to corresponding page. How will you solve this problem?

I try to avoid page specific CSS. You could add a <webobject name="CSS"/> tag to your template and pass in the CSS string on the pages that use the template.



3. I found the examples come with Xcode / ProjectWonder is hard to run for a newbie. I can't get any example running until I saw this screencast:
http://www.wocommunity.org/podcasts/WO54_Examples.mov

Unfortunately, most of the example except the HelloWorld still can't run. Eclipse whining:

Caused by: java.lang.IllegalStateException: <com.webobjects.foundation.NSBundle> warning: There is already a unique instance for Bundle named 'JavaWOExtensions'. Use NSBundle.bundleForName(JavaWOExtensions) to access it: <com.webobjects.foundation.NSBundle name:'JavaWOExtensions' bundlePath:'/Library/WebObjects/lib/JavaWOExtensions.jar' packages:'( com.webobjects.woextensions )' 56 classes >

or

Caused by: java.lang.IllegalStateException: Main bundle 'Properties' file can't be read.

That's very frustrated for a beginner. I mean, why don't Apple make it right at the first time? Examples are very useful for a beginner comparing to javadocs. We can't run the example by simply click the build and run button with standard installation, what's wrong with that?


This is your mistake. Somehow you have created the project so that the WO frameworks appear more than once on the command line. Do you have it installed in more than one place?

Chuck


--

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      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to