-
1. Re: Disable the style provided by Richfaces to rich:extendedDataTable
pvito Dec 1, 2011 6:09 AM (in response to kh.ramana)1 of 1 people found this helpfulHi, Venkataramana Reddy
Use percent for width in column not supported now.
See source code:
org\richfaces\renderkit\ExtendedDataTableRenderer.java
/**
* @deprecated TODO Remove this method when width in relative units in columns will be implemented.
* @param column
* @return width
*/
private String getColumnWidth(UIComponent column) {
String width = (String) column.getAttributes().get("width");
if (width == null || width.length() == 0 || width.indexOf("%") != -1) {
width = "100px";
}
return width;
}
-
2. Re: Disable the style provided by Richfaces to rich:extendedDataTable
kh.ramana Dec 2, 2011 1:43 AM (in response to pvito)Thanks for Reply...
Can u give me the .class file by removing the above method from ExtendedDataTableRenderer.java
I tried to generate, but i am not able to convert the ExtendedDataTableRenderer.java to ExtendedDataTableRenderer.class
I have removed the method and have attached the Java class. Can u please convert it to .class and provide me.
-
3. Re: Disable the style provided by Richfaces to rich:extendedDataTable
mcmurdosound Dec 2, 2011 2:08 AM (in response to kh.ramana)I'm not sure, if it's that easy just removing this method.
You do not have to rebuild richfaces, you can configure the richfaces components to use another renderer. This can be done in the faces-config.xml of your project. Section renderkit, renderer? (I don't have the example right on me now). I did this only last week with the rich:messages to show popups (jQuery) instead of tables or lists containing the facesMessages. Just extend the existing ExtendedDataTable and override the method(s). There might be some dependencies which need to be fixed.
(converting java2class is called compiling)
If you want to recompile / rebuild richfaces then you have to checkout the whole project. Till RF 3 it was an svn repository and the richfaces project consisted of many subprojects. (For each UI component for example ...)
-
4. Re: Disable the style provided by Richfaces to rich:extendedDataTable
pvito Dec 2, 2011 2:34 AM (in response to kh.ramana) -
5. Re: Disable the style provided by Richfaces to rich:extendedDataTable
kh.ramana Dec 2, 2011 2:38 AM (in response to pvito)Do u have any code for doing that...
My requirement is the table to extend as the screen resolutions increases....
-
6. Re: Disable the style provided by Richfaces to rich:extendedDataTable
pvito Dec 2, 2011 3:06 AM (in response to kh.ramana)<script type="text/javascript">
function setColumnWidth() {
tablewidth = jQuery(".rf-edt-tbl-hdr").width();
jQuery(".rf-edt-c-j_idt38").css('width',tablewidth*0.4); //40%
jQuery(".rf-edt-c-j_idt49").css('width',tablewidth*0.4); //40%
jQuery(".rf-edt-c-j_idt50").css('width',tablewidth*0.2); //20%
}
</script>