voyent
CommandButton requires containing form on Timezone sample app  XML
Forum Index -> General Help
Author Message
ryandawson

Joined: 04/Oct/2007 00:00:00
Messages: 13
Offline


I'm trying to get the timezone app running. I page renders far enough to display the time and this keeps refreshing. But I don't get a map or any controls. And in my console I get this exception on every refresh:

[28/11/07 17:52:49:826 GMT] 00000072 D2DFaceletVie E com.icesoft.faces.facelets.D2DFaceletViewHandler renderResponse Problem in renderResponse: Missing Form - the UIComponent of type [class javax.faces.component.html.HtmlCommandButton] requires a containing form.
java.lang.NullPointerException: Missing Form - the UIComponent of type [class javax.faces.component.html.HtmlCommandButton] requires a containing form.
at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.validateParameters(DomBasicRenderer.java:484)
at com.icesoft.faces.renderkit.dom_html_basic.ButtonRenderer.encodeBegin(ButtonRenderer.java:104)
at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java(Compiled Code))
at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(DomBasicRenderer.java:339)
at com.icesoft.faces.renderkit.dom_html_basic.GridRenderer.encodeChildren(GridRenderer.java:197)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:743)
at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:531)
at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:535)
at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:535)
at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:535)
at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:535)
at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:535)
at com.icesoft.faces.facelets.D2DFaceletViewHandler.renderResponse(D2DFaceletViewHandler.java:273)
at com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:149)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:239)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:118)
at com.icesoft.faces.webapp.xmlhttp.PersistentFacesState.render(PersistentFacesState.java:180)
at com.icesoft.faces.async.render.RunnableRender.run(RunnableRender.java:89)
at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:643)
at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:668)
at java.lang.Thread.run(Thread.java:568)


I'm using icefaces 1.5.1 and websphere application server 6.0.2.21.

 Filename timezone.war [Disk] Download
 Description
 Filesize 7568 Kbytes
 Downloaded:  192 time(s)

mark.collette


Joined: 07/Feb/2005 00:00:00
Messages: 1692
Offline


Wow, ICEfaces 1.5.1 :) Can you upgrade to ICEfaces 1.6.2? Or at least ICEfaces 1.5.3?

The timezone tutorial shouldn't be giving you those error messages. Are you deploying them as-is, or with modifications?
[Email]
ryandawson

Joined: 04/Oct/2007 00:00:00
Messages: 13
Offline


I took it from the sample directory. Timezone7. My project structure is attached.

The offending page is below:

<f:view xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ice="http://www.icesoft.com/icefaces/component"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:c="http://java.sun.com/jstl/core"
xmlns:fn="http://java.sun.com/jsp/jstl/functions">
<html>
<head><title>ICEfaces: TimeZone Sample Application</title></head>
<link rel="stylesheet" type="text/css" href="./timezone_style.css"/>
<body bgcolor="white">
<ui:include src="/header.xhtml">
<ui:param name="sectionName" value="header"/>
</ui:include>
<div id="timeZonePanel">

