voyent
Messages posted by: andreiij  XML
Profile for andreiij -> Messages posted by andreiij [29] Go to Page: 1, 2 Next 
Author Message
Thank you. That fixed the issue.

Did put
Code:
    <f:view contentType="text/html"> 

between my <body>-tags in the template,
where f is xmlns:f="http://java.sun.com/jsf/core"


/Andy
Thanks.
Yeah, Im on 2.0.1.

I read about the issue.
I tried it hastly, didnt work, but may have forgotten some files.

However... Do you mean that the starting tag needs the contentType attribute, or that the files actually need to start with a view-tag?

I have a structure with a

template.xhtml

and then files with ui:composition and ui:define, like
Code:
 <ui:composition template="/WEB-INF/templates/default.xhtml"
         xmlns:ui="http://java.sun.com/jsf/facelets" >
 
 	<ui:define name="sideNavigation">
 		<ui:include src="/WEB-INF/includes/sideNavigation.xhtml" />
     </ui:define>
 
 	<ui:define name="mainContent">
 	  <ui:include src="/secure/content.xhtml" />
 	</ui:define>
 
 </ui:composition>
 



The file /secure/content.xhtml starts with a div-element right away, should there be a view tag as root element perhaps?

Have a nice weekend,
Andy

Does your server side 'addJavascriptCall' work at all? Try with alert("!").

Do also try

ice.se(myEvent, theSubmittingElement);

/andy
any updates on this? All our menuBar stoped working in Chrome after refactoring facelets and now templates and ui:include.

Thanks,
Andy

Hi, im getting this when using commandLink and panelConfirmation. The actionListener does not get called.

2010-dec-30 19:42:41 org.apache.tomcat.util.http.Parameters processParameters
WARNING: Parameters: Invalid chunk ignored.



IceFaces 2, Tomcat 6, inside eclipse

Code:
j_idt11=j_idt11&javax.faces.ViewState=5025798264937381923%3A1246622949062736735&ice.window=ifgic04wlu&ice.view=vgid4f1&j_idt11%3Aj_idt16%3Aj_idt194%3Ahejhopp=untitled%20query&j_idt11%3Aj_idt11%3Atree_idta=&j_idt11%3Aj_idt11%3Atree_idtn=&icefacesCssUpdates=&nodeId=&j_idt11%3Aj_idcl=&javax.faces.source=j_idt11%3Atree%3An-0-0%3ArmTreeNodeConfirm-cancel&javax.faces.partial.event=click&javax.faces.partial.execute=%40all&javax.faces.partial.render=%40all&ice.window=ifgic04wlu&ice.view=vgid4f1&ice.focus=j_idt11%3Atree%3An-0-0%3ArmTreeNodeConfirm-cancel&=No&ice.event.target=j_idt11%3Atree%3An-0-0%3ArmTreeNodeConfirm-cancel&ice.event.captured=j_idt11%3Atree%3An-0-0%3ArmTreeNodeConfirm-cancel&ice.event.type=onclick&ice.event.alt=false&ice.event.ctrl=false&ice.event.shift=false&ice.event.meta=false&ice.event.x=1005&ice.event.y=425&ice.event.left=true&ice.event.right=false&ice.submit.type=ice.s&ice.submit.serialization=form&javax.faces.partial.ajax=true


at
icefaces-compat.js.jsf@9913

Code:
targetElement is null
 enableDisableTabindex(target="j_idt11:confi:qmod", enable=true)icefac....js.jsf (line 9913)
 restoreTabindex(target="j_idt11:confi:qmod")icefac....js.jsf (line 9949)
 stopRunning(target="j_idt11:tree:n-0-0:rmTreeNodeConfirm")icefac....js.jsf (line 9730)
 stop(target="j_idt11:tree:n-0-0:rmTreeNodeConfirm")icefac....js.jsf (line 9884)
 close()icefac....js.jsf (line 13589)
 accept()icefac....js.jsf (line 13578)
 onclick(event=click clientX=942, clientY=285)47 (line 2)
 [Break On This Error] focusables.a = targetElement.getElementsByTagName('a'); 


It happens occasinally. Is my session dirty somehow?
There are other threads regarding this problem. But no clear solution

I provide my relevant data in case anyone wants to take closer look at this.

Thanks,
Andreas
No one encountered this, mostly random, exception?
Can the icefaces team point me in any direction?

Thanks,
Andy
Bump/Found any solution to this?
substitue the onClick event to

Code:
 onfocus="if (!this.hasFocus)
     {Autocompleter.Finder.find(this.id).onKeyPress(40); }" 
 
put this on the selectinput element as well

rows="0"
This is what ive come up with so far. It still needs tweaking, but will show _all_ values in a scroll autocomplete and show suggestions when you click the component (which does not yet work in IE, looking into this now).

Like any comments on usability issues and feel free to post your tweaks to this.
Thanks,
Andy

