I got a response from the ajax4jsf mailing list. Seems the problem has to do with th inputDate expecting
Head and Body. Got this from one list dweller:

I have this same problem… The tomahawk calendar (and other tomahawk date components) tries to find a <head> or <body> tag in the response being sent out. If you’re using ajax, there is no <head> or <body> tag  in the response, thus the component crashes and dumps all its _javascript_ in to the console.

I think what they should do, as a work around, is to assume that if the response doesn’t have a <head> or <body> tag, that the resources are already loaded and continue rendering the component as though they have the resources (because they probably do…)

And another came up with this solution:

You can use <a4j:page> component, and html/body tags will be present in any responses. Try such code :

<f:view>

<a4j:page pageTitle="Report Builder"

<h:form id="reportBuilderForm">

<a4j:commandButton reRender="startDate" value="ReRender" /> <h:panelGroup id="startDate" > <t:inputDate type="both" popupCalendar="true" /> </h:panelGroup> </h:form> </a4j:page> </f:view>

Is there a way to make the component a bit more ajax4jsf "friendly" in the future?
 
 


From: Anne-Julia [mailto:[EMAIL PROTECTED]
Sent: Friday, October 20, 2006 1:56 AM
To: MyFaces Discussion
Subject: Re: Problem with <t:inputDate> and ajax4jsf

I had a similar experience with the t:inputCalendar.
After including the snadbox-snapshot-1.5 the pop-up alway throws errors.
I wrote that yesterday, I think.

2006/10/19, Michael Margozzi < [EMAIL PROTECTED]>:

The Tomahawk inputDate component doesn't function properly with Ajax4jsf :-(

<%@ page language="java" pageEncoding="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"%>
<%@ taglib uri="https://ajax4jsf.dev.java.net/ajax" prefix="a4j"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
        <head>
                <title>Report Builder</title>
        </head>

        <body>
                <f:view>
                        <h:form id="reportBuilderForm">
                                        <a4j:commandButton reRender="startDate" value="ReRender"  />
                                        <t:inputDate id="startDate" type="both" popupCalendar="true" />
                        </h:form>
                </f:view>
        </body>
</html>

If you click on the "ReRender" button, the refreshed page is a button with "..." and it never finishes.

If you change "popupCalendar to "false" it works beautifully. I really want the pop up! What can I do?

Mike Margozzi


  • RE: Problem with <t:inputDate> and ajax4jsf Michael Margozzi

Reply via email to