You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Oliver Gottwald <ol...@hotmail.com> on 2005/09/20 18:58:37 UTC
rowOnClick not working? please help!
hello,
I'm new to the group and will be doing a tun with JSF, and myFaces over the
next 6 to 12 months. I'm currently working on getting rowOnClick working in
a
simple jsf file derived from sortTable.jsp example of the myFaces examples.
I'm
getting the below error. I think I'm missing something in my configuration
for
usage of tomahawk. Outside of putting the tomahawk.jar in my WEB-INF\lib
what
else needs done??? Any input on the below issue would be greatly
appreciated. Also when removing rowId I get the same message
Also does anyone know where to / or have the great examples from
http://www.irian.at/myfaces/home.jsf
Environment: XP Pro., tomcat 5.5.9, jdk 1.5.0_04
thanks,
oliver
=============================================================================
javax.servlet.ServletException: /sortTable.jsp(56,16) Unable to find setter
method for attribute: rowId
javax.faces.webapp.FacesServlet.service(FacesServlet.java:125)
org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:112)
root cause
javax.faces.FacesException: /sortTable.jsp(56,16) Unable to find setter
method
for attribute: rowId
org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:411)
org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:280)
org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:300)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:110)
org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:112)
===================================================================================
The following is my JSP:
%@ page session="false" contentType="text/html;charset=utf-8"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
<html >
<!--
/*
* Copyright 2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
//-->
<%@include file="inc/head.inc" %>
<body>
<!--
managed beans used:
list
-->
<SCRIPT Language="JavaScript">
function ding(){
alert('ding')
}
</SCRIPT>
<f:view>
<f:loadBundle basename="com.jsftest.resource.example_messages"
var="example_messages"/>
<t:panelLayout id="page" layout="#{globalOptions.pageLayout}"
styleClass="pageLayout"
headerClass="pageHeader"
navigationClass="pageNavigation"
bodyClass="pageBody"
footerClass="pageFooter">
<f:facet name="header">
<f:subview id="header">
<jsp:include page="inc/page_header.jsp" />
</f:subview>
</f:facet>
<f:facet name="navigation">
<f:subview id="menu" >
<jsp:include page="inc/navigation.jsp" />
</f:subview>
</f:facet>
<f:facet name="body">
<h:panelGroup id="body">
<t:dataTable styleClass="standardTable"
headerClass="standardTable_SortHeader"
footerClass="standardTable_Footer"
rowClasses="standardTable_Row1,standardTable_Row2"
var="car"
value="#{list.cars}"
sortColumn="#{list.sort}"
sortAscending="#{list.ascending}"
preserveDataModel="true"
preserveSort="true"
rowId="#{car.color}"
rowOnClick="ding()"
>
<f:facet name="header">
<h:outputText value="(header table)" />
</f:facet>
<f:facet name="footer">
<h:outputText value="(footer table)" />
</f:facet>
<c:set var="test" value="test"/>
<h:column>
<f:facet name="header">
<t:commandSortHeader columnName="type"
arrow="true">
<h:outputText
value="#{example_messages['sort_cartype']}" />
</t:commandSortHeader>
</f:facet>
<h:outputText value="#{car.type}" />
<f:facet name="footer">
<h:outputText id="ftr1" value="(footer col1)"
/>
</f:facet>
</h:column>
<h:column>
<f:facet name="header">
<t:commandSortHeader columnName="color"
arrow="true">
<h:outputText
value="#{example_messages['sort_carcolor']}" />
</t:commandSortHeader>
</f:facet>
<h:outputText value="#{car.color}" />
<f:facet name="footer">
<h:outputText id="ftr2" value="(footer col2)"
/>
</f:facet>
</h:column>
</t:dataTable>
</h:panelGroup>
</f:facet>
<%@include file="inc/page_footer.jsp" %>
</t:panelLayout>
</f:view>
</body>
</html>
I think there is a configuration issue with tomahawk in my environment. I
put the tomahawk.jar in my WEB-INF\lib
Re: mf 1.1.0 and jscookmenu
Posted by Francesco Consumi <co...@istitutodeglinnocenti.it>.
Quoting Martin Marinschek <ma...@gmail.com>:
> If it isn't this, try out the examples if they are working with your
> version of MyFaces!
>
I've just tried examples/simple.war extracted from 20050926 examples,
and it works. and now ? :-) what do I have to try doing ?
--
Francesco Consumi
Ufficio Sistemi informativi
Istituto degli Innocenti
Piazza SS.Annunziata, 12
50122 Firenze
consumi at istitutodeglinnocenti.it
Tel. +39 055 2037320
ICQ# 12516133
Re: mf 1.1.0 and jscookmenu
Posted by Francesco Consumi <co...@istitutodeglinnocenti.it>.
Quoting Martin Marinschek <ma...@gmail.com>:
> Well,
>
> it looks as if your FacesServlet doesn't work any more - are you sure
> you keep the mapping of the faces servlet, and also have the right
> sequence of things in your web.xml?
>
Martin, here is my web.xml file......
<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">
<session-config>
<session-timeout>30</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
</welcome-file-list>
<!-- Extensions Filter -->
<filter>
<filter-name>extensionsFilter</filter-name>
<filter-class>org.apache.myfaces.component.html.util.ExtensionsFilter</filter-class>
<init-param>
<param-name>uploadMaxFileSize</param-name>
<param-value>100m</param-value>
<description>Set the size limit for uploaded files.
Format: 10 - 10 bytes
10k - 10 KB
10m - 10 MB
1g - 1 GB
</description>
</init-param>
<init-param>
<param-name>uploadThresholdSize</param-name>
<param-value>100k</param-value>
<description>Set the threshold size - files
below this limit are stored in memory, files above
this limit are stored on disk.
Format: 10 - 10 bytes
10k - 10 KB
10m - 10 MB
1g - 1 GB
</description>
</init-param>
<!-- <init-param>
<param-name>uploadRepositoryPath</param-name>
<param-value>/temp</param-value>
<description>Set the path where the intermediary files will
be stored.
</description>
</init-param>-->
</filter>
<filter-mapping>
<filter-name>extensionsFilter</filter-name>
<url-pattern>*.jsf</url-pattern>
</filter-mapping>
<!-- Faces Servlet -->
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup> 1 </load-on-startup>
</servlet>
<!-- Faces Servlet Mapping -->
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
</web-app>
--
Francesco Consumi
Ufficio Sistemi informativi
Istituto degli Innocenti
Piazza SS.Annunziata, 12
50122 Firenze
consumi at istitutodeglinnocenti.it
Tel. +39 055 2037320
ICQ# 12516133
Re: mf 1.1.0 and jscookmenu
Posted by Martin Marinschek <ma...@gmail.com>.
Well,
it looks as if your FacesServlet doesn't work any more - are you sure
you keep the mapping of the faces servlet, and also have the right
sequence of things in your web.xml?
regards,
Martin
On 9/28/05, Francesco Consumi <co...@istitutodeglinnocenti.it> wrote:
> Quoting Marco Barbi <m....@satanet.it>:
>
> >
> > I got problem using myfaces-all.jar (actually I can't remember if it
> > was the same error you are experiencing) so I replaced it with the
> > separate jars (available in the 1.1.0 binary distribution as well)
> > and the menu works.
> >
> > Since I did the same error, I also remember you that you have to
> > define antoher filter-mapping in order to intercept the jscookmenu
> > resources. I suggest you reading
> > http://www.mail-archive.com/users%40myfaces.apache.org/msg09082.html .
> >
>
>
> Hi, I think it isn't exactly my problem... I've replaced myfaces* with
> myfaces-all.jar in simple.war and it still works well. In my
> application the problem is in declaration of filter in web.xml. If the
> extensions filter is enabled, my application doesn't work, and I obtain
> the error
>
> >> GRAVE: Faces context not found. getResponseWriter will fail. Check
> >> if the FacesServlet has been initialized at all in your web.xml.
>
> If I don't include the declaration, the applications works as before,
> but the jscookmenu doesn't work.....
>
>
>
> --
> Francesco Consumi
> Ufficio Sistemi informativi
> Istituto degli Innocenti
> Piazza SS.Annunziata, 12
> 50122 Firenze
> consumi at istitutodeglinnocenti.it
> Tel. +39 055 2037320
> ICQ# 12516133
>
>
>
--
http://www.irian.at
Your JSF powerhouse -
JSF Trainings in English and German
Re: mf 1.1.0 and jscookmenu
Posted by Francesco Consumi <co...@istitutodeglinnocenti.it>.
Quoting Marco Barbi <m....@satanet.it>:
>
> I got problem using myfaces-all.jar (actually I can't remember if it
> was the same error you are experiencing) so I replaced it with the
> separate jars (available in the 1.1.0 binary distribution as well)
> and the menu works.
>
> Since I did the same error, I also remember you that you have to
> define antoher filter-mapping in order to intercept the jscookmenu
> resources. I suggest you reading
> http://www.mail-archive.com/users%40myfaces.apache.org/msg09082.html .
>
Hi, I think it isn't exactly my problem... I've replaced myfaces* with
myfaces-all.jar in simple.war and it still works well. In my
application the problem is in declaration of filter in web.xml. If the
extensions filter is enabled, my application doesn't work, and I obtain
the error
>> GRAVE: Faces context not found. getResponseWriter will fail. Check
>> if the FacesServlet has been initialized at all in your web.xml.
If I don't include the declaration, the applications works as before,
but the jscookmenu doesn't work.....
--
Francesco Consumi
Ufficio Sistemi informativi
Istituto degli Innocenti
Piazza SS.Annunziata, 12
50122 Firenze
consumi at istitutodeglinnocenti.it
Tel. +39 055 2037320
ICQ# 12516133
Re: mf 1.1.0 and jscookmenu
Posted by Marco Barbi <m....@satanet.it>.
Francesco Consumi wrote:
> Quoting Martin Marinschek <ma...@gmail.com>:
>
>> If it isn't this, try out the examples if they are working with your
>> version of MyFaces!
>>
>
> I'm still trying to use jscookmenu in my app without including js code.
>
> I've studied simple.war web.inf file, and I'm trying to use
> extensionsFilter in my app. But, if I include the following rows:
>
> <filter>
> <filter-name>extensionsFilter</filter-name>
>
> <filter-class>org.apache.myfaces.component.html.util.ExtensionsFilter</filter-class>
>
> .....snip.........
> </filter>
> <filter-mapping>
> <filter-name>extensionsFilter</filter-name>
> <url-pattern>*.jsf</url-pattern>
> </filter-mapping>
>
> I obtain this error:
>
> GRAVE: Faces context not found. getResponseWriter will fail. Check if
> the FacesServlet has been initialized at all in your web.xml.
>
> I'm trying with myfaces-20050926->myfaces-all.jar . The simple.war
> webapp works well.
>
> any suggestion ? thanks.
>
> --
> Francesco Consumi
>
>
>
Francesco,
I got problem using myfaces-all.jar (actually I can't remember if it was
the same error you are experiencing) so I replaced it with the separate
jars (available in the 1.1.0 binary distribution as well) and the menu
works.
Since I did the same error, I also remember you that you have to define
antoher filter-mapping in order to intercept the jscookmenu resources. I
suggest you reading
http://www.mail-archive.com/users%40myfaces.apache.org/msg09082.html .
Bye.
Marco
Re: mf 1.1.0 and jscookmenu
Posted by Francesco Consumi <co...@istitutodeglinnocenti.it>.
Quoting Martin Marinschek <ma...@gmail.com>:
> If it isn't this, try out the examples if they are working with your
> version of MyFaces!
>
I'm still trying to use jscookmenu in my app without including js code.
I've studied simple.war web.inf file, and I'm trying to use
extensionsFilter in my app. But, if I include the following rows:
<filter>
<filter-name>extensionsFilter</filter-name>
<filter-class>org.apache.myfaces.component.html.util.ExtensionsFilter</filter-class>
.....snip.........
</filter>
<filter-mapping>
<filter-name>extensionsFilter</filter-name>
<url-pattern>*.jsf</url-pattern>
</filter-mapping>
I obtain this error:
GRAVE: Faces context not found. getResponseWriter will fail. Check if
the FacesServlet has been initialized at all in your web.xml.
I'm trying with myfaces-20050926->myfaces-all.jar . The simple.war
webapp works well.
any suggestion ? thanks.
--
Francesco Consumi
Re: mf 1.1.0 and jscookmenu
Posted by Martin Marinschek <ma...@gmail.com>.
If it isn't this, try out the examples if they are working with your
version of MyFaces!
regards,
Martin
On 9/26/05, Simon Kitching <sk...@obsidium.com> wrote:
> Francesco Consumi wrote:
> > Hi,
> >
> > I'm upgrading all of my projects to 1.1.0, and I don't understand if in
> > new version is still necessary to include styles and js files for
> > JSCookMenu in my pages. Apparently, jscookmenu.jsp in examples/simple
> > doesn't include any <script language="JavaScript"
> > src="jscookmenu/JSCookMenu.js" type="text/javascript"></script>
> >
> > ...et cetera.
> > But, if I don't include these declaration in my pages, the menu doesn't
> > work.
> >
> > what's the solution of this mistery ?
>
> Have you declared the ExtensionsFilter in your web.xml file?
>
> See:
> http://www.mail-archive.com/users%40myfaces.apache.org/msg09082.html
>
> [And I can confirm the last paragraph of that email is true, ie the
> extensions filter must also be mapped to *.jsf].
>
> Regards,
>
> Simon
>
--
http://www.irian.at
Your JSF powerhouse -
JSF Trainings in English and German
Re: mf 1.1.0 and jscookmenu
Posted by Simon Kitching <sk...@obsidium.com>.
Francesco Consumi wrote:
> Hi,
>
> I'm upgrading all of my projects to 1.1.0, and I don't understand if in
> new version is still necessary to include styles and js files for
> JSCookMenu in my pages. Apparently, jscookmenu.jsp in examples/simple
> doesn't include any <script language="JavaScript"
> src="jscookmenu/JSCookMenu.js" type="text/javascript"></script>
>
> ...et cetera.
> But, if I don't include these declaration in my pages, the menu doesn't
> work.
>
> what's the solution of this mistery ?
Have you declared the ExtensionsFilter in your web.xml file?
See:
http://www.mail-archive.com/users%40myfaces.apache.org/msg09082.html
[And I can confirm the last paragraph of that email is true, ie the
extensions filter must also be mapped to *.jsf].
Regards,
Simon
Re: mf 1.1.0 and jscookmenu
Posted by Francesco Consumi <co...@istitutodeglinnocenti.it>.
Quoting Martin Marinschek <ma...@gmail.com>:
> With the nightly build,
>
> the problem should go away - the bug was fixed just shortly after 1.1.0 ;)
>
Thanks, Martin.
I've just tried with 050925 build (myfaces-all.jar of 1,99 megs), but
it still doesn't work if I dont' include any javascript code.
this is one of my pages:
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
<jsp:useBean class="primus.adminBean" id="ab" scope="session"/>
<h:panelGrid id="header_group1" columns="1" styleClass="pageHeader1">
<h:outputText value="#{initParam.titProg}"/>
</h:panelGrid>
<h:panelGrid id="header_group2" columns="1" styleClass="pageHeader2"
columnClasses="pageHeader2col1" >
<t:jscookMenu layout="hbr" theme="ThemeOffice" >
<t:navigationMenuItem id="nav_home" itemLabel="Home" action="go_home" >
<t:navigationMenuItem id="nav_home2" itemLabel="Home" action="go_home" />
<t:navigationMenuItem id="nav_logout" itemLabel="Uscita"
action="#{ab.currentUser.logout}" />
</t:navigationMenuItem>
<t:navigationMenuItem id="nav_ambiti" itemLabel="Ambiti" >
<t:navigationMenuItem id="nav_ambiti2" itemLabel="Ambiti"
action="#{ab.aggAmbiti2}" />
</t:navigationMenuItem>
<t:navigationMenuItem id="nav_regioni" itemLabel="Regioni" >
<t:navigationMenuItem id="nav_riferimenti"
itemLabel="Riferimenti" action="#{ab.aggRiferimenti}" />
</t:navigationMenuItem>
<t:navigationMenuItem id="nav_stat" itemLabel="Statistica"
action="go_el_utenti" >
<t:navigationMenuItem id="nav_stat_argomenti"
itemLabel="Argomenti" action="go_el_argomenti" />
<t:navigationMenuItem id="nav_stat_macroarg"
itemLabel="Macroargomenti" action="go_el_macroarg" />
<t:navigationMenuItem id="nav_stat_indicatori"
itemLabel="Indicatori" action="go_el_indicatori" />
</t:navigationMenuItem>
</t:jscookMenu>
</h:panelGrid>
--
Francesco Consumi
Ufficio Sistemi informativi
Istituto degli Innocenti
Piazza SS.Annunziata, 12
50122 Firenze
consumi at istitutodeglinnocenti.it
Tel. +39 055 2037320
ICQ# 12516133
Re: mf 1.1.0 and jscookmenu
Posted by Martin Marinschek <ma...@gmail.com>.
With the nightly build,
the problem should go away - the bug was fixed just shortly after 1.1.0 ;)
regards,
Martin
On 9/26/05, Francesco Consumi <co...@istitutodeglinnocenti.it> wrote:
> Hi,
>
> I'm upgrading all of my projects to 1.1.0, and I don't understand if in
> new version is still necessary to include styles and js files for
> JSCookMenu in my pages. Apparently, jscookmenu.jsp in examples/simple
> doesn't include any <script language="JavaScript"
> src="jscookmenu/JSCookMenu.js" type="text/javascript"></script>
>
> ...et cetera.
> But, if I don't include these declaration in my pages, the menu doesn't work.
>
> what's the solution of this mistery ?
>
> thanks, -- Francesco Consumi
> Ufficio Sistemi informativi
> Istituto degli Innocenti
> Piazza SS.Annunziata, 12
> 50122 Firenze
> consumi at istitutodeglinnocenti.it
> Tel. +39 055 2037320
> ICQ# 12516133
>
>
>
--
http://www.irian.at
Your JSF powerhouse -
JSF Trainings in English and German
mf 1.1.0 and jscookmenu
Posted by Francesco Consumi <co...@istitutodeglinnocenti.it>.
Hi,
I'm upgrading all of my projects to 1.1.0, and I don't understand if in
new version is still necessary to include styles and js files for
JSCookMenu in my pages. Apparently, jscookmenu.jsp in examples/simple
doesn't include any <script language="JavaScript"
src="jscookmenu/JSCookMenu.js" type="text/javascript"></script>
...et cetera.
But, if I don't include these declaration in my pages, the menu doesn't work.
what's the solution of this mistery ?
thanks, -- Francesco Consumi
Ufficio Sistemi informativi
Istituto degli Innocenti
Piazza SS.Annunziata, 12
50122 Firenze
consumi at istitutodeglinnocenti.it
Tel. +39 055 2037320
ICQ# 12516133