[Logo] Enterprise Client Community
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
How Can I Load The JavaBeanCode in the Layout Editor ?  XML
Forum Index -> Development
Author Message
marinelli



Joined: 18/06/2008 11:15:08
Messages: 4
Offline

hello to everybody,

I am developing my very first cc project and I follow the directions given in the video tutorials.

I created my first jsp page and I wrote in eclipse my javabeancode and
I changed the faces-config.xml.

now I want to see my javabean in the layout editor - environement ,
so I click "Reload Server", but no javabean is loaded in the "Bean Browser"

what I have to do in order to see the javabean in the layout editor ?

ciao marisa marinelli
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5519
Offline

Hi,

please check:

1.) faces-config.xml ==> there should be a link to your class, "d" default by default (but the name is up to you)
2.) the class must be compiled (.class), please check under /EnterprsiseClient/server/tomcat/webapps/<yourproject>/WEB-INF/classes if your classes have arrived there (this is what the reload does: copying the webcontent from your project directory to the <yourproject> directory)

Björn

Björn Müller, CaptainCasa GmbH
marinelli



Joined: 18/06/2008 11:15:08
Messages: 4
Offline

hi Björn

there was no classes copied under:
C:\...\..\Tomcat 6.0\webapps\cc-01\WEB-INF\classes

so I copied my class under :
. Tomcat 6.0\webapps\cc-01\WEB-INF\classes\mma\natcalc\calculate.class

the faces-config under eclipse is this:
<managed-bean>
<managed-bean-name>calculateBean</managed-bean-name>
<managed-bean-class>mma.natcalc.calculate</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>

BUT THE faces-config under
C:\...\Tomcat 6.0\webapps\cc-01\WEB-INF does not contains
my bean definition. So I copied my bean defintion into
C:\...\Tomcat 6.0\webapps\cc-01\WEB-INF\faces-config.xml

SO IT WORKS. I see now my Bean in the cc-editor.

BUT !!!! IF I say "Reload Server" the faces-config.xml under
C:\...\Tomcat 6.0\webapps\cc-01\WEB-INF
is overwritten !!

ciao marisa

I will be back the 3th of july






CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5519
Offline

Hi Marisa,

the Tomcat directory is overwritten by the project directory every time you do a reload of the appication. The project directory (the one you maintain with eclipse) is the origirnal, a reload deploys/copies it into the tomcat/webapps.

Please have a quick look into the docu, explaining how to write the first project, there are explanations about this.

Thanks, Björn

Björn Müller, CaptainCasa GmbH
marinelli



Joined: 18/06/2008 11:15:08
Messages: 4
Offline

hallo Björn ,
I am back.

I would like let you know that if I copy manually the classes, lib and
the faces-config from eclipse to tomcat , my soa projct works.

BUT if I click on "Relaod Server" the lib and
the faces-config under tomcat become corruped, so that I have
to recopy manually the lib and the faces-config from eclipse to tomcat.

an other problem is:
first:
if I start the project from the editor , it works ,
but If I try to start the project from tomcat with
http://localhost:8080/cc-01/natcalc.jsp , I get a empty page.

second:
there is no possibility to get messages from java code with a tag like
<h1><h:messages style="color: blue"/></h1> ?

ciao
marisa


CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5519
Offline

Same response as in the orther thread:



After having checked the problem, the solution was/is as follows:

The Eclipse project was created by importing an exisiting project from the file system. ...and: there is a little checkbox in the import dialog: "Copy project into workspace". If this is pressed then Eclipse does not work on the directory which was created by the CaptainCasa toolset, but the directory was copied into another location.

As result the Layout Editor still takes the original directory it created, whereas the programming is done in the copy created by Eclipse.

Björn

Björn Müller, CaptainCasa GmbH
 
Forum Index -> Development
Go to:   
Powered by JForum 2.1.6 © JForum Team