Tableview : change alignment of one Column

How can I change the text alignment of one Column (also the rows in this Column) in a TableView? Maybe with css or CellFactory... Have anybody an idea?

ohh sry thats right but how it works i try this but it doesnt work:
TableColumn<StreckenTableData, String> thirdCol = new TableColumn<StreckenTableData, String>();
thirdCol .setCellFactory(new Callback<TableColumn,TableCell> (){
public TableCell call(TableColumn param) {
TableCell cell = new TableCell(){
@Override
               public void updateItem(Object item, boolean empty) {
                    if(item!=null){
setText(item.toString());
cell.setAlignment(Pos.TOP_RIGHT);
return cell;
});

Similar Messages

  • Change color of one column in chart

    Hi
    is there a way to change the color of just one column in a column chart? I want to highlight one column but I can't seem to select just that column.
    Thanks

    Welcome to Apple Discussions
    Click on the table to select it then click on the letter column heading to select the desired column. Now go to the object inspector & select Color Fill from the drop-down menu if it's not already chosen then click on the color box to bring up the color chooser. Select the color you want to fill the column.

  • PO Screen Layout change, Addition of one column in Item Overview screen!

    Hi All,
    I have one typical requirement where in user wants to add one column in the Item overview screen, example "Reason for ordering" which is there in Item Detail under Retail Tab!
    Can anyone suggest, How can i get this done? and also i want to know if  there is any possibility to add this field at header level??
    please let me know if i'm not clear in describing the issue...
    Suggestion and solutions would be rewarded & appreciated,
    Thanks in Advance..
    Regards,
    Siddaram

    hi,
    Check sap note 458591..
    Regards
    Priyanka.P

  • Need to change color of one column's value depending on the other column

    Hi,
    i have a search form which displays two column values
    First column value's colour should be based on second column's value
    For example, if second column has values 'Active', 'Inactive' and 'Pending'
    If 'Active' , the first column value's color sholud be 'red'
    If 'inacitve, another color ....
    Thanks in advance,

    Hi!
    What we did was we added a column on the VO that returns kind of a css part (for example if a column value is 'Active' the value of this column should be "background-color:rgb(255,0,0);")
    Than you use something like this on your column:
    inlineStyle="#{row.StatusStyle}"where StatusStyle is the name of the column with "background-color:rgb(255,0,0);" value.
    The problem here can be that the background color doesn't cover the whole column but only the text in it (so if it is null, the color is default).
    If you want the whole column to be of this color you use something like this:
                                        <af:column ...>
                                          <afh:tableLayout ...>
                                            <afh:rowLayout ...>
                                              <afh:cellFormat inlineStyle="#{row.StatusStyle}" ...>
                                                <af:outputText ...>
                                                </af:outputText>
                                              </afh:cellFormat>
                                            </afh:rowLayout>
                                          </afh:tableLayout>
                                        </af:column>Basically you put another table layout inside a column instead just a outputText (or whatever control you use)
    Hope this is understandable and it helps :)
    It works for us.
    BB

  • Set filter for only one column in tableview

    Hi
    i am using in MVC a htmlb:tableview with filter in only one column of 8.
    This is all working fine, except that the user can enter a searchsting in the filterfield for all columns, but in handle_event (of the controller) ; i only react to a text in the filterfield of column 4 and ignore all other filtertext , which were maybe entered in the other columns.
    My question:
    how can i  enter the filter only for one column, in a way that the user cannot enter any text in the filterfield of the other columns, only in column 4 ?
    my view:
    <htmlb:tableView id             = "requirements"
                     table          = "//model/pdst_reqs"
                     filter         = "APPLICATION"                
                     keyColumn       = "EXTID"
                     iterator        = "<%=model%>"
                     footerVisible   = "FALSE"
                     encode          = "TRUE"
                     visibleRowCount = "<%=model->rowcount%>"
                     width           = "100%"/>
    Best Regards
    Britta

    You can disbale the Filter for the particular column by setting the DISABLE_FILTER in the Iterator method IF_HTMLB_TABLEVIEW_ITERATOR~GET_COLUMN_DEFINITIONS. Here is the sample code
    method IF_HTMLB_TABLEVIEW_ITERATOR~GET_COLUMN_DEFINITIONS .
      CLEAR p_column_definitions.
      CLEAR p_overwrites.
      data tv_column TYPE TABLEVIEWCONTROL.
      tv_column-COLUMNNAME          = 'FLDATE'.
      tv_column-SORT                = 'X'.
      tv_column-EDIT                = 'X'.
      tv_column-ONCELLCLICK         = 'MyCellClick1'.
      tv_column-title               = 'Date '.
      APPEND tv_column TO p_column_definitions.
      CLEAR tv_column.
      tv_column-COLUMNNAME          = 'PRICE'.
      tv_column-horizontalAlignment = 'right'.
      tv_column-verticalAlignment   = 'middle'.
      tv_column-ONCELLCLICK         = 'MyCellClick2'.
      tv_column-title               = 'Currency'. 
      tv_column-EDIT                = 'X'.
      tv_column-DISABLE_FILTER      = 'X'.    " <-------Like this
      APPEND tv_column TO p_column_definitions.
    endmethod.
    Hope this will solve your problem.
    Raja

  • How to enable AI(accent insensitiv) for one column without changing session

    Following is my test SQL:
    create table accent_test(col varchar2(10 char);
    insert into accent_test values('INDIA');
    insert into accent_test values('india');
    insert into accent_test values('InDiÄ ');
    Following SQL can only enable CI(Case insensitive), but can’t enable AI(accent insensitive):
    select *
    from accent_test
    where NLS_UPPER(col, 'NLS_SORT=GENERIC_BASELETTER') LIKE NLS_UPPER('INDIA', 'NLS_SORT=GENERIC_BASELETTER')
    COL
    INDIA
    india
    Upper SQL can’t return the third row ‘InDiÄ’ which includes accent character.
    I know following SQL can enable AI by changing the session. However it will change the whole session and other columns in one table:
    SQL> ALTER SESSION SET NLS_COMP=LINGUISTIC;
    SQL> ALTER SESSION SET NLS_SORT=GENERIC_BASELETTER;
    Is there any solution to enable AI for only one column without changing the session?

    convert(<Any Chinese Character>, 'US7ASCII') will all return same character '?'.might be an matter of using the right characterset:
    SQL> select 'ä' str, convert('ä', 'JA16SJIS') converted_str from dual union all
    select 'á', convert('á', 'JA16SJIS') from dual union all
    select 'â', convert('â', 'JA16SJIS') from dual union all
    select 'à',  convert('à', 'JA16SJIS') from dual
    STR CONVERTED_STR
    ä   a           
    á   a           
    â   a           
    à   a           
    4 rows selected.

  • Selecting rows based on one column change

    Hi All -
    I need to select the rows from a table (this table has 4 columns and has a primary key and have many records for that primary key).
    I need to select all the rows for this primary key for which only one column (in this case "flag" column) has been changing from its past value.
    How can I do this?
    for example, table data is:
    ID, flag, Profile,date
    pk, Y, Profile4,01/10/10
    pk, N, Profile4, 01/08/10
    pk,N, Profile3, 01/07/10
    pk,Y, Profile3, 01/05/10
    pk,Y, Profile2, 01/03/10
    pk,N, Profile1, 01/02/10
    The output of the query I am looking for should return the following i.e. only retrieve rows whose previous flag value has been changed:
    ID, flag, Profile,date
    pk, Y, Profile4,01/10/10
    pk,N, Profile3, 01/07/10
    pk,Y, Profile2, 01/03/10
    pk,N, Profile1, 01/02/10
    Please share your expertise.
    Thanks,
    Seenu

    Hi, Seenu,
    Centinul wrote:
    It is always helpful to provide the following:
    1. Oracle version (SELECT * FROM V$VERSION)
    2. Sample data in the form of CREATE / INSERT statements.
    3. Expected output
    4. Explanation of expected output (A.K.A. "business logic")
    5. Use \ tags for #2 and #3. See FAQ (Link on top right side) for details.
    Seenu001 wrote:(1) Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bi
    PL/SQL Release 10.2.0.3.0 - Production
    CORE 10.2.0.3.0 Production
    TNS for Solaris: Version 10.2.0.3.0 - Production
    NLSRTL Version 10.2.0.3.0 - Production Good!
    (2) select 'pk' id,'Y' flag,'Profile4' profile,to_date('01/10/10','mm/dd/yy') dt from dual union all
    select 'pk','N','Profile4',to_date('01/08/10','mm/dd/yy') from dual union all
    select 'pk','N','Profile3',to_date('01/07/10','mm/dd/yy') from dual union all
    select 'pk','Y','Profile3',to_date('01/05/10','mm/dd/yy') from dual union all
    select 'pk','Y','Profile2',to_date('01/03/10','mm/dd/yy') from dual union all
    select 'pk','N','Profile1',to_date('01/02/10','mm/dd/yy') from dualNot bad. It can be made into a CREATE TABLE AS statement without a lot of work, but if you're not willing to do that little bit or work, why should anyone else?     
    (3) Expected output: I want all the rows from this table where the flags have been changed from its previous value.That's a vague description. Post the exat output, like Solomon did:
    ID F PROFILE  DT
    pk N Profile1 01/02/2010
    pk Y Profile2 01/03/2010
    pk N Profile3 01/07/2010
    pk Y Profile4 01/10/2010
    (4) I want all the rows from this table where the flags have been changed from its previous value.That's a repeat of the vague description. Explain how you get the crorrect results, with specific examples, like this:
    "The row dated January 2 should be included, because it is the oldest row in the table, regardless of what its flag is.
    The row dated January 3 should be included because ...
    The row dated January 5 should *not* be included, because ..."
    You don't have to explain every row, just every reason.
    Solomon - I tried your query but the prev_flag is not being populated, it shows null value '-'NULL is not the same as '-'. Did you issue a command like
    SET NULL "-"that would display a '-' instead of NULL?
    Solomon's query works fine for me, as it did for him. Post your code, even if you just copied it from this site. (There may have been an editing problem.)
    Frank - I tried your query, prev_flag is populated in this case but when I am using with the WITH clause, I am getting an error saying "unsupported column aliasing" , I guess WITH command doesnt allow use of column alias. The problem is that I forgot the keyword AS after the sub-query name.
    WITH     got_prev_flag     AS
         SELECT     id, flag, profile, dt     -- DATE is not a good column name
         ,     LAG (flag, 1, '??') OVER (ORDER BY dt)  AS prev_flag
         FROM     t
    --     WHERE     ...     -- any filtering goes here
    SELECT     id, flag, profile, dt
    FROM     got_prev_flag
    WHERE     flag     != prev_flag
    ;If you don't post data in an executable form, then people can't test their ideas. If people can't test their ideas, trivial mistakes like this are very likely.
    This flag column will have either
    Y or N columns. Could you tell me what is the use of "??" value.By default, LAG returns NULL for the first row. If you want to include the first row in the results, then "WHERE     flag     != prev_flag" won't work when prev_flag is NULL. We could explicitly check for "prev_flag IS NULL", but I find it cleared to override the default, and have LAG return '??' on the first row. I guessed that '??' would make the condition "WHERE     flag     != prev_flag" work, no matter what value flag had. There's nothing magical about '??'; you can use any string that will never actually match flag.

  • PLEASE HELP-JTable cell editor-change one cell, changes all cells of column

    for example i have 3 rows 4 columns, column 3 and 4 are dates. now if i change the date to a new value (eg for of column 3)
    for any row, and then i click on any other cell. All cell values ie all rows for that column are changed to that new value.
    ie it changed column 3 for all rows 1, 2 and 3 to that new value which i changed in only one cell of that column.
    PLEASE HELP me , tell me what change i make to the code to fix it ....
    this is my cell renderer for date
    class DateCellRenderer extends JbcDateTimeChooser implements TableCellRenderer {
      protected Border m_noFocusBorder;
      public DateCellRenderer() {
        super();
        setStylePattern(JbcDateTimeChooser.MEDIUM);
        m_noFocusBorder = new EmptyBorder(1, 2, 1, 2);
        setOpaque(true);
        setBorder(m_noFocusBorder);
      public Component getTableCellRendererComponent(JTable table,
       Object value, boolean isSelected, boolean hasFocus,
       int row, int column)
      if(value instanceof Date) {
          Date b = (Date)value;
          setDate(b);
        setFont(table.getFont());
        setBorder(hasFocus ? UIManager.getBorder(
          "Table.focusCellHighlightBorder") : m_noFocusBorder);
        return this;
    }I have this custom cell editor date
    class DateCellEditor extends AbstractCellEditor implements TableCellEditor {
      protected JbcDateTimeChooser editor;
      public DateCellEditor() {
        super();
        editor = new JbcDateTimeChooser();
        editor.setStylePattern(JbcDateTimeChooser.MEDIUM);
      public Object getCellEditorValue() {
        return editor.getDate();
      public Component getTableCellEditorComponent(JTable table,
       Object value, boolean isSelected, int row, int column)
        if(value instanceof Date) {
          editor.setDate((Date)value);
        return editor;
    }and this is how i defined in jtable
        lnnTableModel = new CellSiteLNNTableModel();
        lnnTable.setModel(lnnTableModel);
        lnnTableModel.addColumn("ABC");
        lnnTableModel.addColumn("DEF");
        lnnTableModel.addColumn("Date From");
        lnnTableModel.addColumn("Date To");
        for(int k = 0; k < lnnTableModel.getColumnCount(); k++) {
          TableColumn col = lnnTable.getColumn(lnnTableModel.getColumnName(k));
          TableCellRenderer renderer;
            DefaultTableCellRenderer textRenderer = new DefaultTableCellRenderer();
            renderer = textRenderer;
          TableCellEditor editor;
          JTextField textColumn = new JTextField();
          if((k == CellSiteLNN.DATE_FROM) || (k == CellSiteLNN.DATE_TO)) {
            editor = new DateCellEditor();  //  this is the cell editor
         renderer = new DateCellRenderer(); // this is the assigned cell renderer
          } else {
            editor = new DefaultCellEditor(textColumn);
          col.setCellRenderer(renderer);
          col.setCellEditor(editor);
        }

    table model is extended from AbstractTableModel
    and have these methods
    do you see anything wrong here.....
      public Object getValueAt(int row, int column) {
        Vector rowVector = (Vector)dataVector.elementAt(row);
        return rowVector.elementAt(column);
      public void setValueAt(Object aValue, int row, int column) {
        Vector rowVector = (Vector)dataVector.elementAt(row);
        rowVector.setElementAt(aValue, column);
        // generate notification
        fireTableChanged(new TableModelEvent(this, row, row, column));
      } // end method (setValueAt)

  • How do i change the number of columns within a text box?  I need to go from three columns to one.

    How do I change the number of columns within a text box?  I need to go from 3 columns to 1.  The insert column is highlighted and column break does not work for this.

    Pages '09 does not seem to allow layout breaks in Textboxes.
    Pages 5.2 has the same limitation.
    Use multiple linked Textboxes in Pages '09 to get the layout you want or create your layout in a Word Processing template in the document layer.
    Peter

  • How to change font in just one column of JTable

    I have a table with 4 column.
    I want to have Courier font in column number 2, and Arial in columns number 1, 3 and 4.
    With:
    table.setFont(new Font("Courier New", Font.PLAIN, 12));
    I can set fonts in all columns but how to set font in just one column.
    Thanks
    Srdan

    Hi,
    there are 2 methods of JTable where every rendering resp. editing component "comes" through - prepareRenderer(...) and prepareEditor(....) - by overwriting this methods and calling its super method first you get the component and can manipulate it before you return it. This component is exactly that, what is used for rendering resp. editing afterwards.
    greetings Marsian

  • In BI Publisher Report of excel output for one column is filled with spaces

    Hello,
    We have issue in BI Publisher report of excel output.
    In Excel output for one column few records are displaying as left alignment
    and few record are displaying as right alignment.
    If you are having any xml tag or any syntax for removing spaces for left side
    Please help on this issue.
    Thanks in Advance.
    Regards,
    Swaraj

    Please post the details of the application release, database version and OS along with BI Publisher.
    Is the issue with all reports or specific one(s) only?
    Do you have the patches in the following docs applied?
    Overview of Available Update Patches for Oracle BI Publisher Enterprise 10g [ID 797057.1]
    Overview of Available Update Patches for Oracle BI Publisher Enterprise 11g [ID 1276869.1]
    Overview of Available Patches for Oracle XML Publisher embedded in the Oracle E-Business Suite [ID 1138602.1]
    BI Publisher 10g RTF Template Changes Alignment Settings for Numbered Lists [ID 1418504.1]
    Thanks,
    Hussein

  • To get one column heading

    Hello,
    Using obiee 11g,I have an analysis in my dashboard.
    It has a table and a graph side by side.
    The column heading is bit long (even though the column heading is now getting adjusted )
    but its coming in 3 rows as there are 3 words,Now like i have it for 4 columns.
    Total there are 7 columns.
    What i would like to know is if its possible to have a one single column heading
    for more then one columns.
    For e.g. if the column is col1 abcdefght abc , col2 abcdefght abc....col4 abcdefght abc
    then above these 4 columns have the abcdefght abc so that in the column heading i can just put
    col1,col2,col3,col4?
    abcdefght abc
    col1 col2 col3 col4
    Is this possible.
    Whole idea is i have to use the 2 words for these columns and also reduce the space fro each column,
    So that the table and graph gets aligned without any right scroll.
    Thanks

    abcdefght abc
    col1 col2 col3 col4Only one option. Change the table heading for all these 4 cols to abcdefght abc and put the required column headings as col1, col2 etc
    Now goto table properted - Table view, in Display Column & Table Headings select 'As seperate row' and you are done.
    Hope its useful

  • How to retrieve value of one column to other in Apex using Javascript

    Hi all,
    Can any one help me in solving this problem.
    How to send a value from one column to another column using javascript in Apex. I heard that we can use onChange().
    My requirement is,
    I have a column(Varchar2) in form where i need to enter a value and the data need to be sent to another column(Number) when i press apply changes.
    ex: if i enter a value say 1/3 or 1/4 or 1/3*1/6
    the result should be entered in the other column.
    Message was edited by:
    Raman

    Try something like
    html_GetElement('P1_ITEM2').value = eval(html_GetElement('P1_ITEM1').value);

  • [Forum FAQ] How to configure a Data Driven Subscription which get multi-value parameters from one column of a database table?

    Introduction
    In SQL Server Reporting Services, we can define a mapping between the fields that are returned in the query to specific delivery options and to report parameters in a data-driven subscription.
    For a report with a parameter (such as YEAR) that allow multiple values, when creating a data-driven subscription, how can we pass a record like below to show correct data (data for year 2012, 2013 and 2014).
    EmailAddress                             Parameter                      
    Comment
    [email protected]              2012,2013,2014               NULL
    In this article, I will demonstrate how to configure a Data Driven Subscription which get multi-value parameters from one column of a database table
    Workaround
    Generally, if we pass the “Parameter” column to report directly in the step 5 when creating data-driven subscription.
    The value “2012,2013,2014” will be regarded as a single value, Reporting Services will use “2012,2013,2014” to filter data. However, there are no any records that YEAR filed equal to “2012,2013,2014”, and we will get an error when the subscription executed
    on the log. (C:\Program Files\Microsoft SQL Server\MSRS10_50.MSSQLSERVER\Reporting Services\LogFiles)
    Microsoft.ReportingServices.Diagnostics.Utilities.InvalidReportParameterException: Default value or value provided for the report parameter 'Name' is not a valid value.
    This means that there is no such a value on parameter’s available value list, this is an invalid parameter value. If we change the parameter records like below.
    EmailAddress                        Parameter             Comment
    [email protected]         2012                     NULL
    [email protected]         2013                     NULL
    [email protected]         2014                     NULL
    In this case, Reporting Services will generate 3 reports for one data-driven subscription. Each report for only one year which cannot fit the requirement obviously.
    Currently, there is no a solution to solve this issue. The workaround for it is that create two report, one is used for view report for end users, another one is used for create data-driven subscription.
    On the report that used create data-driven subscription, uncheck “Allow multiple values” option for the parameter, do not specify and available values and default values for this parameter. Then change the Filter
    From
    Expression:[ParameterName]
    Operator   :In
    Value         :[@ParameterName]
    To
    Expression:[ParameterName]
    Operator   :In
    Value         :Split(Parameters!ParameterName.Value,",")
    In this case, we can specify a value like "2012,2013,2014" from database to the data-driven subscription.
    Applies to
    Microsoft SQL Server 2005
    Microsoft SQL Server 2008
    Microsoft SQL Server 2008 R2
    Microsoft SQL Server 2012
    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

    For every Auftrag, there are multiple Position entries.
    Rest of the blocks don't seems to have any relation.
    So you can check this code to see how internal table lt_str is built whose first 3 fields have data contained in Auftrag, and next 3 fields have Position data. The structure is flat, assuming that every Position record is related to preceding Auftrag.
    Try out this snippet.
    DATA lt_data TYPE TABLE OF string.
    DATA lv_data TYPE string.
    CALL METHOD cl_gui_frontend_services=>gui_upload
      EXPORTING
        filename = 'C:\temp\test.txt'
      CHANGING
        data_tab = lt_data
      EXCEPTIONS
        OTHERS   = 19.
    CHECK sy-subrc EQ 0.
    TYPES:
    BEGIN OF ty_str,
      a1 TYPE string,
      a2 TYPE string,
      a3 TYPE string,
      p1 TYPE string,
      p2 TYPE string,
      p3 TYPE string,
    END OF ty_str.
    DATA: lt_str TYPE TABLE OF ty_str,
          ls_str TYPE ty_str,
          lv_block TYPE string,
          lv_flag TYPE boolean.
    LOOP AT lt_data INTO lv_data.
      CASE lv_data.
        WHEN '[Version]' OR '[StdSatz]' OR '[Arbeitstag]' OR '[Pecunia]'
             OR '[Mita]' OR '[Kunde]' OR '[Auftrag]' OR '[Position]'.
          lv_block = lv_data.
          lv_flag = abap_false.
        WHEN OTHERS.
          lv_flag = abap_true.
      ENDCASE.
      CHECK lv_flag EQ abap_true.
      CASE lv_block.
        WHEN '[Auftrag]'.
          SPLIT lv_data AT ';' INTO ls_str-a1 ls_str-a2 ls_str-a3.
        WHEN '[Position]'.
          SPLIT lv_data AT ';' INTO ls_str-p1 ls_str-p2 ls_str-p3.
          APPEND ls_str TO lt_str.
      ENDCASE.
    ENDLOOP.

  • XSLT List View Web part with Inline Editing changing value for one field changes the other lookup field

    Hi
    It's a bit of a weird one. In an XSLT List View web part when Inline editing is enabled if I change the date column, it changes the lookup field column as well. This behavior only occurs if the lookup list has more than 20 entries. Below 20 and we are
    OK.
    Let me explain by example:
    MileStones List - Having more than 20 items
    Tasks List - having a lookup to the Title field from MileStones list. Also having a due date field.
    Simple web part page with one XSLT List View web part for Tasks having inline editing enabled.
    When I edit the first record's due date and press enter (which saves the changes and moves onto next record) and change the due date on second record without even touching the MileStone field. Press enter to commit changes and you see the milestone changing
    on first record!
    The wierd thing is that if the MileStone list has less than 20 items all works as expected.
    Any pointers will be appreciated
    Thanks

    Hi,
    This is a known limitation when working with complex fields like Lookup field.
    A workaround is that we can avoid using the inline edit feature when there are
    complex fields in a list.
    You can take a look at this KB from Microsoft Support to get more details:
    http://support.microsoft.com/kb/2600186/en-us
    A similar thread for your reference:
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/3d369611-ee79-4b5c-86bb-c0f3878cd746/standard-list-view-with-inline-editing-lookup-column-copies-preceding-or-following-items-related?forum=sharepointgeneralprevious
    Thanks
    Patrick Liang
    TechNet Community Support

Maybe you are looking for