Multiline text in cell of the table

Hi Experts,
I have internal table wich has field (type STRING).
Value field is for example '  <?p?>?line1?<?/?p?>?<?p?>?line2?</p>?' Without '?'
It means that value in one cell of the table should be so :
  line1
  line2
I cannot to use FormattedTextView for table column.
What I can to use instead this?
Thanks in advance
Evgeniy
Edited by: Evgeny Vazhev on May 5, 2011 2:03 PM
Edited by: Evgeny Vazhev on May 5, 2011 2:04 PM

Since you can't use the formatted UI elements, you will need to remove the XHTML formatting.  I would suggest perform text replacement and removing the
<p>
completely and replacing the
</p>
with cl_abap_char_utilities=>cr_lf. 
Try that with the textView. If the carriage return isn't used in the text view, you might swap the UI element to a disabled textEdit UI element instead.

Similar Messages

  • How can I take check box in particular cell of the table in smartforms??

    Hi experts,
       pls tell me how can I take check box in particular cell of the table in smartforms??
    It is not interactive form.
    I hv taken small windows as check boxes.but i think it is not a proper solution....give me another solution...

    Hi,
    first create text for a particular cell.
    In that we have a  text editor  in that text editor we have symbols in include menu.
    whatever the symboll u want to put to ur cell . just assign it.
    please check it. if it helpful reward points.
    regards,
    satish.

  • On clicking empty cell in the table

    System forces user to enter valid value on clicking empty customised cell in the table. it should not happen eventhough cell is previously empty.

    hi
    Set the table property visibleRowCount property using a context attribute in your code. Set it to the value node (data source) size.
    e.g
    ; wdContext.currentContextElement().set<attributename>(wdContext.node<urnode>().size());
    Hope it helps.
    regards
    LNV

  • How to Start a color in the middle of a cell in the table & end in next cel

    Hai,
    I am developing a project in VB6 and the databse in MsAccess, i prepared the Report in HTML, Based on 2 Fields called Nextti & Duration Field I am coloring the Background of cells in the report table.
    Actually the Color should start and end insdie or outside the cell based on the 2 Field Values.
    Table is populated for 4 Years under that 48 months, therefor 2 row headings. 1 for showing Years in column & other for Months & with Some fields.
    the below is the line i use to change the background of a particular cell. Its done when i populate the data in the HTML Report.
    OutStream.WriteLine ("<td bgcolor=Yellow><P align=center><Font FACE=Tahoma size=1 color=black>" & Format(dtShade, "dd") & "</Font></P></td>")
    Now i am able to shade the Cell by giving its background color to yellow as below code
    but the problem is i am able to change the background of the full cell. But i don't need to change the background of the full cell always. For example if Nextti value is 15/1/2005 & Duration is 30 then the shade should start from the middle of January Cell (because of the date 15th)end in the middle of next cell (February). If the duration is 15 then it should end in the (January) same end of cell. Kindly tell me how can i do this through HTML. I heard Div can be used to solve this issue. I am a beginner so kindly any one give me a appropriate example which will suit to solve this issue.
    thankyou,
    Chock.

    Can you work out what the actual HTML is to do
    "Whatever it was that you wanted to do" ? { I couldn't understand that }
    I.e If you make up a Test table, with Your Text editor can you get a sample output that looks like you want?
    But the problem is i am able to change the background of the full cell. But i don't need to change the background of the full cell always. For example if Nextti value is 15/1/2005 & Duration is 30 then the shade should start from the middle of January Cell (because of the date 15th)end in the middle of next cell (February). If the duration is 15 then it should end in the (January) same end of cell.
    Is this something that can be done in HTML?
    If your question is 'amenable' to HTML, figure out conditions for which you want to Set a certain color....
    If the color in one cell for instance depends on the Next Cell, then you're going to have to buffer the whole Table ROW....
    Set which ones should be RED for instance, then output that ROW in HTML...
    If you are using Java for this, then also be aware that you might need to escape certain characters like use "\\" to get "\"
    You'd also probaly have an easier time, however you are doing this if you used some sort of CSS .......

  • How to compare text box value with the table data??

    Hello ALL,
    I created one stored procedure in DB,it is as follows:-
    CREATE or replace PROCEDURE chkUser
    u in varchar2,
    p in varchar2,
    ap out varchar2
    is
    begin
    select count(*) into ap from tbuser where loginid = u and password = p;
    end;
    And at the front end I have designed a form with 2 text boxes, now my question is I wanna compare these text box values(which user enters) with the data of the table....??? something like control (may be I am not sure)..... ???
    If anybody can help me out with this issue...... help will be appreciated
    Thank you.
    regards,
    Kumar

    hi Elise,
    I'm always getting the Error Message as "Invalid Creditianls"... let me tell you the whole scenario with sql synatx.
    I have created tables as:-
    CREATE TABLE "TBUSER"
    (     "LOGINID" VARCHAR2(30) NOT NULL ENABLE,
         "PASSWORD" VARCHAR2(30),
         CONSTRAINT "TBUSER_PK" PRIMARY KEY ("LOGINID") ENABLE
    than I created the Procedure on tbuser, it is as:-
    create or replace PROCEDURE logincheck
    u in varchar2,
    p in varchar2,
    ap out varchar2
    is
    begin
    select count(*) into ap from tbuser where loginid = u and password = p;
    end;
    now at the front end side I have created one form with 2 text boxes (P8_USERNAME & P8_PASSWORD) and 2 buttons (Cancel and Submit)
    as per you told me in the above post, I have created 'Validation' procedure with Type as 'Exists' and expression(into Validation Expression1)as:-
    select 1 from tbuser
    where loginid = :P8_USERNAME
    and password = :P8_PASSWORD;
    and
    kept an error message as 'Invalid credentials'.....
    but I don't know what's going wrong..... I do have few data into the table, and when I am entering the same data(with case sensitive) I am getting the Error message, rather than when the credentials are perfect user should be allowed to enter into the current page(where I have created this form and validation procedure)....
    any idea what's going worng and where...????
    thxs.... appreciated..
    regards,
    Kumar

  • Activate only one cell in the table column

    Hi experts,
      I am facing a problem where in i need to allow only one cell for input in the complete table.
      Suppose i have 4 rows and 5 columns, and i want to allow only one field for input in the complete table based on a condition.
    Can someone help me how to achieve this?
    Regards,
    Madhu

    hi madhu,
           what you ca do is, have an extra attribute  in the node that is bound o the table, this attribute must be bound to the read only property of the cell. so according to your condition fill the attribute with 'X' or no value so that it will be in read only or editable mode.
    ---regards,
       alex b justin

  • How to disable perticluar cell of the table on the screen,at run time?

    HI All,
    I am using table control on the screen.
    I have 5 field in the table control.
    out of which one is posnr.
    Now, if user doesnt enters the value of posnr then it should be created automatically.
    I have written the code for that ,but this perticlar cell (for which posnr is generated automatically ) should be disabled now.
    Can anybody tell me how can i do it?
    Thnx in advance.

    Hello Sanjay,
      Write a module inside the loop...endloop in the PBO of your screen. Inside the module, check the field and disable it by modifying the SCREEN table.
    loop at itab with control tctrl.
      module modify screen.
    endloop.
    module modify_screen output.
      loop at screen.
       if screen-name cs 'POSNR'.
       if itab-posnr is not initial.
         screen-input = 0.
       else.
         screen-input = 1.
       endif.
       modify screen.
       endif.
      endloop.
    endmodule.
    Regards,
    Manoj

  • How make Invisible a particular Cell in the TAble Control.

    Dear Freinds,
           I have requirement where in on a particular conditon i have to close one of the fields in the TAble contorl . That is i have to make it as invisible ....iam able only to make only display (greyed out) only iam not able to make invisible.
    Please could any one let me know how can we make invisible a particular field.
    regards
    divya.

    Hi,
    Try this it works,
    LOOP AT tc_release_ord-cols INTO wa_cols.   "tc_release_ord-----> table control
          CASE wa_cols-screen-name.
            WHEN 'ZRELEASE_ORDER-SPOTS1'.
              IF spots1 = ' '.                                            > use your condition here
                wa_cols-invisible = 'X'.                           > set property to invisible
                MODIFY tc_release_ord-cols FROM wa_cols.  >modify table control
              ENDIF.
            WHEN 'ZRELEASE_ORDER-SPOTS2'.
              IF spots2 = ' '.
                wa_cols-invisible = 'X'.
                MODIFY tc_release_ord-cols FROM wa_cols.
              ENDIF.
            WHEN 'ZRELEASE_ORDER-SPOTS3'.
              IF spots3 = ' '.
                wa_cols-invisible = 'X'.
                MODIFY tc_release_ord-cols FROM wa_cols.
              ENDIF.
    endcase.
    Endloop.
    Hope it helps you,
    Regards,
    Abhijit G. Borkar

  • Is it possible to wrap text in cells of a Table indicator?

    I have read the contents of an Excel file into a Table indicator and would like to wrap text within certain cells.
    Solved!
    Go to Solution.

    You can do this - sort of...
    LV will not auto wrap the contents of a cell automatically. However, if there are hard line breaks, you can make LV expand the cell vertically to show all the lines. It will not however, autoutomatically size the cell width.
    Sounds like this might be a good project for an XControl.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • Adding ToolTip for individual cell in the table

    Hi everybody,
    Its urgent. I want to add ToolTip for individual cells. What I have implemented, it show same ToolTip for each cell. I want different ToolTip for individual cell.
    My cells are not editable, as i need this.
    Pleae help me.
    Thanks in Advance.
    Dawoodzai

    Hi,
    See this demo pasted below-
    import java.awt.*;
    import javax.swing.*;
    public class SimpleTableDemo extends JFrame {
         public SimpleTableDemo() {
              super("SimpleTableDemo");
              Object[][] data = {
                   {"Mary", "Campione", "Snowboarding", new Integer(5), new Boolean(false)},
                   {"Alison", "Huml", "Rowing", new Integer(3), new Boolean(true)},
                   {"Kathy", "Walrath", "Chasing toddlers", new Integer(2), new Boolean(false)},
                   {"Sharon", "Zakhour", "Speed reading", new Integer(20), new Boolean(true)},
                   {"Angela", "Lih", "Teaching high school", new Integer(4), new Boolean(false)}
              String[] columnNames = {"First Name", "Last Name", "Sport", "# of Years", "Vegetarian"};
              final JTable table = new MyTable(data, columnNames);
              table.setPreferredScrollableViewportSize(new Dimension(500, 70));
              JScrollPane scrollPane = new JScrollPane(table);
              getContentPane().add(scrollPane, BorderLayout.CENTER);
         public static void main(String[] args) {
              SimpleTableDemo frame = new SimpleTableDemo();
              frame.pack();
              frame.setVisible(true);
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class MyTable extends JTable {
         public MyTable(Object[][] rowData, Object[] columnNames) {
              super(rowData,columnNames);
         public String getToolTipText(MouseEvent e) {
              int r = rowAtPoint(e.getPoint());
              int c = columnAtPoint(e.getPoint());
              return getValueAt(r,c).toString();
    }

  • How to make a particular cell of the table font different?

    hi friends,
    i have a table. i wanted the (only)last row data to be displayed in the bold font.
    is it possible?
    help needed urgently
    regards,
    Deepa Raghuraman

    class BoldTableCellRenderer extends DefaultTableCellRenderer {
      public Component getTableCellRendererComponent(JTable table,Object value,boolean isSelected,boolean hasFocus,int row,int column) {
        Component c = super.getTableCellRendererComponent(table,value,isSelected,hasFocus,row,column);
        if (row == table.getRowCount() -1) {
          Font f = UIManager.getFont("Table.font");
          c.setFont(new Font(f.getFontName(),Font.BOLD,f.getSize()));
        } else {
          c.setFont(UIManager.getFont("Table.font");
        return c;
    }and then set this Renderer as your table renderer by
    table.setDefaultRenderer(Object.class,new BoldTableCellRenderer());Its untested and may have syntax errors (I haven't compiled it), but I hope it gives you an idea.

  • SQL TO search for a text from one of the table in a scheme(user)

    Hi folks
    Is there any way to serch for a text from a table in a schema(user) where we dont know from which table that text belongs to .
    If yes please post me ..
    Thanks

    Try this
         SQL>  var val varchar2(5)
         SQL>  exec :val := 'as'
         PL/SQL procedure successfully completed.
         SQL>  select distinct substr (:val, 1, 11) "Searchword",
                         substr (table_name, 1, 14) "Table",
                         substr (t.column_value.getstringval (), 1, 50) "Column/Value"
                    from cols,
                         table
                            (xmlsequence
                                (dbms_xmlgen.getxmltype ('select ' || column_name
                                                         || ' from ' || table_name
                                                         || ' where upper('
                                                         || column_name
                                                         || ') like upper(''%' || :val
                                                         || '%'')'
                                                        ).extract ('ROWSET/ROW/*')
                            ) t
         --        where table_name in ('EMPLOYEES', 'JOB_HISTORY', 'DEPARTMENTS')
                order by "Table"      
         Regards
    Singh

  • Using a button and a textfield in the same cell of a table

    I have been struggling with this problem for ages, please someone help...
    I am trying to implement a table similar to NetBeans property sheet editor where you have a textfield and a button with "..." in the same table cell. The button is used to invoke a custom editor.
    I have most things working, custom renderers, custom editors and such.
    However, the focus interactions on the table seem completely screwed. Clicking in the editor causes the cell to switch to editing mode as expected. Pressing cursor down or tab, which should close the editor and move focus to the next cell down does not work - the editor closes but the focus disappears to a completely different component elsewhere on my GUI.
    My textfield and button are on a JPanel, and I return that JPanel when getTableCellEditorComponent is called.
    If I switch out the JPanel and instead return the textfield, the focus works as normal.
    I've even looked at the NetBeans source but I can't work out what their trick is.
    Any tips would be gratefully received.
    TIA.

    Thanks for your time, Jeanette...
    Here is a bare-bones example of the problem I'm having. I'm running on JDK1.4 and JDK1.3.1_02.
    I've tried some tricks (hacks) with getNextFocusableComponent and requestDefautFocus and such but with no success.
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.table.*;
    * This example shows a keyboard/focus navigation problem when using a JPanel
    * as a table cell editor. The JPanel contains a textfield and a button.
    * Click in the editor to invoke it, and tab-off (or press cursor down). The
    * edit ends, but the focus disappears rather than moving to the next cell in
    * the table.
    * Change the line that returns the panel to return a text field instead, and
    * all is well.
    public class Test
      public static void main( String[] args )
        new Test();
      public Test()
        JFrame f = new JFrame();
        f.setContentPane( new TablePanel() );
        f.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
        f.setSize( 800, 600 );
        f.setVisible( true );
      class TablePanel extends JPanel
        TablePanel()
          setLayout( new BorderLayout() );
          JTable table = new JTable();
          table.setDefaultEditor( Object.class, new MyEditor() );
          table.setModel(
            new DefaultTableModel(
              new Object[][]
                {null, null},
                {null, null},
                {null, null},
                {null, null}
              new String[] { "A", "B" } ) );
          add( table, BorderLayout.CENTER );
      class MyEditor extends AbstractCellEditor implements TableCellEditor
        private JComponent myEditorPanel;
        private JTextField myTextField;
        MyEditor()
          myEditorPanel = new MyEditorPanel();
          myTextField = new JTextField();
        public Object getCellEditorValue()
          return null;
        public Component getTableCellEditorComponent( JTable table, Object value,
                                                      boolean isSelected,
                                                      int row, int column )
          return myEditorPanel;   // Problems...
    //      return myTextField;   // Keyboard and focus as expected
      class MyEditorPanel extends JPanel
        JTextField tf;
        MyEditorPanel()
          setLayout( new BorderLayout() );
          tf = new JTextField();
          add( tf, BorderLayout.CENTER );
          add( new JButton( "edit" ), BorderLayout.EAST );

  • How to search text in the table?

    Suppose, I've selected some fragment in my document, and I need to find and replace some text in it. Everything is ok, untill I select a part of a table with this text. Does anyone has idea, how to search through the selected cells in the table? Or, just how to iterate them?
    Thanks!

    var doc = app.ActiveDoc;
    var tbl = doc.SelectedTbl;
    // Navigate to the first selected row.
    var row = tbl.FirstRowInTbl;
    while (row.ObjectValid() === 1) {
        if (row.id === tbl.TopRowSelection.id) {
            break;
        row = row.NextRowInTbl;
    // Process the selected rows.
    while (row.ObjectValid() ===1) {
        cell = row.FirstCellInRow;
        while (cell.ObjectValid() === 1) {
            if ((cell.CellColNum >= tbl.LeftColNum) && (cell.CellColNum <= tbl.RightColNum)) {
                // Do something here...
            cell = cell.NextCellInRow;
        if (row.id === tbl.BottomRowSelection.id) {
            break;
        row = row.NextRowInTbl;
    This should do what you want.
    Rick

  • Using Pages, I have created a document and inserted a Table for use in logging an inventaory. When I came to print this off however the lines for the table were missing but the text was in the Table format, weird! How do I print the Table?

    Using Pages, I have created a document and inserted a Table for use logging an inventory. When I came to print this document the lines and boarders of the Table feature did not print however the text did print in the table format. How do I get the lines and boarders to print also?

    Using Pages, I have created a document and inserted a Table for use logging an inventory. When I came to print this document the lines and boarders of the Table feature did not print however the text did print in the table format. How do I get the lines and boarders to print also?

Maybe you are looking for