Datatable multible column sort labels

How can i change labels of multible column sort panel to another language (Turkish). For example i want to convert "Primary Sort Column:" to "Birincil Sıralama Sütunu" .
Thanks for your helps.
Edited by: m4erler on 15.Tem.2008 13:39

Generally speaking, keep your localizable strings in a properties file attached to a resource bundle. Then access the strings via the resource bundle. JSF has support for this.
In you need more details, google for internationalization and localization in Java and JSF. Check the javadoc for the ResourceBundle class, examine the documentation of the <f:loadBundle> tag, the documentation for the <resource-bundle> and <message-bundle> directives in the faces-config.xml, and see section 2.5.2 in the JSF spec.

Similar Messages

  • Sorting Column's Label in Pivot Table

    Hi Fellows !!
    This is my problem: I have two tables, dates and rates, providing me data for a report. Dates has a DateId (number), Year(number) and Month(varchar2(12)), and Rates has DateId(number) and RateAmount(number). I wrote a quite simple query to obtain report's data:
    SELECT DATES.YEAR, DATES.MONTH, RATES.RATEAMOUNT
    FROM DATES, RATES
    WHERE DATES.DATEID = RATES.DATEID.
    I must to show as a pivot each rate by month for each year. Years must be showed as row heading and sorted descending (this already works) and Months must be showed as column's labels. Something like this:
    ----------|January|February|......|December|
    2008 | 737.3 | 372.3 |......| 342.56 |
    2007 | 346.2 | 456.6 |......| 678.78 |
    The problem is Months always appear in Lexicographical order: April, August, December, ..., September. How can I to define the correct sort for Month ? Thanks in advance for your help.
    Edited by: [email protected] on Sep 21, 2009 4:03 PM

    Hi Vetsrini, thank you for your answer.
    I've included an additional DATES table's field in query, and it contains the number of month, according to your suggestion. Results for query show month's names in proper form, but when I set up the pivot table from template builder and get preview for results (pdf, html, etc), I still get month's names in Lexicographical order. All the examples and documentation tips (sorting tags and others) I've found seems to apply to normal tables, because none of that works in my pivot table. Any other ideas are welcome.

  • Problem with column sort in myFaces dataTable

    Hello,
    In my dataTable I am trying to do a column sort on each column, When i click on the column header link nothing is happening. Could somebody please help. Please let me know if I am missing something.
    Here is the code.
    The jsf is as follows:
    <h:panelGrid columns="1" styleClass="tableHeaderAction">
    <t:dataTable id="fooS" value="#{supervisorsDto.tableRows}"
    var="tableRow" rows"30" styleClass="dataTable"
    headerClass="tableHeader" first="0"
    columnClasses="string,string,string,string"
    rowClasses="odd,even"
    sortAscending="#{supervisorsDto.ascending}"
    sortColumn="#{supervisorsDto.sort}"
    preserveSort="true" >
    <t:column>
    <f:facet name="header">
    <t:commandSortHeader columnName="lastName" arrow="false">
    <t:outputText value="#{screen.lastName}" />
    </t:commandSortHeader>
    </f:facet>
    <t:outputText value="#{tableRow.lastName}" />
    </t:column>
    <t:column>
    <f:facet name="header">
    <t:commandSortHeader columnName="firstName" arrow="false">
    <t:outputText value="#{screen.firstName}" />
    </t:commandSortHeader>
    </f:facet>
    <t:outputText value="#{tableRow.firstName}" />
    </t:column>
    <t:column>
    <f:facet name="header">
    <t:commandSortHeader columnName="loginName" arrow="false">
    <t:outputText value="#{screen.loginName}" />
    </t:commandSortHeader>
    </f:facet>
    <t:outputText value="#{tableRow.loginName}" />
    </t:column>
    <t:column>
    <f:facet name="header">
    <t:commandSortHeader columnName="team" arrow="false">
    <t:outputText value="#{screen.team}" />
    </t:commandSortHeader>
    </f:facet>
    <t:outputText value="#{tableRow.team}" />
    <h:inputHidden id="key" value="#{tableRow.empID}" />
    </t:column>
    </t:dataTable>
    </h:panelGrid>
    The sort method in SupervisorsDto is as follows:
    public class SupervisorsDto implements Serializable {
    private String sort="lastName";
    private boolean ascending= true;
    @SuppressWarnings("unchecked")
    public void sort(final String column,final boolean ascending)
    Comparator comparator = new Comparator()
    public int compare(Object o1, Object o2)
    Supervisors c1 = (Supervisors)o1;
    Supervisors c2 = (Supervisors)o2;
    if (column == null)
    return 0;
    if (column.equals("lastName"))
    return ascending ? c1.getLastName().compareTo(c2.getLastName()) : c2.getLastName().compareTo(c1.getLastName());
    else if (column.equals("firstName"))
    return ascending ? c1.getFirstName().compareTo(c2.getFirstName()) : c2.getFirstName().compareTo(c1.getFirstName());
    else if (column.equals("loginName"))
    return ascending ? c1.getLoginName().compareTo(c2.getLoginName()) : c2.getLoginName().compareTo(c1.getLoginName());
    else if (column.equals("team"))
    return ascending ? c1.getTeam().compareTo(c2.getTeam()) : c2.getTeam().compareTo(c1.getTeam());
    else return 0;
    Collections.sort(tableRows, comparator);
    public void sort(String sortColumn)
    if (sortColumn == null)
    throw new IllegalArgumentException("Argument sortColumn must not be null.");
    if (sort.equals(sortColumn))
    //current sort equals new sortColumn -> reverse sort order
    ascending = !ascending;
    else
    //sort new column in default direction
    sort = sortColumn;
    ascending = isDefaultAscending(sort);
    sort(sort, ascending);
    protected boolean isDefaultAscending(String sortColumn)
    return true;
    public String getSort() {
    return sort;
    public void setSort(String sort) {
    this.sort = sort;
    public boolean isAscending() {
    return ascending;
    public void setAscending(boolean ascending) {
    if(ascending != this.ascending)
    this.ascending = ascending;
    Thanks!

    I think I get really good at answering my own questions.
    It seems when you select the sort option on a column you must also set the "Sort Sequence".

  • Multiple Column sort Pop Up not opening using af:PanelCollection

    Hi guys,
    I have a table in which i want to sort on the basis of Multiple Columns.For that I have used af:PanelCollection but when in menus my advance sort Pop Up is Not opening.I am using jdeveloper 11.1.1.6.
    <af:panelCollection id="pc1" styleClass="AFStretchWidth"
    partialTriggers="t1">
    <f:facet name="menus"/>
    <f:facet name="toolbar"/>
    <f:facet name="statusbar"/>
    <af:table value="#{bindings.xx_sw_vwVO.collectionModel}"
    var="row" rows="#{bindings.xx_sw_vwVO.rangeSize}"
    emptyText="#{bindings.xx_sw_vwVO.viewable ? 'No data to display.' : 'Access Denied.'}"
    fetchSize="#{bindings.xx_sw_vwVO.rangeSize}"
    rowBandingInterval="0"
    width="100%"
    selectionListener="#{bindings.xx_sw_vwVO.collectionModel.makeCurrent}"
    inlineStyle="height:350;"
    rowSelection="single" id="t1"
    partialTriggers="::cb1 ::sor1"
    contentDelivery="immediate" immediate="true"
    autoHeightRows="30" columnSelection="multiple">
    <af:clientListener method="sskuRowSelection" type="click"/>
         <af:serverListener type="sskuRowSelectEvent"
    method="#{DataworkbenchBN.sskurowselect}"/>
    <af:column sortProperty="SskuId" sortable="true"
    headerText="#{bindings.xx_sw_vwVO.hints.SskuId.label}"
    id="c33">
    <af:inputText value="#{row.bindings.SskuId.inputValue}"
    label="#{bindings.xx_sw_vwVO.hints.SskuId.label}"
    required="#{bindings.xx_sw_vwVO.hints.SskuId.mandatory}"
    columns="#{bindings.xx_sw_vwVO.hints.SskuId.displayWidth}"
    maximumLength="#{bindings.xx_sw_vwVO.hints.SskuId.precision}"
    shortDesc="#{bindings.xx_sw_vwVO.hints.SskuId.tooltip}"
    id="it17">
    <f:validator binding="#{row.bindings.SskuId.validator}"/>
    </af:inputText>
    </af:column>

    ADF -- panelCollection multiple column sort
    ~Abhijit

  • Unable to capture the adf table column sort icons using open script tool

    Hi All,
    I am new to OATS and I am trying to create script for testing ADF application using open script tool. I face issues in recording two events.
    1. I am unable to record the event of clicking adf table column sort icons that exist on the column header. I tried to use the capture tool, but that couldn't help me.
    2. The second issue is I am unable to capture the panel header text. The component can be identified but I was not able to identify the supporting attribute for the header text.

    Hi keerthi,
    1. I have pasted the code for the first issue
    web
                             .button(
                                       122,
                                       "/web:window[@index='0' or @title='Manage Network Targets - Oracle Communications Order and Service Management - Order and Service Management']/web:document[@index='0' or @name='1824fhkchs_6']/web:form[@id='pt1:_UISform1' or @name='pt1:_UISform1' or @index='0']/web:button[@id='pt1:MA:0:n1:1:pt1:qryId1::search' or @value='Search' or @index='3']")
                             .click();
                        adf
                        .table(
                                  "/web:window[@index='0' or @title='Manage Network Targets - Oracle Communications Order and Service Management - Order and Service Management']/web:document[@index='0' or @name='1c9nk1ryzv_6']/web:ADFTable[@absoluteLocator='pt1:MA:n1:pt1:pnlcltn:resId1']")
                        .columnSort("Ascending", "Name" );
         }

  • Interactive Report wide Column Sorting hangs in Internet Explorer

    I have an application that contains an interactive report. The Column Sorting and Filtering functions work fine in Firefox. However, if I try to sort a wide (110 byte - it contains a hyperlink) column in Internet Explorer, APEX produces the 'loading data' image and then hangs. Even a sort of a narrow (3 byte) column is noticeably slower in Internet Explorer than in Firefox.
    We are running APEX 3.1.1 on Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production with the Partitioning, OLAP, Data Mining and Real Application Testing options

    Hello,
    I answer you over your post.
    Joe Bertram wrote:
    Hi,
    That's an interesting issue. What kind of images are these? Are they the default images installed or are they your custom set of images?The images are png files included as they were icons into the table.
    >
    You say the images disappear when you sort the report. Does it happen when you sort on demand in the dashboard or when you sort it in the report itself? Or both?Only when sort from the dashboard. From the report itself, the answers works fine.
    >
    What are your environment details?Server:
    OBI 10.1.3.4.1.090414.1900
    Windows 2003 server
    JDK 1.6.0.17
    Thin Client:
    Internet explorer 8
    >
    Thanks for the extra info.
    Best regards,
    -JoeIt happens also in other two environments (Development and Pre-production) with the same SW architecture.
    Thanks for your time.

  • Issue Action links,Column sorting in OBIEE(11g) 11.1.1.7.0

    Hello everyone,
    I want to provide the feature column sorting to my users but i dont want to provide any feature to users when they click on right mouse button.When we click on right mouse in action link column value it is giving the "action links","include/exclude columns" options etc.
    I disabled the do not display the action link report name in the column properties.
    Also disable the  include/exclude columns options in the interaction XYZ properties of the view.
    But still i am not able to understand why these links are coming when i run the report from the dashboard.
    Please help me out here.
    thanks,
    prassu

    Hi Timo,
    I am using data control web services to get these attributes on to the jspx page. The table has the value property which is binding to the iterator( #{bindings.SUMMARY_LINES_ITEM.collectionModel}).
    The table has various coulmns like order no, status, request and so on..where Order no and status are converted to a cmd link which navigates to another page on a query.
    I don't understand how setting sorting to true in one of the columns can make it not found in the iterator! And I get the errors only if sorting is done first before querying(clicking on one of the values in a column to navigate to another page).
    Thanks,
    Sue

  • In list view: Why don't searches include results from the Collections field? Why won't the Collections column sort properly?

    In list view: Why don't searches include results from the Collections field? Why won't the Collections column sort properly?

    I create a new index on column2, (INDEX_N3)
    and change SQL to
    select 1 from table T1 where
    T1.COLUMN_002 = '848K 36892'
    This time INDEX_N3 will be used.
    but change SQL to
    select 1 from table T1 where
    T1.COLUMN_002 = '848K 36892'
    and T1.COLUMN_004 = '1000'
    The explain plan will show full scan.
    Why?
    Thanks.

  • Itunes / ipod column sort locked?

    When looking at my ipod via itunes the column sort is locked on sort by "Genre" and i can't change it? When looking at my computer files it works fine it's just on the ipod? I know it worked last week? not sure if i did something or ???
    thanks

    I'm having the same problem with my iphone.  When I click the "manually manage music, it prompts me that the iphone is synced with another library.  Do i want to erase this iphone and sync with this itunes library?
    Of course I dont want to do this!  My iphone is "synced" with my computer at home, while at work, I'd like to listen to music to my iphone through my work mac (which has no mp3s on it) using itunes.  Annoying!
    Anyone find a third party solution to this?

  • DataGrid Column Sort Prevents Drag From Updating DataProvider

    Hi
    I have a datagrid with an XMLListCollection as the Data Provider.
    I have dragging set on so that when I drag a row to somewhere else in the list the XMLListCollection gets updated just fine and so does the DataGrid.
    However, if a column sort has previously been set this seems to stop the XMLListCollection being updated on the drag.
    I have tried setting the sort property on the XMLListColelction to null and then doing a refresh - this works to a point but it restores the default sort order which is not really what I want as the user may wish to continue from where the column sort got them to.
    I was wondering if anyone had any suggestions please ?
    Thanks a lot.
    Chris

    Hi
    Thanks for replying
    This is what the debugger says:
    TypeError: Error #1010: A term is undefined and has no properties.
        at mx.controls.listClasses::ListBase/makeRowsAndColumnsWithExtraRows()[C:\autobuild\3.2.0\fr ameworks\projects\framework\src\mx\controls\listClasses\ListBase.as:1358]
        at mx.controls.listClasses::ListBase/updateDisplayList()[C:\autobuild\3.2.0\frameworks\proje cts\framework\src\mx\controls\listClasses\ListBase.as:3658]
        at mx.controls.dataGridClasses::DataGridBase/updateDisplayList()[C:\autobuild\3.2.0\framewor ks\projects\framework\src\mx\controls\dataGridClasses\DataGridBase.as:581]
        at mx.controls::DataGrid/updateDisplayList()[C:\autobuild\3.2.0\frameworks\projects\framewor k\src\mx\controls\DataGrid.as:1437]
        at mx.controls.listClasses::ListBase/validateDisplayList()[C:\autobuild\3.2.0\frameworks\pro jects\framework\src\mx\controls\listClasses\ListBase.as:3280]
        at mx.managers::LayoutManager/validateDisplayList()[C:\autobuild\3.2.0\frameworks\projects\f ramework\src\mx\managers\LayoutManager.as:622]
        at mx.managers::LayoutManager/doPhasedInstantiation()[C:\autobuild\3.2.0\frameworks\projects \framework\src\mx\managers\LayoutManager.as:695]
        at Function/http://adobe.com/AS3/2006/builtin::apply()
        at mx.core::UIComponent/callLaterDispatcher2()[C:\autobuild\3.2.0\frameworks\projects\framew ork\src\mx\core\UIComponent.as:8628]
        at mx.core::UIComponent/callLaterDispatcher()[C:\autobuild\3.2.0\frameworks\projects\framewo rk\src\mx\core\UIComponent.as:8568]
    For instance, after the page with the flash module loads, and I click on a column, I get the error. This is quite random, sometimes I need a couple of tries to get the error...
    If you require more information about it I will try to provide.
    Thank you
    Vlad

  • Problem with Column Sorting in Request Table View

    We've enabled column sorting on the table view in an Answers request but it doesn't work when more than around 400 rows are returned. It works Ok when fewer than 400 rows are returned. Does anyone know if there is a specific limit to the number of rows where column sorting works?
    Thanks,
    Mike

    I've dug into the query log a little more. When this request returns more than around 400 records and you click on a column heading to sort the table view, the query from the log is not changing to reflect the new sort order. It stays as whatever the default sort order was for the request.
    Column heading sorting on other requests in different subject areas on this same server works fine. I've tested this other request with up to 6400 rows returning and it's sorting works.
    All caching is turned off for the subject area.

  • Classic report column sorting

    Hello to APEX forum
    My Apex version is 4.2.1,
    database version is Oracle 10g XE on Windows 7 Pro
    After upgrading from version 3.2 to 4.2.1 report column sorting doesn't work when "Enable Partial Page Refresh" is set to "Yes".
    When "Enable Partial Page Refresh" is "No" sorting is OK.
    Please, help
    Regards
    Mark

    Hi Mark,
    it looks like your json.js causes troubles. It extends every JavaScript "object" with two methods called toJSONString and parseJSON. I did a quick debugging and it looks like when we construct our AJAX request to do the sorting, the jQuery AJAX handling tries to serialize those two function because it thinks it's regular data and fails with a JavaScript error.
    Looking at the original source of your library at https://github.com/douglascrockford/JSON-js even the creators had some doubts using that version of the library
    json.js: This file does everything that json2.js does. It also adds a toJSONString method and a parseJSON method to Object.prototype. Use of this file is not recommended.
    Are you sure that you need the parseJSON and toJSONString methods? Maybe you are fine with json2.js as well.
    Regards
    Patrick
    My Blog: http://www.inside-oracle-apex.com
    APEX Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf

  • Reports serialising when column sort attributes used

    If an Apex user has two sessions and runs the same report page in both, then if the report uses column sort attributes (rather than an ORDER BY in the SQL), the second is blocked by the first; once the first completes the second then runs and completes. This appears to be because the user preferences for column sorting are being updated each time, even if they have not been changed.
    This application demonstrates the problem:
    http://htmldb.oracle.com/pls/otn/f?p=15827:2
    Create 2 sessions using that URL. The page has a report based on ALL_OBJECTS with an item "Owner" to filter on. Enter "%" in the first session and press Enter and the report will run, taking about 1 minute. Meanwhile in the second session enter a specific owner (or just XXX) and press Enter. The second report will finish just after the first finishes, even though when run alone it only takes half a second or so.
    Is this a bug?

    Hi Tony,
    If you're using this on unauthenticated pages, then the sort preferences are stored per user for the APEX_PUBLIC_USER (or HTMLDB_PUBLIC_USER), which is potentially why you're seeing the serialisation/dead-locking.
    Could you perhaps use the suggestion by Scott in this thread -
    Re: Report sorting affected by other users
    To use the session ID as the APEX user (or anything else you prefer), to mitigate the potential for the deadlock? (It's worth trying and should take just a few seconds to test in your sample app?).
    John.

  • Embedded images disappear on column sorts when viewing SSRS via url in an iframe

    RE:   SQL Server - 2008 R2  Reporting Services
    We deliver an ASP.Net MVC (5) application and some of the views show/display SSRS report via url in an iframe (so the report is displayed vi the web viewer).   There are images in the header of some of these reports which display correctly on the initial
    view, but "disappear" when the user uses a report column sort and/or changes the report zoom (via the SSRS web viewer toolbar). There are other quirky behaviors as well (depending on the browser), but we are dealing with IE versions 8 thru 11.  I've
    already set the ReportViewer.aspx to use <meta http-equiv="X-UA-Compatible" content="IE=7">, and our application pages/views use <meta http-equiv="X-UA-Compatible" content="IE=edge">.
    Does anyone have a "fix" for this? I know it's related to the ReportViewer.aspx and displaying the report(s) in an iframe, but I can't seem to find any information on how to fix the issue.

    Hi,
    According to your description, when you preview report through url in an iframe, the embed images can be displayed, images can’t be displayed after users used sort and changed report zoom.
    To troubleshoot the problem, please refer to the following steps:
    Run the report in Business Intelligence Development Studio (BIDS) to make sure that the images can be displayed correctly.
    The issue may be relevant to compatibility of browser, please use different browser to check whether the issue persists.
    If you are using embedded image of jpg type, please change the extension of the image to png.
    Set the ReportViewer.aspx to use <meta http-equiv="X-UA-Compatible" content="IE=8">.
    Here is a relevant thread you can reference:
    https://social.technet.microsoft.com/Forums/en-US/56650bf4-e65d-4f84-8ac0-a57cb26543b2/image-disappears-when-sorting-in-ssrs-for-server-report-on-report-vieweron-aspx-page?forum=sqlreportingservices
    If you have any more questions, please feel free to ask.
    Thanks,
    Wendy Fu
    If you have any feedback on our support, please click
    here.
    Wendy Fu
    TechNet Community Support

  • Customizing column sorting in new jsf table

    The new JSF table in the creator 2 is great. I like it. It includes so many out of the box features. It is the reason we use the creator for our current project.
    But I cannot figure out how to customize the column sorting.
    Why do I need column sorting?
    I need to sort a column that can include ad IP address or a host name. Our customer can either use a host name or an IP address to address a device in the network, both in the same column.
    Now sorting an IP address is already difficult. It is actually a sort over a 4 byte number. Sorting over host names is normal alphabetic string sorting.
    How to sort over both in the same column?
    This cannot be done using standard sorting. I need to use a validator or something similar to customize the sorting of this column.
    Can anybody help me with a hint if:
    1- Customizing sorting over a column is possible. (I really would like to keep all other sorting features (icons, multi column support...)).
    2- A hint or code sample, how to do this.
    If this is not possible, I urge the creator team to think of implementing this soon. Otherwise one killer feature of the creator 2 will lose a lot of its teeth.

    Thx mayagiri for your reply!
    But including the src-code for the dataprovider package into a test project, and debugging in the creator-ide has done the thing!
    Here our solution:
    Class ToCompare is the object type which address field displayed in a page, simply containing a table with 2 adress colums, that can be sorted either according to our ip/hostname-comparison or according to String.compare().
    * ToCompare.java
    * Created on 10. Februar 2006, 10:41
    * This class is a basic model object,
    * with a field - String address - according
    * to which it shall be sortable.
    package comparator;
    * @author mock
    public class ToCompare {
         * holds the IP or Host address
        private String address=null;
         * Instance of a Comparator class that
         * provides our sorting algorithm
        private RcHostComparator hostComparator=null;
        /** Creates a new instance of ToCompare */   
        public ToCompare() {
            this("defaultHost");       
         * when creating a new ToCompare instance,
         * the hostComparator is created for it
         *  @ param aAddress - IP or Hostname
        public ToCompare(String aAddress) {
            address=aAddress;
            hostComparator=new RcHostComparator(address);
        public String getAddress() {
            return address;
        public RcHostComparator getHostComparator() {
            return hostComparator;
    }Here the code of the Class RcHostComparator, it is created with the address field of the ToCompare object that it holds. It first checks if the address field is an IP or not, and then chooses the comparison algorithm according to its own field state and the field state of the object to compare to:
    * RcHostComparator.java
    * Created on 10. Februar 2006, 10:43
    *  This class is used to provide a method for
    *  comparing objects that have an address field,
    *  containing either IP adresses or hostnames.
    package comparator;
    import java.text.CollationKey;
    import java.text.Collator;
    import java.util.Comparator;
    import java.util.Locale;
    * @author mock
    public class RcHostComparator implements Comparator
         * holds the IP or Host address
        private String address=null;
         * Is the address an IP
        private boolean isIPAddress=false;
         * if (!isIPAddress) this is created out of the address
         * to provide a performant way of comparing it with another
         * CollationKey, in order to sort Strings localized
         *  @ see java.text.Collator
         *  @ see java.text.CollationKey
        private CollationKey hostnameCollationKey=null;
         * if (isIPAddress) this array holds
         * the 4 byte of the Ip address to compare
        private int[] intValues=null;
         * minimum for IP bytes/ints
        private static final int minIntValue=0;
         * maximum for IP bytes/ints
        private static final int maxIntValue=255;
         * Creates a new instance of IpComparator
         *  @ param aAddress  - holds the IP or Host address
        public RcHostComparator(String aAddress) {
            address=aAddress;
             * check if address is an IP
            isIPAddress=checkIP();
             * if Hostname -> instantiate localized CollationKeys
            if(!isIPAddress){
                 Collator _localeCollator=Collator.getInstance(Locale.getDefault());
                 hostnameCollationKey=_localeCollator.getCollationKey(address);
            }else{}
         *  Here the comparison of the address fields is done.
         *  There a 4 cases:
         *  -1 both Hostnames
         *  -2 aObject1 IP, aObject2 Hostname
         *  -3 aObject1 Hostname, aObject2 IP
         *  -4 both IPs
         *  @ param aObject1, aObject2 - Comparator objects
        public int compare(Object aObject1, Object aObject2)
          int _result= 0;
          if(aObject1 instanceof RcHostComparator && aObject2 instanceof RcHostComparator )
               RcHostComparator _ipComparator1=(RcHostComparator)aObject1;
               RcHostComparator _ipComparator2=(RcHostComparator)aObject2;
               *  Compare algorithms, according to address types
               if(!_ipComparator1.isIPAddress()&&!_ipComparator2.isIPAddress()){
                       *  If both addresses are Strings use collationKey.compareTo(Object o)
                    _result=_ipComparator1.getHostnameCollationKey().compareTo(_ipComparator2.getHostnameCollationKey());
               }else{
                       *  IPs are smaller than Strings -> aObject1 < aObject2
                    if(_ipComparator1.isIPAddress()&&!_ipComparator2.isIPAddress()){
                         _result=-1;
                    }else{
                                *  IPs are smaller than Strings -> aObject1 > aObject2
                         if(!_ipComparator1.isIPAddress()){
                              _result=1;
                         }else{
                             int _intIndex=0;
                             int[] _int1=_ipComparator1.getIntValues();
                             int[] _int2=_ipComparator2.getIntValues();
                                      * compare IP adresses per bytes
                             while(_result==0 && _intIndex<4){
                                  if(_int1[_intIndex]>_int2[_intIndex]){
                                       _result=1;
                                  }else if(_int1[_intIndex]<_int2[_intIndex]){
                                       _result=-1;
                                  }else{}                            
                                             _intIndex++;
          }else{}   
          return _result;
         *  checks if the address field holds an IP or a hostname
         *  if (_isIP) fill intValues[] with IP bytes
         *  if (!isIP)  create hostnameCollationKey
        private boolean checkIP(){
           boolean _isIP=false;
           String[] _getInts=null;
            *  basic check for IP address pattern
            *  4 digits also allowed, cause leading
            *  0 stands for octet number ->
            *  0172=122                  ->
            *  0172.0172.0172.0172 = 122.122.122.122
           boolean _firstcheck=address.matches("[0-9]{1,4}\\.[0-9]{1,4}\\.[0-9]{1,4}\\.[0-9]{1,4}");
           if(_firstcheck){
                _getInts=address.split("\\.");           
                intValues=new int[4];
                for (int _count=0; _count<4; _count++){
                   try{                     
                       int _toIntValue;
                       if(_getInts[_count].startsWith("0")){
                                // if leading 0 parse as octet -> radix=8
                               _toIntValue=Integer.parseInt(_getInts[_count], 8);                          
                       }else{  
                                // parse as is -> radix=10 -> (optional)
                               _toIntValue=Integer.parseInt(_getInts[_count]);                          
                       if(_toIntValue<minIntValue||_toIntValue>maxIntValue){
                              // out of unsigned byte range -> no IP
                              return _isIP;
                       }else{
                              // inside byte range -> could be part of an IP
                              intValues[_count]=_toIntValue;
                   }catch(NumberFormatException e){
                           // not parseable -> no IP
                           return _isIP;
               // all 4 bytes/ints are parseable and in unsigned byte range -> this is an IP
                _isIP=true;
           }else{}      
           return _isIP;
        public boolean isIPAddress() {
                return isIPAddress;
        public int[] getIntValues() {
                return intValues;
        public CollationKey getHostnameCollationKey() {
                return hostnameCollationKey;
        public String getAddress()
            return address;
    }The page bean holds an array of ToCompare objects. It is the model for a new table component, hold by an ObjectArrayDataProvider. Here a code excerpt:
    public class Page1 extends AbstractPageBean
        private ToCompare[] toCompare= new ToCompare[]{
            new ToCompare("1.1.1.1"),
            new ToCompare("2.1.1.1"),
            new ToCompare("9.1.1.1"),
            new ToCompare("11.1.1.1"),
            new ToCompare("0172.0172.0172.0172"),
            new ToCompare("123.1.1.1"),
            new ToCompare("a"),
            new ToCompare("o"),
            new ToCompare("u"),
            new ToCompare("z"),
            new ToCompare("�"),      
            new ToCompare("�"),
            new ToCompare("�")        
         * This method is automatically generated, so any user-specified code inserted
         * here is subject to being replaced
        private void _init() throws Exception
            objectArrayDataProvider1.setArray(toCompare);
        private TableRowGroup tableRowGroup1 = new TableRowGroup();   
        private ObjectArrayDataProvider objectArrayDataProvider1 = new ObjectArrayDataProvider();
    }The relevant .jsp section for the two column table looks like:
    <ui:tableRowGroup binding="#{Page1.tableRowGroup1}" id="tableRowGroup1" rows="10" sourceData="#{Page1.objectArrayDataProvider1}" sourceVar="currentRow">
      <ui:tableColumn binding="#{Page1.tableColumn1}" headerText="SortIP" id="tableColumn1" sort="#{currentRow.value['hostComparator']}">
        <ui:staticText binding="#{Page1.staticText1}" id="staticText1" text="#{currentRow.value['address']}"/>
      </ui:tableColumn>
      <ui:tableColumn binding="#{Page1.tableColumn2}" headerText="SortString" id="tableColumn2" sort="address">
        <ui:staticText binding="#{Page1.staticText2}" id="staticText2" text="#{currentRow.value['address']}"/>
      </ui:tableColumn>
    </ui:tableRowGroup>Sorting localized with Locale="DE_de" according to ip/hostcompare sorts:
    SortIP
    1.1.1.1
    2.1.1.1
    9.1.1.1
    11.1.1.1
    0172.0172.0172.0172
    123.1.1.1
    a

    o

    u

    zWhereas normal sort over String address whitout localization sorts:
    SortString
    0172.0172.0172.0172
    1.1.1.1
    11.1.1.1
    123.1.1.1
    2.1.1.1
    9.1.1.1
    a
    o
    u
    z


    �Not that short, but I hope it will help - if anyone has the need for another than the default sorting algorithms
    Best regards,
    Hate E. Lee

Maybe you are looking for