6 Replies Latest reply on Nov 8, 2006 6:37 PM by Aron Bartle

    Sun Java studio Creator 2 and JBoss Seam

    Domenico Loiacono Newbie

      Hi all,
      I'm using JBoss Seam 1.0beta2 with JBoss 4.0.4.CR2.
      Few weeks ago, I have seen that Sun relased Sun Java Studio Creator 2 to visually design jsf pages.
      So I have starting use it to design my web pages and now I'd like to use that pages with Seam.
      But, it's not simple for me integrate it with Seam.

      A simple page sound like this:


      <?xml version="1.0" encoding="UTF-8"?>
      <jsp:root version="1.2" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:ui="http://www.sun.com/web/ui">
       <jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
       <f:view>
       <ui:page binding="#{newPage.page1}" id="page1">
       <ui:html binding="#{newPage.html1}" id="html1">
       <ui:head binding="#{newPage.head1}" id="head1">
       <ui:link binding="#{newPage.link1}" id="link1" url="/resources/stylesheet.css"/>
       </ui:head>
       <ui:body binding="#{newPage.body1}" id="body1" style="-rave-layout: grid">
       <ui:form binding="#{newPage.form1}" id="form1">
       <ui:staticText binding="#{newPage.staticText1}" id="staticText1" style="left: 48px; top: 24px; position: absolute"/>
       </ui:form>
       </ui:body>
       </ui:html>
       </ui:page>
       </f:view>
      </jsp:root>
      


      Do you have some idea?
      I have put Sun's libraries (webui.jar, webui-dt.jar) in my jboss lib server dir, but if I call the page in the browser [http://localhost:8080/mywebapp/newPage.seam] , the source page is not rendered.


        • 1. Re: Sun Java studio Creator 2 and JBoss Seam
          Kusan Atukorala Newbie

          I am having this same problem. It is possible to run studio creator 2 applicaitons in JBOSS, it's just that if you try to put seam it throughs a lot of exceptions

          • 2. Re: Sun Java studio Creator 2 and JBoss Seam
            Domenico Loiacono Newbie

            The solution is:

            1) creator.taglib.xml like this

            <?xml version="1.0" encoding="UTF-8"?>
            <!DOCTYPE facelet-taglib PUBLIC
             "-//Sun Microsystems, Inc.//DTD Facelet Taglib 1.0//EN"
             "http://java.sun.com/dtd/facelet-taglib_1_0.dtd">
             <facelet-taglib>
             <namespace>http://www.sun.com/web/ui</namespace>
             <tag>
             <tag-name>calendar</tag-name>
             <component>
             <component-type>com.sun.rave.web.ui.Calendar</component-type>
             <renderer-type>com.sun.rave.web.ui.Calendar</renderer-type>
             </component>
             </tag>
             <tag>
             <tag-name>form</tag-name>
             <component>
             <component-type>com.sun.rave.web.ui.Form</component-type>
             <renderer-type>com.sun.rave.web.ui.Form</renderer-type>
             </component>
             </tag>
             <tag>
             <tag-name>body</tag-name>
             <component>
             <component-type>com.sun.rave.web.ui.Body</component-type>
             <renderer-type>com.sun.rave.web.ui.Body</renderer-type>
             </component>
             </tag>
             <tag>
             <tag-name>page</tag-name>
             <component>
             <component-type>com.sun.rave.web.ui.Page</component-type>
             <renderer-type>com.sun.rave.web.ui.Page</renderer-type>
             </component>
             </tag>
             <tag>
             <tag-name>head</tag-name>
             <component>
             <component-type>com.sun.rave.web.ui.Head</component-type>
             <renderer-type>com.sun.rave.web.ui.Head</renderer-type>
             </component>
             </tag>
             <tag>
             <tag-name>html</tag-name>
             <component>
             <component-type>com.sun.rave.web.ui.Html</component-type>
             <renderer-type>com.sun.rave.web.ui.Html</renderer-type>
             </component>
             </tag>
            
             <tag>
             <tag-name>link</tag-name>
             <component>
             <component-type>com.sun.rave.web.ui.Link</component-type>
             <renderer-type>com.sun.rave.web.ui.Link</renderer-type>
             </component>
             </tag>
             <tag>
             <tag-name>panelLayout</tag-name>
             <component>
             <component-type>com.sun.rave.web.ui.PanelLayout</component-type>
             <renderer-type>com.sun.rave.web.ui.PanelLayout</renderer-type>
             </component>
             </tag>
             <tag>
             <tag-name>tabSet</tag-name>
             <component>
             <component-type>com.sun.rave.web.ui.TabSet</component-type>
             <renderer-type>com.sun.rave.web.ui.TabSet</renderer-type>
             </component>
             </tag>
             <tag>
             <tag-name>tab</tag-name>
             <component>
             <component-type>com.sun.rave.web.ui.Tab</component-type>
             <renderer-type>com.sun.rave.web.ui.Tab</renderer-type>
             </component>
             </tag>
            
             <tag>
             <tag-name>dropDown</tag-name>
             <component>
             <component-type>com.sun.rave.web.ui.DropDown</component-type>
             <renderer-type>com.sun.rave.web.ui.DropDown</renderer-type>
             </component>
             </tag>
             <tag>
             <tag-name>panelGroup</tag-name>
             <component>
             <component-type>com.sun.rave.web.ui.PanelGroup</component-type>
             <renderer-type>com.sun.rave.web.ui.PanelGroup</renderer-type>
             </component>
             </tag>
             <tag>
             <tag-name>messageGroup</tag-name>
             <component>
             <component-type>com.sun.rave.web.ui.MessageGroup</component-type>
             <renderer-type>com.sun.rave.web.ui.MessageGroup</renderer-type>
             </component>
             </tag>
             <tag>
             <tag-name>label</tag-name>
             <component>
             <component-type>com.sun.rave.web.ui.Label</component-type>
             <renderer-type>com.sun.rave.web.ui.Label</renderer-type>
             </component>
             </tag>
             <tag>
             <tag-name>pageSeparator</tag-name>
             <component>
             <component-type>com.sun.rave.web.ui.PageSeparator</component-type>
             <renderer-type>com.sun.rave.web.ui.PageSeparator</renderer-type>
             </component>
             </tag>
             <tag>
             <tag-name>hyperlink</tag-name>
             <component>
             <component-type>com.sun.rave.web.ui.Hyperlink</component-type>
             <renderer-type>com.sun.rave.web.ui.Hyperlink</renderer-type>
             </component>
             </tag>
             <tag>
             <tag-name>textField</tag-name>
             <component>
             <component-type>com.sun.rave.web.ui.TextField</component-type>
             <renderer-type>com.sun.rave.web.ui.TextField</renderer-type>
             </component>
             </tag>
             <tag>
             <tag-name>passwordField</tag-name>
             <component>
             <component-type>com.sun.rave.web.ui.PasswordField</component-type>
             <renderer-type>com.sun.rave.web.ui.PasswordField</renderer-type>
             </component>
             </tag>
             <tag>
             <tag-name>staticText</tag-name>
             <component>
             <component-type>com.sun.rave.web.ui.StaticText</component-type>
             <renderer-type>com.sun.rave.web.ui.StaticText</renderer-type>
             </component>
             </tag>
            </facelet-taglib>
            


            2)in web.xml
            ....
             <context-param>
             <param-name>facelets.LIBRARIES</param-name>
             <param-value>/WEB-INF/creator.taglib.xml</param-value>
             </context-param>
            ....
            


            3) include sun jars in your application

            4) remove myFaces implementation from /jbossweb-tomcat55.sar/jsf-libs



            • 3. Re: Sun Java studio Creator 2 and JBoss Seam
              Leonard Sitongia Newbie

              Hi,

              Wow, this is just what I was looking for! I've been investigating Seam, and just started trying out Creator.

              Are webui.jar, webui-dt.jar the only Sun jars you need to add to your project?

              Have you written about this online, in a blog, perhaps?

              It would be wonderful if you have a sample project that I could download.

              Thanks!
              ==Leonard

              • 4. Re: Sun Java studio Creator 2 and JBoss Seam
                Max Rydahl Andersen Master

                how do you work around the "issue" with creators requirment how always having a concrete backingbean ?

                • 5. Re: Sun Java studio Creator 2 and JBoss Seam
                  Domenico Loiacono Newbie

                  An Ant script that delete backing bean and delete "binding" from tags in pages.

                  • 6. Re: Sun Java studio Creator 2 and JBoss Seam
                    Aron Bartle Newbie

                    Hello,

                    Although I'm not attempting to use SEAM (just JSF) this page seems the closest match to what I'm experiencing.

                    I'm using jboss4.0.4.GA, default JSF, and attempting to deploy a war with Sun rave UI in it, from Java Studio Creator 2.

                    Just like you mentioned, the sun ui components don't render at all, but I don't get any exceptions either.

                    o I'm including sun's jars in the ear containing the war (except sun jsf jars)

                    o I copied Sun's jstl.jar and default.jar to deploy/jbossweb-tomcat55.sar.

                    o I added in the creator.taglib.xml as you explained, and context-param in web.xml

                    Still the same thing, no errors, nothing rendered.
                    Do you have any suggestion?

                    Thanks,

                    -Aron