myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andreas Kramer" <alfo...@gmx.li>
Subject AW: Installing Trinidad
Date Mon, 29 Oct 2007 13:19:27 GMT
Hi

 

Thanks, but still not working:

 

This is my chart Model:

 

package de.richP.Pl;

 

import java.util.List;

import java.util.Vector;

 

import org.apache.myfaces.trinidad.model.ChartModel;

 

public class newChartM extends ChartModel {

 

       @Override

       public List<String> getGroupLabels() {

             // TODO Auto-generated method stub

             Vector<String> l = new Vector<String>();

             l.add("Group1");

             return l;

       }

 

       @Override

       public List<String> getSeriesLabels() {

             Vector<String> l = new Vector<String>();

             l.add("Series1");

             return l;

       }

 

       @Override

       public List<List<Double>> getYValues() {

             Vector<List<Double>> yList= new Vector<List<Double>>();

             Vector<Double> v2 = new Vector<Double>();

             v2.add(new Double(5));

             v2.add(new Double(3));

             yList.add(v2);

 

             Vector<Double> v3 = new Vector<Double>();

             v3.add(new Double(3));

             v3.add(new Double(7));

             yList.add(v3);

             

             return yList;

       }

 

This is my web.xml:

 

<?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>Richfaces Components demo</description>

 <display-name>richfaces-demo</display-name>

 <context-param>

  <param-name>javax.faces.DEFAULT_SUFFIX</param-name>

  <param-value>.xhtml</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>#{skinBean.skin}</param-value>

 </context-param>

 <!-- <context-param>

  <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>

  <param-value>com.sun.facelets.FaceletViewHandler</param-value>

 </context-param>-->

 <context-param>

  <param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>

  <param-value>false</param-value>

 </context-param>

 <context-param>

  <param-name>org.ajax4jsf.xmlparser.ORDER</param-name>

  <param-value>NEKO</param-value>

 </context-param>

 <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>FORWARD</dispatcher>

  <dispatcher>REQUEST</dispatcher>

  <dispatcher>INCLUDE</dispatcher>

