voyent
Messages posted by: atomz4peace  XML
Profile for atomz4peace -> Messages posted by atomz4peace [121] Go to Page: Previous  1, 2, 3, 4, 5, 6, 7, 8, 9 Next 
Author Message
I'm not sure when I started noticing this, but for sure with firefox 8 and ice 1.8.whatever is latest, I see a nuisance when the session times out.

We have it set to display the modal pop-up with reload. That works fine. But while the modal pop-up is there, the firefox spining "loading" circle keeps spinning forever, like it does when connecting to a site.

So I'm assuming there is some type of connection that's not terminating correctly to make FF do that. Does anyone else see that issue and have a way to stop it?

Thanks!
never mind, it's a jboss bug.

Thanks,
Jim
Hi,

We have a very strange issue that seems like we've tracked it back to a value we display in a datatable / outputText.

We have a simple dataTable with a few columns. Inside the column we have an ice:outputText tag and all that. In one case, we loaded a value from the DB and tried to display it to the browser. Whenever a certain entry was shown, the page "broke" and the datatable was incomplete. Looking at view source and running through a web proxy, it looks like the data just stopped.

So I guess it could be jboss instead of icefaces (1.8.2). But the only oddball character in the string has utf 2019, a funny right single quote. In eclipse debugger, everything looks great, so the error comes when it gets ready to render.

Has anyone ever run across something like this?

Thanks!
Hi,

We have an web app using 1.8.2 and it works fine. We were testing the custom components and dropped in the new jars. On the first test page, we added the new xmlns lines, but got a parse error on the first instance of <ice-cc> component. In our case, it looks like:

Code:
<f:view xmlns:h="http://java.sun.com/jsf/html"
         xmlns:f="http://java.sun.com/jsf/core"
         xmlns:ice="http://www.icesoft.com/icefaces/component"
         xmlns:c="http://java.sun.com/jstl/core"
         xmlns:ui="http://java.sun.com/jsf/facelets"
         xmlns:ice-cc="http://www.icesoft.com/icefaces-composite-comps"
          >
 
 		<html>
 			<head>
 			<ice-cc:css/>
 			
 				<link href="../xmlhttp/css/xp/xp.css" rel="stylesheet"
 					type="text/css" />
 				<link href="../html/sccstyles.css" rel="stylesheet" type="text/css" />
 				
 			</head>
 			<body>
 


And we get an error on the ice-cc line like:

Details: java.lang.Exception: javax.faces.FacesException: Can't parse stream for /jsp/ao_review_test.jspx Error at line 11 char 17: null

and

20:59:38,446 ERROR [Digester] Parse Fatal Error at line 1 column 1: Content is not allowed in prolog.
org.xml.sax.SAXParseException: Content is not allowed in prolog.


Does anyone recognize this as a silly mistake or are we just not meant to have the commercial version? This is jboss 5.1.

Thanks!
I did a work-around by creating an i18n package under and put a messages.properties and messages_en.properties. I copied the files from the comps jar and just put them in my own i18n package. Seemed to make eclipse happy.
This component has had issues for years. Even in the showcase demo if you click quickly, you'll get items selected that you didn't select.

My workaround was to go back to checkboxes.

Hi,

My company did an eval of the EE with composite components but didn't get far. The moment one of my guys dropped the icefaces-composite-comps.jar into the build path, eclipse (ME 8.6) went crazy and filled up the error log with message like:

Error creating base name for: i18n.messages
java.io.IOException: Bundle i18n.messages not found in classpath for project

I see the i18n.messages in the jar file. Does anyone know what caused this and the resolution?

Thanks,
Jim
This looks like a bug but I'll ask of anyone knows about it first. I am using icefaces build 23274 from svn.

When I have a modal panelPopup AND a datatable, it crashes MSIE every time. See the snippet below. This is very simply popup with a table, and a commandbutton that triggers the popup.

But get this. If I move the table BELOW the button in the jspx file, it works fine. If I make it non-modal it works fine too.

