[Logo] Enterprise Client Community
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Messages posted by: unger  XML
Profile for unger -> Messages posted by unger [261] Go to Page: Previous  1, 2, 3 ... 15 , 16, 17, 18 Next 
Author Message
Hi Björn,

the x coordinate is a position inside org.eclnt.jsfserver.elements.impl.PAINTAREAComponent, not a row.

Joachim
Hi Björn,

please have a look at this:

Code:
 ...
 <t:row id="g_7" >
 <t:pane id="g_8" componentbinding="#{d.AnalyticClientMBean.parameterPANEComponent}" height="200" rowdistance="5" width="200" />
 </t:row>
 ...
 


And this is, what I put unter the pane (console output):

Code:
 org.eclnt.jsfserver.elements.impl.ROWComponent
   org.eclnt.jsfserver.elements.impl.TABBEDPANEComponent
   _rendered:
     true
   enabled:
     true
   height:
     400
   width:
     400
     org.eclnt.jsfserver.elements.impl.TABBEDPANETABComponent
     enabled:
       true
     text:
      Tab
       org.eclnt.jsfserver.elements.impl.ROWComponent
         org.eclnt.jsfserver.elements.impl.PAINTAREAComponent
         _rendered:
           true
         height:
           200
         width:
           400
         org.eclnt.jsfserver.elements.impl.LABELComponent
         text:
           Label
         y:
           0
         x:
           0
         width:
           100
         org.eclnt.jsfserver.elements.impl.FIELDComponent
         flush:
           true
         y:
           0
         x:
           100
         width:
           100%
         background:
           #FFFFFF
 


Any hints?

Joachim
Hi,

I mean LABELComponentTag, FIELDComponentTag, ...

For PANEComponentTag 100% works, but HEXIMAGEComponentTag doesn't.

Joachim
Hello,

where can I use % for the attributes width and height in ComponentTags?
Has anybody experience?

Joachim Unger
Hi Björn,

I did so. I used false as actual parameter. But the items were called back!

Joachim
Hi,
I have a code peace that recalculates a grid:

Code:
	
 public void onRowSelect() {
 			selectedQuery = this;
 			// listOfInteractiveComponents.deselectCurrentSelection();
 			AnalyticQuery analyticQuery = selectedQuery.getAnalyticQuery();
 			if (analyticQuery != null) {
 				ArrayList<String> dependencies = analyticQuery.getDependencyList();
 				if (dependencies != null) {
 					ArrayList<ComponentItem> list = (ArrayList<ComponentItem>) listOfInteractiveComponents.getItems();
 					for (ComponentItem component : list) {
 						if (dependencies.contains(component.getComponentId())) {
 							// component.setSelected(true);
 							listOfInteractiveComponents.selectItem(component, false);
 						} else {
 							// component.setSelected(false);
 							listOfInteractiveComponents.deselectItemWCB(component, false);
 						}
 					}
 				}
 			}
 		}
 
 

I use
Code:
 listOfInteractiveComponents.selectItem(component, false);
 listOfInteractiveComponents.deselectItemWCB(component, false);
 

as I don't want to receive any callbacks to onRowSelect/onRowDeselect of the grid's item.