  <dispatcher>ERROR</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>/faces/*</url-pattern>

  </servlet-mapping>

 <login-config>

  <auth-method>BASIC</auth-method>

 </login-config>

 

 <!-- For Trinidad? -->

 <!-- FaceletViewHandler configuration -->

<context-param>

 
<param-name>org.apache.myfaces.trinidad.ALTERNATE_VIEW_HANDLER</param-name>

  <param-value>com.sun.facelets.FaceletViewHandler</param-value>

</context-param>

 

<!-- Use documents saved as *.xhtml for Facelets -->

  <context-param>

    <param-name>facelets.VIEW_MAPPINGS</param-name>

    <param-value>*.xhtml</param-value>

  </context-param>

  <filter>

    <filter-name>trinidad</filter-name>

 
<filter-class>org.apache.myfaces.trinidad.webapp.TrinidadFilter</filter-clas
s>

  </filter>

   <filter-mapping>

    <filter-name>trinidad</filter-name>

    <servlet-name>faces</servlet-name>

  </filter-mapping>

  <!-- resource loader servlet -->

  <servlet>

    <servlet-name>resources</servlet-name>

 
<servlet-class>org.apache.myfaces.trinidad.webapp.ResourceServlet</servlet-c
lass>

  </servlet>  

</web-app>

 

-----Ursprüngliche Nachricht-----
Von: mwessendorf@gmail.com [mailto:mwessendorf@gmail.com] Im Auftrag von
Matthias Wessendorf
Gesendet: Montag, 29. Oktober 2007 14:11
An: MyFaces Discussion
Betreff: Re: Installing Trinidad

 

right,

 

and! make sure that

<servlet-name>faces</servlet-name>

is really mapping to the FacesServelt

 

-M

 

On 10/29/07, lschoop@hsr.ch <lschoop@hsr.ch> wrote:

> Hi Andreas

> 

> I think you forgot the servlet mappings.

> 

> cheers lorin

> 

> ________________________________________

> From: Andreas Kramer [alfonso@gmx.li]

> Sent: 29 October 2007 13:59

> To: 'MyFaces Discussion'

> Subject: AW: Installing Trinidad

> 

> Hi

> 

> I've added: (to web.xml)

> 

>   <filter>

>     <filter-name>trinidad</filter-name>

> 

>
<filter-class>org.apache.myfaces.trinidad.webapp.TrinidadFilter</filter-clas

> s>

>   </filter>

>    <filter-mapping>

>     <filter-name>trinidad</filter-name>

>     <servlet-name>faces</servlet-name>

>   </filter-mapping>

>   <!-- resource loader servlet -->

>   <servlet>

>     <servlet-name>resources</servlet-name>

> 

>
<servlet-class>org.apache.myfaces.trinidad.webapp.ResourceServlet</servlet-c

> lass>

>   </servlet>

> 

> But it's still not working.

> 

> -----Ursprüngliche Nachricht-----

> Von: mwessendorf@gmail.com [mailto:mwessendorf@gmail.com] Im Auftrag von

> Matthias Wessendorf

> Gesendet: Montag, 29. Oktober 2007 13:48

> An: MyFaces Discussion

> Betreff: Re: Installing Trinidad

> 

> you need the TrinidadFilter and the resourceServlet as well.

> 

> See the web.xml file from our demo app:

>
http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad/trinidad-exampl

> es/trinidad-demo/src/main/webapp/WEB-INF/web.xml?view=markup

> 

> -M

> 

> On 10/29/07, Andreas Kramer <alfonso@gmx.li> wrote:

> > Hi

> >

> > Thanks fort he response. Think that I got one step further.

> >

> > No I receive this error in my console:

> >

> > 29.10.2007 13:30:23

> > org.apache.myfaces.trinidadinternal.renderkit.core.CoreRenderKit

> > createResponseWriter

> > SCHWERWIEGEND: No RenderingContext has been created.

> >

> > __________

> > I've added this line to the faces-config according to the wiki:

> >

> >   <!-- Use the Trinidad RenderKit -->

> >   <default-render-kit-id>

> >     org.apache.myfaces.trinidad.core

> >   </default-render-kit-id>

> > </application>

> >

> > Additionally I added the following entries to the web.xml:

> >

> > <context-param>

> >

> >

>
<param-name>org.apache.myfaces.trinidad.ALTERNATE_VIEW_HANDLER</param-name>

> >   <param-value>com.sun.facelets.FaceletViewHandler</param-value>

> > </context-param>

> >

> > <!-- Use documents saved as *.xhtml for Facelets -->

> >   <context-param>

> >     <param-name>facelets.VIEW_MAPPINGS</param-name>

> >     <param-value>*.xhtml</param-value>

> >   </context-param>

> >

> > Any idea?

> >

> > Regards

> >

> > -----Ursprüngliche Nachricht-----

> > Von: mwessendorf@gmail.com [mailto:mwessendorf@gmail.com] Im Auftrag von

> > Matthias Wessendorf

> > Gesendet: Montag, 29. Oktober 2007 12:31

> > An: MyFaces Discussion

> > Betreff: Re: Installing Trinidad

> >

> > no, you have to configure some entries

> >

> > find more here:

> >

> > http://wiki.apache.org/myfaces/Facelets_with_Trinidad

> >

> > -M

> >

> > On 10/29/07, Andreas Kramer <alfonso@gmx.li> wrote:

> > >

> > >

> > >

> > >

> > > Hey Guys

> > >

> > >

> > >

> > > Maybe you can help me installing my Trinidad.

> > >

> > >

> > >

> > > I tried to use a simple tr:ouputText to test if my Trinidad impl is

> > > installed correcty.

> > >

> > > Unfortunately I got this error in my console:

> > >

> > >

> > >

> > > Could not find renderer for

> > > CoreOutputText[UIXFacesBeanImpl, id=j_id_jsp_2003894837_2]

> > > rendererType = org.apache.myfaces.trinidad.Text

> > >

> > >

> > >

> > > Therefore I guess it was not installed correctly, so this is what I
have

> > > done.

> > >

> > >

> > >

> > > WEB-INF/LIB

> > >

> > >

> > >

> > > commons-beanutils-1.7.0.jar

> > >

> > > commons-collections-3.2.jar

> > >

> > > commons-digester-1.8.jar

> > >

> > > commons-logging-1.0.4.jar

> > >

> > > jhighlight-1.0.jar

> > >

> > > jsf-api-1.2_04-p02.jar

> > >

> > > jsf-facelets-1.1.12.jar

> > >

> > > jsf-impl-1.2_04-p02.jar

> > >

> > > jstl-1.0.jar

> > >

> > > nekohtml-0.9.5.jar

> > >

> > > richfaces-api-3.1.1-GA.jar

> > >

> > > richfaces-impl-3.1.1-GA.jar

> > >

> > > richfaces-ui-3.1.1-GA.jar

> > >

> > > trinidad-api-1.2.3.jar

> > >

> > > trinidad-impl-1.2.3.jar

> > >

> > > xercesImpl-2.4.0.jar

> > >

> > >

> > >

> > > I just imported the trinidad –api and impl to the WEB-INF/LIB
directory

> > and

> > > modified nothing in the faces-config or web.xml, as I think this
entries

> > are

> > > just optional.

> > >

> > >

> > >

> > > This is my test page:

> > >

> > >

> > >

> > > <%@ page language="java" contentType="text/html; charset=ISO-8859-1"

> > >

> > >       pageEncoding="ISO-8859-1"%>

> > >

> > > <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"

> > > "http://www.w3.org/TR/html4/loose.dtd">

> > >

> > > <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>

> > >

> > > <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>

> > >

> > > <%@ taglib uri="http://richfaces.org/rich" prefix="r"%>

> > >

> > > <%@ taglib uri="http://myfaces.apache.org/trinidad"

> > > prefix="tr"%>

> > >

> > > <html>

> > >

> > > <head>

> > >

> > > <meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">

> > >

> > > <title>Insert title here</title>

> > >

> > > <link rel="stylesheet" type="text/css" href="css/styles.css">

> > >

> > > </head>

> > >

> > > <body>

> > >

> > > <f:view>

> > >

> > >       <r:toolBar itemSeparator="line">

> > >

> > >             <r:toolBarGroup>

> > >

> > >                   test2

> > >

> > >             </r:toolBarGroup>

> > >

> > >             <r:toolBarGroup>

> > >

> > >                   test1

> > >

> > >                   test2

> > >

> > >             </r:toolBarGroup>

> > >

> > >       </r:toolBar>

> > >

> > >       <r:panelBar width="200">

> > >

> > >             <r:panelBarItem label="Menu 1">

> > >

> > >                   test

> > >

> > >                   </r:panelBarItem>

> > >

> > >             <r:panelBarItem label="Menu 2">

> > >

> > >                   test

> > >

> > >                   </r:panelBarItem>

> > >

> > >       </r:panelBar>

> > >

> > >       <h:outputText value="#{testBean.test}" />

> > >

> > >       <r:calendar>

> > >

> > >       </r:calendar>

> > >

> > >             <tr:chart value="#{testBean.newChart}" type="line" />

> > >

> > >       <tr:outputText value="basic"></tr:outputText>

> > >

> > > </f:view>

> > >

> > > </body>

> > >

> > > </html>

> > >

> > >

> > >

> > >

> > >

> > > Anyone can tell me what i forgot?

> > >

> > >

> > >

> > > Thanks in advance

> > >

> > >

> > >

> > > Cheers,

> > >

> > >

> > >

> > > Andreas

> >

> >

> > --

> > Matthias Wessendorf

> >

> > further stuff:

> > blog: http://matthiaswessendorf.wordpress.com/

> > mail: matzew-at-apache-dot-org

> >

> >

> 

> 

> --

> Matthias Wessendorf

> 

> further stuff:

> blog: http://matthiaswessendorf.wordpress.com/

> mail: matzew-at-apache-dot-org

> 

 

 

-- 

Matthias Wessendorf

 

further stuff:

blog: http://matthiaswessendorf.wordpress.com/

mail: matzew-at-apache-dot-org


Mime
View raw message