You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Rich Schramm <ri...@supplydynamics.com> on 2007/08/29 21:43:45 UTC
[Trinidad] - Javascript errors Integrating with JSF 1.2 RI / Facelets
Hi,
I would like to use the color picker and calendar components in
Trinidad. I am currently running JSF 1.2 RI with facelets and
richfaces. I have configured the installation as per the instructions.
When I display a page with the choosecolor component, it renders the
table, but the transparent image is shows an error (a box with a broken
image) and the javascript shows an error "TrColorConverter" is
undefined. Additionally, when I use the requestContext palette, instead
of showing the colors, it causes an exception in the page showing that
the long list of AWT color elements is a string and not a list.
Thinking maybe it was interference with the RichFaces tags, I created a
very simple page using the demo chooseColor page in demo war.
It looks like:
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:trh="http://myfaces.apache.org/trinidad/html"
xmlns:tr="http://myfaces.apache.org/trinidad" >
<jsp:directive.page contentType="text/html;charset=utf-8"/>
<f:view>
<tr:document title="ChooseColor Demo" >
<tr:form>
<tr:panelGroupLayout layout="vertical">
<f:facet name="separator">
<tr:separator/>
</f:facet>
<tr:outputFormatted styleUsage="instruction"
value="<b>A chooseColor associated with a selectInputColor</b>"/>
<tr:inputColor id="sic1" chooseId="cp1"
shortDesc="Select color from pallette"
label="Enter or select color from palette below"/>
<tr:chooseColor id="cp1"/>
</tr:panelGroupLayout>
</tr:form>
</tr:document>
</f:view>
</jsp:root>
Again, I get the same issues. The javascript is broken and the
transparent image is broken. I doubt if it is a collision with
RichFaces as no components from that library are used on this page, and
it seems to render all of my other facelets pages (with Trinidad comps)
in a useable way, so I am guessing that is configured properly (as per
the installation doc).
Any ideas?
Thanks,
Rich
Re: [Trinidad] - Javascript errors Integrating with JSF 1.2 RI / Facelets
Posted by Adam Winer <aw...@gmail.com>.
<servlet-mapping>
<servlet-name>resources</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
... is wrong. It needs to be:
<servlet-mapping>
<servlet-name>resources</servlet-name>
<url-pattern>/adf/*</url-pattern>
</servlet-mapping>
... like it says at :
http://myfaces.apache.org/trinidad/installation.html
-- Adam
On 8/29/07, Rich Schramm <ri...@supplydynamics.com> wrote:
>
>
>
>
> Adam,
>
>
>
> See below for my web.xml as per your request. Any feedback appreciated.
>
>
>
> Rich
>
>
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
>
>
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
> http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
>
> <description>Facelets StarterKit</description>
>
> <display-name>myapp</display-name>
>
> <context-param>
>
> <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
>
> <param-value>.jspx</param-value>
>
> </context-param>
>
> <context-param>
>
> <param-name>facelets.REFRESH_PERIOD</param-name>
>
> <param-value>2</param-value>
>
> </context-param>
>
> <context-param>
>
> <param-name>facelets.DEVELOPMENT</param-name>
>
> <param-value>true</param-value>
>
> </context-param>
>
> <context-param>
>
> <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
>
> <param-value>server</param-value>
>
> </context-param>
>
> <context-param>
>
> <param-name>com.sun.faces.validateXml</param-name>
>
> <param-value>true</param-value>
>
> </context-param>
>
> <context-param>
>
> <param-name>com.sun.faces.verifyObjects</param-name>
>
> <param-value>true</param-value>
>
> </context-param>
>
> <context-param>
>
> <param-name>org.ajax4jsf.SKIN</param-name>
>
> <param-value>classic</param-value>
>
> </context-param>
>
> <context-param>
>
> <param-name>com.exadel.vcp.trialKey</param-name>
>
> <param-value>trial_key_goes_here</param-value>
>
> </context-param>
>
>
>
> <!-- Trinidad Mappings -->
>
> <context-param>
>
>
> <param-name>org.apache.myfaces.trinidad.ALTERNATE_VIEW_HANDLER</param-name>
>
>
> <param-value>com.sun.facelets.FaceletViewHandler</param-value>
>
> </context-param>
>
>
>
> <context-param>
>
> <param-name>facelets.VIEW_MAPPINGS</param-name>
>
> <param-value>*.jspx</param-value>
>
> </context-param>
>
>
>
> <filter>
>
> <filter-name>trinidad</filter-name>
>
>
> <filter-class>org.apache.myfaces.trinidad.webapp.TrinidadFilter</filter-class>
>
> </filter>
>
>
>
> <filter-mapping>
>
> <filter-name>trinidad</filter-name>
>
> <servlet-name>Faces Servlet</servlet-name>
>
> <dispatcher>REQUEST</dispatcher>
>
> <dispatcher>FORWARD</dispatcher>
>
> <dispatcher>INCLUDE</dispatcher>
>
> </filter-mapping>
>
>
>
> <servlet>
>
> <servlet-name>resources</servlet-name>
>
>
> <servlet-class>org.apache.myfaces.trinidad.webapp.ResourceServlet</servlet-class>
>
> </servlet>
>
>
>
> <servlet-mapping>
>
> <servlet-name>resources</servlet-name>
>
> <url-pattern>*.jsf</url-pattern>
>
> </servlet-mapping>
>
>
>
> <!-- End Trinidad Mapping -->
>
>
>
> <filter>
>
> <display-name>Ajax4jsf Filter</display-name>
>
> <filter-name>ajax4jsf</filter-name>
>
> <filter-class>org.ajax4jsf.Filter</filter-class>
>
> </filter>
>
> <filter-mapping>
>
> <filter-name>ajax4jsf</filter-name>
>
> <servlet-name>Faces Servlet</servlet-name>
>
> <dispatcher>REQUEST</dispatcher>
>
> <dispatcher>FORWARD</dispatcher>
>
> <dispatcher>INCLUDE</dispatcher>
>
> </filter-mapping>
>
> <servlet>
>
> <servlet-name>Faces Servlet</servlet-name>
>
> <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
>
> <load-on-startup>1</load-on-startup>
>
> </servlet>
>
>
>
> <servlet-mapping>
>
> <servlet-name>Faces Servlet</servlet-name>
>
> <url-pattern>*.jsf</url-pattern>
>
> </servlet-mapping>
>
>
>
> </web-app>
>
>
>
>
>
>
> From: Adam Winer [mailto:awiner@gmail.com]
> Sent: Wednesday, August 29, 2007 8:01 PM
> To: MyFaces Discussion
> Subject: Re: [Trinidad] - Javascript errors Integrating with JSF 1.2 RI /
> Facelets
>
>
>
>
> Could we see your web.xml?
>
>
>
>
>
> -- Adam
>
>
>
>
>
> On 8/29/07, Rich Schramm <
> richard.schramm@supplydynamics.com> wrote:
>
>
>
> Hi,
>
>
>
> I would like to use the color picker and calendar components in Trinidad. I
> am currently running JSF 1.2 RI with facelets and richfaces. I have
> configured the installation as per the instructions. When I display a page
> with the choosecolor component, it renders the table, but the transparent
> image is shows an error (a box with a broken image) and the javascript shows
> an error "TrColorConverter" is undefined. Additionally, when I use the
> requestContext palette, instead of showing the colors, it causes an
> exception in the page showing that the long list of AWT color elements is a
> string and not a list.
>
>
>
> Thinking maybe it was interference with the RichFaces tags, I created a very
> simple page using the demo chooseColor page in demo war.
>
>
>
> It looks like:
>
>
>
> <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
>
> xmlns:f="http://java.sun.com/jsf/core"
>
> xmlns:h="http://java.sun.com/jsf/html"
>
>
> xmlns:trh="http://myfaces.apache.org/trinidad/html"
>
> xmlns:tr="http://myfaces.apache.org/trinidad" >
>
> <jsp:directive.page
> contentType="text/html;charset=utf-8"/>
>
> <f:view>
>
> <tr:document title="ChooseColor Demo" >
>
> <tr:form>
>
> <tr:panelGroupLayout layout="vertical">
>
> <f:facet name="separator">
>
> <tr:separator/>
>
> </f:facet>
>
> <tr:outputFormatted styleUsage="instruction" value="<b>A
> chooseColor associated with a selectInputColor</b>"/>
>
> <tr:inputColor id="sic1" chooseId="cp1"
>
> shortDesc="Select color from pallette"
>
> label="Enter or select color from palette below"/>
>
> <tr:chooseColor id="cp1"/>
>
> </tr:panelGroupLayout>
>
> </tr:form>
>
> </tr:document>
>
> </f:view>
>
> </jsp:root>
>
>
>
> Again, I get the same issues. The javascript is broken and the transparent
> image is broken. I doubt if it is a collision with RichFaces as no
> components from that library are used on this page, and it seems to render
> all of my other facelets pages (with Trinidad comps) in a useable way, so I
> am guessing that is configured properly (as per the installation doc).
>
>
>
> Any ideas?
>
>
>
> Thanks,
>
>
>
> Rich
>
>
>
>
>
>
>
> _____________________________________________________________________________
> Scanned by IBM Email Security Management Services powered by MessageLabs.
> For more information please visit http://www.ers.ibm.com
> _____________________________________________________________________________
RE: [Trinidad] - Javascript errors Integrating with JSF 1.2 RI / Facelets
Posted by Rich Schramm <ri...@supplydynamics.com>.
Adam,
See below for my web.xml as per your request. Any feedback appreciated.
Rich
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<description>Facelets StarterKit</description>
<display-name>myapp</display-name>
<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.jspx</param-value>
</context-param>
<context-param>
<param-name>facelets.REFRESH_PERIOD</param-name>
<param-value>2</param-value>
</context-param>
<context-param>
<param-name>facelets.DEVELOPMENT</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>server</param-value>
</context-param>
<context-param>
<param-name>com.sun.faces.validateXml</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>com.sun.faces.verifyObjects</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>org.ajax4jsf.SKIN</param-name>
<param-value>classic</param-value>
</context-param>
<context-param>
<param-name>com.exadel.vcp.trialKey</param-name>
<param-value>trial_key_goes_here</param-value>
</context-param>
<!-- Trinidad Mappings -->
<context-param>
<param-name>org.apache.myfaces.trinidad.ALTERNATE_VIEW_HANDLER</param-na
me>
<param-value>com.sun.facelets.FaceletViewHandler</param-value>
</context-param>
<context-param>
<param-name>facelets.VIEW_MAPPINGS</param-name>
<param-value>*.jspx</param-value>
</context-param>
<filter>
<filter-name>trinidad</filter-name>
<filter-class>org.apache.myfaces.trinidad.webapp.TrinidadFilter</filter-
class>
</filter>
<filter-mapping>
<filter-name>trinidad</filter-name>
<servlet-name>Faces Servlet</servlet-name>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
<dispatcher>INCLUDE</dispatcher>
</filter-mapping>
<servlet>
<servlet-name>resources</servlet-name>
<servlet-class>org.apache.myfaces.trinidad.webapp.ResourceServlet</servl
et-class>
</servlet>
<servlet-mapping>
<servlet-name>resources</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
<!-- End Trinidad Mapping -->
<filter>
<display-name>Ajax4jsf Filter</display-name>
<filter-name>ajax4jsf</filter-name>
<filter-class>org.ajax4jsf.Filter</filter-class>
</filter>
<filter-mapping>
<filter-name>ajax4jsf</filter-name>
<servlet-name>Faces Servlet</servlet-name>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
<dispatcher>INCLUDE</dispatcher>
</filter-mapping>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
</web-app>
From: Adam Winer [mailto:awiner@gmail.com]
Sent: Wednesday, August 29, 2007 8:01 PM
To: MyFaces Discussion
Subject: Re: [Trinidad] - Javascript errors Integrating with JSF 1.2 RI
/ Facelets
Could we see your web.xml?
-- Adam
On 8/29/07, Rich Schramm < richard.schramm@supplydynamics.com
<ma...@supplydynamics.com> > wrote:
Hi,
I would like to use the color picker and calendar components in
Trinidad. I am currently running JSF 1.2 RI with facelets and
richfaces. I have configured the installation as per the instructions.
When I display a page with the choosecolor component, it renders the
table, but the transparent image is shows an error (a box with a broken
image) and the javascript shows an error "TrColorConverter" is
undefined. Additionally, when I use the requestContext palette, instead
of showing the colors, it causes an exception in the page showing that
the long list of AWT color elements is a string and not a list.
Thinking maybe it was interference with the RichFaces tags, I created a
very simple page using the demo chooseColor page in demo war.
It looks like:
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:trh="http://myfaces.apache.org/trinidad/html"
xmlns:tr="http://myfaces.apache.org/trinidad" >
<jsp:directive.page contentType="text/html;charset=utf-8"/>
<f:view>
<tr:document title="ChooseColor Demo" >
<tr:form>
<tr:panelGroupLayout layout="vertical">
<f:facet name="separator">
<tr:separator/>
</f:facet>
<tr:outputFormatted styleUsage="instruction"
value="<b>A chooseColor associated with a selectInputColor</b>"/>
<tr:inputColor id="sic1" chooseId="cp1"
shortDesc="Select color from pallette"
label="Enter or select color from palette below"/>
<tr:chooseColor id="cp1"/>
</tr:panelGroupLayout>
</tr:form>
</tr:document>
</f:view>
</jsp:root>
Again, I get the same issues. The javascript is broken and the
transparent image is broken. I doubt if it is a collision with
RichFaces as no components from that library are used on this page, and
it seems to render all of my other facelets pages (with Trinidad comps)
in a useable way, so I am guessing that is configured properly (as per
the installation doc).
Any ideas?
Thanks,
Rich
________________________________________________________________________
_____
Scanned by IBM Email Security Management Services powered by
MessageLabs. For more information please visit http://www.ers.ibm.com
________________________________________________________________________
_____
Re: [Trinidad] - Javascript errors Integrating with JSF 1.2 RI / Facelets
Posted by Adam Winer <aw...@gmail.com>.
Could we see your web.xml?
-- Adam
On 8/29/07, Rich Schramm <ri...@supplydynamics.com> wrote:
>
> Hi,
>
>
>
> I would like to use the color picker and calendar components in Trinidad.
> I am currently running JSF 1.2 RI with facelets and richfaces. I have
> configured the installation as per the instructions. When I display a page
> with the choosecolor component, it renders the table, but the transparent
> image is shows an error (a box with a broken image) and the javascript shows
> an error "TrColorConverter" is undefined. Additionally, when I use the
> requestContext palette, instead of showing the colors, it causes an
> exception in the page showing that the long list of AWT color elements is a
> string and not a list.
>
>
>
> Thinking maybe it was interference with the RichFaces tags, I created a
> very simple page using the demo chooseColor page in demo war.
>
>
>
> It looks like:
>
>
>
> <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
>
> xmlns:f="http://java.sun.com/jsf/core"
>
> xmlns:h="http://java.sun.com/jsf/html"
>
> xmlns:trh="http://myfaces.apache.org/trinidad/html"
>
> xmlns:tr="http://myfaces.apache.org/trinidad" >
>
> <jsp:directive.page contentType="text/html;charset=utf-8"/>
>
> <f:view>
>
> <tr:document title="ChooseColor Demo" >
>
> <tr:form>
>
> <tr:panelGroupLayout layout="vertical">
>
> <f:facet name="separator">
>
> <tr:separator/>
>
> </f:facet>
>
> <tr:outputFormatted styleUsage="instruction" value="<b>A
> chooseColor associated with a selectInputColor</b>"/>
>
> <tr:inputColor id="sic1" chooseId="cp1"
>
> shortDesc="Select color from pallette"
>
> label="Enter or select color from palette below"/>
>
> <tr:chooseColor id="cp1"/>
>
> </tr:panelGroupLayout>
>
> </tr:form>
>
> </tr:document>
>
> </f:view>
>
> </jsp:root>
>
>
>
> Again, I get the same issues. The javascript is broken and the
> transparent image is broken. I doubt if it is a collision with RichFaces as
> no components from that library are used on this page, and it seems to
> render all of my other facelets pages (with Trinidad comps) in a useable
> way, so I am guessing that is configured properly (as per the installation
> doc).
>
>
>
> Any ideas?
>
>
>
> Thanks,
>
>
>
> *Rich*
>
>
>