-
1. Re: Extended Data table - usage
healeyb Oct 26, 2011 3:21 PM (in response to mpgong)Hi, I came up with this and it seems to work, but I've not (yet) fixed my column widths so couldn't
say for sure if it will still work - but I think so!
stylesheet.css
---------------------
.cellWrap {
word-wrap: break-word;
white-space: pre-wrap;
}
page.xhtml
----------------
<rich:column>
<h:outputText styleClass="cellWrap" value="this is a very long sentence and will test my css skills"/>
</rich:column>
Regards,
Brendan.
-
2. Re: Extended Data table - usage
mpgong Oct 26, 2011 4:12 PM (in response to healeyb)didn't work exactly but it gave me a place to look and i was able to get it to wrap using firebug and modifying the styles. Now it is seems to be a matter of overriding the correct rf style and adding my own.
thanks
-
3. Re: Extended Data table - usage
healeyb Oct 26, 2011 11:57 PM (in response to mpgong)1 of 1 people found this helpfulMichael, I missed something important out. I'm also using this styling which allows table cells, rows -
whatever, to expand vertically to fit the contents. TBH I've not really looked into why it works, but it
does. Looking back at my notes it seems that this only works if used within inline style tags:
<style>
.rf-edt-hdr-c {
border-right: none !important;
border-bottom: none !important;
}
.rf-edt-c {
height: 100% !important;
border-right: none !important;
border-bottom: none !important;
}
.rf-edt-cnt td {
border-bottom: 1px solid #9FC0E9;
border-right: 1px solid #9FC0E9;
}
</style>
<rich:extendedDataTable ...
I think I'm correct in saying that if the app developer has to use !important, then the RF developers
must also be (as per css specificity rules), and this is not considered good practice?
The row height solution was provided by Ryan Yoder: http://community.jboss.org/message/621937#621937
-
4. Re: Extended Data table - usage
mcmurdosound Oct 27, 2011 7:46 AM (in response to healeyb)Thanks for the cellWrap styleclasses. Gave me some new ideas to save some column width.
-
5. Re: Extended Data table - usage
mpgong Oct 27, 2011 8:28 AM (in response to mcmurdosound)Thanks Brendan, I'll give those a try. I did notice while tweaking .rf-edt-c i was able to get the height to show it wrap along with you other settings (cellwrap) but didn't try the inline style yet.
-
6. Re: Extended Data table - usage
mpgong Oct 27, 2011 9:43 AM (in response to mpgong)Using the inline css settings works, i just added one more .rd-edt-c-cnt { white-space:normal}.
Now things wrap correctly. Though i increased the column widths as well in hopes the text won't be large enough to wrap.
Now my other issues, column reordering. How can i disable that? trying link in my original post to turn off the event didn't seem to do it.
-
7. Re: Extended Data table - usage
mn3 Nov 23, 2011 10:40 AM (in response to mpgong)Add this to your CSS file:
.rf-edt-c-cnt {
white-space: pre-wrap;
}
.rf-edt-c {
height: 100%;
}
Works perfect for me!
-
8. Re: Extended Data table - usage
mcmurdosound Nov 23, 2011 1:38 PM (in response to mpgong)"column reordering. How can i disable that? "
Hmmm, I think some weeks ago there was an example of a customized extendeddatatable. Much like the original but the javascript code for the dragNdrop functionallity was removed. This should also improve the performance and reduces the generated html-code.
Another approach is to kill the DnD feature for extdts:
place somewhere:
<script>
DnD.ExtSimpleDraggable.prototype.isDragEnabled=function(){};
</script>
-
9. Re: Extended Data table - usage
healeyb Nov 24, 2011 8:06 AM (in response to mn3)Mathias, I gave your suggestion a try, always happy for the simplest solution, but in my table
the cells in a given row were all different sizes. I have an image in the first column, then some
lengthy text in the 2nd col - maybe that's what's causing the issue.
Interesting comments about disabling drag and drop in edt, I'll have to give this a try.
Regards,
Brendan.