Details
Description
-
Hide
- debugxhtml.zip
- 16 kB
- Ted Goddard
-
- accordion.xhtml 0.9 kB
- audio.xhtml 0.9 kB
- button.xhtml 0.9 kB
- camcorder.xhtml 0.9 kB
- camera.xhtml 0.9 kB
- carousel.xhtml 0.9 kB
- contactlist.xhtml 0.9 kB
- contentstack.xhtml 0.9 kB
- dataview.xhtml 0.9 kB
- date.xhtml 0.9 kB
- fieldset.xhtml 0.9 kB
- flip-switch.xhtml 0.9 kB
- geolocation.xhtml 0.9 kB
- gmap.xhtml 0.9 kB
- image.xhtml 0.9 kB
- input.xhtml 0.9 kB
- list.xhtml 0.9 kB
- menubutton.xhtml 0.9 kB
- microphone.xhtml 0.9 kB
- notification.xhtml 0.9 kB
- panelconfirmation.xhtml 0.9 kB
- panelpopup.xhtml 0.9 kB
- qrcode.xhtml 0.9 kB
- reality.xhtml 0.9 kB
- submitnotification.xhtml 0.9 kB
- tabset.xhtml 0.9 kB
- theme.xhtml 0.9 kB
- video.xhtml 0.9 kB
Issue Links
- is duplicated by
-
MOBI-696 Support for running with MyFaces
- Closed
Activity
- All
- Comments
- History
- Activity
- Remote Attachments
- Subversion
MyFaces is sensitive to duplicate IDs, such as in WEB-INF/includes/view/small.xhtml and WEB-INF/includes/content/content-stack.xhtml ("menu"). These must be fixed in the demo.
Some resource paths containing "/" are not functional under MyFaces.
The augmented reality demo then was functional with no JavaScript conflict. It is possible that MyFaces maintains the same internal context object as mojarra. The multipart file upload from the chrome browser was also functional.
MyFaces also seems to have an issue with auto-generated ids:
java.lang.IllegalStateException: component with duplicate id "j_id_31" found
at org.apache.myfaces.view.facelets.compiler.CheckDuplicateIdFaceletUtils.checkIds(CheckDuplicateIdFaceletUtils.java:100)
at org.apache.myfaces.view.facelets.compiler.CheckDuplicateIdFaceletUtils.checkIds(CheckDuplicateIdFaceletUtils.java:116)
at org.apache.myfaces.view.facelets.compiler.CheckDuplicateIdFaceletUtils.checkIds(CheckDuplicateIdFaceletUtils.java:116)
at org.apache.myfaces.view.facelets.compiler.CheckDuplicateIdFaceletUtils.checkIds(CheckDuplicateIdFaceletUtils.java:82)
at org.apache.myfaces.view.facelets.DefaultFaceletsStateManagementStrategy.saveView(DefaultFaceletsStateManagementStrategy.java:536)
at org.apache.myfaces.application.StateManagerImpl.saveView(StateManagerImpl.java:188)
at javax.faces.application.StateManager.getViewState(StateManager.java:253)
at org.icefaces.impl.context.DOMPartialViewContext.renderState(DOMPartialViewContext.java:619)
at org.icefaces.impl.context.DOMPartialViewContext.processPartial(DOMPartialViewContext.java:247)
at javax.faces.component.UIViewRoot.encodeChildren(UIViewRoot.java:408)
at javax.faces.component.UIComponentBase.encodeAll(UIComponentBase.java:532)
at org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage.renderView(FaceletViewDeclarationLanguage.java:1981)
at org.apache.myfaces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:285)
at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:116)
at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:241)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:199)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:999)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1812)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
2-May-2013 1:46:10 PM org.icefaces.impl.application.ExtendedExceptionHandler handle
There appear to be differences in how managed bean injection functions under MyFaces. The following change allows a photo upload in Mediacast to succeed:
@ManagedBean(name = MediaController.BEAN_NAME)
-@ViewScoped
+@SessionScoped
public class MediaController implements Serializable {
After that, a duplicate ID occurrs:
java.lang.IllegalStateException: component with duplicate id "frm:j_id_2l_1" found
at org.apache.myfaces.view.facelets.compiler.CheckDuplicateIdFaceletUtils.checkIds(CheckDuplicateIdFaceletUtils.java:100)
at org.apache.myfaces.view.facelets.compiler.CheckDuplicateIdFaceletUtils.checkIds(CheckDuplicateIdFaceletUtils.java:116)
Duplicate IDs occur with the navigation controls in mobileshowcase (perhaps due to MyFaces interaction with ContentStack) so further testing has been done with pages split out. They were created as follows:
#!/bin/zsh
#working directory icemobile/samples/mobileshowcase/src/main/webapp
for fyle in WEB-INF/includes/examples//-example.xhtml
do
prefix=$
; name=$
{prefix##*/}echo $fyle $
{name}.xhtmlcat pre.txt >${name}
.xhtml
echo '<ui:include src="'$
'">' >>$
{name}.xhtmlcat post.txt >>${name}
.xhtml
done
pre.txt:
<!DOCTYPE html >
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:util="http://java.sun.com/jsf/composite/components"
xmlns:mobi="http://www.icesoft.com/icefaces/mobile/component"
xmlns:icecore="http://www.icefaces.org/icefaces/core"
xmlns:c="http://java.sun.com/jsp/jstl/core">
<h:head>
<title>ICEfaces Mobile Showcase</title>
<mobi:deviceResource theme="#
"/>
<h:outputStylesheet library="css" name="showcase.css" media="screen"/>
</h:head>
<h:body>
<style type="text/css" id="themebuilder"></style>
post.txt:
<ui:param name="viewSize" value="large" />
</ui:include>
</h:body>
</html>
WEB-INF/includes/examples/device/camcorder-example.xhtml camcorder.xhtml
WEB-INF/includes/examples/device/camera-example.xhtml camera.xhtml
WEB-INF/includes/examples/device/contactlist-example.xhtml contactlist.xhtml
WEB-INF/includes/examples/device/microphone-example.xhtml microphone.xhtml
WEB-INF/includes/examples/device/notification-example.xhtml notification.xhtml
WEB-INF/includes/examples/device/qrcode-example.xhtml qrcode.xhtml
WEB-INF/includes/examples/device/reality-example.xhtml reality.xhtml
WEB-INF/includes/examples/input/button-example.xhtml button.xhtml
WEB-INF/includes/examples/input/date-example.xhtml date.xhtml
WEB-INF/includes/examples/input/flip-switch-example.xhtml flip-switch.xhtml
WEB-INF/includes/examples/input/geolocation-example.xhtml geolocation.xhtml
WEB-INF/includes/examples/input/gmap-example.xhtml gmap.xhtml
WEB-INF/includes/examples/input/input-example.xhtml input.xhtml
WEB-INF/includes/examples/input/menubutton-example.xhtml menubutton.xhtml
WEB-INF/includes/examples/input/submitnotification-example.xhtml submitnotification.xhtml
WEB-INF/includes/examples/layout/accordion-example.xhtml accordion.xhtml
WEB-INF/includes/examples/layout/carousel-example.xhtml carousel.xhtml
WEB-INF/includes/examples/layout/contentstack-example.xhtml contentstack.xhtml
WEB-INF/includes/examples/layout/dataview-example.xhtml dataview.xhtml
WEB-INF/includes/examples/layout/fieldset-example.xhtml fieldset.xhtml
WEB-INF/includes/examples/layout/list-example.xhtml list.xhtml
WEB-INF/includes/examples/layout/panelconfirmation-example.xhtml panelconfirmation.xhtml
WEB-INF/includes/examples/layout/panelpopup-example.xhtml panelpopup.xhtml
WEB-INF/includes/examples/layout/tabset-example.xhtml tabset.xhtml
WEB-INF/includes/examples/layout/theme-example.xhtml theme.xhtml
WEB-INF/includes/examples/media/audio-example.xhtml audio.xhtml
WEB-INF/includes/examples/media/image-example.xhtml image.xhtml
WEB-INF/includes/examples/media/video-example.xhtml video.xhtml
camcorder.xhtml
- works
camera.xhtml
- works
contactlist.xhtml
- works
microphone.xhtml
- works
notification.xhtml
- works (cloud push not tested)
qrcode.xhtml
- works
reality.xhtml
- works, however images with images/auction in library name were not loaded
button.xhtml
- works
date.xhtml
- works
flip-switch.xhtml
- works, but renders extra copies of flipswitch at page bottom
geolocation.xhtml
- works
gmap.xhtml
- map not displayed; however test page lacked reference to google javascript
input.xhtml
- works
menubutton.xhtml
- works
submitnotification.xhtml
- blocking dialog did not disappear
accordion.xhtml
- works
carousel.xhtml
- works (page updated blinked)
contentstack.xhtml
- neither the buttons nor the selectone updates the page correctly
- reloading the page shows the expected state
- this is likely the root cause of the main demo issues
dataview.xhtml
- works (row selection does not remain visible)
fieldset.xhtml
- works
list.xhtml
- works
panelconfirmation.xhtml
- works
panelpopup.xhtml
- works
tabset.xhtml
- works
audio.xhtml
- works
image.xhtml
- works
video.xhtml
- works
Removing facelet="true" from contentStack appears to resolve the component duplication issue.
The following was mistakenly checked in under MOBI-718:
if (window.addEventListener) { window.addEventListener("load", function () { - jsf.getViewState = html5getViewState; if ((undefined !== window.FormData) && (undefined === window.ice.mobile) && ((undefined === window.clientInformation) ||
Both mojarra and MyFaces now contain serialization code that supports generic input elements. This means that we no longer need to alter jsf.getViewState with html5getViewState.
The following parameters may resolve the facelet issues with contentStack.
<context-param>
<param-name>org.apache.myfaces.REFRESH_TRANSIENT_BUILD_ON_PSS</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>org.apache.myfaces.REFRESH_TRANSIENT_BUILD_ON_PSS_PRESERVE_STATE</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>org.apache.myfaces.SERIALIZE_STATE_IN_SESSION</param-name>
<param-value>false</param-value>
</context-param>
Direct links to individual component demos.
ICEmobile requires update to trunk version of ICEfaces. This resolves Exception on startup java.lang.NoSuchMethodError: org.icefaces.util.EnvUtils.getWarnBeforeExpiryInterval(Ljavax/faces/context/FacesContext;)J