Code:
 XHTML:
 
 <ice:selectInputText 
     options="{frequency:0.2}" 
     styleClass="vAttribAutoCompList"
     onclick="if (!this.firstChild.hasFocus) {Autocompleter.Finder.find(this.firstChild.id).getUpdatedChoices(false,Event.KEY_DOWN,-1);}return ;"
     width="100" 
     valueChangeListener="#{Bean.vcEvent}">
     actionListener="#{Bean.aEvent}"
      
 	<f:selectItems value="#{Bean.autocompleteList}" />
 </ice:selectInputText>
 
 
 
 
 CSS: 
 .iceSelInpTxtList {
     height:150px;
     overflow-x:hidden;
     overflow-y:auto;
     background-color: white;
 }
 
 
 JAVA:
 
 
 	public void vcEvent(ValueChangeEvent e) {
 
 
 		SelectInputText comp = (SelectInputText) e.getComponent();
 
 		//Perform search here
 
 		if (autoCompleteList.size() == 1) {
 			// only 1 result, select it auto, but only "if not backspace"
 			if (search.length() < oldSearch.length()) {
 				logger.debug("Removed character");
 				// no
 			} else {
 				logger.debug("Selecting only result. " + comp.getId());
 				comp.setValue(autoCompletedAttributesAsSelectItems.get(0)
 				        .getLabel());
 
 			}
 		}
 		//Set valid and invalid stylesheet, makes red background or similar
 
 		if (autoCompletedAttributesAsSelectItems.size() == 0) {
 
 			comp.setStyleClass("iAttribAutoComp");
 		} else {
 			comp.setStyleClass("vAttribAutoComp");
 		}
 
 
 }
 	public void actionEvent(ActionEvent e) {
 		
 		SelectInputText comp = (SelectInputText) e.getComponent();
 		SelectItem selectedItem = comp.getSelectedItem();
 
 		boolean noValid = true;
 
 		if (selectedItem == null) {
 			logger.debug("selectItem null");
 		} else {
 			if (selectedItem.getValue() == null) {
 				logger.debug("selectItems value null");
 			} else {
 				logger.debug("got valid attribute: "
 				        + selectedItem.getValue().getClass());
 				noValid = false;
 			}
 		}
 		if (noValid) {
 			comp.setStyleClass("iAttribAutoComp");
 			return;
 		} else {
 			comp.setStyleClass("vAttribAutoComp");
 		}
 		logger
 		        .debug("Selc itm "
 		                + comp.getSelectedItem().getValue().getClass());
 		logger.debug("Selc itm lbl" + comp.getSelectedItem().getLabel());
 	}
 
Ok, im looking into it.

Im looking at the javascript (in icefaces) to see if i can call a method on Autocompleter javascript object to show the suggestion list directly onFocus.

However, this does not solve the problem that a user can not browse all possible values in any way. Scrolling in the suggestion list would be nice!

I have already fixed that the component automatically selects a element if the search is unambiguous.

/andy
Have you found a solution?
All,
I have two context menus / menuPopup in my application. At random occasions i get this exception that the component cant be found. I get this exception randomly maybe 10% of the time when interreacting with random objects on the page.

I have manually set id's on components.
Has anyone else encountered this exception?
Any suggestions?

IceFaces 1.8.2 facelets
AS: Tomcat 6, GF 2, GF 3, WAS 6.1....

Thanks
/Andy

Code:
  
                           <ice:menuPopup 
                     styleClass="contextMenu" id="mngCtxMnu"
                     style="z-index:35000;position:absolute;top:0px;left:0px;"
                     displayListener="#{selectionController.ctxMnuDisplayListener}"
                     binding="#{.selectionController.menuPopup}"/>
 


Code:
<ice:panelGroup id="NCtxMnu" style="width:300px;overflow:hidden;" menuPopup=":::mngCtxMnu" contextValue="#{row}">