<ice:form partialSubmit="true">
<h:panelGrid columns="2" rowClasses="floatingDialogHeader, , " width="100%">
<h:outputText value="Server Time Zone"/>
<h:outputText value="Time Zone Selected from Map"/>
<h:outputText styleClass="formLabel" value="#{timeZoneBean.serverTimeZoneName}"/>
<h:outputText styleClass="formLabel" value="#{timeZoneBean.selectedTimeZoneName}"/>
<h:outputText value="#{timeZoneBean.serverTime}"/>
<h:outputText value="#{timeZoneBean.selectedTime}"/>
</h:panelGrid>
<h:panelGrid columns="#{fn:length(timeZoneBean.allTimeZoneList)}" width="100%" cellpadding="0" cellspacing="0">
<c:forEach var="allTimeZone" items="#{timeZoneBean.allTimeZoneList}">
<h:commandButton id="#{allTimeZone.mapCommandButtonId}" image="#{allTimeZone.imagePath}" actionListener="#{timeZoneBean.listen}" style="border: 0px;"/>
</c:forEach>
<c:forEach var="allTimeZone" items="#{timeZoneBean.allTimeZoneList}">
<ice:selectBooleanCheckbox id="#{allTimeZone.checkboxId}" required="false" immediate="true" value="#{allTimeZone.currentlyShowing}" valueChangeListener="#{timeZoneBean.timeZoneChanged}" autocomplete="off"/>
</c:forEach>
</h:panelGrid>
<h:dataTable id="timezoneDataTable" value="#{timeZoneBean.checkedTimeZoneList}" var="checkedTimeZone" headerClass="tableHeader" width="100%" columnClasses="checkedDisplayName,checkedLocation,checkedUseDaylightTime,checkedInDaylightTime,checkedTime">
<f:facet name="header"><h:outputText styleClass="tableHeaderTitle" value="Checked Time Zones"/></f:facet>
<h:column>
<f:facet name="header"><h:outputText value="Time Zone"/></f:facet>
<h:outputText value="#{checkedTimeZone.displayName}"/>
</h:column>
<h:column>
<f:facet name="header"><h:outputText value="Location"/></f:facet>
<h:outputText value="#{checkedTimeZone.location}"/>
</h:column>
<h:column>
<f:facet name="header"><h:outputText value="Uses DST"/></f:facet>
<h:outputText value="#{checkedTimeZone.useDaylightTime}"/>
</h:column>
<h:column>
<f:facet name="header"><h:outputText value="In DST"/></f:facet>
<h:outputText value="#{checkedTimeZone.inDaylightTime}"/>
</h:column>
<h:column>
<f:facet name="header"><h:outputText value="Time"/></f:facet>
<h:outputText styleClass="formLabel" value=" #{checkedTimeZone.time} "/>
</h:column>
</h:dataTable>
</ice:form>

</div>
</body>
</html>
</f:view>
[Thumb - timezone.GIF]
 Filename timezone.GIF [Disk] Download
 Description
 Filesize 10 Kbytes
 Downloaded:  262 time(s)

ryandawson

Joined: 04/Oct/2007 00:00:00
Messages: 13
Offline



I get the same thing in 1.5.3. I must be missing something here.

I would switch to 1.6 but I can't get the showcase to run with that version. I think that one is a WAS problem but I've no choice but to use WAS 6.0.2.21.
[Thumb - timezone153.GIF]
 Filename timezone153.GIF [Disk] Download
 Description
 Filesize 79 Kbytes
 Downloaded:  269 time(s)

ryandawson

Joined: 04/Oct/2007 00:00:00
Messages: 13
Offline



I should say that the identical project runs perfect in WAS 6.1.0.
ryandawson

Joined: 04/Oct/2007 00:00:00
Messages: 13
Offline



I've also noticed that if I change:

<h:commandButton id="#{allTimeZone.mapCommandButtonId}" image="#{allTimeZone.imagePath}" actionListener="#{timeZoneBean.listen}" style="border: 0px;"/>

To:

<ice:commandButton id="#{allTimeZone.mapCommandButtonId}" image="#{allTimeZone.imagePath}" actionListener="#{timeZoneBean.listen}" style="border: 0px;"/>


Then I get this error:

http://www.icefaces.org/JForum/posts/list/5792.page

However, joy_bond's solution doesn't work for me.
mark.collette


Joined: 07/Feb/2005 00:00:00
Messages: 1692
Offline


Sorry Ryan, we only support that far back for actual support customers. Plus, your problems seemed tied to your choice of development environment, not something wrong with the actual code, since I've tested timezone7 quite a bit for every 1.5.x release. I'd recommend trying out Eclipse with a current ICEfaces release.

If none of that is possible, then maybe post your problem to the Tools section of the forums, and one of the tools guys, who've had experience with that IDE can be more helpful.
[Email]
 
Forum Index -> General Help
Go to:   
Powered by JForum 2.1.7ice © JForum Team