As shown here I cannot stop it:
Code:
 Daemon Thread [http-50000-3] (Suspended (breakpoint at line 1348 in AnalyticTemplateMBean$ComponentItem))	
 	AnalyticTemplateMBean$ComponentItem.onRowDeselect() line: 1348	
 	AnalyticTemplateMBean$ComponentItemList(FIXGRIDBinding<itemClass>).deselectItemWCB(IFIXGRIDItem, boolean) line: 1735	
 	AnalyticTemplateMBean$UIQueryItem.onRowSelect() line: 1278	
 	FIXGRIDListBinding<ItemClass>(FIXGRIDBinding<itemClass>).selectItemWCB(IFIXGRIDItem, boolean) line: 1680	
 	FIXGRIDListBinding<ItemClass>(FIXGRIDBinding<itemClass>).selectItem(IFIXGRIDItem) line: 1672	
 	FIXGRIDListBinding<ItemClass>(FIXGRIDBinding<itemClass>).updateItemSelection(IFIXGRIDItem) line: 1646	
 	FIXGRIDListBinding<ItemClass>(FIXGRIDBinding<itemClass>).onGridActionExecute(ActionEvent) line: 1426	
 	FIXGRIDListBinding<ItemClass>(FIXGRIDBinding<itemClass>).onGridAction(ActionEvent) line: 1378	
 	NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]	
 	NativeMethodAccessorImpl.invoke(Object, Object[]) line: not available	
 	DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: not available	
 	Method.invoke(Object, Object...) line: not available	
 	StackedMethodExpression.invoke(ELContext, Object[]) line: 68	
 	MethodExpressionDelegator.invoke(ELContext, Object[]) line: 108	
 	MethodExpressionDelegator.processAction(ActionEvent) line: 196	
 	FIXGRIDComponent(BaseActionComponent).broadcast(FacesEvent) line: 259	
 	UIViewRoot.broadcastEvents(FacesContext, PhaseId) line: 475	
 	UIViewRoot.processUpdates(FacesContext) line: 729	
 	UpdateModelValuesPhase.execute(FacesContext) line: 78	
 	UpdateModelValuesPhase(Phase).doPhase(FacesContext, Lifecycle, ListIterator<PhaseListener>) line: 100	
 	LifecycleImpl.execute(FacesContext) line: 118	
 	FacesServlet.service(ServletRequest, ServletResponse) line: 265	
 	ApplicationFilterChain.internalDoFilter(ServletRequest, ServletResponse) line: 290	
 	ApplicationFilterChain.doFilter(ServletRequest, ServletResponse) line: 206	
 	LoginFilter.doFilter(ServletRequest, ServletResponse, FilterChain) line: 46	
 	ApplicationFilterChain.internalDoFilter(ServletRequest, ServletResponse) line: 235	
 	ApplicationFilterChain.doFilter(ServletRequest, ServletResponse) line: 206	
 	ThreadingFilter.doFilter(ServletRequest, ServletResponse, FilterChain) line: 226	
 	ApplicationFilterChain.internalDoFilter(ServletRequest, ServletResponse) line: 235	
 	ApplicationFilterChain.doFilter(ServletRequest, ServletResponse) line: 206	
 	CompressionFilter.doFilter(ServletRequest, ServletResponse, FilterChain) line: 33	
 	ApplicationFilterChain.internalDoFilter(ServletRequest, ServletResponse) line: 235	
 	ApplicationFilterChain.doFilter(ServletRequest, ServletResponse) line: 206	
 	StandardWrapperValve.invoke(Request, Response) line: 233	
 	StandardContextValve.invoke(Request, Response) line: 191	
 	StandardHostValve.invoke(Request, Response) line: 128	
 	ErrorReportValve.invoke(Request, Response) line: 102	
 	StandardEngineValve.invoke(Request, Response) line: 109	
 	CoyoteAdapter.service(Request, Response) line: 286	
 	Http11Processor.process(Socket) line: 845	
 	Http11Protocol$Http11ConnectionHandler.process(Socket) line: 583	
 	JIoEndpoint$Worker.run() line: 447	
 	Thread.run() line: not available	
 


Shall I use component.setSelected(false); which is not recommend by the API?

Regards,

Joachim
The problem is solved. Resolution for everybody who will find one day a similar problem:

Don't change the ARRAYGRIDListBinding instance. It must be a fix 1:1 dependency between Java instance and EC-Objectbinding attribute.

Regards,

Joachim
Hello Björn,

1st:
Thank You!

2nd:
I built the failure that selectedQuery might be null.
But why the program didn't crash, when selectedQuery is surely null?

Joachim
I found, that it works when
Code:
 rendered=#{d.AnalyticTemplateMBean.selectedQuery != null}
 

is set.

So the program should crash, when it starts. Then selectedQuery is null. But the grid leaves empty. When I select a Query-Item the program crashes. But then selectedQuery is not null.

Conclusion: It's not a EC topic.

Regards,

Joachim
Hello community-members,

I have a problem using ARRAYGRID:

