Accessing a nested JPanel

The format:
JFrame that contains 2 JPanels that I want to switch depending on user input.
I've tried from with the JFrame code:
JPanel jpanel1 = new JPanel();
The constructor in JPanel1 creates an instance of jPanel2 & jPanel3.
jPanel1.jPanel2.setVisible(true);
jPanel1.jPanel3.setVisible(false);
This doesn't work - any ideas on how to accomplish the task?
Thanks,
Michael

What jdbc driver and database version are you on? What happens if you do not cast to Status? Does it return a STRUCT? What is the stack trace?
The following seems to work:
create or replace type status_typ is object(
attribute1 varchar2(50),
attribute2 varchar2(50),
attribute3 varchar2(50)
create or replace type status_tab is table of status_typ
create or replace procedure get_status(
  s out status_tab
) is
begin
s := status_tab(status_typ('a','b','c'));
end;
show errors
  // Status.java
  public class Status implements SQLData {
    protected String
      attribute1, attribute2, attribute3, sql_type;
    public String getSQLTypeName() {
      return sql_type;
    public void readSQL(SQLInput stream, String typeName) throws SQLException {
      sql_type = typeName;
      attribute1 = stream.readString();
      attribute2 = stream.readString();
      attribute3 = stream.readString();
    public void writeSQL(SQLOutput stream) {
    OracleCallableStatement cs = (OracleCallableStatement)conn.prepareCall(
    "{call get_status(?)}"
    cs.registerOutParameter(1, OracleTypes.ARRAY, "STATUS_TAB");
    cs.execute();
    Map map = conn.getTypeMap();
    map.put("STATUS_TYP",Class.forName("Status"));
    int i = 0;
    ResultSet rs = cs.getArray(1).getResultSet();
    while(rs.next()) {
      Status s = (Status)rs.getObject(2);
      System.out.println("Row " + i++ + " " + rs.getObject(2) + " " + s.attribute1 + "," + s.attribute2 + "," + s.attribute3);
Row 0 Status@b01d43 a,b,c

Similar Messages

  • Access a nested symbol timeline from the main stage

    Hi all,
    Would love some help on accessing a nested symbol from the main stage please.
    To set the scene.....
    "Its an autumn day..
    no sorry...just joking...
    So i have a symbol called "NormalAnatomy" - its not on the main stage, but when a button is clicked it appears in the 'content' box which is just a rectangle on the main stage.
    Inside "NormalAnatomy" symbol is another symbol called "Scrub_all" which is an animation
    For users to view the animation they use a scrub bar like this lovely lady has invented:
    Create Click and Touch Draggable Scrubbers with Edge Animate CC | sarahjustine.com
    So for Sarah Justines scrubber to work - the main stage has a lot of actions added to it. Also the "timelinePlay" symbol is on the main stage
    Its starts:
    var symDur = sym.getSymbol("timelinePlay").getDuration();
    var mySymbol = sym.getSymbol("timelinePlay");
    var scrubber = sym.$("scrubber");
    var bar = sym.$("bar");
    sym.$("mobileHit").hide();
    var dragme = false;
    So I put my "NormalAnatomy" symbol on my main stage to see if the code would work and changed all the relevant details.. and indeed it worked!
    var symDur = sym.getSymbol("NormalAnatomy").getSymbol("Scrub_all").getDuration();
    var mySymbol = sym.getSymbol("NormalAnatomy").getSymbol("Scrub_all");
    var scrubber = sym.getSymbol("NormalAnatomy").$("scrubber");
    var bar = sym.getSymbol("NormalAnatomy").$("bar");
    sym.getSymbol("NormalAnatomy").$("mobileHit").hide();
    var dragme = false;
    But i don't want the "NormalAnatomy" symbol to be on the main stage as I want it to appear in the 'content' box only when i hit a btn
    So as soon as I took this symbol off the main stage, the scrubber doesn't work. So I click a btn, and the symbol appears in the content box but the scrubber doesn't work.
    so I tried in front of the "NormalAnatomy"
    getStage().
    getStage("content").
    getComposition().getStage().
    getSymbol("content").
    but nothing works
    The main problem must be the fact that the NormalAnatomy symbol appears inside a content box so the MainStage actions doesn't know how to find it??
    So my question is... what should I put in the main stage actions to make it access the "NormalAnatomy" symbol?
    Thanks for your help in advance!

    On click handler for the symbol use
    sym.getComposition().getStage().getSymbol("nameofsymbol").play();
    or
    sym.getSymbol("nameofsymbol").play();
    replace the italics with the literal name of the symbol as it appears in the Elements panel.
    Some API details found here (http://www.adobe.com/devnet-docs/edgeanimate/api/current/index.html) in the Work With Symbols section.
    Darrell

  • Accessing data nested inside a JSON data source in Project Siena

    Hi all
    I'm trying to work with JSON data sources via REST in Project Siena. I can easily set up the JSON data source and get the data into my data sources list. However, the data is nested, so for example a REST request to search returns JSON data that is unpacked
    (correctly) as:
    search_query > entries > name
    I have tried two different REST-based data sources with the same result. I have tried accessing the data a couple of ways: firstly via a Gallery view and secondly just getting a listing with a DropDown.
    For this example, I've tried setting the Data items to search_query!entries (and a bunch of other things) with the idea that I could then refer to ThisItem!name and when that failed trying almost everything I could from the function reference
    http://siena.blob.core.windows.net/beta/ProjectSienaBetaFunctionReference.html#_Toc373745469
    Should this work? It seems like it's an extremely common structure for JSON returned from a RESTful service (top level containing count, pagination, other data and then a set of result details beneath).
    Any ideas appreciated. For completeness, the two data sources I've tried are the Box.com Content API (Search and Folders) and the ZenDesk API (Groups).
    Cheers.

    What you get back from the call is essentially a table with a single row--the "entries" column within that row have multiple rows that contain the name data. Try binding First(search_query)!entries to extract the name records. 

  • Accessing javax.swing.JPanel from outside the EDT

    Hi everybody!
    I am not new to Java but to Swing.
    Please consider the following:
    public class MyPanel extends JPanel
         private int number = 0;
         private Object object = null;
         public int getNumber()
              return number;
         public void setNumber(int aNumber)
              number = aNumber;
         public Object getObject()
              return object;
         public void setObject(Object aObject)
              object = aObject;
    Question:
    Is it save to call the getters and setters defined above from a Thread other than the Event Dispatching Thread.
    From my point of view and my understanding of Swing this should be save as the getters and setters do not touch anything other than the methods and instances defined within the object layer of MyPanel.
    Please help :-)

    jboeing wrote:
    I might be wrong, but I think it's safe to touch the non-Swing methods in a subclass from other threads. The main concern in accessing Swing off the EDT is that you can concurrently modify parts of code, but since the EDT does not touch your getters and setters, at least it won't make deadlocks. Perfect, exactly what I would suggest. I couldn't have put it better.
    The only oddities may occur if the member variable you set is used in logic for an overriden method (like paintComponent), but I don't think this will be too problematic in most cases.See what you mean so: What about synchronizing the getters and setters. Then only the scheduler would block the EDT as long as another Thread was touching the members. As no wait() and notify() calls arise this should not result in any deadlocks. The worst thing I could think of is that the responsiveness of the user interface may degrade if the EDT had to wait for a while as to many Threads were already waiting for synchronized accesss.
    >
    Edit:
    Oh, and in the future, use the "*Code Formatting Tags*", see http://forum.java.sun.com/help.jspa?sec=formatting
    Edited by: jboeing on Nov 13, 2007 1:14 PM
    public class Apology{
        public static void main(String[] args){
            System.out.println("Thank you for your kind advice :-)");
            System.out.println("but please don't ask me why this is quoted style");
    }Edited by: tog on Nov 14, 2007 6:08 PM

  • Accessing Deeply Nested Value

    Thread followed on from [here|Access to SRM Variable;
    Hi Folks,
    Following on from a thread I started in the SRM forum, I now have access to a very deeply nested variable see [this|http://img59.imageshack.us/i/variable.png/] image for path.
    How can I change the value in this variable using OO code?
    All help is much appreciate,
    Colm

    Uwe,
    I did not have access to that particular instance but I was able to use your help to find the values that I needed to change. I needed to create a post-exit enhancement on my WDDOINIT method and implement the following code. Thank you very much.
      DATA: lo_wd_child_node      TYPE REF TO if_wd_context_node,
            lo_root_node          TYPE REF TO if_wd_context_node,
            lo_context            TYPE REF TO if_wd_context.
      lo_context      = wd_context->get_context( ).
      lo_root_node    = lo_context->root_node.
      lo_wd_child_node = lo_root_node->get_child_node( name = 'ACTIVE' ).
      lo_wd_child_node->set_attribute( EXPORTING name  = 'ACTIVE_LOC'
                                                 value = '02' ).
    Edited by: Colm Gavin on Mar 9, 2011 12:46 PM

  • Nested JPanels

    For a game GUI I have made each square of the board as a JPanel and these are all nested inside another JPanel which represents the whole gameboard. Can anyone tell me how (if possible) f.ex. each square can catch it's own MouseReleased event? The parent JPanel(the gameboard) seems to catch all MouseEvents.

    hi,
    i am not sure if i understood ur problem rigth, but i think u have a panel within a apnel right? if so, then just write the action listeners for teh sub-panels the same way u wrote for the main panel and it shud work fine.....let me know if it works..........sorry if it is a silly answer

  • Question on program structure about event handling in nested JPanels in GUI

    Hi All,
    I'm currently writing a GUI app with a wizard included in the app. I have one class that acts as a template for each of the panels in the wizard. That class contains a JPanel called contentsPanel that I intend to put the specific contents into. I also want the panel contents to be modular so I have a couple of classes for different things, e.g. name and address panel, etc. these panels will contain checkboxes and the like that I want to event listeneres to watch out for. Whats the best way of implementing event handling for panel within panel structure? E.g for the the checkbox example,would it be a good idea to have an accessor method that returns the check book object from the innerclass/panel and use an addListener() method on the returned object in the top level class/panel. Or is it better to have the event listeners for those objects in the same class? I would appreciate some insight into this?
    Regards!

    MyMainClass.main(new String[] { "the", "arguments" });
    // or, if you defined your main to use varags (i.e. as "public static void main(String... args)") then you can just use
    MyMainClass.main("the", "arguments");But you should really extract your functionality out of the main method into meaningful classes and methods and just use those from both your console code and your GUI code.

  • How to access a nested child tag values in  XML Object(getting error:No Such variable)

    Hi,
    I could see the XML object data and while accessing a perticular attribute let say "SlotA"  it is showing "No such variable Error".
    I appreciate any of your  inputs or suggestions to solve this error.
    You can find the screen snapshot of the problem as part of the attachment here.
    Thanks in advance
    CSNPrasad.

    Dear Natasha,
    Thanks for your mails & cooperation as well.
    This time i  have added the trace() and can see the value.Now the problem is "can't access a property or method of a null object reference"
    Noe: This code mxml file is called at Runtime based on the data defined in the XMLSocket data.
    I need to display Remote devices like davice1,device2 device3 etc. these are added/delete at any time ,so we need to show same changes in UI at Runtime.
    I implemented Polymorphism concept to construct the device object at runtime like follows
    var device:Object;
    for each (var deviceData:XML indeviceListXML..Device)
                        device = getBatteryBay(deviceData.deviceId)
                        // If device already exists with the deviceId, update the details
                        // Else create a newdevice and add it to the container for displaying it.
                                                                                    if (device == null)
                            if (device.Type == "DEVICE1")
                                device = new Device1();
                            else if (device.Type == "DEVICE2")
                            device = new Device2();
                            else
                                device = new DefaultDevice();
                            device.id = deviceData.deviceId;
                          device.name = deviceData.devicename;
                         device.setData(deviceData);
    Here new Device1(); and new Device2() are the UIComponents and created at Runtime, upto here no problem to display, when i try to setData to the devices it is throwing error
    "can't access a property or method of a null object reference". because Device1 and Device2 has Child components like "DataIndicator" and need to set properties to these components which are not created yet.
    I appreciate any of your Input or suggestions at the earliest
    Thanks in Advance
    Regards

  • Default component accessibility in Container (JPanel)

    Hi all,
    I suppose this question is possible to find in this forum, but I was unsuccessful. I have JPanel including many components (e.g. JTextField, JComboBox, JButton, JList, ...). I would like to focus to specific component, e.g. JTextField. Example: When JPanel is shown then JTextField should be accessible (I want write there) not any other component. How can I reach this state?

    fun_with_me wrote:
    jTextField1.grabFocus();
    The other day you gave an answer that had me wondering if you program using a crystal ball, and this reply simply reinforces that impression. Do you ever consult the JavaDocs?
    From the JavaDocs for [JComponent.grabFocus()|http://java.sun.com/javase/6/docs/api/javax/swing/JComponent.html#grabFocus()].
    "Requests that this Component get the input focus, and that this Component's top-level ancestor become the focused Window. This component must be displayable, visible, and focusable for the request to be granted.
    This method is intended for use by focus implementations. *Client code should not use this method; instead, it should use requestFocusInWindow().* "

  • Nested JPanel resizing

    In one of my application there is one Jframe( BorderLayout) containing panel at the center surrounded with JScrollPane. The panel contains one more JPanel in it.
    On click of a button i need to resize both the panel.
    in the event handler method, Im caling setPreferedSize() and setSize() for both the panels.
    Only outer panel gets resized for the first click and for the second click inner panel gets resized...
    how can i solve this problem...?

    There is no way of knowing where the problem is without the code, however, you said you have called the setPreferedSize() and setSize() methods in the event handler.
    This should get called when you press the button, one thing you must do is to make sure that they are both inside the same block of code. If you are using an if statement.
    if(buttonPressed()){
    setPreferedSize();
    setSize();
    }Or you could post a simple version to help us solve the problem.

  • Accessing nested UIComponents

    The aim of the script is to be able to access component's
    chldren, and their children, and their children, etc... by their
    index.
    I've tried the following:
    // script
    public function deployNesting():void {
    var container:Canvas= new Canvas();
    var chldA:Canvas = new Canvas();
    var chldB:Canvas = new Canvas();
    var chldC:Canvas = new Canvas();
    this.addChild(this.container);
    this.container.addChild(chldA);
    this.container.addChild(chldB);
    this.container.addChild(chldC);
    return;
    public function accessNesting():void {
    trace(this.childAt(0).childAt(0))
    // error 1119*
    trace(this.childAt(0).numChildren)
    // error 1119*
    return;
    *1119 : Access of possibly undefined property numChildren
    through a reference with static type
    flash.display:DisplayObject.
    I'm aware that such nesting is not usually a best practice,
    but in some cases it is required, and I would appreciate an advice
    on this issue.
    a.neko

    Well... It's time to assume the therapeutical values of this
    forum in my particular case : ) One more time, just after recurring
    to all posiible ways to solve it, and afterwards posting a topic
    here, I change my approach and find the solution...
    In this case it is required to cast the return of all the
    getChildAt() in the nesting structure, except the last one.
    You can access a nested child to add a new child to it's
    display list as follows:
    Canvas(this.getChildAt(0)).addChild(chldC);
    Accessing a deeply nested child's name property looks as
    follows:
    Canvas((Canvas(this.getChildAt(0))).getChildAt(0)).getChildAt(0).name;
    etc...
    Somewhat complicated, but solves the problem of accessing
    nested children when, for instance, the variables used to create
    them are gone, or to freely iterate through nested display lists...
    (Verified with Flex 2.0 Builder mx.* components, but I
    suppose it works also for flash.display.* objects.)
    a.neko

  • Nested property access

    How to access the nested propertry while creating a column.
    Assume I have an Address object inside a Person object. Now I want to access the street name field inside the address object using the nested property some thing like address.streetName
    TableColumn streetName= new TableColumn("Street Name");
            streetName.setMinWidth(100);
            streetName.setCellValueFactory(
                    new PropertyValueFactory<Person, String>("address.streetName"));  // What string should I give here?Object Structure:
    Person {
    private String firstName;
    private Address address;
    Address {
    private String streetName;
    }I know we can do this in a different way like below, but I want to know if it can be accessed using nested property syntax.
    TableColumn streetName= new TableColumn("Street Name");
            streetName.setMinWidth(100);
            streetName.setCellValueFactory(
                    new PropertyValueFactory<Person, Address>("streetName"));And inside updateItem() , do the following:
    @Override
        public void updateItem(Address item, boolean empty) {
    ((Address)item).getStreetName();
    }

    http://docs.oracle.com/javafx/2/api/javafx/beans/binding/Bindings.html
    public static <T> ObjectBinding<T> select(ObservableValue<?> root,
                              java.lang.String... steps)Creates a binding used to get a member, such as a.b.c.

  • Need help placing objects in JPanel

          public SimpleTab()
                ButtonGroup group = new ButtonGroup();
                group.add(videoandaudio);
                group.add(audioonly);
                group.add(videoonly);
                videoandaudio.setSelected(true);    
                JFrame frame1 = new JFrame("project");
                frame1.setSize(1000, 700);
                JLabel urllabel = new JLabel("URL");
                JLabel songlabel = new JLabel ("Enter Song");
                JLabel artistlabel = new JLabel ("Enter Artist");
                JLabel crop1label = new JLabel ("Start Time");
                JLabel crop2label = new JLabel ("Stop Time");
                url.setColumns(25);
                GridBagLayout gbl;
                GridBagConstraints gbc;
                JEditorPane jep;
                gbl=new GridBagLayout();
                gbc=new GridBagConstraints();
                p.setBounds(0,0,30,600);
                p.setLayout(gbl);
                gbc.gridx=0;
                gbc.gridy=-20;
                gbl.setConstraints(urllabel,gbc);
                gbc.gridx=0;       
                gbc.gridy=0;
                gbc.weightx=0.0;
                gbl.setConstraints(urllabel,gbc);
                p.add(urllabel);
                gbc.gridx=10;
                gbc.gridy=0;
                gbc.weightx=1.0;
                gbl.setConstraints(url,gbc);
                p.add(url);
                gbc.gridx=0;
                gbc.gridy=20;
                gbc.weightx=0.0;
                gbl.setConstraints(artistlabel,gbc);
                p.add(artistlabel);
                gbc.gridx=10;
                gbc.gridy=20;
                gbc.weightx=1.0;
                gbl.setConstraints(artist,gbc);
                p.add(artist,gbc);
                gbc.gridx=0;
                gbc.gridy=40;
                gbc.weightx=0.0;
                gbl.setConstraints(songlabel,gbc);
                p.add(songlabel);
                gbc.gridx=10;
                gbc.gridy=40;
                gbc.weightx=0;
                gbl.setConstraints(song,gbc);
                p.add(song,gbc);
                gbc.gridx=0;
                gbc.gridy=60;
                gbc.weightx=0.0;       
                gbl.setConstraints(crop1label,gbc);
                p.add(crop1label,gbc);
                gbc.gridx=10;
                gbc.gridy=60;
                gbc.weightx=1.0; 
                gbl.setConstraints(crop1,gbc);
                p.add(crop1,gbc);
                gbc.gridx=0;
                gbc.gridy=80;
                gbc.weightx=0.0;
                gbl.setConstraints(crop2label,gbc);
                p.add(crop2label);
                gbc.gridx=10;
                gbc.gridy=80;
                gbc.weightx=1.0;
                gbl.setConstraints(crop2,gbc);
                p.add(crop2,gbc);
                gbc.gridx=0;
                gbc.gridy=110;
                gbc.weightx=0.0;
                jPanel1.setBorder(BorderFactory.createEtchedBorder());
                jPanel1.setBounds(new Rectangle(70, 40, 10, 200));
                gbc.gridy = 0;
                gbl.setConstraints(videoandaudio, gbc);
                jPanel1.add(videoandaudio);
                gbc.gridy = 20;
                gbl.setConstraints(audioonly, gbc);
                jPanel1.add(audioonly);
                gbc.gridy = 40;
                gbl.setConstraints(videoonly, gbc);
                jPanel1.add(videoonly);
                gbc.gridx = 0;
                gbc.gridy = 190;
                gbl.setConstraints(jPanel1, gbc);
                p.add(jPanel1);
                DownloadsTableModel1.addColumn("Video File");
                DownloadsTableModel1.addColumn("Status");
                DownloadsTable.getColumnModel().getColumn(0).setPreferredWidth(200);
                DownloadsTable.getColumnModel().getColumn(1).setPreferredWidth(200);
                DownloadsTable.setColumnSelectionAllowed(false);
                DownloadsTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
                DownloadsTable.setDefaultRenderer(Object.class, new DownloadsTableCellRenderer());
                JScrollPane jScrollPane1 = new JScrollPane();           
                jScrollPane1.setBounds(new Rectangle(10, 130, 400, 90));
                jScrollPane1.getViewport().add(DownloadsTable);
                gbc.gridx = 0;
                gbc.gridy = 210;
                gbl.setConstraints(jScrollPane1,gbc);
                p.add(jScrollPane1);
                gbc.gridx=1;
                gbc.gridy=230;
                gbc.weightx=0.0;
                JButton downloadbutton = new JButton();
                downloadbutton.setText("Download");
                gbl.setConstraints(downloadbutton,gbc);
                p.add(downloadbutton);
                JButton pausebutton = new JButton();
                pausebutton.setText("Freeze");
                gbc.gridx = 2;
                gbc.gridy = 230;
                gbl.setConstraints(pausebutton,gbc);
                p.add(pausebutton);
                JButton cancelbutton = new JButton();
                cancelbutton.setText("Cancel");
                gbc.gridx = 3;
                gbc.gridy = 230;
                gbl.setConstraints(cancelbutton, gbc);
                p.add(cancelbutton);
                frame1.add(p);
                frame1.show();
          }[http://www.geocities.com/justinknag/jjjjunit.jpg]
    I need to center the radio buttons, as well as the table. Also, I need to create some space in between everything.

    You know that you can nest JPanels, each with its own layout, you don't have to try to have everything placed in one JPanel that uses a single grand layout manager. I recommend that you read the Sun tutorial on layout managers, and try playing with them til you figure out what will work best. As it is all I see is an attempt to dump everything in one panel with GridBagLayout.
    Also, you would do well to clean up the code, to refactor it into several methods, otherwise it will become a spaghetti code mess.
    Good luck!
    Edit: Here's what I got when I did this:
    [flickr pic|http://farm4.static.flickr.com/3155/2906451640_8deedd7aa3_o.jpg]
    I used
    BoxLayout over-all for the main panel
    A combination of BorderLayout and GridLayout for the top panel
    gridlayout for the next radiobutton panel
    jscrollpane for the jtable
    and gridlayout for the buttons
    I avoided GridBagLayout, because I truly despise it.
    YMMV of course.
    Edited by: Encephalopathic on Oct 1, 2008 7:35 PM

  • Retrieve attachements nested in .msg file attached to an email

    Hi All,
    question regarding retrieving nested attachments with-in email.
    Im able to retrieve an email attached to an email and also other attachemnts attached to an email.
    The problem is im not able to retrieve a mail which has an email as an attachment which in turn has a doc attachment.
    The structure is like this--Mail A -->has an attachemnt MailB.msg--->This MailB.msg has a Test.doc attachemnt in it.
    With my code im able to retrieve this MailB.msg's body but not the attachemnt Test.doc it has in it.
    I found that MailB.msg part is not an instanceof MultiPart .
    This is kind of Urgent.
    Is there any one help me resolve this??

    You're right, the nested message definitely has attachments, and it's definitely a multipart message.
    If you're not seeing it, there's something wrong with your program, or there's something wrong with
    your mail server.
    I saved the message to a file and ran "java msgshow -m -s < msg.txt", which showed this structure
    for the nested message:
          CONTENT-TYPE: message/rfc822
          This is a Nested Message
            This is the message envelope
            FROM: xxx
            REPLY TO: xxx
            TO: xxx
            SUBJECT: FW: LIC Receipt
            SendDate: Tue Feb 10 06:01:30 PST 2009
            FLAGS:
            X-Mailer NOT available
            CONTENT-TYPE: multipart/mixed;
            boundary="Boundary_(ID_p5i8pVdsdEV99SAb2KDWuw)"
            This is a Multipart
              CONTENT-TYPE: multipart/related;
            boundary="Boundary_(ID_lli6t6Aq6i1zX4YOueK9IQ)";
            type="multipart/alternative"
              This is a Multipart
                CONTENT-TYPE: multipart/alternative;
            boundary="Boundary_(ID_AQLuyew+Ue/dARR0G/h21w)"
                This is a Multipart
                  CONTENT-TYPE: text/plain; charset=us-ascii
                  This is plain text
                  CONTENT-TYPE: text/html; charset=us-ascii
                CONTENT-TYPE: image/gif; name=image002.gif
                FILENAME: image002.gif
                CONTENT-TYPE: image/jpeg; name=image001.jpg
                FILENAME: image001.jpg
              CONTENT-TYPE: application/pdf; name="xxx.pdf"
              FILENAME: xxx.pdf
              CONTENT-TYPE: application/octet-stream; name="xxx.mht"
              FILENAME: xxx.mht
              ---------------------------How are you accessing the message? Are you reading it from an IMAP mail server? If so,
    turn on session debugging and send me the protocol trace when you access the message.
    Some servers have bugs when accessing nested messages. See the JavaMail FAQ for
    details of how to work around such server bugs.
    If the problem doesn't look like a server bug, I'll need to see the code you're using to access
    the nested message and its attachments.

  • JSP Accessing variables in a class that are located outside of the class

    I am having a problem accessing a nested HashMap in a function. The HashMap is defined before the HTML starts and the function is located near the end (Shouldn't make a difference).
    List tires = databean.getTires();
    Map frontTireInfo = (Map)tires.get(0); //Works
    Map rearTireInfo = (Map)tires.get(tires.size()-1); //Works
    Map neumaticos = new HashMap();
    for(Iterator itr=tires.iterator();itr.hasNext();) {
         HashMap tempTire = (HashMap)itr.next();
         String tirePosition = (String)tempTire.get("position");
         neumaticos.put(tirePosition, tempTire);
    <HEAD>. . . </HEAD>
    <BODY>. .
    <%=getTireInspectionTable("FRONT_RIGHT")%> //Works
    </BODY>
    I believe the above stores the tempHash in the tirePosition.
    <%!
         private String getTireInspectionTable(String tirePos) {
              StringBuffer sb = new StringBuffer();
         sb.append("<input type='text' value=" +
    *****<% neumaticos.get(tirePos) %> + " />" ) illegal start of expression
    return sb.toString();
    %>
    Why can I not access neumaticos in the method?
    I am able to call other methods from this one, but not variables.
    If it is possible, please help point me in the correct direction.
    Thanks in advance,
    Mike

    MPDreiding wrote:
         sb.append("<input type='text' value=" +
    *****<% neumaticos.get(tirePos) %> + " />" ) illegal start of expression
              Illegal start of expression sounds like a compile time error so your syntax is wrong. Why are you using scriptlet
    <% neumaticos.get(tirePos) %>
    inside of declaration? I think that's the problem. Just remove <% and %> and see what happens.

Maybe you are looking for