0

How do I display multiline text in editable textbox on device screen? At the moment, if the text is not editable then it shows the full text in multiline. The same value is displayed in 2 textboxes, one is editable and one is non-editable.

 <groupitem id="WorkExecution.groupitem_1">
    <text cssClass="richText" editable="false"  
     id="WorkExecution.groupitem_1_abc" resourceAttribute="abc"/>
 </groupitem>
 <groupitem id="WorkExecution.groupitem_2">
     <text cssClass="richText" editable="true" 
      id="WorkExecution.groupitem_2_xyz" placeHolder="Tap to enter"
      resourceAttribute="xyz"/>
</groupitem>

e.g. if the value reads -

IBM® Maximo® Anywhere gives you remote access from most mobile devices to Maximo Asset Management processes – work and asset management. It is built with an interface that is customizable, so you can create your own assets.

then the value of abc is displayed properly in multiline format whereas value of xyz is displayed in a single line and not in multiline.

Do I need to apply any CSS here?

Idan Adar
  • 44,156
  • 13
  • 50
  • 89

2 Answers2

0

In the OOB app.xml if you look at the view

<view editableView="WorkExecution.NewWorkLogView" id="WorkExecution.WorkLogDetailView" label="Work Log Entry">

You will see the multi line editable detail attribute near the bottom

            <groupitem id="WorkExecution.WorkLogDetailView_workOrder_groupitem_5">
                <text cssClass="richText" editable="false" id="WorkExecution.WorkLogDetailView_workOrder_groupitem_5_details_Details" label="Details" resourceAttribute="details"/>
            </groupitem>

As you already have the editable and css attributes set, my guess is that on your view it is not defined as an editableView.

0

For a editable multiline widget you need to use the textarea widget. See our WorkLog details page in 7.5.2 for an example.

<groupitem id="WorkExecution.NewWorkLogView_workOrder_groupitem_5">
                        <textarea editable="true" id="WorkExecution.NewWorkLogView_details_0" label="Work Log Details" placeHolder="Tap to enter" resourceAttribute="details"/>
                    </groupitem>
scott dickerson
  • 908
  • 1
  • 5
  • 13
  • Hi Scott, Thanks for your suggestion. I had tried this before but the font in textarea widget automatically changes. Also, is there any way where the text area is fitted to the text size? – Sakshi Joshi Oct 05 '15 at 09:06
  • You should be able to control the textarea font and height and widthwith a different Css style sheet class. We don't have any editable multilingual widget that automatically adjusts its length. – scott dickerson Oct 06 '15 at 18:48