You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "gogan (JIRA)" <de...@myfaces.apache.org> on 2006/11/29 17:36:23 UTC

[jira] Commented: (TOMAHAWK-428) inputCalendar not working with facelets when renderAsPopup="true"

    [ http://issues.apache.org/jira/browse/TOMAHAWK-428?page=comments#action_12454363 ] 
            
gogan commented on TOMAHAWK-428:
--------------------------------

We had the same problem. The Fix is very simple. If the value might be null you must definite a help text. In the old version this was not necessary so is it nice to know :-)

<t:inputCalendar id="id"
    value="{a.value}" 
    styleClass="calender"
    renderAsPopup="true"
    helpText="iamimportant ">
</t:inputCalendar>

> inputCalendar not working with facelets when renderAsPopup="true"
> -----------------------------------------------------------------
>
>                 Key: TOMAHAWK-428
>                 URL: http://issues.apache.org/jira/browse/TOMAHAWK-428
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Calendar
>    Affects Versions: 1.1.3-SNAPSHOT
>         Environment: JSF Sun RI, Tomahawk 1.1.3-snapshot, facelets-1.0.16.jar, Tomcat 5.5, JDK 1.5
>            Reporter: Vofeka
>         Attachments: tomahawk.taglib.xml
>
>
> Getting an exception when trying to render an inputCalendar component with facelets (facelets is installed correctly and works fine on other pages). 
> Here is the calendar.jsp page using facelets and the calendar:
> <code>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
>     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml" 
> 	xmlns:ui="http://java.sun.com/jsf/facelets" 
> 	xmlns:h="http://java.sun.com/jsf/html" 
> 	xmlns:f="http://java.sun.com/jsf/core" 
> 	xmlns:t="http://myfaces.apache.org/tomahawk" >
> 	
> <ui:composition >
> 	<ui:define name="content">
> 		<h:form>
>             <t:inputCalendar renderAsPopup="true"> </t:inputCalendar>  
> 		</h:form>
> 	</ui:define>
> </ui:composition>
> </html>
> </code>
> I get the following exception:
> <code>
> SEVERE: Error Rendering View[/web/facelets/calendar.jsp]
> java.lang.NullPointerException: Erreur dans les arguments: Un ou plusieurs paramétres peuvent ''tre nuls.
> 	at com.sun.faces.renderkit.html_basic.HtmlResponseWriter.writeAttribute(HtmlResponseWriter.java:240)
> 	at org.apache.myfaces.custom.inputTextHelp.HtmlTextHelpRenderer.renderInputTextHelp(HtmlTextHelpRenderer.java:93)
> 	at org.apache.myfaces.custom.inputTextHelp.HtmlTextHelpRenderer.renderNormal(HtmlTextHelpRenderer.java:48)
> 	at org.apache.myfaces.renderkit.html.ext.HtmlTextRenderer.encodeEnd(HtmlTextRenderer.java:80)
> 	at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:720)
> 	at org.apache.myfaces.shared_tomahawk.renderkit.RendererUtils.renderChild(RendererUtils.java:442)
> 	at org.apache.myfaces.custom.calendar.HtmlCalendarRenderer.encodeEnd(HtmlCalendarRenderer.java:160)
> 	at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:720)
> 	at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:242)
> 	at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:239)
> 	at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:239)
> 	at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:577)
> 	at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
> 	at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
> 	at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
> 	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> 	at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> </code>
> If i change the *renderAsPopup to false* then the calendar is rendered properly.... but I need to get the popup version :-(
> Any help would be greatly appreciated. Thanks

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

Re: [jira] Commented: (TOMAHAWK-428) inputCalendar not working with facelets when renderAsPopup="true"

Posted by dileep <ye...@gmail.com>.
Hi I have a problem using tomahawk calendar in my myfaces application
deployed in Tomcat server.
When I do not configure  the extensions filter I am able to see the calendar
and obviously it does  not update my bean with the value chosen using
calendar.
But when I configure the extension filter i am not able to access the
application it says resource not found.

I guess this issue is because of conflict in the context path after
configuring the extensions filter.

Here is my web.xml content:

<?xml version="1.0"?>
<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">
 <display-name>Click Portal</display-name>
 <context-param>
  <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
  <param-value>client</param-value>
 </context-param>
 <context-param>
  <param-name>javax.faces.application.CONFIG_FILES</param-name>
  <param-value>/WEB-INF/faces-config.xml</param-value>
 </context-param>
 <filter>
  <filter-name>MyFacesExtensionsFilter</filter-name>
 
<filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
  <init-param>
   <param-name>maxFileSize</param-name>
   <param-value>20m</param-value>
  </init-param>
 </filter>
 <!-- extension mapping for adding <script/>, <link/>, and other resource
tags to JSF-pages  -->
 <filter-mapping>
  <filter-name>MyFacesExtensionsFilter</filter-name>
  <!-- servlet-name must match the name of your
javax.faces.webapp.FacesServlet entry -->
  <url-pattern>*.jsf</url-pattern>
 </filter-mapping>
 <!-- extension mapping for serving page-independent resources (javascript,
stylesheets, images, etc.)  -->
 <filter-mapping>
  <filter-name>MyFacesExtensionsFilter</filter-name>
  <url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
 </filter-mapping>
 <!-- Listener, that does all the startup work (configuration, init). -->
 <listener>
 
<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
 </listener>
 <!-- Faces Servlet -->
 <servlet>
  <servlet-name>FacesServlet</servlet-name>
  <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
  <load-on-startup>0</load-on-startup>
 </servlet>
 <servlet-mapping>
  <servlet-name>FacesServlet</servlet-name>
  <url-pattern>*.jsf</url-pattern>
 </servlet-mapping>
 <login-config>
  <auth-method>BASIC</auth-method>
 </login-config>
</web-app>

Please someone let me know what the problem could be.Thanks!


-- 
View this message in context: http://www.nabble.com/-jira--Created%3A-%28TOMAHAWK-428%29-inputCalendar-not-working-with-facelets-when-renderAsPopup%3D%22true%22-tf1590390.html#a7607400
Sent from the My Faces - Dev mailing list archive at Nabble.com.