My Page:
Code:
 ...
 <t:arraygrid id="g_411" height="100" objectbinding="#{d.AnalyticTemplateMBean.grid}" sbvisibleamount="50" selectorcolumn="1" suppressheadline="true" usefieldforlabel="false" width="200" />
 ...
 


My managed Bean:
Code:
 public class ComponentItem extends ARRAYGRIDItem {
 		@Override
 		public void onRowDeselect() {
 			super.onRowDeselect();
 		}
 		@Override
 		public void onRowExecute() {
 			super.onRowExecute();
 		}
 	}
 
 	protected ARRAYGRIDListBinding<ComponentItem> grid = null;
 
 	public ARRAYGRIDListBinding<ComponentItem> getGrid() {
 		if (grid != null)
 			return grid;
 		grid = new ARRAYGRIDListBinding<ComponentItem>();
 		String[] titles = new String[] { "" };
 		String[] widths = new String[] { "100%" };
 		grid.setTitles(titles);
 		grid.setWidths(widths);
 
 		List<UIComponent> list = tree.getItemList();
 		for (UIComponent component : list) {
 			ComponentItem componentItem = new ComponentItem();
 			String[] columns = new String[] { component.getText() };
 			componentItem.setValues(columns);
 			grid.getItems().add(componentItem);
 		}
 		return grid;
 	}
 


All works very well, when the class definition isn't inside a FIXGRIDItem!
Now I put the class inside a subclass of FIXGRIDItem, because I need access to AnalyticQuery analyticQuery:

Code:
 public class UIQueryItem extends FIXGRIDItem {
   private AnalyticQuery analyticQuery = null;
 	public UIQueryItem(AnalyticQuery pAnalyticQuery) {
 			analyticQuery = pAnalyticQuery;
 		}
 
 		public void onToggle() {
 		}
 
 		public void onRowExecute() {
 		}
 
 		public void onRowSelect() {
 			selectedQuery = this;
 		}
 
 		public AnalyticQuery getAnalyticQuery() {
 			return analyticQuery;
 		}
 
 		public void setAnalyticQuery(AnalyticQuery analyticQuery) {
 			this.analyticQuery = analyticQuery;
 		}
 
 		public class ComponentItem extends ARRAYGRIDItem {
 			@Override
 			public void onRowDeselect() {
 				super.onRowDeselect();
 			}
 
 			@Override
 			public void onRowExecute() {
 				super.onRowExecute();
 			}
 		}
 
 		protected ARRAYGRIDListBinding<ComponentItem> grid = null;
 
 		public ARRAYGRIDListBinding<ComponentItem> getGrid() {
 			if (grid != null)
 				return grid;
 			grid = new ARRAYGRIDListBinding<ComponentItem>();
 			String[] titles = new String[] { "" };
 			String[] widths = new String[] { "100%" };
 			grid.setTitles(titles);
 			grid.setWidths(widths);
 
 			List<UIComponent> list = tree.getItemList();
 			for (UIComponent component : list) {
 				ComponentItem componentItem = new ComponentItem();
 				String[] columns = new String[] { component.getText() };
 				componentItem.setValues(columns);
 				grid.getItems().add(componentItem);
 			}
 			return grid;
 		}
 	}
 


Nothing changed but the JSP binding:

Code:
 <t:arraygrid id="g_411" height="100" objectbinding="#{d.AnalyticTemplateMBean.selectedQuery.grid}" sbvisibleamount="50" selectorcolumn="1" suppressheadline="true" usefieldforlabel="false" width="200" />
 


Here the binding is made to:
Code:
 private UIQueryItem selectedQuery = null;
 


When the user select a GUI item, of course selectedQuery is not null.

