facebook

Forcing a project to be JSF

  1. MyEclipse Archived
  2.  > 
  3. Documentation
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #271158 Reply

    Tony Herstell
    Participant

    I cannot find in the doco a way of forcing a project to be a JSF project.

    I created a new EJB3 project.
    I copied across all my parts from a J2EE project (which was a Seam and hence J5E3 project anyhow)

    When I open the faces-config.xml from the Web part it says the project is not a JSF project (also not showing this in the properties tab).

    I was going to use the “add JSF Capabilites” before I saw that it was going to add all sorts of stuff that I don’t want to my project.

    Please can you advise how I force the WAR to be tagged as JSF so I can open the faces-config.xml in the GUI view.

    Another point is how do I force the project to have the right validators.

    I guess, really, what I want a button on the
    “add XXXXX Capabilites…” wizard
    that says..
    [ ] Ok, I know what I am doing, and have already set things up correctly so don’t copy in anything. (really I should have noticed that this was a JSF project and just offered to tag it as a XXXX project and offered to add in various validators anyhow)

    Thanks.

    #271178 Reply

    Riyad Kalla
    Member

    balanceofpower,
    1) You mention an EJB3 project above, this cannot be made a JSF project. Only a Web Project can become a JSF project. But later you mention a “WAR”, so I’m not sure what type of project you are dealing with, maybe you have 2 projects? But this is the guideline none the less.

    2) The wizard won’t add anything you don’t want it to add. For example you can uncheck all the libraries and TLDs at the bottom of the wizard, and it is asking you where your faces-config file lives in the top portion of the wizard that you have to set so it knows about the file.

    3) It will try and register the FacesServlet in your web.xml file, but should notice that it’s already there if it sees one.

    #271188 Reply

    Tony Herstell
    Participant

    I have an ear project
    This has three parts (seperate project parts)
    EAR, EJB (jar) and WAR.
    I was trying to use the common terminology… sorry.

    Anyhow, the WAR is a JSF (Seam) project.

    My project is working fine as a SEAM (JSF) project.

    It’s just that since copying all files over from the old EJB2 project EAR, EJB and WAR) file by line MyEclipse does not recognise the WAR part as JSF enbaled.

    Whats the flag I need to hack to tell it it is?

    What is your trigger to tell its a JSF project?

    #271193 Reply

    Riyad Kalla
    Member

    I don’t officially endorse this, but if you are handy you could do this:

    1) Create some throw-away WAR project, add JSF Caps to it.
    2) Copy across the builders and natures from the .project file in that project to your project.
    3) Copy across any jsf dot file that gets created to your project (I don’t remember if there is one or not…)

    Go to your project properties under MyEclipse and make sure the JSF icon is lit up on your old project… then you should be good to go.

    #271196 Reply

    Tony Herstell
    Participant

    Yes, I had tried that
    🙂

    I was trying to retrofit the builders and natures to my j2ee project that was really a j5e3 project!

    I will try what you are suggesting

    So… my little JSF icon is not lit up. It used to be ! and I used to get my files validated..

    Weired… (vanishing config as well as libraries?)

    Living on the bleeding edge is always fun.

    Thx.

    #271199 Reply

    Riyad Kalla
    Member

    wait… are you trying to do this on a EJB3 Project? You can only do this on a Web Project.

    I thought I understood you to have 3 projects and assumed you were doing all this on your Web Project… I am super confused now…

    #271200 Reply

    Tony Herstell
    Participant

    Ok,
    I create a EJB3 project
    This creates an EAR, EJB(Jar) and a Web(WAR) Head
    The Ear is auto configured to include the EJB(Jar) and the Web(War) when it builds (refence projects)

    
    <?xml version="1.0" encoding="UTF-8"?>
    <application xmlns="http://java.sun.com/xml/ns/javaee"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="5"
        xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd">
    
        <display-name>selwynequestriancentre</display-name>
    
        <module id="myeclipse.1180825499040">
            <web>
                <web-uri>selwynequestriancentreWeb.war</web-uri>
                <context-root>/selwynequestriancentre</context-root>
            </web>
        </module>
    
        <module id="myeclipse.1180825499551">
            <ejb>selwynequestriancentreEJB.jar</ejb>
        </module>
    ...
    

    On the WAR head you can do properties and it no longer shows the War as being a JSF project (it just vanished).

    So now I need to add it back in so I can use the graphical tools for managing my faces-config.xml etc.

    Is that any clearer.

    Sorry for confusing you.

    I CREATED this seam project by creating an EJB EAR project; making it JSF and the deleting all the files 😉 and copying all my files from the old J2EE Ear project (that was already a EJB EAR JSF enabled SEAM project!).

    I was hoping to pick all the correct builders and natures.

    See why we ask for Seam (let alone Seam+IceFaces) support 😉

    Thanks.

    #271201 Reply

    Tony Herstell
    Participant

    I will post back when I have fiddled tonight hopefully telling you its all working great.
    I will also compare the files to a previous (SVN) release of the codebase as hopefully the missing files will be shown !

Viewing 8 posts - 1 through 8 (of 8 total)
Reply To: Forcing a project to be JSF

You must be logged in to post in the forum log in