Code:
 2009-dec-16 17:24:11 com.sun.faces.lifecycle.Phase doPhase
 ALLVARLIG: JSF1054: (Phase ID: APPLY_REQUEST_VALUES 2, View ID: /Main.xhtml) Exception thrown during phase execution: javax.faces.event.PhaseEvent[source=com.sun.faces.lifecycle.LifecycleImpl@1214726]
 2009-dec-16 17:24:11 org.apache.catalina.core.StandardWrapperValve invoke
 ALLVARLIG: Servlet.service() for servlet Blocking Servlet threw exception
 java.lang.IllegalArgumentException: Could not find the MenuPopup UIComponent referenced by attribute menuPopup=":::mngCtxMnu" in UIComponent of type: com.icesoft.faces.component.ext.HtmlPanelGroup with id: "NCtxMnu"
 	at com.icesoft.faces.component.menupopup.MenuPopupHelper.findMenuPopup(MenuPopupHelper.java:111)
 	at com.icesoft.faces.component.menupopup.MenuPopupHelper.processDisplayListener(MenuPopupHelper.java:78)
 	at com.icesoft.faces.component.menupopup.MenuPopupHelper.decodeMenuContext(MenuPopupHelper.java:49)
 	at com.icesoft.faces.component.ext.renderkit.GroupRenderer.decode(GroupRenderer.java:264)
 	at javax.faces.component.UIComponentBase.decode(UIComponentBase.java:789)
 	at com.icesoft.faces.component.ext.HtmlPanelGroup.decode(HtmlPanelGroup.java:134)
 	at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1031)
 	at com.icesoft.faces.component.ext.HtmlDataTable.processKids(HtmlDataTable.java:338)
 	at com.icesoft.faces.component.ext.HtmlDataTable.iterate(HtmlDataTable.java:293)
 	at com.icesoft.faces.component.panelseries.UISeries.processDecodes(UISeries.java:315)
 	at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1026)
 	at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1026)
 	at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1026)
 	at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1026)
 	at javax.faces.component.UIForm.processDecodes(UIForm.java:208)
 	at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1026)
 	at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1026)
 	at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1026)
 	at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:540)
 	at com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:78)
 	at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
 	at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
 	at com.icesoft.faces.webapp.http.core.JsfLifecycleExecutor.apply(JsfLifecycleExecutor.java:18)
 	at com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.renderCycle(ReceiveSendUpdates.java:132)
 	at com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.service(ReceiveSendUpdates.java:74)
 	at com.icesoft.faces.webapp.http.core.RequestVerifier.service(RequestVerifier.java:31)
 	at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:24)
 	at com.icesoft.faces.webapp.http.servlet.BasicAdaptingServlet.service(BasicAdaptingServlet.java:16)
 	at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:23)
 	at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:53)
 	at com.icesoft.faces.webapp.http.servlet.SessionVerifier.service(SessionVerifier.java:26)
 	at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:23)
 	at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:131)
 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
 	at com.icesoft.faces.webapp.xmlhttp.BlockingServlet.service(BlockingServlet.java:56)
 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 	at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:359)
 	at org.springframework.security.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
 	at org.springframework.security.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
 	at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)
 	at org.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp(ExceptionTranslationFilter.java:101)
 	at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
 	at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)
 	at org.springframework.security.ui.logout.LogoutFilter.doFilterHttp(LogoutFilter.java:89)
 	at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
 	at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)
 	at org.springframework.security.ui.preauth.AbstractPreAuthenticatedProcessingFilter.doFilterHttp(AbstractPreAuthenticatedProcessingFilter.java:60)
 	at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
 	at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)
 	at org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:235)
 	at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
 	at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)
 	at org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:174)
 	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:236)
 	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
 	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
 	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
 	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
 	at java.lang.Thread.run(Unknown Source)
 
Its very infrequent in my eclipse/tomcat env.
Ill get back to this thread after doing acceptance testing in
glassfish/websphere etc.
Icefaces 1.8.1, Tomcat 6.20, Java 1.6.13

When enabling compressDOM i get the following exception as soon as a partial submit takes place.

Any ideas? FastInfoset is there.
Thanks

/Andy
Code:
 type Exception report
 
 message
 
 description The server encountered an internal error () that prevented it from fulfilling this request.
 
 exception
 
 javax.servlet.ServletException: java.io.IOException: org.w3c.dom.DOMException: NAMESPACE_ERR: An attempt is made to create or change an object in a way which is incorrect with regard to namespaces.
 	com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:179)
 	javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
 	com.icesoft.faces.webapp.xmlhttp.BlockingServlet.service(BlockingServlet.java:56)
 
 root cause
 
 java.io.IOException: org.w3c.dom.DOMException: NAMESPACE_ERR: An attempt is made to create or change an object in a way which is incorrect with regard to namespaces.
 	com.icesoft.faces.context.BridgeFacesContext$FastInfosetDocumentStore.load(BridgeFacesContext.java:878)
 	com.icesoft.faces.context.BridgeFacesContext.applyBrowserDOMChanges(BridgeFacesContext.java:439)
 	com.icesoft.faces.context.View.makeCurrent(View.java:249)
 	com.icesoft.faces.context.View.processPostback(View.java:132)
 	com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.service(ReceiveSendUpdates.java:67)
 	com.icesoft.faces.webapp.http.core.RequestVerifier.service(RequestVerifier.java:28)
 	com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:24)
 	com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet.service(MainSessionBoundServlet.java:160)
 	com.icesoft.faces.webapp.http.servlet.SessionDispatcher$1.service(SessionDispatcher.java:42)
 	com.icesoft.faces.webapp.http.servlet.ThreadBlockingAdaptingServlet.service(ThreadBlockingAdaptingServlet.java:19)
 	com.icesoft.faces.webapp.http.servlet.EnvironmentAdaptingServlet.service(EnvironmentAdaptingServlet.java:63)
 	com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:62)
 	com.icesoft.faces.webapp.http.servlet.SessionVerifier.service(SessionVerifier.java:22)
 	com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:23)
 	com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:153)
 	javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
 	com.icesoft.faces.webapp.xmlhttp.BlockingServlet.service(BlockingServlet.java:56)
 
 
 
Profile for andreiij -> Messages posted by andreiij [29] Go to Page: 1, 2 Next 
Go to:   
Powered by JForum 2.1.7ice © JForum Team