Code:
javax.servlet.ServletException: Index: 0, Size: 0
 	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:277)
 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 	at com.schott.indit.passntAdmin.utils.LoginFilter.doFilter(LoginFilter.java:46)
 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 	at org.eclnt.jsfserver.util.ThreadingFilter.doFilter(ThreadingFilter.java:226)
 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 	at org.eclnt.jsfserver.util.CompressionFilter.doFilter(CompressionFilter.java:33)
 	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.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:286)
 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
 	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
 	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
 	at java.lang.Thread.run(Unknown Source)
 Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
 	at java.util.ArrayList.RangeCheck(Unknown Source)
 	at java.util.ArrayList.get(Unknown Source)
 	at org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.checkIfColumnIsRendered(FIXGRIDComponent.java:1904)
 	at org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.encodeChildren(FIXGRIDComponent.java:815)
 	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:930)
 	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933)
 	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933)
 	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933)
 	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933)
 	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933)
 	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933)
 	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933)
 	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933)
 	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933)
 	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933)
 	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933)
 	at javax.faces.render.Renderer.encodeChildren(Renderer.java:148)
 	at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:837)
 	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:930)
 	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933)
 	at com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:266)
 	at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:197)
 	at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:110)
 	at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
 	at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
 	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
 	... 21 more
 


Any clue?

Regards,

Joachim
Hello Björn,

thank You.

Would be a nice feature (attribute). How did You like the link (the HTML behaviour)?


Regards,

Joachim




Hi,

is it possible to move the focus (the frame) between rows without destroying the current selection - and then select the focused row with the keyboard? May result in an additionally selected row in a "multiselect=true" scenario.

Compare HTML behaviour: http://de.selfhtml.org/html/formulare/anzeige/select_multiple.htm

Regards,
Joachim
Here is a demo. Change the field's value, then press the button.

Code:
 package managedbeans;
 
 import java.util.HashMap;
 
 import javax.faces.event.ActionEvent;
 
 public class Page3Bean {
 	private HashMap<String, HasAValue> fieldWithValueMap = new HashMap<String, HasAValue> ();
 	private FieldWithValue fieldWithValue = new FieldWithValue ();
 	{
 		fieldWithValueMap.put ("S", fieldWithValue);
 	}
 	private String field = "Outer Field";
 
 	public Page3Bean () {
 	}
 
 	public Page3Bean (Dispatcher dispatcher) {
 	}
 
 	public static abstract class HasAValue {
 		// private Object value;
 		//		public void setValue (Object value) {
 		//        	this.value = value;
 		//        }
 		//		public Object getValue () {
 		//			return value;
 		//		}
 
 		public abstract Object getValue ();
 	}
 
 	public static class FieldWithValue extends HasAValue {
 		private String value = "Inner Field";
 
 		public void setValue (String value) {
 			this.value = value;
 		}
 
 		public String getValue () {
 			return value;
 		}
 	}
 
 	public void onHello (ActionEvent ae) {
 	}
 
 	public String getField () {
 		return field;
 	}
 
 	public void setCcValueMap (HashMap<String, HasAValue> ccValueMap) {
 		this.fieldWithValueMap = ccValueMap;
 	}
 
 	public HashMap<String, HasAValue> getCcValueMap () {
 		return fieldWithValueMap;
 	}
 }
 


JSP:


Code:
 <%@page contentType="text/html"%>
 <%@page pageEncoding="UTF-8"%>
 
 <%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
 <%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
 
 <%@taglib prefix="t" uri="/WEB-INF/eclnt"%>
 
 
 <!-- ========== CONTENT BEGIN ========== -->
 <f:view>
 <h:form>
 <f:subview id="Page3g_sv">
 <t:rowtitlebar id="g_1" />
 <t:rowheader id="g_2" />
 <t:rowbodypane id="g_3" >
 <t:row id="g_4" >
 <t:field id="g_5" text="#{d.Page3Bean.ccValueMap.S.value}" width="100" />
 <t:button id="g_6" text="Drück mich!" />
 </t:row>
 </t:rowbodypane>
 <t:rowstatusbar id="g_7" />
 <t:pageaddons id="g_pa"/>
 </f:subview>
 </h:form>
 </f:view>
 <!-- ========== CONTENT END ========== -->
 


Additionally You will find the calling stack below, just before invoking the method setValue (..) inside CCValue:

