Passing arraylist between constructors?

Hi guys,
I've pretty new to java, and I think i'm having a little trouble
understanding scope. The program I'm working on is building a jtree
from an xml file, to do this an arraylist (xmlText) is being built and
declared in the function Main. It's then called to an overloaded
constructor which processes the XML into a jtree:
public Editor( String title, ArrayList xmlText ) throws
ParserConfigurationException
Later, in the second constructor which builds my GUI, I try and call
the same arraylist so I can parse this XML into a set of combo boxes,
but get an error thrown up at me that i'm having a hard time solving- :
public Editor( String title ) throws ParserConfigurationException
// additional code
// Create a read-only combobox- where I get an error.
String [] items = (String []) xmlText.toArray (new String[
xmlText.size () ]);
JComboBox queryBox = new JComboBox(items);
JComboBox queryBox2 = new JComboBox(items);
JComboBox queryBox3 = new JComboBox(items);
JComboBox queryBox4 = new JComboBox(items);
JComboBox queryBox5 = new JComboBox(items);
This is the way I understand the Arraylist can be converted to a string
to use in the combo boxs. However I get an error thrown up at me here
at about line 206, which as far as I understand, is because when the
overloaded constructor calls the other constructor:
public Editor( String title ) throws ParserConfigurationException -
It does not pass in the variable xmlText.
I'm told that the compiler complains because xmlText is not defined
at that point:
- it is not a global variable or class member
- it has not been passed into the function
and
- it has not been declared inside the current function
Can anyone think of a solution to this problem? As I say a lot of this
stuff is still fairly beyond me, I understand the principles behind the
language and the problem, but the solution has been evading me so far.
If anyone could give me any help or a solution here I'd be very
grateful- I'm getting totally stressed over this.
The code I'm working on is below, I've highlighted where the error
crops up too- it's about line 200-206 area. Sorry for the length, I was
unsure as to how much of the code I should post.
public class Editor extends JFrame implements ActionListener
// This is the XMLTree object which displays the XML in a JTree
private XMLTree XMLTree;
private JTextArea textArea, textArea2, textArea3;
// One JScrollPane is the container for the JTree, the other is for
the textArea
private JScrollPane jScroll, jScrollRt, jScrollUp,
jScrollBelow;
private JSplitPane splitPane, splitPane2;
private JPanel panel;
// This JButton handles the tree Refresh feature
private JButton refreshButton;
// This Listener allows the frame's close button to work properly
private WindowListener winClosing;
private JSplitPane splitpane3;
// Menu Objects
private JMenuBar menuBar;
private JMenu fileMenu;
private JMenuItem newItem, openItem, saveItem,
exitItem;
// This JDialog object will be used to allow the user to cancel an exit
command
private JDialog verifyDialog;
// These JLabel objects will be used to display the error messages
private JLabel question;
// These JButtons are used with the verifyDialog object
private JButton okButton, cancelButton;
private JComboBox testBox;
// These two constants set the width and height of the frame
private static final int FRAME_WIDTH = 600;
private static final int FRAME_HEIGHT = 450;
* This constructor passes the graphical construction off to the
overloaded constructor
* and then handles the processing of the XML text
public Editor( String title, ArrayList xmlText ) throws
ParserConfigurationException
this( title );
textArea.setText( ( String )xmlText.get( 0 ) + "\n" );
for ( int i = 1; i < xmlText.size(); i++ )
textArea.append( ( String )xmlText.get( i ) + "\n" );
try
XMLTree.refresh( textArea.getText() );
catch( Exception ex )
String message = ex.getMessage();
System.out.println( message );
}//end try/catch
} //end Editor( String title, String xml )
* This constructor builds a frame containing a JSplitPane, which in
turn contains two
JScrollPanes.
* One of the panes contains an XMLTree object and the other contains
a JTextArea object.
public Editor( String title ) throws ParserConfigurationException
// This builds the JFrame portion of the object
super( title );
Toolkit toolkit;
Dimension dim, minimumSize;
int screenHeight, screenWidth;
// Initialize basic layout properties
setBackground( Color.lightGray );
getContentPane().setLayout( new BorderLayout() );
// Set the frame's display to be WIDTH x HEIGHT in the middle of
the screen
toolkit = Toolkit.getDefaultToolkit();
dim = toolkit.getScreenSize();
screenHeight = dim.height;
screenWidth = dim.width;
setBounds( (screenWidth-FRAME_WIDTH)/2,
(screenHeight-FRAME_HEIGHT)/2, FRAME_WIDTH,
FRAME_HEIGHT );
// Build the Menu
// Build the verify dialog
// Set the Default Close Operation
// Create the refresh button object
// Add the button to the frame
// Create two JScrollPane objects
jScroll = new JScrollPane();
jScrollRt = new JScrollPane();
// First, create the JTextArea:
// Create the JTextArea and add it to the right hand JScroll
textArea = new JTextArea( 200,150 );
jScrollRt.getViewport().add( textArea );
// Next, create the XMLTree
XMLTree = new XMLTree();
XMLTree.getSelectionModel().setSelectionMode(
TreeSelectionModel.SINGLE_TREE_SELECTION
XMLTree.setShowsRootHandles( true );
// A more advanced version of this tool would allow the JTree to
be editable
XMLTree.setEditable( false );
// Wrap the JTree in a JScroll so that we can scroll it in the
JSplitPane.
jScroll.getViewport().add( XMLTree );
// Create the JSplitPane and add the two JScroll objects
splitPane = new JSplitPane( JSplitPane.HORIZONTAL_SPLIT, jScroll,
jScrollRt );
splitPane.setOneTouchExpandable(true);
splitPane.setDividerLocation(200);
jScrollUp = new JScrollPane();
jScrollBelow=new JScrollPane();
// Here is were the error is coming up
String [] items = (String []) xmlText.toArray (new String[
xmlText.size () ]);
JComboBox queryBox = new JComboBox(items);
JComboBox queryBox2 = new JComboBox(items);
JComboBox queryBox3 = new JComboBox(items);
JComboBox queryBox4 = new JComboBox(items);
JComboBox queryBox5 = new JComboBox(items);
* I'm adding the scroll pane to the split pane,
* a panel to the top of the split pane, and some uneditible
combo boxes
* to them. Then I'll rearrange them to rearrange them, but
unfortunately am getting an error thrown up above.
panel = new JPanel();
panel.add(queryBox);
panel.add(queryBox2);
panel.add(queryBox3);
panel.add(queryBox4);
panel.add(queryBox5);
jScrollUp.getViewport().add( panel );
// Now building a text area
textArea3 = new JTextArea(200, 150);
jScrollBelow.getViewport().add( textArea3 );
splitPane2 = new JSplitPane(JSplitPane.VERTICAL_SPLIT,
jScrollUp, jScrollBelow);
splitPane2.setPreferredSize( new Dimension(300, 200) );
splitPane2.setDividerLocation(100);
splitPane2.setOneTouchExpandable(true);
// in here can change the contents of the split pane
getContentPane().add(splitPane2,BorderLayout.SOUTH);
// Provide minimum sizes for the two components in the split pane
minimumSize = new Dimension(200, 150);
jScroll.setMinimumSize( minimumSize );
jScrollRt.setMinimumSize( minimumSize );
// Provide a preferred size for the split pane
splitPane.setPreferredSize( new Dimension(400, 300) );
// Add the split pane to the frame
getContentPane().add( splitPane, BorderLayout.CENTER );
//Put the final touches to the JFrame object
validate();
setVisible(true);
// Add a WindowListener so that we can close the window
winClosing = new WindowAdapter()
public void windowClosing(WindowEvent e)
verifyDialog.show();
addWindowListener(winClosing);
} //end Editor()
* When a user event occurs, this method is called. If the action
performed was a click
* of the "Refresh" button, then the XMLTree object is updated using
the current XML text
* contained in the JTextArea
public void actionPerformed( ActionEvent ae )
if ( ae.getActionCommand().equals( "Refresh" ) )
try
XMLTree.refresh( textArea.getText() );
catch( Exception ex )
String message = ex.getMessage();
ex.printStackTrace();
}//end try/catch
else if ( ae.getActionCommand().equals( "OK" ) )
exit();
else if ( ae.getActionCommand().equals( "Cancel" ) )
verifyDialog.hide();
}//end if/else if
} //end actionPerformed()
// Program execution begins here. An XML file (*.xml) must be passed
into the method
public static void main( String[] args )
String fileName = "";
BufferedReader reader;
String line;
ArrayList xmlText = null;
Editor Editor;
// Build a Document object based on the specified XML file
try
if( args.length > 0 )
fileName = args[0];
if ( fileName.substring( fileName.indexOf( '.' ) ).equals(
".xml" ) )
reader = new BufferedReader( new FileReader( fileName )
xmlText = new ArrayList();
while ( ( line = reader.readLine() ) != null )
xmlText.add( line );
} //end while ( ( line = reader.readLine() ) != null )
// The file will have to be re-read when the Document
object is parsed
reader.close();
// Construct the GUI components and pass a reference to
the XML root node
Editor = new Editor( "Editor 1.0", xmlText );
else
help();
} //end if ( fileName.substring( fileName.indexOf( '.' )
).equals( ".xml" ) )
else
Editor = new Editor( "Editor 1.0" );
} //end if( args.length > 0 )
catch( FileNotFoundException fnfEx )
System.out.println( fileName + " was not found." );
exit();
catch( Exception ex )
ex.printStackTrace();
exit();
}// end try/catch
}// end main()
// A common source of operating instructions
private static void help()
System.out.println( "\nUsage: java Editor filename.xml" );
System.exit(0);
} //end help()
// A common point of exit
public static void exit()
System.out.println( "\nThank you for using Editor 1.0" );
System.exit(0);
} //end exit()
class newMenuHandler implements ActionListener
public void actionPerformed( ActionEvent ae )
textArea.setText( "" );
try
// Next, create a new XMLTree
XMLTree = new XMLTree();
XMLTree.getSelectionModel().setSelectionMode(
TreeSelectionModel.SINGLE_TREE_SELECTION );
XMLTree.setShowsRootHandles( true );
// A more advanced version of this tool would allow the JTree
to be editable
XMLTree.setEditable( false );
catch( Exception ex )
String message = ex.getMessage();
ex.printStackTrace();
}//end try/catch
}//end actionPerformed()
}//end class newMenuHandler
class openMenuHandler implements ActionListener
JFileChooser jfc;
Container parent;
int choice;
openMenuHandler()
super();
jfc = new JFileChooser();
jfc.setSize( 400,300 );
jfc.setFileFilter( new XmlFileFilter() );
parent = openItem.getParent();
}//end openMenuHandler()
public void actionPerformed( ActionEvent ae )
// Displays the jfc and sets the dialog to 'open'
choice = jfc.showOpenDialog( parent );
if ( choice == JFileChooser.APPROVE_OPTION )
String fileName, line;
BufferedReader reader;
fileName = jfc.getSelectedFile().getAbsolutePath();
try
reader = new BufferedReader( new FileReader( fileName ) );
textArea.setText( reader.readLine() + "\n" );
while ( ( line = reader.readLine() ) != null )
textArea.append( line + "\n" );
} //end while ( ( line = reader.readLine() ) != null )
// The file will have to be re-read when the Document
object is parsed
reader.close();
XMLTree.refresh( textArea.getText() );
catch ( Exception ex )
String message = ex.getMessage();
ex.printStackTrace();
}//end try/catch
jfc.setCurrentDirectory( new File( fileName ) );
} //end if ( choice == JFileChooser.APPROVE_OPTION )
}//end actionPerformed()
}//end class openMenuHandler
class saveMenuHandler implements ActionListener
JFileChooser jfc;
Container parent;
int choice;
saveMenuHandler()
super();
jfc = new JFileChooser();
jfc.setSize( 400,300 );
jfc.setFileFilter( new XmlFileFilter() );
parent = saveItem.getParent();
}//end saveMenuHandler()
public void actionPerformed( ActionEvent ae )
// Displays the jfc and sets the dialog to 'save'
choice = jfc.showSaveDialog( parent );
if ( choice == JFileChooser.APPROVE_OPTION )
String fileName;
File fObj;
FileWriter writer;
fileName = jfc.getSelectedFile().getAbsolutePath();
try
writer = new FileWriter( fileName );
textArea.write( writer );
// The file will have to be re-read when the Document
object is parsed
writer.close();
catch ( IOException ioe )
ioe.printStackTrace();
}//end try/catch
jfc.setCurrentDirectory( new File( fileName ) );
} //end if ( choice == JFileChooser.APPROVE_OPTION )
}//end actionPerformed()
}//end class saveMenuHandler
class exitMenuHandler implements ActionListener
public void actionPerformed( ActionEvent ae )
verifyDialog.show();
}//end actionPerformed()
}//end class exitMenuHandler
class XmlFileFilter extends javax.swing.filechooser.FileFilter
public boolean accept( File fobj )
if ( fobj.isDirectory() )
return true;
else
return fobj.getName().endsWith( ".xml" );
}//end accept()
public String getDescription()
return "*.xml";
}//end getDescription()
}//end class XmlFileFilter
} //end class Editor
Sorry if this post has been a bit lengthy, any help you guys could give
me solving this would be really appreciated.
Thanks,
Iain.

