Okay, I have the terminology figured out a little better now, so lets see if
this helps.

The JSP page is including a package which apparently instantiates the
CommunityAccessLevel class on import.  So, in ColdFusion, how can you import a
Java package?

I could just create a new object based upon this class, I am just not sure that
is the best answer.

Thanks
-- Jeff

Quoting Jeff Chastain <[EMAIL PROTECTED]>:

> Okay, maybe with some more context, you can help me out with this then.  I
> have the following JSP code that I am attempting to convert to CF.
>  
> <% page language="java" import="com.plumtree.remote.portlet.*" %>
> <%
>     IPortletContext context =
> PortletContextFactory.createPortletContext(request, response);
>     IPortletUser portletUser = context.getUser();
>  
>     if ( CommunityAccessLevel.Edit ==
> portletUser.getCurrentCommunityAccessLevel() ) {
>         ....
>  
> I have the CF code that handles the first two object declarations (via
> cfobject).  Where I am running into problems is in the IF statement with the
> 'CommunityAccessLevel.Edit'.  There is nothing in the page before this that
> declares a CommunityAccessLevel object.  In reading the documentation for
> this API, CommunityAccessLevel is a class in the plumtree.remote.portlet
> namespace that has a static field called Edit.
>  
> So, how would I translate this into CF?
>  
> Thanks for your help.
> -- Jeff
>
>   _____  
>
> From: Samuel Neff [mailto:[EMAIL PROTECTED]
> Sent: Friday, September 17, 2004 8:13 AM
> To: CF-Talk
> Subject: RE: Java Import -> CF
>
>
> Import in Java doesn't instatiate anything, all it does is make a reference
> used by the compiler to use shorthand access to packages so you don't have
> to write out the whole package name every time you reference a class in that
> package.
>
> The closest equivalent in CF would be:
>
> <cfset portlet = "com.plumtree.remote.portlet.">
> <cfset homePortlet = createObject("java", "#portlet#HomePortlet")>
>
> Sam
>
> ----------------------------------------------
> Blog:  http://www.rewindlife.com
> Chart: http://www.blinex.com/products/charting
> ----------------------------------------------
>
> -----Original Message-----
> From: Jeff Chastain [mailto:[EMAIL PROTECTED]
> Sent: Friday, September 17, 2004 8:45 AM
> To: CF-Talk
> Subject: Java Import -> CF
>
> When you see the following line in a JSP file ...
>    <% page language="java" import="com.plumtree.remote.portlet.*" %>
> ... is there a way to duplicate this functionality in CFMX?  Is it possible
> it import an entire library like this rather than instantiating every class
> individually with cfobject?
>
> Thanks
> -- Jeff
>   _____  
>
>
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to