Possible to highlight a row in text area which in turn would fire an event?

I'm making a GUI of which the main portion consists of a large text area. The text area would list problems that our company is experiencing - each row would represent a problem. Each row would give a problem ID and a description of the problem. I want to make it so that when the user clicks on a row (a problem), another dialog box would open which would present possible solutions to the user regarding the problem at hand. How would I write code to highlight a row which in turn would fire an event opening up another box?
I thought about going about this another way - have a drop down (jcombobox) integrated into each row which the user can choose from but I'm not sure if you can insert a drop down into a text area (and neatly into a row at that!) so I think the former way may be preferable.
Thanks in advance.
Regards,
Paul

If a java application is required (as opposed to a web-based solution using HTML's linking capabilities) the best approach might be a JList implementation. It could go something like this...
import java.awt.*;
import javax.swing.*;
import javax.swing.event.*;
public class ListFrame extends JFrame
   public ListFrame()
      super("JList example frame");
      getContentPane().add(getListPanel(), BorderLayout.CENTER);
      setDefaultCloseOperation(EXIT_ON_CLOSE);
      pack();
      setVisible(true);
   private Component getListPanel()
      JPanel panel = new JPanel(new BorderLayout());
      final JList list = new JList(new Object[]
         "List option 1...",
         "List option 2...",
         "List option 3..."
      // This will make sure only one item can be checked at a time.
      list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
      // Handle the selection here.
      list.addListSelectionListener(new ListSelectionListener()
         public void valueChanged(ListSelectionEvent e)
            // No need to go on if this was a deselection.
            if (e.getValueIsAdjusting() || list.isSelectionEmpty())
               return;
            // This is where you would have to convert the value that's selected into whatever
            // it is you want to display to the user.  This example just puts the text of the
            // selected item into a messagebox.
            Object selectedItem = list.getSelectedValue();
            JOptionPane.showMessageDialog(ListFrame.this, selectedItem);
      list.setVisibleRowCount(5);
      // The scrollpane will control the scrolling of the list (so you can have as many options
      // as you want).  Standard JScrollPane functionalities can be used to control various
      // visual aspects of the list.     
      JScrollPane scroll = new JScrollPane(list);
      scroll.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
      panel.add(scroll, BorderLayout.CENTER);
      return panel;
   public static void main(String[] args)
      new ListFrame();
}I know this is quite after-the-fact, but I hope it helps (if you hadn't already solved the problem :) )

Similar Messages

  • Is it possible to highlight a row in ALVLIST

    Hi,
      Is it possible to highlight a row in an ALV List ...If so how to do it?
    Kindly help.
    Thanks.

    hi ,
    u can colour a perticular row...
    like,
    TABLES:     ekko.
    TYPE-POOLS: slis.                                 "ALV Declarations
    *Data Declaration
    TYPES: BEGIN OF t_ekko,
      ebeln TYPE ekpo-ebeln,
      ebelp TYPE ekpo-ebelp,
      statu TYPE ekpo-statu,
      aedat TYPE ekpo-aedat,
      matnr TYPE ekpo-matnr,
      menge TYPE ekpo-menge,
      meins TYPE ekpo-meins,
      netpr TYPE ekpo-netpr,
      peinh TYPE ekpo-peinh,
      line_color(4) TYPE c,     "Used to store row color attributes
    END OF t_ekko.
    DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
          wa_ekko TYPE t_ekko.
    *ALV data declarations
    DATA: fieldcatalog TYPE slis_t_fieldcat_alv WITH HEADER LINE,
          gd_tab_group TYPE slis_t_sp_group_alv,
          gd_layout    TYPE slis_layout_alv,
          gd_repid     LIKE sy-repid.
    *Start-of-selection.
    START-OF-SELECTION.
      PERFORM data_retrieval.
      PERFORM build_fieldcatalog.
      PERFORM build_layout.
      PERFORM display_alv_report.
    *&      Form  BUILD_FIELDCATALOG
          Build Fieldcatalog for ALV Report
    FORM build_fieldcatalog.
      fieldcatalog-fieldname   = 'EBELN'.
      fieldcatalog-seltext_m   = 'Purchase Order'.
      fieldcatalog-col_pos     = 0.
      fieldcatalog-outputlen   = 10.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'EBELP'.
      fieldcatalog-seltext_m   = 'PO Item'.
      fieldcatalog-col_pos     = 1.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'STATU'.
      fieldcatalog-seltext_m   = 'Status'.
      fieldcatalog-col_pos     = 2.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'AEDAT'.
      fieldcatalog-seltext_m   = 'Item change date'.
      fieldcatalog-col_pos     = 3.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'MATNR'.
      fieldcatalog-seltext_m   = 'Material Number'.
      fieldcatalog-col_pos     = 4.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'MENGE'.
      fieldcatalog-seltext_m   = 'PO quantity'.
      fieldcatalog-col_pos     = 5.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'MEINS'.
      fieldcatalog-seltext_m   = 'Order Unit'.
      fieldcatalog-col_pos     = 6.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'NETPR'.
      fieldcatalog-seltext_m   = 'Net Price'.
      fieldcatalog-col_pos     = 7.
      fieldcatalog-outputlen   = 15.
      fieldcatalog-datatype     = 'CURR'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'PEINH'.
      fieldcatalog-seltext_m   = 'Price Unit'.
      fieldcatalog-col_pos     = 8.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
    ENDFORM.                    " BUILD_FIELDCATALOG
    *&      Form  BUILD_LAYOUT
          Build layout for ALV grid report
    FORM build_layout.
      gd_layout-no_input          = 'X'.
      gd_layout-colwidth_optimize = 'X'.
      gd_layout-info_fieldname =      'LINE_COLOR'.
    ENDFORM.                    " BUILD_LAYOUT
    *&      Form  DISPLAY_ALV_REPORT
          Display report using ALV grid
    FORM display_alv_report.
      gd_repid = sy-repid.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program = gd_repid
          is_layout          = gd_layout
          it_fieldcat        = fieldcatalog[]
          i_save             = 'X'
        TABLES
          t_outtab           = it_ekko
        EXCEPTIONS
          program_error      = 1
          OTHERS             = 2.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " DISPLAY_ALV_REPORT
    *&      Form  DATA_RETRIEVAL
          Retrieve data form EKPO table and populate itab it_ekko
    FORM data_retrieval.
      DATA: ld_color(1) TYPE c.
      SELECT ebeln ebelp statu aedat matnr menge meins netpr peinh
       UP TO 10 ROWS
        FROM ekpo
        INTO TABLE it_ekko.
    *Populate field with color attributes
      LOOP AT it_ekko INTO wa_ekko.
    Populate color variable with colour properties
    Char 1 = C (This is a color property)
    Char 2 = 3 (Color codes: 1 - 7)
    Char 3 = Intensified on/off ( 1 or 0 )
    Char 4 = Inverse display on/off ( 1 or 0 )
              i.e. wa_ekko-line_color = 'C410'
        ld_color = ld_color + 1.
    Only 7 colours so need to reset color value
        IF ld_color = 8.
          ld_color = 1.
        ENDIF.
        CONCATENATE 'C' ld_color '10' INTO wa_ekko-line_color.
    wa_ekko-line_color = 'C410'.
        MODIFY it_ekko FROM wa_ekko.
      ENDLOOP.
    ENDFORM.                    " DATA_RETRIEVAL

  • Showing Multiple Row in text area

    My requirement is like ( in TextArea display only )
    head1 head2 head3 head4
    A b c d
    a' b' c' d'
    where
    head1..head --> header of the report
    a..d and a'..d' ---> rows of data need to be fetched from DB...
    i tried using various workarounds but nothing seems to work out...
    any help wud be apprciated
    -prashant

    Yes i intend to create report....but somehow i feel it is better to use EASY Report instead of showing records in text area ...thanks anyway

  • Issue with rightclicking in a text area which uses Squiggly

    Hi,
    I have found an issue with using squiggly in a TextArea component.
    I was able to simulate the same in the demo url . http://labs.adobe.com/technologies/squiggly/demo/#
    The issue is when I enter a random text like "aaaaaaaaaaaaaaaaaaaaaaaaaaaa" and then when I do a right click on the text area,
    I get an exception as shown below.
    TypeError: Error #1010: A term is undefined and has no  properties.
    at  com.adobe.linguistics.spelling.core::SuggestionManager/nsuggest()[C:\squiggly\esg\squiggl y\main\AdobeSpellingEngine\src\com\adobe\linguistics\spelling\core\SuggestionManager.as:20 1]
    at  com.adobe.linguistics.spelling.core::SquigglyEngine/suggest()[C:\squiggly\esg\squiggly\ma in\AdobeSpellingEngine\src\com\adobe\linguistics\spelling\core\SquigglyEngine.as:285]
    at  com.adobe.linguistics.spelling::SpellChecker/getSuggestions()[C:\squiggly\esg\squiggly\ma in\AdobeSpellingEngine\src\com\adobe\linguistics\spelling\SpellChecker.as:145]
    at  com.adobe.linguistics.spelling.ui::HaloWordProcessor/getSuggestionsAtPoint()[C:\squiggly\ esg\squiggly\main\AdobeSpellingUI\src\com\adobe\linguistics\spelling\ui\HaloWordProcessor. as:49]
    at  com.adobe.linguistics.spelling.ui::SpellingContextMenu/handleContextMenuSelect()[C:\squig gly\esg\squiggly\main\AdobeSpellingUI\src\com\adobe\linguistics\spelling\ui\SpellingContex tMenu.as:124]
    So is there any fix for the above error or a workaround for this.
    This has been filed as bug in an application I am working on.
    regards,
    Anup Francis

    Thank you for reporting this issue.
    I was unable to reproduce this problem under the following configurations:
    Mac OSX 10.6.3, Flash 10.0.42.34, Firefox 3.6.3
    Windows XP, Flash 10.0.45.2, IE 8.0.6001
    Windows XP, Flash 10.1.53.21, Firefox 3.6.3
    Could you provide more details about the software configurations you have that reproduces this problem?
    Also, is there a specific location you click in the TextArea?  On the word?  On white space?
    Thanks,
    - Bruce, Adobe

  • Flex 4 spark text area which expands to the correct height

    Whats the best way to get a simple <s:RichText area which expands to the correct height of the text property?

        <s:RichText text=" test test test test test test test test test test test testtest. test test test test test test test test test test test testtest. test test test test test test test test test test test testtest. test test test test test test test test test test test testtest.test test test test test test test test test test test testtest END." width="400" />
    works for me.  Don't specify a height and it will measure the text.
    BTW, while setting s:TextArea heightInLines to NaN will get it to auto-size the height that is not the intended usuage.  You should use s:RichEditableText which does support auto-sizing in either the width or height dimension if it is not specified.

  • Is it possible to have two rows of text fields per entry in a tabular form?

    Hi,
    I'm constructing a tabular form with several text fields for each entry, and I have just been advised we need twice as many text fields now as the requirements have changed.
    Anyway I am running out of real estate on the page without having to use horizontal scroll bars, and am wondering if it is possible to arrange the text fields into two rows in the tabular form for data entry. I have successfully done this for display as text fields, but not sure if it can be done in this instance.
    Any help would be greatly appreciated.
    Application Express 4.1.1.00.23
    Greg
    Edited by: Snowman on Nov 30, 2012 12:02 PM

    Snowman wrote:
    Hi,
    I'm constructing a tabular form with several text fields for each entry, and I have just been advised we need twice as many text fields now as the requirements have changed.In the first place I'd strongly recommend not using tabular forms: +{thread:id=850889}+.
    Anyway I am running out of real estate on the page without having to use horizontal scroll bars, and am wondering if it is possible to arrange the text fields into two rows in the tabular form for data entry. I have successfully done this for display as text fields, but not sure if it can be done in this instance.If you must, create a custom named column template and base the tabular form report on this: {message:id=10399762}

  • Interactive text application: Which Adobe product would be most appropriate?

    Hello All,
    I will be creating an interactive, online text application and I would like to know which of the Adobe (or any other) products you think is best suited for this project. Your input is greatly appreciated. Here is a description of the final product:
    The initial interactive document will have about 200 pages with about 350 words per page (more pages will be added weekly). There will be a variety of fonts used in this document (some 3d text, some flat text, etc.)Thirty percent of the words will glow on the page (at runtime) and upon mouseover the text that makes up these words will expand (vertically and horizontally). Upon click images and movies with sound (animations and videos) will pop up (over the text document) and play. Sometimes a click on a word will change the text in the rest of the document (introduce new fonts, colors and font sizes).
    Which product would best accomplish this? Flash, AfterEffects or something else?
    Thanks much!

    For the time spent learning how to use Illustrator and the cost of it you could probably hire a professional.
    If you want to do it yourself for a small company, avoid Adobe all together unless you want to use their 30 day trails - google it for info.
    Gimp is good, free, simple. http://www.gimp.org/downloads/
    And as above, Publisher and Expression design can be OK - generally it's what you do with the software not the software itself.

  • More than one text area on a slide master... how?

    Is it possible to define more than one text area on a master slide? If so how?
    I want to have a layout with two columns of text - a fairly common layout in presentation packs - but can't persuade Keynote to accept this as a layout for a template. I realise that there can only be one 'body' area, but any attempt to produce a 'fake' second body area fails - whether I put in a text box or a shape with text in.
    If I put it in as a text box, I can't put a limit on how big the box is.
    If I put it in as a shape with text in, when I try to enable the shape as a text placeholder, it forces the whole text in box to have same format as 'top level' outline.
    Any ideas?

    If you want two columns of text, why not set up the Body textbox with two columns? Select the Body textbox on the slide master, then in the Text Inspector, in the Columns tab, set however many columns you want.

  • Text Area (Cursor)

    Is it possible to hide the blinking cursor in an input field?
    If yes please let me know the code

    Whoa Its resolved
    I unchecked the editable option of text area which doesnt allow the user to enter anything in the textarea until the audio is completed. This has resolved the issue of a cursor blinking when going to Slide 2 and coming back to Slide 3.
    Just need to resolve the usability issue part now
    I just need to hide the mouse cursor now till the audio is completed and then allow the user to type.

  • Report Title and Text Area issue when exported to pdf using Viewer

    Hi there,
    We are using OracleBI Discoverer Version 10.1.2.55.26
    We have reports that displays Report title containing the following
    - Report Title
    - Runt Date and Time
    - Page No
    And text area which displays 'Last Page'
    Following properties are set at the worksheet level using page setup
    Report Title --> 'Print on every Page'
    Text Area --> 'Print on last page'
    The report when exported to PDF using Discoverer plus works fine and displays report title and text area as defeined.
    But when we try to export the same report to pdf from Discoverer viewer, it displays
    - Report title on first page only.
    - text area on all pages
    All our users accesses report using discoverer viewer so we cannot open discoverer plus to them.
    Is there a solution which will enable us to export the report in pdf using discoverer viewer and displays the same output as discoverer plus.
    Please let me know... If you have any questions then please feel free to ask.
    Thanks in advance for your help...
    Manish

    but when opened on other os x machines some text is colored differently than it should be
    Well, if typographic objects are colour managed, the colour appearance is dependent on the source ICC profile that describes the colourants in the typographic objects and the destination ICC profile that describes the colours the display is able to form and the RBC colourant combinations that will form those colours.
    In general, typographic objects should have special treatment, since the expectation is not that typographic objects should be colour managed, but that typographic objects should simple be set to the maximum density of dark. On a display, that is R=0 G=0 B=0 and on a seperations device (a lithographic press) that is C=0 M=0 Y=0 K=100.
    If for some reason typographic objects are colour managed, and if the ICC profiles for the displays are off by half a mile or more in relation to the actual state of the display system, then the colours will not be the same. On the other hand, if those displays are calibrated and characterized, then the colourants will be converted to form the same colours on the displays.
    /hh

  • How can i make the results of dos command print to text area in a gui????

    I need to get the results from a command line application to print in a text area located in a gui... i have the following code written, which should run the command... if run from a dos window, the command prints the list of what's in a jar file to the screen.... i want that info that is printed to go in a text area which i have named textBox which is global to the program.. i know textBox.appends() is what i should use but how do i retrieve the info from the dos window to put in the appends method?
    The code is below for the method..
    Thanks,
    DH
         /*     Runs the DOS Command for listing a JAR File     */
         public void jarList ( ) // Needs To Be Fixed!!
              listFieldText = listField.getText();
              String command;      
              command = "jar tf " + listFieldText;
              System.out.println(command);
              Runtime rt = Runtime.getRuntime();
              try
                   Process child = rt.exec(command);
                   child.waitFor();
                   System.out.println("Process exit code is: " + child.exitValue());
              catch(IOException e)
                   System.err.println("IOException starting process!");
              catch(InterruptedException e)
                   System.err.println("Interrupted waiting for process!");
    }

    Replace child.waitFor()with:          BufferedReader br=new BufferedReader(new InputStreamReader(child.getInputStream()));
              String s="";
                    while((s=br.readLine())!=null) {
                        textbox.append(s);
                    }Mark

  • Text Areas in Apex 4.2.2 - Can't be read dynamically - Bug?

    Hi,
    i encountered a big problem after upgrading Apex from 4.1 to 4.2.2.
    On an application page there is a Text Area which will be read and processed after clicking a button. I didn't want a refresh of the page and did it with a dynamic action.
    All this worked like a charm with 4.1.
    Since the upgrade, the value of the Text Area is always returned as null while processing the dynamic action, but the value is filled by the user!
    When i change the type of the Element to Rich Text Area everything works fine, but i don't want this because i don't want HTML in the corresponding table.
    Is this a bug? How can i workaround it?
    Thank you
    Regards
    Daniel

    Yep - it's a bug. But it only occurs when there is also a rich text editor present. The issue is in the initialization of an apex.item instance. When using jQuery .val() the value of the textarea can be retrieved, but not when using $v. And $v is a shortcut to apex.item.getValue. Since a dynamic action is an apex thing, it'll use apex.item.getValue to get the value. And that is returning nothing. The reason is not getValue being wrong, but an incorrect init of the apex.item object when the item concerns a textarea and there is a rich text editor present.
    To explain this somewhat:
    In getValue there is this code:
                if( !lArray ) {
                    switch( _self.item_type ) {
                        /* check single checkbox entry */
                        case 'CHECKBOX'             :lReturn = ( _self.node.checked ) ? _self.node.value : ""; break;
                        /* check single radio entry */
                        case 'RADIO'                :lReturn = ( _self.node.checked ) ? _self.node.value : ""; break;
                        case 'TEXT'                 :lReturn = _self.node.value; break;
                        case 'POPUP_LOV'            :lReturn = _self.node.value; break;
                        case 'POPUP_KEY_LOV'        :lReturn = apex.jQuery( '#' + _self.node.id + "_HIDDENVALUE", apex.gPageContext$ ).val(); break;
                        case 'DATEPICKER'           :lReturn = _self.node.value; break;
                        case 'HIDDEN'               :lReturn = _self.node.value; break;
                        case 'DISPLAY_SAVES_STATE'  :lReturn = _self.node.value; break;
                        case 'DISPLAY_ONLY'         :lReturn = _self.node.innerHTML; break;
                        case 'TEXTAREA'             :lReturn = _self.node.value; break;
                        case 'FCKEDITOR'            :
                                oEditor = FCKeditorAPI.GetInstance( _self.node.id ) ;
                                lReturn = oEditor.GetHTML();
                                break;
                        default                     :lReturn = ""; break;
                return lReturn;
    When textarea you'd expect a return of the value, but nope. Obviously when performing $v on the textarea nothing is returned so what occurs is the default clause.
    Using
    document.getElementById("P1_TEXTAREA").value
    //or
    $("#P1_TEXTAREA").val()
    will return the value.
    However, what is being tested is _self.item_type and _self.node.value.
    These are properties instantiated when apex.item is called, as such
    apex.item("P1_TEXTAREA")
    Checking the console will show all the properties assigned. The node is correct, but item_type is empty... That explains the empty return from getValue.
    So why is the item_type empty when there is a text editor?
    item.js, line 147 (for those interested)
        if( lNodeType === 'FIELDSET' ) {
            //snipped out since irrelevant
        }else if( lNodeType === 'INPUT' ) {
            //snipped out since irrelevant
            // if the node type is not a fieldset or an input, initialise item_type accordingly
        } else {
            _self.item_type = lNodeType;
            switch( _self.item_type ) {
                case 'TEXTAREA':
                    if( _self.node.parentNode.className === 'html_editor' && _self.node.parentNode.tagName === 'FIELDSET' ) {
                        _self.item_type = 'FCKEDITOR';
                    } else {
                        try {
                            if (CKEDITOR.instances[ _self.id ] ) {
                                _self.item_type = 'CKEDITOR3';
                            } else {
                                _self.item_type = null;
                        } catch( e ) {}
                    break;
                case 'SELECT':
                    break;
                case 'SPAN':
                    if( _self.node.className === 'display_only' ) {
                        _self.item_type = 'DISPLAY_ONLY';
                    break;
                default:
                    _self.item_type = false;
        } // end if on lNodeType
    } //end if (_self.node)
    The relevant parts here is the else clause on node type. You can see that firstly item_type is assigned the nodetype. In the case of a textarea the nodetype will be set to "TEXTAREA". Good.
    Then, case TEXTAREA. First if? Nope, not an htmleditor. Else. Try. And in this try is the mistake. If there are no rich text editors then attempting to call CKEDITOR will throw an error since it will not be instantiated. That is good though, and makes sure that when there are no RTE's that the item_type will correctly be textarea since there is no re-assigment happening of item_type.
    Consider now when there are RTE's. The CKEDITOR object will be instantiated, so no error. However, the textarea is obviously not in the array of editors since it is no editor, so it won't be found and we land in the else clause. There the item type is assigned "null". Thus, no longer "TEXTAREA".
    So subsequently, when calling getValue the code will return nothing because of the "unknown" itemtype of the item.
    So all that to say that yes, there is a bug in the apex code when you mix a textarea and a rich text editor on a page. Is there anything you can do to solve this? No, not really, save for editing item.js to account for the faulty assignment.
    If you still have this requirement to have a textarea and RTE on the same page, then I can only advise you not to use a dynamic action, but using an ondemand process and calling it yourself, providing the correct value by using jQuery calls instead of apex ones.
    (plus: should be logged as a bug by someone...)

  • Conditionally disable text area

    I have a text area which I want to disable on load if another items value is greater than 0.
    I do not want to make the text area read only, as this dispalys right across the page.
    I have tried several things, but to no avail. My latest was
    <script type="text/javascript">
    function disDescription() {
    var aa = $v('P148_ITEM_A')
    if (aa > '0')
    $x_disableItem('P148_ITEM_B', aa);
    <script>
    onload="disDescription();
    {code}
    Cheers
    Gus
    Edited by: Gus C on Sep 28, 2010 7:58 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Hi,
    You have at least one small problem in code. You do not close script tag
    Here is sample how you can do it. Place to page HTML header
    <script type="text/javascript">
    addLoadEvent(function(){var a=$x('P148_ITEM_A');if(a.value*1>0){$x_disableItem(a,true)}});
    </script>Regards,
    Jari
    Edited by: jarola on Sep 28, 2010 6:24 PM
    Item name corrected

  • Writing in a Text Area from a different class.

    Hi,
    I need to write some text in a Text Area which is in a class I've call GUI where I handle all the graphic stuff but I need to do it from another class which handles packets that come through a COM port.
    Is there anyway to do that?
    Thanks!

    Thank you! I'll try that but I think I might have problems with that since an instance of the Gui class was already created. I'm using the NetBeans Gui design form wich already makes the code for the Gui and this is what I have public class Gui extends javax.swing.JFrame {
        Connection connection = new Connection();
        /** Creates new form Gui */
        public Gui() {
            initComponents();
        /** This method is called from within the constructor to
         * initialize the form.
         * WARNING: Do NOT modify this code. The content of this method is
         * always regenerated by the Form Editor.
        @SuppressWarnings("unchecked")
        // <editor-fold defaultstate="collapsed" desc="Generated Code">
        private void initComponents() {
            bnConectar = new javax.swing.JButton();
            cbPuerto = new javax.swing.JComboBox();
            lblPuerto = new javax.swing.JLabel();
            jScrollPane1 = new javax.swing.JScrollPane();
            taPuerto = new javax.swing.JTextArea();
            bnPing = new javax.swing.JButton();
            jMenuBar1 = new javax.swing.JMenuBar();
            mArchivo = new javax.swing.JMenu();
            miNuevoP = new javax.swing.JMenuItem();
            miCargarP = new javax.swing.JMenuItem();
            miGuardarP = new javax.swing.JMenuItem();
            miSalir = new javax.swing.JMenuItem();
            mEdicion = new javax.swing.JMenu();
            mMonitorizacion = new javax.swing.JMenu();
            miMonON = new javax.swing.JMenuItem();
            miMonOFF = new javax.swing.JMenuItem();
            miPing = new javax.swing.JMenuItem();
            miConfig = new javax.swing.JMenuItem();
            mAyuda = new javax.swing.JMenu();
            miAcerca = new javax.swing.JMenuItem();
            setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
            setTitle("Monitorizaci?n");
            bnConectar.setFont(new java.awt.Font("Tahoma", 1, 11));
            bnConectar.setText("Conectar");
            bnConectar.setToolTipText("Conecta con el puerto seleccionado.");
            bnConectar.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    bnConectarActionPerformed(evt);
            cbPuerto.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
            lblPuerto.setFont(new java.awt.Font("Tahoma", 1, 14));
            lblPuerto.setText("Puerto");
            taPuerto.setColumns(20);
            taPuerto.setRows(5);
            jScrollPane1.setViewportView(taPuerto);
            bnPing.setFont(new java.awt.Font("Tahoma", 1, 11));
            bnPing.setText("Ping");
            bnPing.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    bnPingActionPerformed(evt);
            mArchivo.setText("Archivo");
            miNuevoP.setText("Nuevo Proyecto");
            mArchivo.add(miNuevoP);
            miCargarP.setText("Cargar Proyecto");
            mArchivo.add(miCargarP);
            miGuardarP.setText("Guardar Proyecto");
            mArchivo.add(miGuardarP);
            miSalir.setText("Salir");
            mArchivo.add(miSalir);
            jMenuBar1.add(mArchivo);
            mEdicion.setText("Edici?n");
            jMenuBar1.add(mEdicion);
            mMonitorizacion.setText("Monitorizaci?n");
            miMonON.setText("Monitorizaci?n ON");
            mMonitorizacion.add(miMonON);
            miMonOFF.setText("Monitorizaci?n OFF");
            mMonitorizacion.add(miMonOFF);
            miPing.setText("Ping");
            mMonitorizacion.add(miPing);
            miConfig.setText("Configuraci?n");
            mMonitorizacion.add(miConfig);
            jMenuBar1.add(mMonitorizacion);
            mAyuda.setText("Ayuda");
            miAcerca.setText("Acerca");
            mAyuda.add(miAcerca);
            jMenuBar1.add(mAyuda);
            setJMenuBar(jMenuBar1);
            javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
            getContentPane().setLayout(layout);
            layout.setHorizontalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                    .addContainerGap()
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                        .addGroup(layout.createSequentialGroup()
                            .addComponent(lblPuerto)
                            .addGap(17, 17, 17)
                            .addComponent(cbPuerto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(bnPing)
                            .addComponent(bnConectar)))
                    .addGap(45, 45, 45)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 214, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(287, Short.MAX_VALUE))
            layout.setVerticalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                    .addContainerGap()
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(layout.createSequentialGroup()
                            .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addContainerGap())
                        .addGroup(layout.createSequentialGroup()
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(cbPuerto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(lblPuerto))
                            .addGap(18, 18, 18)
                            .addComponent(bnConectar)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 12, Short.MAX_VALUE)
                            .addComponent(bnPing)
                            .addContainerGap(172, Short.MAX_VALUE))))
            pack();
        }// </editor-fold>
        private void bnConectarActionPerformed(java.awt.event.ActionEvent evt) {                                          
            try{
               connection.connect();
            }catch (XBeeException e){
        private void bnPingActionPerformed(java.awt.event.ActionEvent evt) {                                      
            try{
               connection.ping();
            }catch (XBeeException e){
        * @param args the command line arguments
        public static void main(String args[]) throws Exception, InterruptedException {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                   new Gui().setVisible(true);
        }Would that be a problem?
    Thanks again!

  • Multi Row Text Item (Not Text Area)

    Is it possible to create a multi-row text item for entering data i.e. a text area WITHOUT a scrollbar?. I know exactly how many rows I need e.g. an address field
    The scroll bar looks terrible on printouts when printing off data entry forms.
    Also any way of having ruled lines appear in the multi row text field?
    regards
    Paul

    Hello,
    No, just use three text items. or a textarea with the style ="overflow:hidden;" should supress the scrollbar
    Carl
    Message was edited by:
    Carl Backstrom

Maybe you are looking for

  • What are the mandatory para SO_NEW_DOCUMENT_ATT_SEND_API1

    Hii All, what r the mandary parameters that i hv to gv for this Fm SO_NEW_DOCUMENT_ATT_SEND_API1. for mail.. i hv done till converting OTF data to PDF format n now my requiremnet is to send attachment through mail. so how to use SO_NEW_DOCUMENT_ATT_S

  • Starting with the base state

    Hello All, I know I have done this before, but it's been awhile since I've created a Flex App. I started with the original "gray" box, and placed an image and text within it. Now when I view it in the browser it's all the way over to the left side of

  • Prob in debugging code in exit EXIT_SAPLF050_004

    Hi In exit func mod EXIT_SAPLF050_004 in include ZX050U05 I've written my code. In the includ before executing my logic I've written break <userid>. But while debugging it's not working. But the include isactivated. I'm testing it through idoc proces

  • Missing something on how NULL's work with this sql... help....

    I'm missing something here and - I'm hoping someone can help me out... IF I have a SQL statement: Select Distinct columna From table1 where columnb = value1 and columna NOT IN ('a','b','c'); Where Value1 is on two rows.... and - columna has a NOT NUL

  • Long timeout before getting new DHCP lease when changing VLAN - 5508

    We have a HA with 5508:s, we are on 7.6.110.0. Since going HA we have seen a new problem with our main WLAN, clients connect to a login net on a login VLAN, after authenticating they get shuttled to another VLAN. After getting initial IP-address and