Code:
 Daemon Thread [http-50000-2] (Suspended (breakpoint at line 1270 in AnalyticClientMBean$CCValue))	
 	AnalyticClientMBean$CCLookup(AnalyticClientMBean$CCValue).setValue(Object) line: 1270	
 	NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]	
 	NativeMethodAccessorImpl.invoke(Object, Object[]) line: not available	
 	DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: not available	
 	Method.invoke(Object, Object...) line: not available	
 	BeanELResolver.setValue(ELContext, Object, Object, Object) line: 108	
 	FacesCompositeELResolver(CompositeELResolver).setValue(ELContext, Object, Object, Object) line: 68	
 	FacesCompositeELResolver.setValue(ELContext, Object, Object, Object) line: 100	
 	CCELResolver.setValue(ELContext, Object, Object, Object) line: 230	
 	StackedValueExpression.setValueExecute(ELContext, Object, boolean) line: 396	
 	StackedValueExpression.setValue(ELContext, Object, boolean) line: 250	
 	StackedValueExpression.setValue(ELContext, Object) line: 243	
 	ExpressionManagerV.setValue(FacesContext, Object, Object) line: 51	
 	BaseComponent$SetValueExec.execute() line: 75	
 	COMBOBOXComponent(BaseComponent).processUpdates(FacesContext) line: 849	
 	PAINTAREAComponent(UIComponentBase).processUpdates(FacesContext) line: 1081	
 	PAINTAREAComponent(BaseComponent).processUpdates(FacesContext) line: 853	
 	ROWComponent(UIComponentBase).processUpdates(FacesContext) line: 1081	
 	ROWComponent(BaseComponent).processUpdates(FacesContext) line: 853	
 	TABBEDPANETABComponent(UIComponentBase).processUpdates(FacesContext) line: 1081	
 	TABBEDPANETABComponent(BaseComponent).processUpdates(FacesContext) line: 853	
 	TABBEDPANEComponent(UIComponentBase).processUpdates(FacesContext) line: 1081	
 	TABBEDPANEComponent(BaseComponent).processUpdates(FacesContext) line: 853	
 	ROWComponent(UIComponentBase).processUpdates(FacesContext) line: 1081	
 	ROWComponent(BaseComponent).processUpdates(FacesContext) line: 853	
 	PANEComponent(UIComponentBase).processUpdates(FacesContext) line: 1081	
 	PANEComponent(BaseComponent).processUpdates(FacesContext) line: 853	
 	ROWComponent(UIComponentBase).processUpdates(FacesContext) line: 1081	
 	ROWComponent(BaseComponent).processUpdates(FacesContext) line: 853	
 	PANEComponent(UIComponentBase).processUpdates(FacesContext) line: 1081	
 	PANEComponent(BaseComponent).processUpdates(FacesContext) line: 853	
 	ROWComponent(UIComponentBase).processUpdates(FacesContext) line: 1081	
 	ROWComponent(BaseComponent).processUpdates(FacesContext) line: 853	
 	ROWBODYPANEComponent(UIComponentBase).processUpdates(FacesContext) line: 1081	
 	ROWBODYPANEComponent(BaseComponent).processUpdates(FacesContext) line: 853	
 	UINamingContainer(UIComponentBase).processUpdates(FacesContext) line: 1081	
 	HtmlForm(UIForm).processUpdates(FacesContext) line: 260	
 	UIViewRoot(UIComponentBase).processUpdates(FacesContext) line: 1081	
 	UIViewRoot.processUpdates(FacesContext) line: 728	
 	UpdateModelValuesPhase.execute(FacesContext) line: 78	
 	UpdateModelValuesPhase(Phase).doPhase(FacesContext, Lifecycle, ListIterator<PhaseListener>) line: 100	
 	LifecycleImpl.execute(FacesContext) line: 118	
 	FacesServlet.service(ServletRequest, ServletResponse) line: 265	
 	ApplicationFilterChain.internalDoFilter(ServletRequest, ServletResponse) line: 290	
 	ApplicationFilterChain.doFilter(ServletRequest, ServletResponse) line: 206	
 	LoginFilter.doFilter(ServletRequest, ServletResponse, FilterChain) line: 46	
 	ApplicationFilterChain.internalDoFilter(ServletRequest, ServletResponse) line: 235	
 	ApplicationFilterChain.doFilter(ServletRequest, ServletResponse) line: 206	
 	ThreadingFilter.doFilter(ServletRequest, ServletResponse, FilterChain) line: 226	
 	ApplicationFilterChain.internalDoFilter(ServletRequest, ServletResponse) line: 235	
 	ApplicationFilterChain.doFilter(ServletRequest, ServletResponse) line: 206	
 	CompressionFilter.doFilter(ServletRequest, ServletResponse, FilterChain) line: 33	
 	ApplicationFilterChain.internalDoFilter(ServletRequest, ServletResponse) line: 235	
 	ApplicationFilterChain.doFilter(ServletRequest, ServletResponse) line: 206	
 	StandardWrapperValve.invoke(Request, Response) line: 233	
 	StandardContextValve.invoke(Request, Response) line: 191	
 	StandardHostValve.invoke(Request, Response) line: 128	
 	ErrorReportValve.invoke(Request, Response) line: 102	
 	StandardEngineValve.invoke(Request, Response) line: 109	
 	CoyoteAdapter.service(Request, Response) line: 286	
 	Http11Processor.process(Socket) line: 845	
 	Http11Protocol$Http11ConnectionHandler.process(Socket) line: 583	
 	JIoEndpoint$Worker.run() line: 447	
 	Thread.run() line: not available	
 