Is there any way to get more details so we can open a real bug report on this?

Thanks!
Jim


Code:
 					<ice:panelPopup styleClass="icePanelPopup" modal="true"
 						autoCentre="true" rendered="true"
 						visible="#{FuzzyIDBean.renderPopupMessage}"
 						style="position: absolute; width: 400px; height=300px; z-index:250002;">						
 						
 						<f:facet name="header">
 							<ice:outputText value="Notice" />
 						</f:facet>
 						<f:facet name="body">
 							<ice:panelGrid cellpadding="0" cellspacing="0" columns="1"
 								styleClass="icePanelPopupBody">
 								<ice:outputText value="#{FuzzyIDBean.popupMessage}" />
 								<br clear="all" />
 								<center>
 									<ice:commandButton styleClass="buttonsmall"
 										actionListener="#{FuzzyIDBean.hideMessage}" value="Close" />
 								</center>
 							</ice:panelGrid>
 						</f:facet>
 </ice:panelPopup>
 
 <ice:dataTable var="entry1" 
 						 value="#{FuzzyIDBean.entryListCached}"
 						styleClass="menutable" headerClass="bold" rowClasses="FFFFFF"
 						rendered="true" >
 
 						<ice:column>
 							<f:facet name="header">
 								<ice:outputText value="Fuzzy Name" />
 							</f:facet>
 							<ice:outputText value="#{entry1.name}" styleClass="bold" />
 						</ice:column>					
 </ice:dataTable>
 
 
 
 <ice:commandButton value="Reload Possible List" styleClass="button"
 						actionListener="#{FuzzyIDBean.reloadPossibleList}" />
 <ice:commandButton value="Run Merge and Ignore" styleClass="button"
 						actionListener="#{FuzzyIDBean.runMerge}" />
 
Hi,

I'm trying to get a generic error message like <error-page> in web.xml. But I have things differently than most. What we do is:

- std jsp pages backed by spring
- jsp pages have jsp:include statements to include ice pages
- user pushes a button to do an action
- ICE page encounters an exception, like a DB error
- If we do nothing in web.xml, we get a stack trace where the ice page should have gone, the template in the jsp is normal, just the jsf included that has the stack trace.

If we then add <error-page> to web.xml, when we hit the error, the jsf page just sits there at my confirmation pop-up. The debugger shows the query repeating and this: javax.faces.el.EvaluationException: org.springframework.dao.DataIntegrityViolationException:

So my question is in this scenario with jsp:include, is there a way to have a generic page that will be shown embedded in the jsp? The <error-page> does prevent the stack trace, but does not show the contents of the <location>error.htm</location>

Any thoughts?

Thank you!
Does anyone have a convenient way to do column-level filtering and sorting with icefaces? I know you can manually code up an action method in the bean but that makes you have to customize for every type of bean/list combo you have, quite a bit of work.

In contrast, richfaces has a really great datatable that does all this out of the box without any backing bean work.

Does anyone have a generic way to filter on column data or is there a way to get the richfaces datatable component to work within an icefaces application? I would even be OK with making these datatable pages use richfaces only with a different extension if the two could co-exist in the same app.

Anyone done this before?

Thanks!
I had 2 problems with the default dataexporter for my app, and fixed them in a custom exporter if it helps anyone. The first was if I had an image in my datatable, the default will export the html links and all that. Very messy. The other was that if a value was null, the export csv/xls/pdf would say "null" instead of blank.

The below method fixes those. Because the default dataexporter class had a lot of private variables, I overrode every class. I'm sure I didn't need to but haven't bothered to clean that up.

To use our custom, ice provides a way to bind to your own instance of exporter, like:

binding="#{bean.dataExporterXLS}

where dataExporterXLS is:

protected DataExporterAA dataExporterXLS = new DataExporterAA();

The changes are in encodeParentAndChildrenAsString. These would make great options for the standard taglib.