Hey. Couple pointers:
When posting, try to keep code inbetween code tags (button between spell check and quote original). It will pretty-print the code.
Posting code is good. Usually, though, you want to post theminimum amount of code which runs and shows your problem.
That way people don't have to wade through irrelevant stuff and
they have an easier time helping.
http://homepage1.nifty.com/algafield/sscce.html
As for your problem, this is a scope issue. You declare an
ArrayList xmlText in main(). That means that everywhere after
the declaration in main(), you can reference your xmlText.
So far so good. Then, inside main(), you call
Editor = new Editor( "Editor 1.0", xmlText );Now you've passed the xmlText variable to a new method,
Editor(String title, ArrayList xmlText) [which happens to be a
constructor, but that's not important]. When you do that, you
make the two variables title and xmlText available to the whole
Editor(String, ArrayList) method.
This is where you get messed up. You invoke another method
from inside Editor(String, ArrayList). When you call
this(title);you're invoking the method Editor(String title). You aren't passing
in your arraylist, though. You've got code in the Editor(String) method
which is trying to reference xmlText, but you'd need to pass in
your ArrayList in order to do so.
My suggestion would be to merge the two constructor methods into
one, Editor(String title, ArrayList xmlText).

Similar Messages

  • Difference between constructor & Methods if any ?

    In the below code I use the constructor ConstructorShirt1('M') to pass the value of M to the class ConstructorShirt1, but why do we have to do this, instead can we not just use a method and write the same thing in a method.
    class ConstructorShirt1Test {
         public static void main (String args[]) {
    ConstructorShirt1 constShirt = new ConstructorShirt1('M');
    char colorCode;
              colorCode = constShirt.getColorCode();
    System.out.println("Color Code: " + colorCode);
    class ConstructorShirt1 {
    private int shirtID = 0; // Default ID for the shirt
    private String description = "-description required-"; // default
    // The color codes are R=Red, B=Blue, G=Green, U=Unset
    private char colorCode = 'U';
    private double price = 0.0; // Default price for all items
    private int quantityInStock = 0; // Default quantity for all items
    public ConstructorShirt1(char startingCode) {
    switch (startingCode) {
    case 'R':
    case 'G':
    case 'B':
    colorCode = startingCode;
    break;
    default:
    System.out.println("Invalid colorCode. Use R, G, or B");
    public char getColorCode() {
    return colorCode;
    } // end of class
    So I am not clear what is the difference between constructor and methods if any ? or if not when to use a constructor and when to use a method.
    I would be glad if somebody throws light on this topic.
    PK

    There shouldn't be any confusion on this one... a constructor is meant to create an instance of the class. It can also set the state of its member variables in the process, like the constructor you are using. The same can also be done by a method.
    Wouldn't make much of a difference for simple programs, but this is more pertinent when it comes to designing classes. Like if the developer using the class needs to know what all states he has to set before he needs to do anything useful, then it is better to provide a constructor with some arguments for doing that.

  • Best method for passing data between nested components

    I have a fairly good sized Flex application (if it was
    stuffed all into one file--which it used to be--it would be about
    3-4k lines of code). I have since started breaking it up into
    components and abstracting logic to make it easier to write,
    manage, and develop.
    The biggest thing that I'm running into is figuring out a way
    to pass data between components. Now, I know how to write and use
    custom events, so that you dispatch events up the chain of
    components, but it seems like that only works one way (bottom-up).
    I also know how to make public variables/functions inside the
    component and then the caller can just assign that variable or call
    that function.
    Let's say that I have the following chain of components:
    Component A
    --Component B
    -- -- Component C
    -- -- -- Component D
    What is the best way to pass data between A and D (in both
    directions)?
    If I use an event to pass from D to A, it seems as though I
    have to write event code in each of the components and do the
    bubbling up manually. What I'm really stuck on though, is how to
    get data from A to D.
    I have a remote object in Component A that goes out and gets
    some data from the server, and most all of the other components all
    rely on whatever was returned -- so what is the best way to be able
    to "share" data between all components? I don't want to have to
    pass a variable through B and C just so that D can get it, but I
    also don't want to make D go and request the information itself. B
    and C might not need the data, so it seems stupid to have to make
    it be aware of it.
    Any ideas? I hope that my explanation is clear enough...
    Thanks.
    -Jake

    Peter (or anyone else)...
    To take this example to the next (albeit parallel) level, how
    would you go about creating a class that will let you just
    capture/dispatch local data changes? Following along my original
    example (Components A-D),let's say that we have this component
    architecture:
    Component A
    --Component B
    -- -- Component C
    -- -- -- Component D
    -- -- Component E
    -- -- Comonnent F
    How would we go about creating a dispatch scheme for getting
    data between Component C and E/F? Maybe in Component C the user
    picks a username from a combo box. That selection will drive some
    changes in Component E (like triggering a new screen to appear
    based on the user). There are no remote methods at play with this
    example, just a simple update of a username that's all contained
    within the Flex app.
    I tried mimicking the technique that we used for the
    RemoteObject methods, but things are a bit different this time
    around because we're not making a trip to the server. I just want
    to be able to register Component E to listen for an event that
    would indicate that some data has changed.
    Now, once again, I know that I can bubble that information up
    to A and then back down to E, but that's sloppy... There has to be
    a similar approach to broadcasting events across the entire
    application, right?
    Here's what I started to come up with so far:
    [Event(name="selectUsername", type="CustomEvent")]
    public class LocalData extends EventDispatcher
    private static var _self:LocalData;
    // Constructor
    public function LocalData() {
    // ?? does anything go here ??
    // Returns the singleton instance of this class.
    public static function getInstance():LocalData {
    if( _self == null ) {
    _self = new LocalData();
    return _self;
    // public method that can be called to dispatch the event.
    public static function selectUsername(userObj:Object):void {
    dispatchEvent(new CustomEvent(userObj, "selectUsername"));
    Then, in the component that wants to dispatch the event, we
    do this:
    LocalData.selectUsername([some object]);
    And in the component that wants to listen for the event:
    LocalData.getInstance().addEventListener("selectUsername",
    selectUsername_Result);
    public function selectUsername_Result(e:CustomEvent):void {
    // handle results here
    The problem with this is that when I go to compile it, it
    doesn't like my use of "dispatchEvent" inside that public static
    method. Tells me, "Call to possibly undefined method
    "dispatchEvent". Huh? Why would it be undefined?
    Does it make sense with where I'm going?
    Any help is greatly appreciated.
    Thanks!
    -Jacob

  • Pass parametrs between pages

    Hi,
    how can I pass parameters between pages, WITHOUT using a Session bean?
    I mean: I need to use a Link Action component to pass control to another page (using the page navigation feature) and, along with the request, also pass the Id of the clicked image.
    Can I do this using a JSF/Creator feature?
    (without using a link like "NextPage.jsp?id=234")
    thanks a lot

    Runak,
    I have a question about this. On the faqs link you supplied there is a document:
    How can I pass data between pages without creating SessionBean variables in Creator?
    I have this problem a lot:
    Now if a variable is passed to Page2 from Page1 that is fine but as soon as you press a button or other. That variable is gone when the constructor is loaded again.
    What work around would you suggest?, passing a varable from Page2 to Page2 dosen't seem to work.
    I use Hidden Fields, but surely theres a better way.
    Regards
    Jonathan

  • OBIEE 11G - Issue passing parameters between two reports

    Hi folks,
    I am struggling to pass parameters between two reports in OBIEE 11G.
    My first report contains the following columns: Rolling Year Type (VCHAR), Year(VCHAR), Month(VCHAR), Cost(Double).
    My second report contains the following columns: Rolling Year Type(VCHAR), Year(VCHAR), Month(VCHAR), Category(VCHAR), Cost(Double).
    My requirement is to pass the Rolling Year Type, Year and Month values from report 1 to report 2.
    On the Month column properties of report 1, I have created an Action Link called 'Drill to Category'. I have clicked on 'Navigate to BI Content' and selected Report 2.
    Then on Report 2, I have included three filters: Rolling Year Type is prompted, Year is prompted, Month is promted.
    When I run the report I always get the following error:
    The specified criteria didn't result in any data. This is often caused by applying filters and/or selections that are too restrictive or that contain incorrect values. Please check your Analysis Filters and try again. The filters currently being applied are shown below.
    When I check the cursor cache, the filter values are correct. Does anybody have any idea why Report 2 does not display?
    When I remove the Month filter, the report works correctly.
    I have since changed the third filter to be Month No and although Report 2 does display, it does not pick up the filter on the Month No.
    I initially thought this may have been a caching issue and so I have disabled BI Server Cache but this does not fix my problem.
    This was never an issue on OBIEE 10G as I found it very easy to navigate between two requests.
    Has anyone else experienced problems with passing parameters between two request in 11G?
    Any help appreciated.
    Thanks
    Gavin

    Hi,
    I once tried this kind of requirement(with dashboard prompts though) and hit at similar issue. I later found out that the problem is with the space in the parameter values. Can you please let me know, if the same is the case with you?
    Suppose the parameter passed is "Jan 2010", but the report on the destination takes the value as "Jan" & "2010". Yes, it kind of split the parameter value to two based on space. I think we can notice the filters the destination report got, by enabling filter view.
    In this case, since you pass only value at a time, could you try placing the parameter value anyway in double quotes? I think the Server then will understand it as one value.
    Thank you,
    Dhar

  • Passing parameters between views in different Web Dynpro applications

    Hi everyone,
    I would like to pass the value of one parameter between one view in a webdynpro application and another view that is in other webdynpro application. How can I do this in a secure way?

    Hi,
    Check below links for passing parameters between two applications:
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b083f76a-708c-2b10-559b-e07c36dc5440
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/91b6ad90-0201-0010-efa3-9626d2685b6e
    Re: Pass parameters via POST in WDPortalNavigation.navigateAbsolute method
    Regards,
    Anagha

  • Having issues on ASA 5510 pass traffic between interfaces

    I am trying to pass traffic between two internal interfaces but am unable to.  Been searching quite a bit and have tried several things to no avail. I feel like there is a simple solution here I am just not seeing. Here is the relevant portion of my config:
    interface Ethernet0/1
    nameif inside
    security-level 100
    ip address 192.168.5.1 255.255.255.0
    interface Ethernet0/2
    nameif ct-users
    security-level 100
    ip address 10.12.0.1 255.255.0.0
    same-security-traffic permit inter-interface
    access-list inside_nat0_outbound extended permit ip any 192.168.5.0 255.255.255.0
    access-list inside_nat0_outbound extended permit ip any 10.12.0.0 255.255.0.0
    access-list inside_access_in extended permit ip any any
    nat (inside) 0 access-list inside_nat0_outbound
    nat (inside) 1 0.0.0.0 0.0.0.0
    nat (ct-users) 0 access-list inside_nat0_outbound
    nat (ct-users) 1 0.0.0.0 0.0.0.0
    static (inside,ct-users) 192.168.5.0 192.168.5.0 netmask 255.255.255.0
    static (ct-users,inside) 10.12.0.0 10.12.0.0 netmask 255.255.0.0
    access-group outside_access_in in interface outside
    access-group outside_access_ipv6_in in interface outside
    access-group inside_access_in in interface inside
    access-group inside_access_ipv6_in in interface inside
    access-group inside_access_in in interface ct-users
    access-group inside_access_ipv6_in in interface ct-users
    On both networks I am able to access the internet, just not traffic between each other.
    A packet-tracer reveals the following (it's hitting some weird rules on the way):
    cybertron# packet-tracer input inside tcp 192.168.5.2 ssh 10.12.0.2 ssh detailed
    Phase: 1
    Type: ACCESS-LIST
    Subtype:
    Result: ALLOW
    Config:
    Implicit Rule
    Additional Information:
    Forward Flow based lookup yields rule:
    in id=0xab827020, priority=1, domain=permit, deny=false
    hits=8628156090, user_data=0x0, cs_id=0x0, l3_type=0x8
    src mac=0000.0000.0000, mask=0000.0000.0000
    dst mac=0000.0000.0000, mask=0100.0000.0000
    Phase: 2
    Type: UN-NAT
    Subtype: static
    Result: ALLOW
    Config:
    static (ct-users,inside) 10.12.0.0 10.12.0.0 netmask 255.255.0.0
    match ip ct-users 10.12.0.0 255.255.0.0 inside any
    static translation to 10.12.0.0
    translate_hits = 0, untranslate_hits = 6
    Additional Information:
    NAT divert to egress interface ct-users
    Untranslate 10.12.0.0/0 to 10.12.0.0/0 using netmask 255.255.0.0
    Phase: 3
    Type: ACCESS-LIST
    Subtype: log
    Result: ALLOW
    Config:
    access-group inside_access_in in interface inside
    access-list inside_access_in extended permit ip any any
    Additional Information:
    Forward Flow based lookup yields rule:
    in id=0xad5bec88, priority=12, domain=permit, deny=false
    hits=173081, user_data=0xa8a76ac0, cs_id=0x0, flags=0x0, protocol=0
    src ip=0.0.0.0, mask=0.0.0.0, port=0
    dst ip=0.0.0.0, mask=0.0.0.0, port=0, dscp=0x0
    Phase: 4
    Type: IP-OPTIONS
    Subtype:
    Result: ALLOW
    Config:
    Additional Information:
    Forward Flow based lookup yields rule:
    in id=0xab829758, priority=0, domain=inspect-ip-options, deny=true
    hits=146139764, user_data=0x0, cs_id=0x0, reverse, flags=0x0, protocol=0
    src ip=0.0.0.0, mask=0.0.0.0, port=0
    dst ip=0.0.0.0, mask=0.0.0.0, port=0, dscp=0x0
    Phase: 5
    Type: NAT-EXEMPT
    Subtype: rpf-check
    Result: ALLOW
    Config:
    Additional Information:
    Forward Flow based lookup yields rule:
    in id=0xad48c860, priority=6, domain=nat-exempt-reverse, deny=false
    hits=2, user_data=0xad4b5e98, cs_id=0x0, use_real_addr, flags=0x0, protocol=0
    src ip=192.168.5.0, mask=255.255.255.0, port=0
    dst ip=0.0.0.0, mask=0.0.0.0, port=0, dscp=0x0
    Phase: 6
    Type: NAT-EXEMPT
    Subtype:
    Result: ALLOW
    Config:
    match ip inside any ct-users 10.12.0.0 255.255.0.0
    NAT exempt
    translate_hits = 2, untranslate_hits = 2
    Additional Information:
    Forward Flow based lookup yields rule:
    in id=0xad3b1f70, priority=6, domain=nat-exempt, deny=false
    hits=2, user_data=0xad62b7a8, cs_id=0x0, use_real_addr, flags=0x0, protocol=0
    src ip=0.0.0.0, mask=0.0.0.0, port=0
    dst ip=10.12.0.0, mask=255.255.0.0, port=0, dscp=0x0
    Phase: 7
    Type: NAT
    Subtype:
    Result: ALLOW
    Config:
    static (inside,ct-users) 192.168.5.0 192.168.5.0 netmask 255.255.255.0
    match ip inside 192.168.5.0 255.255.255.0 ct-users any
    static translation to 192.168.5.0
    translate_hits = 1, untranslate_hits = 15
    Additional Information:
    Forward Flow based lookup yields rule:
    in id=0xadf7a778, priority=5, domain=nat, deny=false
    hits=6, user_data=0xad80cfd0, cs_id=0x0, flags=0x0, protocol=0
    src ip=192.168.5.0, mask=255.255.255.0, port=0
    dst ip=0.0.0.0, mask=0.0.0.0, port=0, dscp=0x0
    Phase: 8
    Type: NAT
    Subtype: host-limits
    Result: ALLOW
    Config:
    static (inside,outside) udp 184.73.2.1 1514 192.168.5.2 1514 netmask 255.255.255.255
    match udp inside host 192.168.5.2 eq 1514 outside any
    static translation to 184.73.2.1/1514
    translate_hits = 0, untranslate_hits = 0
    Additional Information:
    Forward Flow based lookup yields rule:
    in id=0xab8e2928, priority=5, domain=host, deny=false
    hits=9276881, user_data=0xab8e1d20, cs_id=0x0, reverse, flags=0x0, protocol=0
    src ip=192.168.5.2, mask=255.255.255.255, port=0
    dst ip=0.0.0.0, mask=0.0.0.0, port=0, dscp=0x0
    Phase: 9
    Type: NAT
    Subtype: rpf-check
    Result: ALLOW
    Config:
    static (ct-users,inside) 10.12.0.0 10.12.0.0 netmask 255.255.0.0
    match ip ct-users 10.12.0.0 255.255.0.0 inside any
    static translation to 10.12.0.0
    translate_hits = 0, untranslate_hits = 6
    Additional Information:
    Forward Flow based lookup yields rule:
    out id=0xad158dc0, priority=5, domain=nat-reverse, deny=false
    hits=6, user_data=0xac0fb6b8, cs_id=0x0, flags=0x0, protocol=0
    src ip=0.0.0.0, mask=0.0.0.0, port=0
    dst ip=10.12.0.0, mask=255.255.0.0, port=0, dscp=0x0
    Phase: 10
    Type: NAT
    Subtype: host-limits
    Result: ALLOW
    Config:
    static (ct-users,inside) 10.12.0.0 10.12.0.0 netmask 255.255.0.0
    match ip ct-users 10.12.0.0 255.255.0.0 inside any
    static translation to 10.12.0.0
    translate_hits = 0, untranslate_hits = 6
    Additional Information:
    Reverse Flow based lookup yields rule:
    in id=0xada0cd38, priority=5, domain=host, deny=false
    hits=131, user_data=0xac0fb6b8, cs_id=0x0, reverse, flags=0x0, protocol=0
    src ip=10.12.0.0, mask=255.255.0.0, port=0
    dst ip=0.0.0.0, mask=0.0.0.0, port=0, dscp=0x0
    Phase: 11
    Type: IP-OPTIONS
    Subtype:
    Result: ALLOW
    Config:
    Additional Information:
    Reverse Flow based lookup yields rule:
    in id=0xad5c1ab0, priority=0, domain=inspect-ip-options, deny=true
    hits=130, user_data=0x0, cs_id=0x0, reverse, flags=0x0, protocol=0
    src ip=0.0.0.0, mask=0.0.0.0, port=0
    dst ip=0.0.0.0, mask=0.0.0.0, port=0, dscp=0x0
    Phase: 12
    Type: FLOW-CREATION
    Subtype:
    Result: ALLOW
    Config:
    Additional Information:
    New flow created with id 189385494, packet dispatched to next module
    Module information for forward flow ...
    snp_fp_tracer_drop
    snp_fp_inspect_ip_options
    snp_fp_tcp_normalizer
    snp_fp_translate
    snp_fp_adjacency
    snp_fp_fragment
    snp_ifc_stat
    Module information for reverse flow ...
    snp_fp_tracer_drop
    snp_fp_inspect_ip_options
    snp_fp_translate
    snp_fp_tcp_normalizer
    snp_fp_adjacency
    snp_fp_fragment
    snp_ifc_stat
    Result:
    input-interface: inside
    input-status: up
    input-line-status: up
    output-interface: ct-users
    output-status: up
    output-line-status: up
    Action: allow

    how are you testing? if you are pinging between the subnets, make sure you have disabled windows firewall and/or any other firewall that is installed on the PCs (remember to re-enable it later).
    Are the NAT commands there because you were trying different things to get this working?  I suggest you use the command no nat-control instead.  Depending on the version of ASA you are running it may already be disabled by default.  In version 8.4 and later nat-control has been removed completely.
    Please remember to select a correct answer and rate helpful posts

  • Pass values between pages

    Hello experts!
    I am trying to pass value between two pages without page submit.
    I set item value from first page to session state by dynamic action. Then I am trying to pass this value to second page, I use button which redirects to second page and sets item value on second page with value from first page.
    But approach this does not woks as I expected. The value from the first page is not passed to the second page when I click on button. Value is passed to the second page only if I:
    1. set some value to item on first page (e.g. XX);
    2. click on button which redirects to the second page;
    3. get back to first page;
    4. set some new value to the item (e.g. YY);
    5. click on button;
    6. then the first value from session state is passed to sthe econd page (value XX)
    Could anybody tell me where I make a mistake, or what is wrong in my solution?
    Test appl.
    www.apex.oracle.com
    http://apex.oracle.com/pls/apex/f?p=9027:LOGIN_DESKTOP:6946284921064
    workspace: kurintest
    username: [email protected]
    passwd: kurintest
    appl: 9027 pass_value
    Thanks in advance!
    Jiri

    Jiri N. wrote:
    Hello experts!
    I am trying to pass value between two pages without page submit.
    I set item value from first page to session state by dynamic action. Then I am trying to pass this value to second page, I use button which redirects to second page and sets item value on second page with value from first page.
    But approach this does not woks as I expected. The value from the first page is not passed to the second page when I click on button. Value is passed to the second page only if I:
    1. set some value to item on first page (e.g. XX);
    2. click on button which redirects to the second page;
    3. get back to first page;
    4. set some new value to the item (e.g. YY);
    5. click on button;
    6. then the first value from session state is passed to sthe econd page (value XX)
    Could anybody tell me where I make a mistake, or what is wrong in my solution?A redirect button and it's target URL&mdash;including items to be set and their values&mdash;are rendered on page show, in this case before <tt>P2_ITEM1</tt> has a value. Look at the page source when the page is first rendered:
    <input type="button" value="Button1"onclick="apex.navigation.redirect(&#x27;f?p=9027:3:11397156385140::NO:RP,3:P3_ITEM1:&#x27;);" id="P2_BUTTON1"  />No value substituted for <tt>&P2_ITEM1.</tt> in the URL.
    Why do you want to navigate between these pages without a page submit? As APEX has to render page 3 anyway, why not submit and branch?

  • Pass Values between two Function Modules RFC in Portal

    I need to pass values ​​between 2 FM RFC.
    I have an implicit enhancement in HRMSS_RFC_EP_READ_GENERALDATA RFC function module.
    PERNR LIKE  PSKEY-PERNR
    ENHANCEMENT 1  Z_ESS_EXPORT_PERNR.    "active version
      EXPORT pernr to memory id 'PMK'.
      set parameter id 'PMK' field pernr.
    ENDENHANCEMENT.
    On the other hand an RFC function module that has the code:
            pmk    LIKE PSKEY-PERNR,
            pmk_2  LIKE PSKEY-PERNR.
      get parameter id 'PMK' field pmk.
      IMPORT pmk_2 FROM MEMORY ID 'PMK'.
    When the execution is done in development environment, the modules function at the level of R3, the "get parameter id" works only if the debbuger is classic, otherwise not work. The Import to memory id never works.
    In the environment of quality, r3 do not work any of the 2 sentences. If run from portal (which is as it should be) does not work.
    Thanks if anyone can help me get the problem. Both function modules are executed at the portal.
    Regards
    Edited by: Daynet1840 on Feb 15, 2012 2:02 AM

    When the execution is directly in r3, in development environment or quality, does the set / get parameter id. Export / Import memory id not work.
    But if the FM are called from the portal, does not the set / get parameter id.
    I tried changing the sentence as I indicated harishkumar.dy still not working.
    Madhu: They're in different function groups, one is standard and the other not.
    Regards
    Edited by: Daynet1840 on Feb 15, 2012 3:08 PM
    Edited by: Daynet1840 on Feb 15, 2012 3:11 PM

  • How to pass variables between loaders

    Hi,
    I am trying to load an image, with descriptive text and a back button on the click of a thumbnail of the image. I am using a MovieClipLoader instance to do this.
    Here are my problems:
    1. I tried loading the image, with the text(which is within an external swf), using the same loader, but since I am placing them dynamically, depending on the dimensions of the image, I need to pass variables between the two. The image loader is taking longer than the text (obviously) but I need the dimensions of the image before I can place the text. How do I do that??
    2. I tried using two loaders, with separate listeners, and the problem once again is that the text loads before the image, and is hence placed with default values instead of the values derived from the image. The code is within onLoadInit(). Is it possible for me to get the dimensions of the image from onLoadStart()???
    3. There is a back button within the text.swf. I want the image and the text.swf to be unloaded when this button is clicked. How can I achieve that? Can I call loader.unloadClip(target), from within this? Will it recognize the variable?
    4. Is there a much easier way to do this, which I am sadly unaware of?
    Any help will be appreciated.

    Tried the onloadstart() function, but it gives target._width and _height as 0. So that is ruled out...any other suggestions?

  • Pass parameter between programs

    Hi,
    I need to pass one parameter between 3 programs :
    That is the actual flow of my parameter.
    SAPF110V -> RFFOBE_I -> which include ZRFFORI99B)
    get param   <- RFFOBE_I <- set param
    with statments
    SET PARAMETER ID 'ZDBL' FIELD p_doublon.
    GET parameter ID 'ZDBL' FIELD p_doublons.
    But unfortunatly it doesn't work :/  (value of my param = 0)
    I can run the include program in debug because it is run in background...
    I can't use a Ztable
    Any idea to pass value between this flow ?
    Thanks,

    Hello,
    The value which you want to pass between the programs can be stored in the SAP memory space by using the IMPORT and EXPORT to MEMORY ID statement.
    EXPORT <internal table/variable> to MEMORY-ID 'MY MEMORY'.
    Above statement will keep the value in SAP memory by creating a memory named as 'MY MEMORY'.
    IMPORT <internal table/variable> from MEMORY-ID 'MY MEMORY'.
    Above statement will get the value from SAP memory space.
    But while using the above statement please consider that all the three programs should be run in the same session because the Memory that you are using will automatically be cleaned up by the Garbage collector as the session ends.
    Hope it helps.
    Thanks,
    Jayant.
    <<text removed - don't ask for points>>
    Edited by: Matt on Nov 19, 2008 7:48 PM

  • Passing Parameter between Methods

    I have some problems because i don't really know how to pass parameter between methods in a java class.
    How can i do that? below is the code that i did.
    I want to pass in the parameter from a method called dbTest where this method will run StringTokenizer to capture the input from a text file then it will run storeData method whereby later it will then store into the database.
    How can i pass data between this two methods whereby i want to read from text file then take the value to be passed into the database to be stored?
    Thanks alot
    package com;
    import java.io.*;
    import java.util.*;
    import com.db4o.ObjectContainer;
    import com.db4o.Db4o;
    import com.db4o.ObjectSet;
      class TokenTest {
           private final static String filename = "C:\\TokenTest.yap";
           public String fname;
         public static void main (String[] args) {
              new File(filename).delete();
              ObjectContainer db=Db4o.openFile(filename);
         try {
            String fname;
            String lname;
            String city;
            String state;
             dbStore();
            storeData();
         finally {
              db.close();
         public String dbTest() {
            DataInputStream dis = null;
            String dbRecord = null;
            try {
               File f = new File("c:\\abc.txt");
               FileReader fis = new FileReader(f);
               BufferedReader bis = new BufferedReader(fis);
               // read the first record of the database
             while ( (dbRecord = bis.readLine()) != null) {
                  StringTokenizer st = new StringTokenizer(dbRecord, "|");
                  String fname = st.nextToken();
                  String lname = st.nextToken();
                  String city  = st.nextToken();
                  String state = st.nextToken();
                  System.out.println("First Name:  " + fname);
                  System.out.println("Last Name:   " + lname);
                  System.out.println("City:        " + city);
                  System.out.println("State:       " + state + "\n");
            } catch (IOException e) {
               // catch io errors from FileInputStream or readLine()
               System.out.println("Uh oh, got an IOException error: " + e.getMessage());
            } finally {
               // if the file opened okay, make sure we close it
               if (dis != null) {
                  try {
                     dis.close();
                  } catch (IOException ioe) {
                     System.out.println("IOException error trying to close the file: " +
                                        ioe.getMessage());
               } // end if
            } // end finally
            return fname;
         } // end dbTest
         public void storeData ()
              new File(filename).delete();
              ObjectContainer db = Db4o.openFile(filename);
              //Add data to the database
              TokenTest tk = new TokenTest();
              String fNme = tk.dbTest();
              db.set(tk);
        //     try {
                  //open database file - database represented by ObjectContainer
        //          File filename = new File("c:\\abc.yap");
        //          ObjectContainer object = new ObjectContainer();
        //          while ((dbRecord = bis.readLine() !=null))
        //          db.set(fname);
        //          db.set(lname);
        //          db.set(city);
            //          db.set(state);
    } // end class
         Message was edited by:
    erickh

    In a nutshell, you don't "pass" parameters. You simply call methods with whatever parameters they take. So, methods can call methods, which can call other methods, using the parameters in question. Hope that makes sense.

  • Passing parameter between two applets

    hi all,
    i want to pass parameter between two applets. in other words, when user clicks the button; close the running applet, pass parameter to another applet and run another applet.
    now i think that could be, ( creating a parameter table in database, when user click on button write parameters to table and stop active applet and run other applet. when other applet runs in init methot it takes parameter from table). but it will be very indirect way.
    if you have an idea or information, plesae tell me.
    thanks for your interest

    Hi ,
    Plz pay a visit to this wonderful website,
    http://www.rgagnon.com/javadetails/java-0022.html / http://www.rgagnon.com/howto.html
    Best Wishes,
    Gaurav
    PS : Thanks to Real Gagnon. This is all I can do at this stage, but wanted to say you are doing a wonderful job.

  • Pass values between panels in different UI files

    Hi All,
    Is there a way to pass values between panels belonging to User Interface files ? Or is it easier to have one .uir and different .c and .h files ?
    Thanks,
    Kanu

    I should say that it's not possible for you to trap events from the first popup,and this depends on the basic concept of "popup panel".
    When you install a popup panel, all user interaction with existing panels is excluded: all focus it aimed at the popup only, no other user interface event is generated. If you launch another popup from the first one, the second popup prevails over the first one and no event can be generated on the first panel until the second one is closed.
    Handling a chain of two popup panels while looping on GetUserEvent can lead to unpredictable situation not so easy to untangle.
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • Performace tuning: how to pass data between different batch job programs?

    Hi everyone,
        now i have one problem about performance tuning using threading in SAP programs: split one big program into two programs - one is main program and the other is sub program. using batch jobs, we can submit multi jobs of sub program at the same time.
        does anybody know how to pass data between different batch jobs? I don't want to use temp files. can ABAP memory can implement this?
        thanks!

    Wei,
    Yes we can transfer the data by using
    SAP Memory OR ABAP Memory.
    Ex:  V_count TYPE i.
      V_count = 100.
    LOOP AT  itab.
    IF v_count EQ 25.
    Here For every batch job
      EXPORT data TO MEMORY ID 'ABC'
       Function module
        JOB_OPEN
       JOB_SUBMIT
       JOB_CLOSE.
      ENDIF.
    ENDLOOP .
    IN your 2nd program.
    INITIALIZATION.
    IMPORT data FROM MEMORY IF 'ABC'.
    FREE memory if .---When you free the memory you will get recent data.
    Don't forget to reward if useful.

Maybe you are looking for

  • N97 Copy & Past missing?

    How can I copy urls from the browser, or past passwords into my wlan configuration? On my N95, there was a dedicated key for copy&past but this key has been stripped by Nokia on the N97. I could live with that, if there would be a key combination equ

  • Song and Artist display differently in landscape mode (iPod on iPhone)

    I have a CD Compilation *50 Best Songs Ever*. When I play any song from this Compilation on my iPhone, if I turn the phone to landscape mode the Artist defaults back to the Artist on the 1st track, but if I turn the phone back to upright mode the Art

  • Hyperion Intelligence

    <p>1. Can we export the data in Excel sheet in multiple tabs.<br>that is if I have 12 months data, I want in Excel sheet with datafor each month in a separate tab but with Names for the tab likeJan ,feb etc ....<br><br>2. Can we export the Data with

  • Yahoo Messenger won't sign in Macbook (13" Black) v. 10.6.8 (Snow Leopard)

    Been having some really weird issues with Yahoo Messenger on my Macbook (13" Black) O/S Snow Leopard v 10.6.8.  My sign-in/log-in screen has been in this perpetual cycle of saying "signing -in" but nothing happens..  I have no other issues with other

  • Firefox will not connect to serever.

    Firefox will not connect to server. Other application connect. I have removed and reloaded firefox several times.