RE: Java Import - CF

2004-09-17 Thread Samuel Neff
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]




RE: Java Import - CF

2004-09-17 Thread Jeff Chastain
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]




RE: Java Import - CF

2004-09-17 Thread Jeff Chastain
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]




RE: Java Import - CF

2004-09-17 Thread Kola Oyedeji
If you have the package available as a jar you should be able to
reference it in the administrator under the classpath settings.

 
Kola

 
-Original Message-
From: Jeff Chastain [mailto:[EMAIL PROTECTED] 
Sent: 17 September 2004 16:07
To: CF-Talk
Subject: RE: Java Import - CF

 
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]




RE: Java Import - CF

2004-09-17 Thread Jeff Chastain
Well, the com.plumtree.remote.portlet.* namespace is part of a jar that is
already referenced in the CF administrator.I have all of that setup.

However, it appears that when the package is being imported in JSP, that some
constructor or something is being called that instantiates the
'CommunityAccessLevel.Edit' class and static variable automatically.This is
what I am trying to duplicate.

If I just add the path to the jar file in the Administrator classpath, it is not
 giving me the same result as the JSP import.So, I need to figure out what
the missing piece is between the two.

Thanks
-- Jeff

Quoting Kola Oyedeji [EMAIL PROTECTED]:

 If you have the package available as a jar you should be able to
 reference it in the administrator under the classpath settings.

 Kola

 -Original Message-
 From: Jeff Chastain [mailto:[EMAIL PROTECTED] 
 Sent: 17 September 2004 16:07
 To: CF-Talk
 Subject: RE: Java Import - CF

 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]




RE: Java Import - CF

2004-09-17 Thread Jeff Chastain
Okay, a better reply is that it appears that the following JSP package import ...

% page language=java import=com.plumtree.remote.portlet.* %

... is actually comparable to ...

cfobject action="" type=java
class=com.plumtree.remote.portlet.AggregationMode name=AggregationMode
cfobject action="" type=java
class=com.plumtree.remote.portlet.CommunityAccessLevel
name=CommunityAccessLevel
cfobject action="" type=java
class=com.plumtree.remote.portlet.HostedDisplayMode name=HostedDisplayMode

... etc. for all 15 classes in this package.

So, is there a simpler way to do this?It would be ideal, as it is in JSP, to
have all of the objects already created and ready to use without having to
perform N cfobject calls at the top of a template.

Thanks
- Jeff

Quoting Kola Oyedeji [EMAIL PROTECTED]:

 If you have the package available as a jar you should be able to
 reference it in the administrator under the classpath settings.

 Kola


-
This mail sent through IMP: http://horde.org/imp/
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




RE: Java Import - CF

2004-09-17 Thread Kola Oyedeji
Jeff AFAIK there is no way to do this in CF, you're stuck with using
create object. 

 
KOla

 
-Original Message-
From: Jeff Chastain [mailto:[EMAIL PROTECTED] 
Sent: 17 September 2004 17:19
To: CF-Talk
Subject: RE: Java Import - CF

 
Okay, a better reply is that it appears that the following JSP package
import ...

% page language=java import=com.plumtree.remote.portlet.* %

... is actually comparable to ...

cfobject action="" type=java
class=com.plumtree.remote.portlet.AggregationMode
name=AggregationMode
cfobject action="" type=java
class=com.plumtree.remote.portlet.CommunityAccessLevel
name=CommunityAccessLevel
cfobject action="" type=java
class=com.plumtree.remote.portlet.HostedDisplayMode
name=HostedDisplayMode

... etc. for all 15 classes in this package.

So, is there a simpler way to do this?It would be ideal, as it is in
JSP, to
have all of the objects already created and ready to use without having
to
perform N cfobject calls at the top of a template.

Thanks
- Jeff

Quoting Kola Oyedeji [EMAIL PROTECTED]:

 If you have the package available as a jar you should be able to
 reference it in the administrator under the classpath settings.

 Kola


-
This mail sent through IMP: http://horde.org/imp/
_
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




RE: Java Import - CF

2004-09-17 Thread Jeff Chastain
That is what I was afraid of, but it was worth asking.Thanks for your help.

-- Jeff

Quoting Kola Oyedeji [EMAIL PROTECTED]:

 Jeff AFAIK there is no way to do this in CF, you're stuck with using
 create object. 

 KOla

 -Original Message-
 From: Jeff Chastain [mailto:[EMAIL PROTECTED] 
 Sent: 17 September 2004 17:19
 To: CF-Talk
 Subject: RE: Java Import - CF

 Okay, a better reply is that it appears that the following JSP package
 import ...
 
 % page language=java import=com.plumtree.remote.portlet.* %
 
 ... is actually comparable to ...
 
 cfobject action="" type=java
 class=com.plumtree.remote.portlet.AggregationMode
 name=AggregationMode
 cfobject action="" type=java
 class=com.plumtree.remote.portlet.CommunityAccessLevel
 name=CommunityAccessLevel
 cfobject action="" type=java
 class=com.plumtree.remote.portlet.HostedDisplayMode
 name=HostedDisplayMode
 
 ... etc. for all 15 classes in this package.
 
 So, is there a simpler way to do this?It would be ideal, as it is in
 JSP, to
 have all of the objects already created and ready to use without having
 to
 perform N cfobject calls at the top of a template.
 
 Thanks
 - Jeff
 
 Quoting Kola Oyedeji [EMAIL PROTECTED]:
 
  If you have the package available as a jar you should be able to
  reference it in the administrator under the classpath settings.
 
  Kola
 
 
 -
 This mail sent through IMP: http://horde.org/imp/
_
 
 
 

 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]