Code:
 
 import java.io.File;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.Iterator;
 import java.util.List;
 
 import javax.faces.component.UIComponent;
 import javax.faces.component.UIData;
 import javax.faces.component.UIGraphic;
 import javax.faces.component.UIOutput;
 import javax.faces.context.FacesContext;
 import javax.faces.el.ValueBinding;
 import javax.faces.event.AbortProcessingException;
 import javax.faces.event.FacesEvent;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
 import com.icesoft.faces.application.D2DViewHandler;
 import com.icesoft.faces.component.CSS_DEFAULT;
 import com.icesoft.faces.component.dataexporter.CSVOutputHandler;
 import com.icesoft.faces.component.dataexporter.DataExporter;
 import com.icesoft.faces.component.dataexporter.ExcelOutputHandler;
 import com.icesoft.faces.component.dataexporter.OutputTypeHandler;
 import com.icesoft.faces.component.ext.RowSelector;
 import com.icesoft.faces.component.ext.UIColumn;
 import com.icesoft.faces.component.ext.taglib.Util;
 import com.icesoft.faces.context.FileResource;
 import com.icesoft.faces.util.CoreUtils;
 
 public class DataExporterAA extends DataExporter {
 	public static final String COMPONENT_FAMILY = "com.icesoft.faces.DataExporter";
 	public static final String COMPONENT_TYPE = "com.icesoft.faces.DataExporter";
 	public static final String DEFAULT_RENDERER_TYPE = "com.icesoft.faces.DataExporterRenderer";
 	private final Log log = LogFactory.getLog(DataExporterAA.class);
 
 	private static final OutputTypeHandler NoopOutputHandler = new OutputTypeHandler("no-data") {
 		@Override
 		public void writeHeaderCell(String text, int col) {
 		}
 
 		@Override
 		public void writeCell(Object output, int col, int row) {
 		}
 
 		@Override
 		public void flushFile() {
 		}
 	};
 
 	private boolean readyToExport = false;
 
 	private String _for;
 	private String type;
 	private String clickToCreateFileText;
 	private String _origType;
 	private transient OutputTypeHandler outputTypeHandler;
 	private String _origFor;
 	private transient OutputTypeHandler _origOutputTypeHandler;
 	private transient int _origDataModelHash = 0;
 	public final static String EXCEL_TYPE = "excel";
 	public final static String CSV_TYPE = "csv";
 	private Boolean ignorePagination;
 	private Boolean renderLabelAsButton;
 	private String styleClass;
 	private String includeColumns;
 	private int rows = Integer.MIN_VALUE;
 	private int first = Integer.MIN_VALUE;
 	private String popupBlockerLabel;
 	public DataExporterAA() {
 	}
 
 	/*
 	 * (non-Javadoc)
 	 * 
 	 * @see javax.faces.component.UIComponent#getFamily()
 	 */
 	@Override
 	public String getFamily() {
 		return COMPONENT_FAMILY;
 	}
 
 	@Override
 	public String getComponentType() {
 		return COMPONENT_TYPE;
 	}
 
 	/*
 	 * (non-Javadoc)
 	 * 
 	 * @see javax.faces.component.UIComponent#getRendererType()
 	 */
 	@Override
 	public String getRendererType() {
 		return DEFAULT_RENDERER_TYPE;
 	}
 
 	@Override
 	public UIData getUIData() {
 		String forStr = getFor();
 		UIData forComp = (UIData)D2DViewHandler.findComponent(forStr, this);
 
 		if (forComp == null) {
 			throw new IllegalArgumentException(
 					"could not find UIData referenced by attribute @for = '"
 					+ forStr + "'");
 		} else if (!(forComp instanceof UIData)) {
 			throw new IllegalArgumentException(
 					"uiComponent referenced by attribute @for = '" + forStr
 					+ "' must be of type " + UIData.class.getName()
 					+ ", not type " + forComp.getClass().getName());
 		}
 		//compare with cached DataModel to check for updates
 		if( _origDataModelHash != 0 && _origDataModelHash != forComp.getValue().hashCode()){
 			reset();
 		}
 		if (!isIgnorePagination() && ((first != Integer.MIN_VALUE && first != forComp.getFirst()) ||
 				(rows != Integer.MIN_VALUE && rows != forComp.getRows()))  ) {
 			reset(); 
 		}
 
 
 		Object value = forComp.getValue();
 		if (null != value) {
 			_origDataModelHash = forComp.getValue().hashCode();
 		}
 		return forComp;
 	}
 
 	private void reset(){
 		this.readyToExport = false;
 		this.resource = null;
 	}
 
 	@Override
 	public String getFor() {
 		if (_for != null) {
 			if( !_for.equals(this._origFor))
 				reset();
 			this._origFor = _for;
 			return _for;
 		}
 		ValueBinding vb = getValueBinding("for");
 		String newFor = null;
 		if( vb != null ){
 			newFor = (String) vb.getValue(getFacesContext());
 			if( newFor != null && !newFor.equals(this._origFor))
 				reset();
 			this._origFor = newFor;
 		}
 
 		return newFor;
 	}
 	
 	@Override
 	public void setFor(String forValue) {
 		if( forValue != null && !forValue.equals(_for))
 			this.resource = null;
 		_for = forValue;
 	}
 
 	@Override
 	public String getType(){
 		if (type != null) {
 			if( !type.equals(this._origType))
 				reset();
 			this._origType = type;
 			return type;
 		}
 		ValueBinding vb = getValueBinding("type");
 		String newType = null;
 		if( vb != null ){
 			newType = (String) vb.getValue(getFacesContext());
 			if( newType != null && !newType.equals(this._origType))
 				reset();
 			this._origType = newType;
 		}
 		return newType;
 	}
 
 	@Override
 	public void setType(String type){
 		if( type != null && !type.equals(this.type))
 			reset();
 		this.type = type;
 	}
 	
 	@Override
 	public boolean isReadyToExport() {
 		return readyToExport;
 	}
 
 	@Override
 	public void setReadyToExport(boolean readyToExport) {
 		this.readyToExport = readyToExport;
 	}
 
 	/**
 	 * @deprecated
 	 */
 	@Deprecated
 	@Override
 	public String getClickToCreateFileText() {
 		if (this.clickToCreateFileText != null) {
 			return clickToCreateFileText;
 		}
 		ValueBinding vb = getValueBinding("clickToCreateFileText");
 		return vb != null ? (String) vb.getValue(getFacesContext()) : null;
 	}
 
 	/**
 	 * @deprecated
 	 */
 	@Deprecated
 	@Override
 	public void setClickToCreateFileText(String clickToCreateFileText) {
 		this.clickToCreateFileText = clickToCreateFileText;
 	}
 	
 	@Override
 	public OutputTypeHandler getOutputTypeHandler() {
 		ValueBinding vb = getValueBinding("outputTypeHandler");
 		OutputTypeHandler newOutputHandler = null;
 		if( vb != null ){
 			newOutputHandler = (OutputTypeHandler) vb.getValue(getFacesContext());
 			if( newOutputHandler != null && newOutputHandler != this._origOutputTypeHandler)
 				reset();
 			this._origOutputTypeHandler = newOutputHandler;
 		}
 		return newOutputHandler;
 	}
 
 	@Override
 	public void setOutputTypeHandler(OutputTypeHandler outputTypeHandler) {
 		if( outputTypeHandler != null && outputTypeHandler != this.outputTypeHandler)
 			reset();
 		this.outputTypeHandler = outputTypeHandler;
 	}
 
 	private transient Object values[];
 	/*
 	 * (non-Javadoc)
 	 * 
 	 * @see javax.faces.component.StateHolder#saveState(javax.faces.context.FacesContext)
 	 */
 	@Override
 	public Object saveState(FacesContext context) {
 
 		if(values == null){
 			values = new Object[14];
 		}
 		values[0] = super.saveState(context);
 		values[1] = _for;
 		values[2] = type;
 		values[3] = clickToCreateFileText;
 		values[4] = readyToExport? Boolean.TRUE : Boolean.FALSE;
 		values[5] = _origType;
 		values[6] = _origFor;
 		values[7] = ignorePagination; 
 		values[8] = renderLabelAsButton;     
 		values[9] = styleClass;
 		values[10] = includeColumns;         
 		values[11] = new Integer(rows); 
 		values[12] = new Integer(first); 
 		values[13] = popupBlockerLabel;
 		return ((values));
 	}
 
 	/*
 	 * (non-Javadoc)
 	 * 
 	 * @see javax.faces.component.StateHolder#restoreState(javax.faces.context.FacesContext,
 	 *      java.lang.Object)
 	 */
 	@Override
 	public void restoreState(FacesContext context, Object state) {
 		Object values[] = (Object[]) state;
 		super.restoreState(context, values[0]);
 		_for = (String) values[1];
 		type = (String) values[2];
 		clickToCreateFileText = (String) values[3];
 		readyToExport = ((Boolean) values[4]).booleanValue();        
 		_origType = (String) values[5];
 		_origFor = (String)values[6];
 		ignorePagination = (Boolean)values[7]; 
 		renderLabelAsButton = (Boolean)values[8];  
 		styleClass = (String)values[9];  
 		includeColumns = (String)values[10];    
 		rows = ((Integer)values[11]).intValue(); 
 		first = ((Integer)values[12]).intValue();  
 		popupBlockerLabel = (String)values[13];         
 	}
 
 	@Override
 	public String getLabel() {
 		String label = super.getLabel();
 		if (label == null) {
 			if (resource instanceof FileResource)
 				label = ((FileResource)resource).getFile().getName();
 		}
 		return label;
 	}
 	@Override
 	public void broadcast(FacesEvent event)
 	throws AbortProcessingException {
 		super.setResource(this.resource);
 		super.setType(this.type);
 		super.broadcast(event);
 		
 //		if (event != null) {
 //			FacesContext facesContext = FacesContext.getCurrentInstance();
 //			String type = getType();
 //			UIData uiData = getUIData();
 //			Resource res = getResource(); 
 //			if (res == null) {
 //				File output = createFile(facesContext, type, uiData);
 //				setResource(new FileResource(output));
 //				getResource();
 //			}
 //			JavascriptContext.addJavascriptCall(facesContext, "Ice.DataExporterOpenWindow(\"" + 
 //					getClientId(facesContext) + "\", \"" + getPath() + "\", \""+ getLabel() 
 //					+"\", \""+ getPopupBlockerLabel() +"\" );");
 //		}
 	}    
 
 	private File createFile(FacesContext fc, String type, UIData uiData) {
 		OutputTypeHandler outputHandler = null;
 		String path = CoreUtils.getRealPath(fc, "/export"); 
 		File exportDir = new File(path);
 		if (!exportDir.exists())
 			exportDir.mkdirs();
 		String pathWithoutExt = path + "/export_"
 		+ new Date().getTime();
 
 		if (getOutputTypeHandler() != null)
 			outputHandler = getOutputTypeHandler();
 		else if (DataExporterAA.EXCEL_TYPE.equals(getType())) {
 			outputHandler = new ExcelOutputHandler(pathWithoutExt + ".xls",
 					fc, uiData.getId());
 		} else if (DataExporterAA.CSV_TYPE.equals(getType())) {
 			outputHandler = new CSVOutputHandler(pathWithoutExt + ".csv");
 		} else {
 			outputHandler = NoopOutputHandler;
 		}
 		renderToHandler(outputHandler, uiData, fc);
 		setMimeType(outputHandler.getMimeType());
 
 		return outputHandler.getFile();
 	}
 
 	private String encodeParentAndChildrenAsString(FacesContext fc,
 			UIComponent uic) {
 		StringBuffer str = new StringBuffer();
 		
 		//new section
 		if (uic instanceof UIGraphic) {
 			ValueBinding vbAlt = uic.getValueBinding("alt");
 			if (vbAlt != null) {
 				if (vbAlt.getValue(fc) != null) {
 					str.append(vbAlt.getValue(fc).toString());
 				}
 			}
 		} else if (uic instanceof UIOutput && !(uic instanceof javax.faces.component.html.HtmlOutputLink)) {
 			Object value = uic.getAttributes().get("value");
 			if (value != null) {
 				str.append(value);
 			} else {
 				ValueBinding vb = uic.getValueBinding("value");
 				if (vb != null) {
 					if (vb.getValue(fc) != null) {
 						str.append(vb.getValue(fc));
 					}
 				}
 			}	
 		}
 		//end new section		
 		
 		if (uic.getChildCount() > 0) {
 			Iterator iter = uic.getChildren().iterator();
 			while (iter.hasNext()) {
 				UIComponent child = (UIComponent) iter.next();
 				str.append(encodeParentAndChildrenAsString(fc, child));
 			}
 		}
 		return str.toString();
 	}
 	@Override
 	protected List getRenderedChildColumnsList(UIComponent component) {
 		List results = new ArrayList();
 		Iterator kids = component.getChildren().iterator();
 		while (kids.hasNext()) {
 			UIComponent kid = (UIComponent) kids.next();
 			if ((kid instanceof UIColumn) && kid.isRendered()) {
 				results.add(kid);
 			}
 		}
 		return results;
 	}
 
 	private void renderToHandler(OutputTypeHandler outputHandler,
 			UIData uiData, FacesContext fc) {
 
 		try {
 			int rowIndex = 0;
 			int numberOfRowsToDisplay = 0;  
 			if (!isIgnorePagination()) {
 				rowIndex = uiData.getFirst();
 				numberOfRowsToDisplay = uiData.getRows();
 				first = rowIndex;
 				rows = numberOfRowsToDisplay;
 			}
 			int colIndex = 0;
 
 			int countOfRowsDisplayed = 0;
 			uiData.setRowIndex(rowIndex);
 			String[] includeColumnsArray = null;
 			String includeColumns = getIncludeColumns();
 			if (includeColumns != null)
 				includeColumnsArray = includeColumns.split(",");
 
 			// write header
 			List columns = getRenderedChildColumnsList(uiData);
 			Iterator childColumns;
 			if (includeColumnsArray != null) {
 				renderInUserDefinedOrder(fc, outputHandler, columns, includeColumnsArray, colIndex, -1);
 			} else {
 				childColumns = columns.iterator();
 				while (childColumns.hasNext()) {
 					UIColumn nextColumn = (UIColumn) childColumns.next();
 					processColumnHeader(fc, outputHandler, nextColumn, colIndex);
 					colIndex++;
 				}
 			}
 
 			while (uiData.isRowAvailable()) {
 				if (numberOfRowsToDisplay > 0
 						&& countOfRowsDisplayed >= numberOfRowsToDisplay) {
 					break;
 				}
 
 				// render the child columns; each one in a td
 				colIndex = 0;
 
 				if (includeColumnsArray != null) {
 					renderInUserDefinedOrder(fc, outputHandler, columns, includeColumnsArray, colIndex, countOfRowsDisplayed);
 				} else {
 					childColumns = columns.iterator();
 					while (childColumns.hasNext()) {
 						UIColumn nextColumn = (UIColumn) childColumns.next();
 						processColumn(fc, outputHandler, nextColumn, colIndex, countOfRowsDisplayed);
 						colIndex++;
 					}
 				}
 				// keep track of rows displayed
 				countOfRowsDisplayed++;
 				// maintain the row index property on the underlying UIData
 				// component
 				rowIndex++;
 				uiData.setRowIndex(rowIndex);
 
 			}
 			// reset the underlying UIData component
 			uiData.setRowIndex(-1);
 
 			outputHandler.flushFile();
 		} catch (Exception e) {
 			log.error("renderToHandler()", e);
 		}
 
 	}
 	@Override
 	public void addInfo() {}
 
 	/**
 	 * <p>Set the value of the <code>ignorePagination</code> property.</p>
 	 */
 	@Override
 	public void setIgnorePagination(boolean ignorePagination) {
 		this.ignorePagination = new Boolean(ignorePagination);
 	}
 
 	/**
 	 * <p>Return the value of the <code>ignorePagination</code> property.</p>
 	 */
 	@Override
 	public boolean isIgnorePagination() {
 		if (ignorePagination != null) {
 			return ignorePagination.booleanValue();
 		}
 		ValueBinding vb = getValueBinding("ignorePagination");
 		return vb != null ? ((Boolean) vb.getValue(getFacesContext()))
 				.booleanValue() : false;
 	}   
 
 	/**
 	 * <p>Set the value of the <code>renderLabelAsButton</code> property.</p>
 	 */
 	@Override
 	public void setRenderLabelAsButton(boolean renderLabelAsButton) {
 		this.renderLabelAsButton = new Boolean(renderLabelAsButton);
 	}
 
 	/**
 	 * <p>Return the value of the <code>renderLabelAsButton</code> property.</p>
 	 */
 	@Override
 	public boolean isRenderLabelAsButton() {
 		if (renderLabelAsButton != null) {
 			return renderLabelAsButton.booleanValue();
 		}
 		ValueBinding vb = getValueBinding("renderLabelAsButton");
 		return vb != null ? ((Boolean) vb.getValue(getFacesContext()))
 				.booleanValue() : false;
 	}
 
 	@Override
 	public void setStyleClass(String styleClass) {
 		this.styleClass = styleClass;
 	}
 
 	@Override
 	public String getStyleClass() {
 		return Util.getQualifiedStyleClass(this, 
 				styleClass,
 				CSS_DEFAULT.DATAEXPORTER_DEFAULT_STYLE_CLASS,
 				"styleClass");
 	} 
 
 	@Override
 	protected void processColumnHeader(FacesContext fc, 
 			OutputTypeHandler outputHandler,
 			UIColumn uiColumn, int colIndex) {
 		UIComponent headerComp = uiColumn.getFacet("header");
 		if (headerComp != null) {
 			String headerText = encodeParentAndChildrenAsString(fc, headerComp);
 			if (headerText != null) {
 				outputHandler.writeHeaderCell(headerText, colIndex);
 			}
 		}        
 	}
 
 	@Override
 	protected void processColumn(FacesContext fc, 
 			OutputTypeHandler outputHandler,
 			UIColumn uiColumn, int colIndex,
 			int countOfRowsDisplayed) {
 		StringBuffer stringOutput = new StringBuffer();
 
 		Iterator childrenOfThisColumn = uiColumn.getChildren()
 		.iterator();
 		while (childrenOfThisColumn.hasNext()) {
 
 			UIComponent nextChild = (UIComponent) childrenOfThisColumn
 			.next();
 			if (nextChild.isRendered() && !(nextChild instanceof RowSelector)) {
 				stringOutput.append(encodeParentAndChildrenAsString(fc,
 						nextChild));
 				//a blank to separate 
 				if (childrenOfThisColumn.hasNext()) {
 					stringOutput.append(' '); 
 				}
 			}
 
 		}
 		outputHandler.writeCell(stringOutput.toString(), colIndex, countOfRowsDisplayed);
 
 	}
 
 
 	/**
 	 */
 	@Override
 	public String getIncludeColumns() {
 		if (this.includeColumns != null) {
 			return includeColumns;
 		}
 		ValueBinding vb = getValueBinding("includeColumns");
 		return vb != null ? (String) vb.getValue(getFacesContext()) : null;
 	}
 
 	/**
 	 */
 	@Override
 	public void setIncludeColumns(String includeColumns) {
 		this.includeColumns = includeColumns;
 	}    
 
 	@Override
 	protected void renderInUserDefinedOrder(FacesContext fc,
 			OutputTypeHandler outputHandler, 
 			List columns,
 			String[] includeColumnsArray,
 			int colIndex,
 			int countOfRowsDisplayed
 	) {
 		for (int i=0; i<includeColumnsArray.length; i++) {
 			int userIndex = 0;
 			try {
 				userIndex = Integer.parseInt(includeColumnsArray[i].trim());
 			} catch (Exception e) {
 				log.error("renderInUserDefinedOrder() invalid column index ", e);
 				continue;
 			}
 			if ( userIndex < 0 || userIndex > columns.size()) {
 				log.info("["+userIndex +"] is invalid column index. Column index is 0 based and should be less then from "+ columns.size());
 				continue;
 			}
 			UIColumn nextColumn = (UIColumn) columns.get(userIndex);
 			if (countOfRowsDisplayed == -1) {
 				processColumnHeader(fc, outputHandler, nextColumn, colIndex);
 			} else {
 				processColumn(fc, outputHandler, nextColumn, colIndex, countOfRowsDisplayed);
 			}
 			colIndex++; 
 		}
 
 	}
 
 	@Override
 	public String getPopupBlockerLabel() {
 		if (this.popupBlockerLabel != null) {
 			return popupBlockerLabel;
 		}
 		ValueBinding vb = getValueBinding("popupBlockerLabel");
 		return vb != null ? (String) vb.getValue(getFacesContext()) : null;
 	}
 
 	@Override
 	public void setPopupBlockerLabel(String popupBlockerLabel) {
 		this.popupBlockerLabel = popupBlockerLabel;
 	}    
 }
 
