Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Component Java class lookup



Jon,

WOComponent nextPage = pageWithName(MyComponentClass.class.getName());
Cool.  I hadn't considered that, but since I avoid these issues I never really thought about it.

On Oct 11, 2006, at 3:26 PM, Jon Nolan wrote:

You may also use the following convention:

WOComponent nextPage = pageWithName(MyComponentClass.class.getName());



Robert Walker wrote:
Logi,
I'd say your best bet is to avoid that situation altogether by avoiding name conflicts.  It's the job of WOComponent.pageWithName(String) to lookup the java file for a particular WOComponent name.  There may be a workaround, but avoidance is the best practice here.
This is really a side-effect of the original Obj-C origins of WebObjects (Obj-C doesn't have packages as in Java).  The recommended design pattern is to prefix any class names with two capital letters (e.g. NSArray, NSDictionary).  Do this in your frameworks with your own prefix like XYMyFrameWorkPage.java or XYMyUtilities.java.
On Oct 11, 2006, at 6:09 AM, Logi Helgu wrote:
I have a Framework[FW] and Project[PR] that both a JAVA file with the same
name.  In my FW it's a single file and a Component in my PR.  When I run the
PR the Component looks for the Java file in the FW but not the one in the
PR.  Is there any way to tell a Component in witch package or "namespace" to
look in WebObjects( Eclipse )?

    With well-being and veneration,

    Logi Helgu




Fyrirvari á tölvupósti / e-mail disclaimer
<a href=""http://www.us.is/page/fyrirvari">http://www.us.is/page/fyrirvari">http://www.us.is/page/fyrirvari</a> 

 _______________________________________________
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
-- 
Robert Walker
------------------------------------------------------------------------
_______________________________________________
WebObjects-dev mailing list

--
Robert Walker



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

This email sent to email@hidden

References: 
 >Component Java class lookup (From: Logi Helgu <email@hidden>)
 >Re: Component Java class lookup (From: Robert Walker <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.