Hello,

building an UI within a pane using ComponentTag(s) shows me a mystery:

Code:
 else if (component instanceof Lookup) {
 				Lookup lookup = (Lookup) component;
 				CCLookup c = new CCLookup(lookup);
 				if (c != null) {
 					BaseComponent newComponent[] = c.createInputComponent(lookup, getOwningDispatcher());
 					parent.getChildren().add(newComponent[0]);
 					parent.getChildren().add(newComponent[1]);
 					ccValueMap.put(CCUTIL.replaceSpace(lookup.getId()), c);
 				}
 


Look inside createInputComponent:
Code:
 public BaseComponent[] createInputComponent(Lookup field, IDispatcher dispatcher) {
 			LABELComponentTag ltag = new LABELComponentTag();
 			COMBOBOXComponentTag tag = new COMBOBOXComponentTag();
 			BaseComponent[] b = null;
 			try {
 				ltag.setText(field.getLabelText());
 				ltag.setWidth(field.getWidthLabel());
 				ltag.setX(field.getX());
 				ltag.setY(field.getY());
 
 				Integer i0 = new Integer(field.getX());
 				Integer i1 = new Integer(field.getWidthLabel());
 				Integer i2 = i1 + i0;
 				tag.setWidth(field.getWidthField());
 				tag.setX(i2.toString());
 				tag.setY(field.getY());
 				tag.setFlush("true");
 
 				String expression = "#{d.AnalyticClientMBean.ccValue." + CCUTIL.replaceSpace(field.getId()) + ".vv}";
 				expression = dispatcher.updateExpression(expression);
 				tag.setValidvaluesbinding(expression);
 
 				expression = "#{d.AnalyticClientMBean.ccValue." + CCUTIL.replaceSpace(field.getId()) + ".value}";
 				expression = dispatcher.updateExpression(expression);
 				tag.setValue(expression);
 				b = new BaseComponent[] { ltag.createBaseComponent(), tag.createBaseComponent() };
 			} catch (Throwable t) {
 				logger.error(t.getStackTrace());
 			}
 			return b;
 		}
 


The class Code:
public static class CCLookup extends CCValue  implements IValidValueUpdateable
holds a value with getter and setter.

Inside base class CCValue is a
Code:
protected abstract Object getValue();


What happen, if the instance will be updated? Yes there are setters to be used in the setter-phase. But the EL-Resolver does not recognize it.

javax.servlet.ServletException: Servlet execution threw an exception
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:313)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.schott.indit.passntAdmin.utils.LoginFilter.doFilter(LoginFilter.java:46)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.eclnt.jsfserver.util.ThreadingFilter.doFilter(ThreadingFilter.java:226)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.eclnt.jsfserver.util.CompressionFilter.doFilter(CompressionFilter.java:33)
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.core.StandardHostValve.invoke(StandardHostValve.java:12
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:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.Error: java.lang.Error: javax.el.PropertyNotFoundException: Property 'value' not writable on type java.lang.Object
at org.eclnt.jsfserver.util.StackedValueExpression.setValue(StackedValueExpression.java:281)
at org.eclnt.jsfserver.util.StackedValueExpression.setValue(StackedValueExpression.java:243)
at org.eclnt.jsfserver.util.ExpressionManagerV.setValue(ExpressionManagerV.java:51)
at org.eclnt.jsfserver.elements.BaseComponent$SetValueExec.execute(BaseComponent.java:75)
at org.eclnt.jsfserver.elements.BaseComponent.processUpdates(BaseComponent.java:849)
at javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1081)
at org.eclnt.jsfserver.elements.BaseComponent.processUpdates(BaseComponent.java:853)
at javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1081)
at org.eclnt.jsfserver.elements.BaseComponent.processUpdates(BaseComponent.java:853)
at javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1081)
at org.eclnt.jsfserver.elements.BaseComponent.processUpdates(BaseComponent.java:853)
at javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1081)
at org.eclnt.jsfserver.elements.BaseComponent.processUpdates(BaseComponent.java:853)
at javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1081)
at org.eclnt.jsfserver.elements.BaseComponent.processUpdates(BaseComponent.java:853)
at javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1081)
at org.eclnt.jsfserver.elements.BaseComponent.processUpdates(BaseComponent.java:853)
at javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1081)
at org.eclnt.jsfserver.elements.BaseComponent.processUpdates(BaseComponent.java:853)
at javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1081)
at org.eclnt.jsfserver.elements.BaseComponent.processUpdates(BaseComponent.java:853)
at javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1081)
at org.eclnt.jsfserver.elements.BaseComponent.processUpdates(BaseComponent.java:853)
at javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1081)
at org.eclnt.jsfserver.elements.BaseComponent.processUpdates(BaseComponent.java:853)
at javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1081)
at javax.faces.component.UIForm.processUpdates(UIForm.java:260)
at javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1081)
at javax.faces.component.UIViewRoot.processUpdates(UIViewRoot.java:72
at com.sun.faces.lifecycle.UpdateModelValuesPhase.execute(UpdateModelValuesPhase.java:7
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:11
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
... 20 more
Caused by: java.lang.Error: javax.el.PropertyNotFoundException: Property 'value' not writable on type java.lang.Object
at org.eclnt.jsfserver.util.CCELResolver.setValue(CCELResolver.java:244)
at org.eclnt.jsfserver.util.StackedValueExpression.setValueExecute(StackedValueExpression.java:396)
at org.eclnt.jsfserver.util.StackedValueExpression.setValue(StackedValueExpression.java:250)
... 53 more
Caused by: javax.el.PropertyNotFoundException: Property 'value' not writable on type java.lang.Object
at javax.el.BeanELResolver$BeanProperty.write(BeanELResolver.java:247)
at javax.el.BeanELResolver$BeanProperty.access$100(BeanELResolver.java:209)
at javax.el.BeanELResolver.setValue(BeanELResolver.java:106)
at javax.el.CompositeELResolver.setValue(CompositeELResolver.java:6
at com.sun.faces.el.FacesCompositeELResolver.setValue(FacesCompositeELResolver.java:100)
at org.eclnt.jsfserver.util.CCELResolver.setValue(CCELResolver.java:230)
... 55 more

When replacing the abstract Object Method inside CCValue with
Code:
 private Object value;
 
 		public Object getValue() {
 			return value;
 		}
 
 		public void setValue(Object value) {
 			this.value = value;
 		}
 

the program works. The setter in the base class will be found.

Even if the Map ccValueMap is defined as HashMap<String, CCValue> there should be a dynamically type check (Java behavior) and the setter of CCLookup should be used.

I could not build a simple demo to reproduce the problem. It works in the simple case.

Any hints?

Joachim
 
Profile for unger -> Messages posted by unger [261] Go to Page: Previous  1, 2, 3 ... 15 , 16, 17, 18 Next 
Go to:   
Powered by JForum 2.1.6 © JForum Team