Problem in displaying long string in JTextField

Hi All,
I got problem in displaying long String in JtextField. It does center alignment & I can see middle part of string where length of JTextfield is 6 char. How can I do left alignement so that I can see starting 6 character?
--Harish                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

you may try this:
yourTextFieldName.setHorizontalAlignment(JTextField.LEFT);
or
yourTextFieldName.setHorizontalAlignment(JTextField.LEADING);
hth.

Similar Messages

  • Smartform Problem in Displaying a string data

    Hi Friends,
                     I am facing a problem while displaying a string data in smartform. Actually it is a one of the field's data in an internal table. It is a STRING field type of length 0. While populating in an internal table it is having a all the data(Around 700 char data). But while displaying in a smartform surprizingly only few characters(Around 225 char data). How can i overcome this problem?
    Regards,
    Sekhar.J

    Hi
    try this and see
    Declare some Variables of 72 char each and split that long string data of internal table text field into them and display these variables strings one below other in smartform
    var1 = itab-text+0(72)
    var2 = itab-text+72(72)
    var3 = itab-text+144(72)
    like that
    and display one below other in smartform.
    &VAR1&
    &VAR2&
    &VAR3&
    Reward points for useful Answers
    Regards
    Anji

  • Problem with displaying long numbers in flex.

    I'm trying to display a usps tracking number in a textbox. However it automatically converts to an exponential value. Any way to bypass this?
    I'm getting the value from the xml file.
    this 9121805213907020609207 show up as 9.12180521390702e+21

    Hi,
            When you are Trying to display that no in TextBox directyly pass that number to TextBox as String itself  , If you are not using that value any where in Flex side this is the best Idea But if you want to use that number it will be a problem why because a long value can take a max value of 2^63-1 but your value is more than that.

  • How to display unicode string in alv

    Hi,guys, I came accross one problem on displaying unicode string in alv rows.
    some string like this: \u591c\u9e23\u732a  ,  They are displayed directly in alv. Actually, they are some chinese characters.
    Any one could help me? Should I invoke any function module to convert it ?
    Thanks.

    Hi,
    Kindly refer the link below:
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/1046905c-3acf-2b10-aea6-a70ade12c76f
    Hope this helps you.
    Regards,
    Tarun
    Edited by: Tarun Gambhir on Mar 22, 2009 9:49 AM

  • How to display  LONG TEXT STRING in Module Pool Screen ?

    Hi Experts,
    I want to display long text string, on screen designed through module pool(SE51). I tried to display through input/output field , but it displays it in SINGLE LINE and i have to scroll all through to view all string.
    I want to display it in rectangular format . It doesnt allow me to set HEIGHT of component.
    Please provide solution.
    Thanks in advance.
    Regards
    Deepak

    This is the program where u can get the WA_THEAD from other program like report and trying to display and modifying that text. U can do instead of WA_THEAD u can generate here itself and use also
    *& Module pool       ZMP_LTEXT                                         *
    PROGRAM  ZMP_LTEXT                               .
    TABLES: STXL.
    *&      Module  STATUS_9000  OUTPUT
    MODULE STATUS_9000 OUTPUT.
    CONSTANTS:line_length type i value 132.
    DATA:g_editor type ref to cl_gui_textedit,
         g_editor_container type ref to cl_gui_custom_container,
         CONT1 type scrfname value 'CONT1',
         g_repid like sy-repid,
         g_ok_code like sy-ucomm,
         g_mytable(132) type c occurs 0,
         g_mycontainer(30) type c ,
         v_result(256) type c,
         g_head like thead,
         it_line type table of tline with header line,
         wa_stxl type stxl.
    DATA : BEGIN OF IT_THEAD1,
           ICON TYPE ICON-ID.
           INCLUDE STRUCTURE STXL.
    DATA : END OF IT_THEAD1.
    DATA : IT_THEAD LIKE TABLE OF IT_THEAD1,
           WA_THEAD LIKE LINE OF IT_THEAD.
    IMPORT WA_THEAD FROM MEMORY ID 'ABCD'.
    select SINGLE * from STXL into wa_stxl
                     where tdname = '00006000156500000002'.
    SELECT SINGLE * from STXL into wa_stxl
                      where tdname = WA_THEAD-TDNAME
                      AND TDID = WA_THEAD-TDID
                      AND TDOBJECT = WA_THEAD-TDOBJECT
                      AND TDSPRAS = WA_THEAD-TDSPRAS.
    IF SY-SUBRC NE 0.
    MESSAGE 'NO RECORD EXIST' TYPE 'E'.
    ENDIF.
    MOVE-CORRESPONDING WA_STXL TO G_HEAD.
    SET PF-STATUS 'STATUS'.
    SET TITLEBAR '001'.
      if g_editor is initial.
         CREATE OBJECT G_EDITOR_CONTAINER
           EXPORTING
            PARENT                      =
             CONTAINER_NAME              = CONT1
            STYLE                       =
            LIFETIME                    = lifetime_default
            REPID                       =
            DYNNR                       =
            NO_AUTODEF_PROGID_DYNNR     =
           EXCEPTIONS
            CNTL_ERROR                  = 1
            CNTL_SYSTEM_ERROR           = 2
            CREATE_ERROR                = 3
            LIFETIME_ERROR              = 4
            LIFETIME_DYNPRO_DYNPRO_LINK = 5
             others                      = 6.
         IF SY-SUBRC <> 0.
         MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
         ENDIF.
         CREATE OBJECT G_EDITOR
           EXPORTING
            MAX_NUMBER_CHARS       =
            STYLE                  = 0
       WORDWRAP_MODE          = cl_gui_textedit=>wordwrap_at_fixed_position
    for to fix number of characters in row to 132 characers
             WORDWRAP_POSITION      = line_length
             WORDWRAP_TO_LINEBREAK_MODE = cl_gui_textedit=>true
    for the word to break to next line if it don’t fit in line
            FILEDROP_MODE          = DROPFILE_EVENT_OFF
             PARENT                 = G_EDITOR_CONTAINER
            LIFETIME               =
            NAME                   =
           EXCEPTIONS
            ERROR_CNTL_CREATE      = 1
            ERROR_CNTL_INIT        = 2
            ERROR_CNTL_LINK        = 3
            ERROR_DP_CREATE        = 4
            GUI_TYPE_NOT_SUPPORTED = 5
             others                 = 6  .
         IF SY-SUBRC <> 0.
         MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
         ENDIF.
      REFRESH g_mytable.
         MOVE: WA_THEAD-TDNAME TO STXL-TDNAME,
               WA_THEAD-TDID TO STXL-TDID,
               WA_THEAD-TDOBJECT TO STXL-TDOBJECT,
               WA_THEAD-TDSPRAS TO STXL-TDSPRAS.
        CALL FUNCTION 'READ_TEXT'
        EXPORTING
        CLIENT                        = SY-MANDT
          ID                            = wa_stxl-tdid
          LANGUAGE                      = wa_stxl-tdspras
          NAME                          = wa_stxl-tdname
          OBJECT                        = wa_stxl-tdobject
        ARCHIVE_HANDLE                = 0
        LOCAL_CAT                     = ' '
      IMPORTING
        HEADER                        =
        TABLES
          LINES                         = it_line
      EXCEPTIONS
        ID                            = 1
        LANGUAGE                      = 2
        NAME                          = 3
        NOT_FOUND                     = 4
        OBJECT                        = 5
        REFERENCE_CHECK               = 6
        WRONG_ACCESS_TO_ARCHIVE       = 7
        OTHERS                        = 8
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    LOOP AT IT_LINE INTO V_RESULT.
       APPEND V_RESULT TO G_MYTABLE.
    ENDLOOP.
    CALL METHOD G_EDITOR->SET_TEXT_AS_R3TABLE
       EXPORTING
         TABLE           = G_MYTABLE
       EXCEPTIONS
         ERROR_DP        = 1
         ERROR_DP_CREATE = 2
         others          = 3.
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
       endif.
    ENDMODULE.                 " STATUS_9000  OUTPUT
    *&      Module  USER_COMMAND_9000  INPUT
    MODULE USER_COMMAND_9000 INPUT.
    CASE SY-UCOMM.
    REFRESH G_MYTABLE[].
    REFRESH IT_LINE[].
    CLEAR V_RESULT.
      WHEN 'SAVE'.
         CALL METHOD G_EDITOR->GET_TEXT_AS_R3TABLE
          EXPORTING
            ONLY_WHEN_MODIFIED     = FALSE
            IMPORTING
              TABLE                  = G_MYTABLE
            IS_MODIFIED            =
          EXCEPTIONS
            ERROR_DP               = 1
            ERROR_CNTL_CALL_METHOD = 2
            ERROR_DP_CREATE        = 3
            POTENTIAL_DATA_LOSS    = 4
            others                 = 5
         IF SY-SUBRC <> 0.
         MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
         ENDIF.
    LOOP AT G_MYTABLE INTO V_RESULT.
       APPEND V_RESULT TO IT_LINE.
    ENDLOOP.
    CLEAR V_RESULT.
        CALL FUNCTION 'SAVE_TEXT'
          EXPORTING
            CLIENT                = SY-MANDT
            HEADER                = G_HEAD
            INSERT                = ' '
            SAVEMODE_DIRECT       = 'X'
          OWNER_SPECIFIED       = ' '
          LOCAL_CAT             = ' '
        IMPORTING
          FUNCTION              =
          NEWHEADER             =
          TABLES
            LINES                 = IT_LINE
        EXCEPTIONS
          ID                    = 1
          LANGUAGE              = 2
          NAME                  = 3
          OBJECT                = 4
          OTHERS                = 5
       IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
       ENDIF.
    REFRESH G_MYTABLE[].
    REFRESH IT_LINE[].
    CLEAR V_RESULT.
    WHEN 'BACK' OR 'CANCEL' OR 'EXIT'.
    LEAVE TO SCREEN '0'.
    *CALL SCREEN '0'.
    WHEN OTHERS.
    ENDCASE.
    *G_OK_CODE = SY-UCOMM.
    *CLEAR SY-UCOMM.
    ENDMODULE.                 " USER_COMMAND_9000  INPUT

  • In report layout, can format a long string display as Column mode?

    Hi,
    Just want to check in report builder any way can format a long string into a column mode?
    Example: I have a field to hold 8000 character, and would like to print
    30 character in each line, when reach 50 line, then print in column i/o to print next page?
    Any idea ? Thanks a lot if you can share your experience with me.
    best Regards,
    Klnghau

    hi let say your field name is x
    then if your want it word wrap then it's simple just get one field and make it's vertical
    elasticity variable. and asign the field to it..
    but if you want your field to be displayed as
    first colunm and then beside continuation of that column but in 2nd one...
    then create 2 formula columns make your field legth been distributed half in each.
    so cf_1 is:
    decalre
    t varchar2(1510);
    begin
    if length(:x) > 1500
    t := substr(x, 1, 1500); -- as 30 x 50 = 1500
    else
    t := :x;
    end if;
    return t;
    so cf_2 is:
    decalre
    t varchar2(1510);
    begin
    if length(:x) > 1500
    t := substr(x, 1500, length(:x)-1500); -- as 30 x 50 = 1500
    else
    t := '';
    end if;
    return t;
    and then in design view
    field1 field2
    for field1 source is cf_1 and
    for field2 source is cf_2
    that's all
    Enjoy Oracle...

  • GP - How to display a long string value

    I'm trying to display a really long string value and then allow the user a couple of result state choices (to either go back and do another search or finish).
    None of the forms (WD, display, etc.) will display a really long string.
    I tried using a loop type decision dialog, but there doesn't appear to be a way of having it pick up a parameter value as the message (or part of the message) to display.
    I can get it to display in the complex type decision dialog, but I don't need the group/options and I can't seem to get rid of the second set of buttons that show up (the long string parameter value was put into the 'Info Texts' area and does display ok).
    Is there any easy way of displaying the complete contents of a long string value and have buttons for results states?  I'd even be happy if I could just display the whole string and use a separate callable object for the choices.
    Thanks,
    Cindy

    I think you should try calling a JAVA or ABAP Webdynpro as the callable object. As you know, we can display long texts in the webdynpro fields. Other alternative is an Adobe form as well.
    Cheers,
    Mandrake

  • Webservice: Problem passing long string 8k

    Hi,
    I have a webservice who receives a string parameter (xml). I send it a string shorter than 8 kb  a no problem but when I send a long string longer than 8 kb, it has problems.
    Do someone know how can I fix this?
    Where can I modify this value?
    regards.

    Thanks for your recomendations, The problem is still there. I'm doing a POST.
    I already did the same sample in CF9 and I don't have the problem there. The only diference is the that the CF9 is a physical server with Win Server 2008 R2 and the CF 10 is a virtual with WIn Server 08 R2.

  • StAX  XMLStreamReader  getTextCharacters() problem withj long strings

    Hi,
    I am reading long hexidecimal strings that are within elements in xml using StAX and with long hexidecimal strings I seem to be losing the end of these strings. I am creating XMLStreamReader and I tried using getText() and this was not returning anything but using getTextCharacters() seems to work until I get these long strings. Here is the code I am using for processing a CHARACTERS event:
    import javax.xml.stream.XMLInputFactory;
    import javax.xml.stream.XMLStreamConstants;
    import javax.xml.stream.XMLStreamException;
    import javax.xml.stream.XMLStreamReader;
    if(event == XMLStreamConstants.CHARACTERS){
    int start = reader.getTextStart();
    int length = reader.getTextLength();
    char[] textCharacters = reader.getTextCharacters();
    String text = (new String(textCharacters,start,length)).trim();
    int containsHexInt = text.indexOf("0x");
    if(currentElement.equals("attrid")){
    attributeIdString = text;
    }else if(currentElement.equals("symbol")){
    symbolString = text;
    }else if(currentElement.equals("value") && containsHexInt != -1){
    if(transactionsTimeStamp==null){ transactionsTimeStamp=DateUtil.getNowInAcFormat();
    if(staxCompoundsDocument == null){
    staxCompoundsDocument = new StAXCompoundsDocument(
    outputFileName, transactionsTimeStamp, exlusionFilePath );
    staxCompoundsDocument.outputDocumentHead();
    staxCompoundsDocument.addCompound(transTimeStamp,fileTrans,
    symbolString,attributeIdString, parseHex(text),state,userid);
    I am using jsr173_api.jar though I don't have the version number for this.
    If anyone could help me explain this it would be real help. I am guessing it may be down to using buffers under the covers for StAX but don't know exactly how this works.
    Thanks in advance
    Rob

    Thanks DrClap,
    that was the problem, having not worked with StAX before I didn't know it could behave like this :(
    So I had a look at the documentation and tried setting the IS_COALESCING property but it seems the implementation of StAX that we have doesn't support this :( and doesn't have the methods isCoalescing :( and I don't have enough influence to change that.
    So I have had to set up my looping through events like the following pseudo code :
    if event != CHARACTERS && stringBuffer.length > 0
    process characters
    make stringBuffer empty
    do some event processing
    if event == CHARACTERS
    add the characters to the string buffer
    If there is a better way of doing this I'd like to know but at least I have something that works at the moment.
    Thanks
    Rob

  • LONG string formatting problem- do you have answers?

    Hi,
    When I start my movie, I am trying to set a variable using a LONG string- concatenating "text" and getAt(x,y). I saw a solution some time ago utilizing backslashes. i keep getting the error message "variable used befroe assigned a value".
    My variable is "bodder" and the string is "I can't get there until " & getAt(x,y) & ". You may have to ask a co-worker for a ride, or catch the next commuter train."
    "bodder" is included as a global.
    My code is: bodder = string( "I can't get there until " & getAt(x,y) & ". You may have to ask a co-worker for a ride, " \
    "or catch the next commuter train.")
    Thanks in advance.
    BigDaddy

    Joshua,
    I just used 'x' and 'y' in my post to fill-in the blanks.
    I have a list with a different name, which I access/reference throughtout the movie successfully.
    BigDaddy

  • Problem in displaying loginpage when user press logout

    Hi everyone, I am new to Swing and facing an issue which might appear simple to you people.
    I have a Login Screen. When user supply credentials and press the login button, the next page is displayed which has a logout button. If user clicks this logout button, ideally the login screen should come. I am struck up in implementing this functionallity. I'm attached SAMPLE Code for the same.
    // MainFrame.java
    import java.awt.Color;
    import java.awt.Container;
    import java.awt.Font;
    import java.awt.event.WindowEvent;
    import java.awt.event.WindowListener;
    import java.io.PrintStream;
    import java.text.SimpleDateFormat;
    import javax.swing.JFrame;
    import javax.swing.JOptionPane;
    import javax.swing.JPanel;
    public class MainFrame extends JFrame implements WindowListener{
        private static final long serialVersionUID = 1L;
         public static  String server_url = "t3://localhost:7001";
         public static  String JNDI_NAME = "com.qwest.bpm.designerserver.DesignerServerRemoteHome";
         static final String title_base = "MY App";
         PrintStream log;
         SimpleDateFormat df;
         public static JPanel current_page;
        String errmsg;
        public Color background;
        public Color color_tablehead;
        public Color color_canvas;
        Font font_textfield;
        String database;
        MainFrame(String title){
             super(title);
            System.setSecurityManager(null);
            setSize(900, 720);
              addWindowListener(this);
              rootPane.setDoubleBuffered(false);
              background = new Color(0.9f,0.9f,0.7f);
              color_tablehead = new Color(0.8f,0.8f,0.6f);
              color_canvas = new Color(0.97f,1.0f,0.97f);
              font_textfield = new Font("courier", Font.PLAIN, 12);
              setBackground(background);
              getContentPane().setBackground(null);
              log = System.out;
              df = new SimpleDateFormat("HH:mm:ss");
              setDefaultLookAndFeelDecorated(true);
            errmsg = null;
            database = "Oracle";
         public void setPage(JPanel page) {
              if (current_page!=null) current_page.setVisible(false);
              Container content_pane = getContentPane();
              if (!content_pane.isAncestorOf(page)) {
                   // System.out.println("Add page " + page.getClass().getName());
                   content_pane.add(page);
              page.setVisible(true);
              current_page = page;
            if (errmsg!=null) {
                JOptionPane.showMessageDialog(this, errmsg);
                errmsg = null;
         public void logout() {
              //Code to be changed here
           System.exit(0);
         public static void main(String[] args){
              MainFrame frame = new MainFrame("My App");
              frame.setPage(LoginPage.getPage(frame));
              frame.setVisible(true);
         public void windowActivated(WindowEvent e) {
              // TODO Auto-generated method stub
         public void windowClosed(WindowEvent e) {
              // TODO Auto-generated method stub
         public void windowClosing(WindowEvent e) {
              // TODO Auto-generated method stub
         public void windowDeactivated(WindowEvent e) {
              // TODO Auto-generated method stub
         public void windowDeiconified(WindowEvent e) {
              // TODO Auto-generated method stub
         public void windowIconified(WindowEvent e) {
              // TODO Auto-generated method stub
         public void windowOpened(WindowEvent e) {
              // TODO Auto-generated method stub
    //MainPanel.java
    import java.awt.BorderLayout;
    import java.awt.Color;
    import javax.swing.JPanel;
    public class MainPanel extends JPanel{
         public MainFrame frame;
         protected Color background;
         public MainPanel(MainFrame frame) {
              super();
              this.frame = frame;
              setLayout(new BorderLayout());
              setBackground(null);
    //LoginPage.java
    import java.awt.GridLayout;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.AbstractButton;
    import javax.swing.BorderFactory;
    import javax.swing.JButton;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    import javax.swing.JPasswordField;
    import javax.swing.JTextField;
    public class LoginPage extends MainPanel implements ActionListener {
         private static final long serialVersionUID = 1L;
         JTextField username, serverurl, servername;
         JPasswordField password;
         static LoginPage singleton = null;
         LoginPage(MainFrame frame) {
              super(frame);
              setLayout(null);
              JLabel label;
              JPanel panel = new JPanel(new GridLayout(2,2));
            panel.setLayout(null);
            panel.setBounds(100,100,200,200);
            panel.setBorder(BorderFactory.createTitledBorder("Credentials "));
            panel.setSize(600,350);
            panel.setOpaque(false);
              label = new JLabel("User Name");
              label.setBounds(60, 60, 120, 20);
              panel.add(label);
              username = new JTextField();
              username.setBounds(200, 60, 120, 20);
            //username.setActionCommand(C.ACTION_LOGIN);
              panel.add(username);
              label = new JLabel("Password");
              label.setBounds(60, 90, 120, 20);
              panel.add(label);
              password = new JPasswordField();
              password.setBounds(200, 90, 120, 20);
            password.setActionCommand("login");
            password.addActionListener(this);
              panel.add(password);
              JButton button_login = new JButton("Log In");
              button_login.setBounds(150, 240, 120, 25);
              button_login.setBackground(background);
              button_login.setActionCommand("login");
              button_login.addActionListener(this);
              panel.add(button_login);
            add(panel);
         static LoginPage getPage(MainFrame frame) {
              if (singleton==null)
                   singleton = new LoginPage(frame);
              return singleton;
         public void actionPerformed(ActionEvent e) {
             Object source = e.getSource();
             String cmd;
              if (source instanceof AbstractButton)
                   cmd = ((AbstractButton)source).getActionCommand();
            else if (source instanceof JPasswordField)
                cmd = "login";  
              else return;
              if(cmd.equalsIgnoreCase("login")) {
                   frame.setPage(NextPage.getPage(frame));
    //NextPage.java
    import java.awt.GridLayout;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.AbstractButton;
    import javax.swing.BorderFactory;
    import javax.swing.JButton;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    import javax.swing.JPasswordField;
    import javax.swing.JTextField;
    public class NextPage extends MainPanel implements ActionListener{
         private static final long serialVersionUID = 1L;
         JTextField username, serverurl, servername;
         JPasswordField password;
         static NextPage singleton = null;
         NextPage(MainFrame frame) {
              super(frame);
              setLayout(null);
              JLabel label;
              JPanel panel = new JPanel(new GridLayout(2,2));
            panel.setLayout(null);
            panel.setBounds(100,100,200,200);
            panel.setBorder(BorderFactory.createTitledBorder("Credentials "));
            panel.setSize(600,350);
            panel.setOpaque(false);
              label = new JLabel(" Hurray Login Successfull ");
              label.setBounds(60, 60, 120, 20);
              panel.add(label);
              username = new JTextField();
              username.setBounds(200, 60, 120, 20);
            //username.setActionCommand(C.ACTION_LOGIN);
              panel.add(username);
              label = new JLabel("Now try Logout ");
              label.setBounds(60, 90, 120, 20);
              panel.add(label);
              JButton button_login = new JButton("Log Out");
              button_login.setBounds(150, 240, 120, 25);
              button_login.setBackground(background);
              button_login.setActionCommand("logout");
              button_login.addActionListener(this);
              panel.add(button_login);
            add(panel);
         static NextPage getPage(MainFrame frame) {
              if (singleton==null)
                   singleton = new NextPage(frame);
              return singleton;
         public void actionPerformed(ActionEvent e) {
             Object source = e.getSource();
             String cmd ="";
              if (source instanceof AbstractButton)
                   cmd = ((AbstractButton)source).getActionCommand();
              if(cmd.equalsIgnoreCase("logout")) {
                   frame.logout();
    }

    solved it :)

  • OWA Email - One Long String

    The email I receive from OWA has no line breaks, it is all one long string.  This is creating a big problem when I forward the emails received with my BB as they are difficult to read by the recipient.  Is there anyway to correct this?  I use BIS and access my work email via OWA.  I also have a separate personal email set up with no problems with the email I receive or send.  
    BB Curve 8310 v4.5.0.55
    OWA v5.5 SP4
    Any help will be appreciated!

    I'm experiencing the same issue (no line breaks) when pasting rows directly from Excel (2008 & 2011) into a Flex TextArea on a Mac. However, when pasting the exact same data from a Windows Excel spreadsheet, it contains the line breaks.
    From Mac: Customer\tPhoneCustomer 1\t555-555-5555Customer 2\t555-555-5556
    From Windows: Customer\tPhone\rCustomer 1\t555-555-5555\rCustomer 2\t555-555-5556\r
    This appears to be a bug in a flash.display class as pasting the data from Excel to a text editor and then copying/pasting into the same Flex TextArea preserves the original line breaks.
    Has anyone figured out a work around?

  • How to set selected value in html:options that isusing HasMap Long,String

    So here is my problem
    I have a HashMap<Long,String> where key is the country id and value is the country name. So I am displaying it in the jsp using the below code
    <c-rt:set var="countriesMap" value="<%=countriesMap%>" target="java.util.HashMap<Long,String>"/>
    <html:select size="1" property="countryId" >
    <html:option value="" />
    <html:options collection="countriesMap" property="key" labelProperty="value" />
    </html:select>
    And my Action form has the property countryId.
    So it works fine , it displays all the countries and sets the country ID in the form's property that we set in the property attribute of <html:select>.The form's property is of type Long.
    But suppose if some error occurs in the validate method for some other property then when the page renders back it does not set the selected country in the list box.
    Can anyone please help me out of this.Thanks in advance.
    Edited by: AmitDsm on May 9, 2008 8:01 AM

    Hi,
    I had the same issue. Altho I am using Spring, the solution is the same.
    <select name="expMonth">
         <option value=""></option>
         <c:forEach items="${form.data.months}"
              var="month">
              <c:choose>
                   <c:when test="${form.data.pDet.expDate_month eq month}">
                        <option selected="selected"><c:out value="${month}"/></option>
                   </c:when>
                   <c:otherwise>
                        <option><c:out value="${month}"/></option>
                   </c:otherwise>
              </c:choose>
         </c:forEach>
    </select>Disclaimer: Not sure if this is the correct way to do it, but it works for me
    Edited by: Reegz on 2008/05/12 05:58

  • Problem with displaying BLOB images on JSP page using a servlet

    hi. I have a big problem with displaying BLOB images using JSP. I have a servlet that connects to the oracle database, gets a BLOB image , reads it, and then displays it using a BinaryStream. The problem is , this works only when i directly call that servlet, that is http://localhost:8080/ImageServlet. It doesn't work when i try to use that servlet to display my image on my JSP page (my JSP page displays only a broken-image icon ) I tried several coding approaches with my servlet (used both Blob and BLOB objects), and they work just fine as long as i display images explicitly using only the servlet.
    Here's what i use : ORACLE 10g XE , Eclipse 3.1.2, Tomcat 5.5.16 , JDK 1.5
    here is one of my image servlet's working versions (the essential part of it) :
                   BLOB blob=null;
              rset=st.executeQuery("SELECT * FROM IMAGES WHERE ID=1");
              while (rset.next())
                   blob=((OracleResultSet)rset).getBLOB(2);
              response.reset();
              response.setContentType("image/jpeg");
              response.addHeader("Content-Disposition","filename=42.jpeg");
                    ServletOutputStream ostr=response.getOutputStream();
                   InputStream istr=blob.getBinaryStream(1L);
                    int size=blob.getBufferSize();
              int len=-1;
                    byte[] buff = new byte[size];
                         while ((len=istr.read( buff ))!=-1 ) {
                   ostr.write(buff,0,len);
             response.flushBuffer();
             ostr.close(); and my JSP page code :
    <img src="/ImageServlet" border="0"  > If you could just tell me what i'm doing wrong here , or if you could show me your own solutions to that problem , i would be very greatful ,cos i'm realy stuck here , and i'm rather pressed for time too. Hope someone can help.

    I turns out that it wasn't that big of a problem after all. All i had to do was to take the above code and place it into another JSP page instead of into a servlet like i did before. Then i just used that page as a source for my IMG tag in my first JSP. It works perfectly well. Why this doesn't work for servlets i still don't know, but it's not a problem form me anymore . Ofcourse if someone knows the answer , go ahead and write. I would still appriceatte it.
    here's the magic tag : <img src="ImageJSP.jsp" border="0"  > enjoy : )

  • Problem with display of JScrollPane

    I have made a small GUI.
    It has a JFrame and four JPanels are added to the frame.
    The placement is done by program and hence layout manager is set to null.
    Two of the panels contain JScrollPane.
    One scroll pane is associated with a JList.
    Another scroll pane is associated with a JTextArea.
    I am creating panel components in their respective paintComponent() method.
    Now my problem is whenever I run the code, the behaviour of the display of the GUI is erratic. Sometimes it appears perfectly fine other times the JList contents and JTextArea along with their scroll bars don't appear. I have tried running the code on different platforms and different systems. On some systems it works perfectly fine, on some it behaves erratically.
    Moreover my experience is that it is giving problem on somewhat lower configuration systems (low RAM and CPU) and running fine on higher configuration systems.
    I ran it on my laptop with 512MB RAM and centrino duo processor. (Both on windows and ubuntu it gave the same problem, random display behavior)
    I ran it on a desktop with 1GB RAM and higher processor (Both on windows and ubuntu it displayed fine)
    Does this problem relate to insufficient painting time or something of this sort? Why is this problem is coming and what's the solution?
    Thanks in advance.
    Also if anybody has encountered similar problem please do share so that I could at least say this is not a unique one.

    The placement is done by program and hence layout manager is set to null.That is (probably) your first problem. Learn to use use LayoutMangers, they save time in the long run.
    Sometimes it appears perfectly fine other times the JList contents and JTextArea along with their scroll bars don't appearProbably because preferred sizes are not set correctly. Since you are not using a layout manager that is your responsibility. Easy solution is to use a proper combination of layout managers.
    I am creating panel components in their respective paintComponent() method.That is (probably) your second problem. paintComponent() is for doing custom painting, not creating new components dynamically.
    I suggest you start by reading the Swing tutorial for example programs.

Maybe you are looking for

  • Enable microsoft update on windows 7 enterprise

    Hi I installing a Windows 7 Enpterprise on computer and want to enable Microsoft Update to install all updates for Microsoft products. But I clicked "learn more" in Windows Update which in Control Panel, the opened Windows Update web site just shown

  • How can i know the version of autoconfig ?

    hi I am on 12.1.1 to determine my autopatch version i used Note 390666.1 i ran SET head off Lines 120 pages 100 col n_patch format A10 col bug_number format A10 col patch_name format A10 spool LACF_ptch_level.txt select ' LACF ' FROM dual; select bug

  • Federated Portal Network configuration

    Hi, I just started configuring two test portal systems for federation. When I create a producer object in the consumer portal under system administration-->Federated Portal and then test it gives the following message. "Producer Connection   Test Det

  • Using Saxon Functions Within XSLT

    Hi, Please let me know how to use saxon functions within XSLT. E.g.: If I want to implement saxon:base64Binary-to-string() function in XSLT in "xsl:value-of" function, then what will be the format for implementation. I have selected the Processor as

  • I've lost my photo's off my ipod

    I was trying to sync my photo's from my ipod to my laptop, 3000 family photo's from when my children were babies, and they have gone, they are not on my ipod anymore and I can't find them on my laptop, can someone please help, can I get these back???