• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Ajax in ProjectWonder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Ajax in ProjectWonder


  • Subject: Re: Ajax in ProjectWonder
  • From: Chuck Hill <email@hidden>
  • Date: Mon, 14 Apr 2008 11:37:06 -0700


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@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Ajax in ProjectWonder
      • From: "Yung-Luen Lan" <email@hidden>
References: 
 >Ajax in ProjectWonder (From: "Yung-Luen Lan" <email@hidden>)

  • Prev by Date: Re: Convenience functions in model classes
  • Next by Date: Re: new to ajax
  • Previous by thread: Re: Ajax in ProjectWonder
  • Next by thread: Re: Ajax in ProjectWonder
  • Index(es):
    • Date
    • Thread