Is there any way to override any of the methods in DataExporter? The problem is that when you export a datatable that has links in it, the html link comes through as well. So if I just want the text that is displayed on the screen, there seems to be now way to strip out the link part.

The change would be to do something like adding another tag, maybe "textOnly" and then in DataExporter.encodeParentAndChildrenAsString() where we have:
Code:
         if (value != null)
             str.append(value);
         else {
             ValueBinding vb = uic.getValueBinding("value");
             if (vb != null)
                 str.append(vb.getValue(fc));
         }
 


Add some other thing like:

Code:
 if (TEXTONLY) {
   if (uic instanceof UIGraphic) {
     ValueBinding vbAlt = uic.getValueBinding("alt");
    // add the alt tag only
   } else if (uic instanceof UIOutput && !(uic instanceof javax.faces.component.html.HtmlOutputLink)) {
    // add the value here
   }
 } else {
 
 // do original work here
 
 }							
 


I would rather avoid custom source and I can probably create my own custom tag, but is there a way to override just this method/class in my app?

Thanks!
Has anyone else seen the eclipse JSF editor hang like crazy when you use the content assist (ctrl-space) to list the methods of a bean?

It doesn't matter if I have the ice eclipse plugin installed or not, so it must be a core eclipse/jsf thing. On eclipse 3.3, it works fine. On 3.4 or 3.5 when I hit ctrl-space, the cpu goes to 100 for maybe 10-20 seconds. My beans are not really that big so I'm not sure what it's doing.

Interestingly, if I edit the faces-config.xml outside of eclipse, then start eclipse, it works great! I get eclipse log messages saying faces-config.xml is out of sync. The moment I refresh the project (F5) the log error messages stop, but then it starts to hang again.

Anyone else see this and find an answer?

Thanks!
FYI, we saw the problem on one win7 computer, one xp, but not on win2003 and another win7.

Oddly enough, FF 3.6b5 fixes the issue.
Seems like only on windows 7. We ripped out all FF settings and started over with defaults and all plugins disabled, A/V turned off, etc... win2003 worked fine, win7 gave 100%cpu.

Happens even on a small table, just not as long of delay. The spinning circle just never stops after the table repaints and cpu goes bananas.

It also happens in the component showcase, though not as bad since the tables don't have as many rows.

Anyone else see this or do we have something else really weird going on?
 
Profile for atomz4peace -> Messages posted by atomz4peace [121] Go to Page: Previous  1, 2, 3, 4, 5, 6, 7, 8, 9 Next 
Go to:   
Powered by JForum 2.1.7ice © JForum Team