Refer to a JTabbedPane from the porgram /&what is the first method invoked?

Hi there,
I have been researching for this for a while and couldn?t find the answer, maybe some of you guys can help.
Situation: I have a program with some JTabbedPane in it
          panel.setLayout(new BorderLayout());
          JTabbedPane pane = new JTabbedPane();
          pane.setTabPlacement(JTabbedPane.LEFT);
          pane.setFont(new Font("Times New Roman", Font.PLAIN, 16));
          pane.add("User", userPanel);
          pane.add("Group Type", groupPanel);
          pane.add("Agent", agentPanel);
          panel.add(pane, BorderLayout.CENTER);
Question1: sometimes, when the user clicks on JButton, I want to refer him directly to a different ?JTabbedPane?. Meaning, I don?t want him to physically press the ?JTabbedPane? to get there, but I want the program to take him directly to the relevant section. how to do that?
Quesiotn2: what is the first method invoked when referred to a JTabbedPane. Or, how can I count how many times the users has referred to a particular section.
Thanks for any help :-)
dgz

panel.setLayout(new BorderLayout());
JTabbedPane pane = new JTabbedPane();
pane.setTabPlacement(JTabbedPane.LEFT);
pane.setFont(new Font("Times New Roman", Font.PLAIN,
16));
pane.add("User", userPanel);
pane.add("Group Type", groupPanel);
pane.add("Agent", agentPanel);
panel.add(pane, BorderLayout.CENTER);
Question1: sometimes, when the user clicks on JButton,
I want to refer him directly to a different
?JTabbedPane?. Meaning, I don?t want him to physically
press the ?JTabbedPane? to get there, but I want the
program to take him directly to the relevant section.
how to do that?
Try this tabPane.setSelectedIndex(anIndex) //eg a number between 0 and tabPane.getTabCount
Quesiotn2: what is the first method invoked when
referred to a JTabbedPane. Or, how can I count how
many times the users has referred to a particular
section.You can get the component at an index, check if it is showing and update a count variable eg
Vector counter = new Vector();
public void checkVisibleTab() {
for(int x = 0; x < tabPane.getTabCount(); x++) {
   if(tabPane.getComponentAt(x).isShowing())
      counter.addElement( new Integer(x) );
} You can then iterate through the vector and find how many times a particular number appears and use it for your specific purpose.
ICE

Similar Messages

  • I exchanged my battery-challenged Ipad 1 for a refurbished model, and it won't move from the first page. . .what gives?

    I exchanged my battery-challenged Ipad 1 for a refurbished model, and the new model won't move from the first page, which shows the battery charger pointing toward an Itunes logo.  It has a full battery charge. . .what gives?

    It's been so long since I activated an iPad original model, and I am assuming that it needs to be activated. If that's not the problem, then you need to restore the iOS software.
    Eject the iPad, turn the iPad off, quit iTunes, restart you computer - then restart the iPad and connect it to your computer and see if iTunes launches on it's own. If it doesn't, then launch it yourself. If iTunes does not guide you through the activation process, I assume that you have to restore the software.
    Click on the iPad name on the left sidebar of iTunes. If you don't see the sidebar, go to View>Show Sidebar from the menu at the top. Then you should see the iPad under the devices heading. After you click on the iPad name, click on the Summary Tab at the top of the iTunes window on the right. Then Click on Restore.
    I'm hoping that starting the process over again activates the iPad rather than having to restore the device, but see what happens.

  • Just bought an iPhone 5 in second hand and it seems that i need to have the Apple ID from the first owner to use it- Any advice?

    I bought an iphone 5 in second hand and therefore performed a factory hard resert. When I tryed to turn it on again, after going trough all the steps, I was asked to fill in the Apple ID and password from the first owner who now doesnt pick up the phone… So now there's no way I can turn it on because I always get stuck in that part where I need to fill in the Apple ID and Password! Does anyone know how can I solve this problem?? Because I'm pretty sure the guy who sold it to me is not going to pick up the phone ever again...

    So you are explaining a situation where a legitimate user needs help from Apple. Why wont Apple help? Apple knows everything about the iOS devices  that are on its network.  If the iOS device is attached to an Apple account then Apple knows about it and the owner. I have an Apple account so Apple also knows about me and the iOS devices that i own already. Apple even has my credit card info on file.
    I dont expect you to know if an iOS  device that i bought was stolen or not. But surely Apple knows cause they can send an email to the seller  who has the iPhone still attached to their account and tell them that i have their phone. Then Apple can tell that seller they have a certain amount of time to respond or the iOS device will be removed from their account. Thats the best that Apple can do for their customers to protect their devices. Apple does the same whenever i buy something on the App Store or change anything with my iOS devices on iCloud. They send me an email telling me what happened and what i can do if that info is not correct. Why cant they do it with these second hand buyer activation issues?

  • How to remove the recursion from the following method

    Hi All,
    Can u plz help me to remove the recursion from the following method.
    The problem here is that recursion cann't be removed easily here as there is no any end condition.
    hopefully waiting for the help....
    Reema.
    private FilterStatement processCustomExpressions(FilterStatement statement,
              DistinguishedName tenant, LdapDao ldapDao)
              throws NameNotFoundException,
              LDAPServerException, NamingException {
         HashMap relMap = new HashMap();
         HashMap replaceMap = new HashMap();
         Vector relVec = null;
              FilterSubExpressions expressions = statement.getExpressions();
              FilterPartIterator it = (FilterPartIterator)expressions.iterator();
              while (it.hasNext()) {
                   FilterExpression e = (FilterExpression)it.next();
                   if (e instanceof CustomExpression) {
                        CustomExpression ce = (CustomExpression)e;
                        try {
                             FilterExpression fe = ce.createExpression();
                             if (fe instanceof RelationshipExpression) {
                                  RelationshipExpression re = (RelationshipExpression)fe;
                                  it.replace(re);
                                  relVec = (Vector) relMap.get(re.name);
                                  if(relVec == null) {
                                       relVec = new Vector();
                                       relVec.add(re);
                                  }else {
                                       relVec.add(re);
                                       it.remove();
                                  relMap.put(re.name, relVec);
                             } else if (fe instanceof SystemExpression) {
         SystemExpression se = (SystemExpression)fe;
         it.replace(se);
                        } catch (FilterEvaluationException fe) {
                             traceLogger.exception(Level.DEBUG_MIN, this,
                                  "processCustomExpressions(" + statement.toString() + ")", fe);
                             SystemLog.getInstance().logError(this,
                                  "processCustomExpressions(" + statement.toString() + ")", fe.getMessage());
              replaceRelationshipExpressions(statement, tenant, ldapDao, relMap);
              processContainerBasedExpressions(tenant, ldapDao, relMap, replaceMap);
              FilterSubStatements statements = statement.getStatements();
              FilterStatement temp = null;
              if (statements.size() != 0) {          
                   FilterPartIterator iter = (FilterPartIterator)statements.iterator();
                   while (iter.hasNext()) {
                        temp = (FilterStatement)iter.next();
                        temp = processCustomExpressions(temp, tenant, ldapDao);
                        iter.replace(temp);
              if(!replaceMap.isEmpty())
                   return replaceContainerBasedExpressions(statement, replaceMap);
              return statement;
         }

    I think one of the reasons that noone will reply to your posting is that you take it a bit too easy. First of all, please use the "code" button to format your code listings. Then it will look like this (see below) and everybody can at least read it!
    private FilterStatement processCustomExpressions(FilterStatement statement,
                                                    DistinguishedName tenant,
                                                    LdapDao ldapDao)
            throws NameNotFoundException, LDAPServerException, NamingException {
        HashMap relMap = new HashMap();
        HashMap replaceMap = new HashMap();
        Vector relVec = null;
        FilterSubExpressions expressions = statement.getExpressions();
        FilterPartIterator it = (FilterPartIterator) expressions.iterator();
        while (it.hasNext()) {
            FilterExpression e = (FilterExpression) it.next();
            if (e instanceof CustomExpression) {
                CustomExpression ce = (CustomExpression) e;
                try {
                    FilterExpression fe = ce.createExpression();
                    if (fe instanceof RelationshipExpression) {
                        RelationshipExpression re = (RelationshipExpression) fe;
                        it.replace(re);
                        relVec = (Vector) relMap.get(re.name);
                        if (relVec == null) {
                            relVec = new Vector();
                            relVec.add(re);
                        else {
                            relVec.add(re);
                            it.remove();
                        relMap.put(re.name, relVec);
                    else if (fe instanceof SystemExpression) {
                        SystemExpression se = (SystemExpression) fe;
                        it.replace(se);
                catch (FilterEvaluationException fe) {
                    traceLogger.exception(Level.DEBUG_MIN, this,
                                "processCustomExpressions("
                                + statement.toString()
                                + ")",
                            fe);
                    SystemLog.getInstance().logError(this,
                                "processCustomExpressions("
                                + statement.toString()
                                + ")",
                            fe.getMessage());
        replaceRelationshipExpressions(statement, tenant, ldapDao, relMap);
        processContainerBasedExpressions(tenant, ldapDao, relMap, replaceMap);
        FilterSubStatements statements = statement.getStatements();
        FilterStatement temp = null;
        if (statements.size() != 0) {
            FilterPartIterator iter = (FilterPartIterator) statements.iterator();
            while (iter.hasNext()) {
                temp = (FilterStatement) iter.next();
                temp = processCustomExpressions(temp, tenant, ldapDao);
                iter.replace(temp);
        if (!replaceMap.isEmpty())
            return replaceContainerBasedExpressions(statement, replaceMap);
        return statement;
    }Second, when you cannot understand your own code anymore, simplify it! As far as I can see, there are two "main" processes (i.e. loops) in your method, where the second one calls the method recursively. Split the method into two. Furthermore, write a third method that processes the iterated elements and call that method from out of the loops.
    I did'nt analyse your method and have no idea what it does at all. I'm merely telling my first impression.
    Good luck.

  • Two statements, get results from the first statement?

    Ok maybe I made it sound a little harder than it is, but this is what I am trying to do. I have a result set from from a database call when I pass in the username and password . In the 1st call I get the Users info: User_ID, first_name, lastname, etc...
    But I either need to get info from the first statement, and pass it to the 2nd statement or just do two statement calls calling the same info and passing it to my user object? I dont know which if any is faster, or better. The only thing I need from the first statement is the user_id. In the 2nd statement I need the user_id to find out the user permissions.
    Here is the original code when It was getting the user info and permissions from the same table. try
               dba = new DbAccess();
               java.sql.Connection con = dba.getConnection();          
    java.sql.DriverManager.getConnection("jdbc:oracle:thin:@kares:1523:appd","user","pass");  
               ps = con.prepareStatement("SELECT USER_ID, LAST_NAME, FIRST_NAME, LOGIN, PASSWORD," +
               "X, Y, Z FROM RD_USERS WHERE LOGIN=? and PASSWORD=?");
               ps.setString(1, user);
               ps.setString(2, pass);
               rs = ps.executeQuery();
               // set the user attributes
               if ( rs.next() )
                  loginValid = true;
                  setUserId(rs.getInt("USER_ID"));
                  setLastName(rs.getString("LAST_NAME"));
                  setFirstName(rs.getString("FIRST_NAME"));
                  setLoginName(rs.getString("LOGIN"));
                  setPassword(rs.getString("PASSWORD"));   
                  X = rs.getBoolean("X");
                  setX(X);
                  Y = rs.getBoolean("Y");
                  setY(Y);
                  Z = rs.getBoolean("Z");
                  setZ(Z);
               else
                  setLastName(null);
                  setFirstName(null);
                  setLoginName(null);
                  setPassword(null);
                  setX(false);
                  setY(false);
                  setZ(false);
               rs.close(); rs = null;
               ps.close(); ps = null;
               //dba.close(); dba = null;
            } The code above gets the info from one table, I now need to get the X, Y, and Z from a different table, but I need the USER_ID first. So, the first table is set up with the user_id and user info, and the 2nd table is set up with the user_id and user permissions

    Thanks DrClap I started on the the query and I did it a little differently, but it should hopefull do the same thing. my tables are constructed as so:
    USER
         USER_ID
         FIRST_NAME
         LAST_NAME
         USER_NAME
         PASSWORD
         ETC....
    USER_PERMISSIONS
         USER_ID
         PERMISSION X
         PERMISSION Y
         PERMISSION Z
         ETC....
    My Select looks something like this
    ps = con.prepareStatement("SELECT a.USER_ID, a.LAST_NAME, a.FIRST_NAME, a.USER_NAME, a.USER_PASSWORD," +
               "b.X, b.Y, b.Z FROM RD_USERS a, RD_PERMISSIONS b WHERE USER_NAME=? and USER_PASSWORD=?");
    This is where I come to a crossroads, Can I add on another AND to say "WHERE a.USER_ID = b.USER_ID
    and do I use the =, or is it ==, or .equals(). Thanks in advance.
    orozcom

  • Sending files from the remote method

    hi,
    I would like to know if we can send a File object, i.e. a file as the return value from the remote method on the server side accessed by the client.
    Actually, i want to make the files stored at the server system accessible to the client system. how to achieve it?

    java.io.File implements java.io.Serializable so the previous answer is formally incorrect. However you need to be aware that that would only send the File object, which is essentially the filename, not its contents. I'm sure that what the poster meant to say.
    You can send the contents as well in a number of ways but you have to write it by hand. There's no easy way out of the box.

  • Upgraded to Bionic from the first Droid.

    So, I went in to the best buy store today, got the Bionic, was told that I would be grandfathered in to my old plan, that had unlimited data. Then I go to my account online and it says I have a 2gb cap... I use my phone alot, that's why I got the unlimited data. What should I do? I know I'm going to get slammed with a huge charge, because I'm going to go over 2gb....

    You are a life saver my friend, I figured that I'd be okay, but made this post to just see if anyone else had the same problem and got it taken care of. I would of called them but I'm at work, so I'll have to do it when I get home.
    By the way, the droid Bionic is awesome. I had my last Droid, the original one for nearly 2 years, never replaced it once, I hear I'm one of the lucky few, haha. So it's nice to go from the first droid, straight to the Bionic. Such a difference.
    Thanks again!

  • HT4539 I want to download all the music I purchased through my iphone and computer from the first date i had iphone to date, and keep it in both my computer and iphone.

    Need help, I want to download all the music I purchased through my iphone and computer from the first date i had iphone to date, and keep it in both my computer and iphone.

    You cannot synch the other way, with the exception of songs purchased on iTunes.
    What you need to do is move the iTunes library from the computer to which you've been synching your phone and put it on your new MacBook. 

  • How do I loop back from the first frame to the last frame?

    Hi there,
    I'm currently working on the framework for a product viewer.
    I have:
    a movie clip called 'viewer_mc' which contains the images take from different angles of the product. The actionscript generates a script on the last frame of this that returns it to frame 1.
    a button instance called 'autoplay_btn' which plays through the movie clip from whatever the current frame is, and stops on frame 1.
    a left and right button which serve to move the movie clip frame, to give the appearance that the product is rotating.
    I have succeeded in getting it to:
    have the movie clip play through once, return to frame 1 and stop.
    have the buttons return functions when held down, that move the frame in the movie clip using nextFrame and prevFrame commands. The right button successfully loops round to frame 1 and continues functioning to give the appearance of continual rotation.
    The last problem I am experiencing is getting the left button to act in the corresponding manner, going from the first frame to the last and continuing to function.
    Here is my actionscript so far:
    import flash.events.MouseEvent;
    var lastFrame:Number = viewer_mc.totalFrames;
    var thisFrame:Number = viewer_mc.currentFrame;
    var backFrame:Number = viewer_mc.currentFrame-1;
    1. This is the part that gets it to play through once before returning to the first frame. I think perhaps the problem I am experiencing is because of the 'viewer_mc.addFrameScript(lastFrame-1, toStart)' part i.e. although I'm holding the left button, its returning to this script and therefor getting bounced back immediately to the first frame. However, there is no flicker on the screen which you might expect if this were the case
    Note - as this is a generic product viewer which I can use as a template I am using lastFrame etc. as opposed to typing the value in
    function toStart (){
              viewer_mc.gotoAndStop(1);
    viewer_mc.addFrameScript(lastFrame-1, toStart);
    2. This is the functionality for the autoplay_btn that will play through a rotation / return the viewer to the initial (frontal) view of the product (frame 1).
    autoplay_btn.addEventListener(MouseEvent.MOUSE_DOWN, autoplay);
    function autoplay (ev:MouseEvent):void{
              var startFrame:Number = viewer_mc.currentFrame;
              viewer_mc.gotoAndPlay(startFrame);
    3. This is the functionality of the right button, which when held, moves the movie clip to the next frame via the 'rotateRight' function based on the 'nextFrame' command. It loops back round to the first frame due to the 'viewer_mc.addFrameScript(lastFrame-1, toStart)' script generated on the last frame of the movie clip, as is desired.
    right_btn.addEventListener(MouseEvent.MOUSE_DOWN, rightDown);
    function rightDown(e:Event){
        stage.addEventListener(MouseEvent.MOUSE_UP,stoprightDown); //listen for mouse up on the stage, in case the finger/mouse moved off of the button accidentally when they release.
        addEventListener(Event.ENTER_FRAME,rotateRight); //while the mouse is down, run the tick function once every frame as per the project frame rate
    function stoprightDown(e:Event):void {
        removeEventListener(Event.ENTER_FRAME,rotateRight);  //stop running the tick function every frame now that the mouse is up
        stage.removeEventListener(MouseEvent.MOUSE_UP,stoprightDown); //remove the listener for mouse up
    function rotateRight(e:Event):void {
        viewer_mc.nextFrame();
    4. This is the functionality of the left button, which when held, moves the movie clip to the prev frame via the 'rotateRight' function based on the 'prevFrame' command. And this is where the problem lies, as although it works for getting the movieclip back to frame 1, it does not loop round to the last frame and continue functioning, as is wanted.
    left_btn.addEventListener(MouseEvent.MOUSE_DOWN, leftDown);
    function leftDown(e:Event){
        stage.addEventListener(MouseEvent.MOUSE_UP,stopleftDown); //listen for mouse up on the stage, in case the finger/mouse moved off of the button accidentally when they release.
        addEventListener(Event.ENTER_FRAME,rotateLeft); //while the mouse is down, run the tick function once every frame as per the project frame rate
    function stopleftDown(e:Event):void {
        removeEventListener(Event.ENTER_FRAME,rotateLeft);  //stop running the tick function every frame now that the mouse is up
        stage.removeEventListener(MouseEvent.MOUSE_UP,stopleftDown); //remove the listener for mouse up
    I'd imagine it is probably my logic for this part that is really letting me down - I can do a similar function in actionscript 2, but am trying to learn actionscript 3 just to move with the times as it were, and struggling a bit. Still this is only a few days in!
    function rotateLeft(e:Event):void{
              if(thisFrame==1){
                        gotoAndStop(viewer_mc.totalFrames-1);
              } else{
              viewer_mc.prevFrame();
    Any help you can give me would be gratefully received. For an example of the effect I am trying to achieve with the autoplay button etc. I recommend:
    http://www.fender.com/basses/precision-bass/american-standard-precision-bass

    Thanks for getting back to me.
    Here's the code without my comments / explanations:
    import flash.events.MouseEvent;
    import flash.events.Event;
    var lastFrame:Number = viewer_mc.totalFrames;
    var thisFrame:Number = viewer_mc.currentFrame;
    var backFrame:Number = viewer_mc.currentFrame-1;
    function toStart (){
              viewer_mc.gotoAndStop(1);
    viewer_mc.addFrameScript(lastFrame-1, toStart);
    //last image of viewer_mc = first image of viewer_mc
    autoplay_btn.addEventListener(MouseEvent.MOUSE_DOWN, autoplay);
    function autoplay (ev:MouseEvent):void{
              var startFrame:Number = viewer_mc.currentFrame;
              viewer_mc.gotoAndPlay(startFrame);
    right_btn.addEventListener(MouseEvent.MOUSE_DOWN, rightDown);
    function rightDown(e:Event){
        stage.addEventListener(MouseEvent.MOUSE_UP,stoprightDown); //listen for mouse up on the stage, in case the finger/mouse moved off of the button accidentally when they release.
        addEventListener(Event.ENTER_FRAME,rotateRight); //while the mouse is down, run the tick function once every frame as per the project frame rate
    function stoprightDown(e:Event):void {
        removeEventListener(Event.ENTER_FRAME,rotateRight);  //stop running the tick function every frame now that the mouse is up
        stage.removeEventListener(MouseEvent.MOUSE_UP,stoprightDown); //remove the listener for mouse up
    function rotateRight(e:Event):void {
        viewer_mc.nextFrame();
    left_btn.addEventListener(MouseEvent.MOUSE_DOWN, leftDown);
    function leftDown(e:Event){
        stage.addEventListener(MouseEvent.MOUSE_UP,stopleftDown); //listen for mouse up on the stage, in case the finger/mouse moved off of the button accidentally when they release.
        addEventListener(Event.ENTER_FRAME,rotateLeft);//while the mouse is down, run the tick function once every frame as per the project frame rate
    function stopleftDown(e:Event):void {
        removeEventListener(Event.ENTER_FRAME,rotateLeft);  //stop running the tick function every frame now that the mouse is up
        stage.removeEventListener(MouseEvent.MOUSE_UP,stopleftDown); //remove the listener for mouse up
    function rotateLeft(e:Event):void{
              viewer_mc.prevFrame();
    The definition of the rotateLeft function is where the problem lies I think - I've taken out my poor attempts at doing the logic from the previous post. If I were to write it out long-hand the statement I want to write is: 'If you get to frame 1 and function rotateLeft is called go to the end of the movie clip'.
    The reason I have to use the viewer_mc.totalFrames-1 definition in the addFrameScript call is the addFrameScript function is 0 based i.e. if you want to call frame 1 of the movieclip you have to return a value of 0 in the addFrameScript (or such is my understanding of it anyway). As such, the last image in the movie clip will need to be the view obtained at 360 degree rotation, which is of course the same view as at 0 degree rotation. As a consequence, the last frame in the movie clip is superfluous for the user, but necessary for the overall effect to be achieved. And, in addition, to keep up the effect of a 360 degree view when the rotateLeft function is called it needs to skip that last frame to go to the lastFrame-1 (or totalframes-1), or in other words, the view of the image prior to completing the full 360 rotation.
    the variables thisFrame and lastFrame are defined at the very top of the script. Like you said they might need to be defined or called on again elsewhere.

  • Open a second window from the first one

    Hi,
    The problem of my application is loosing control when I open the second window, so I know that the problem is the run of the sub VI but I don't find an other possibility to open a second window from the first one knowing that the first sends its vales to the second one. In an other way I want to open two windows simutaneously.
    NB: I attached  a simple verssion of my application.
    Can someone help me please.
    Attachments:
    The main VI.vi ‏21 KB
    The su b VI.vi ‏28 KB

    Hi Basile,
    why do you open a new thread again? Didn't the older one provide a solution?
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • I have 2 phones on my iTunes account, why are text messages showing on the second phone when sent from the first

    I have 2 phones on my iTunes account, why are text messages showing on the second phone when sent from the first phone?

    it's meant to work like that
    so if you receive a message on your iphone you also get it on your ipad or ipod touch
    to avoid it use separate appleID for each device
    or turn off imessage on 1 or both devices in their settings
    but that will not fix the issue that 2 devices using the same appleID will never be able to facetime eachother
    the appleID is a unique handle for 1 user only

  • How can I remove the page number from the first page of the document that is the cover page?

    How can I remove the page number from the first page of the document that is the cover page?

    If you open the Pages panel, (Window>Pages) you will see thumbnails of your master pages and your document pages. In new documents, there is usually a master called A-Master and one called None. If you drag the thumbnail of the None master onto the thumbnail of a document page, it will apply that master to that page. Presumably, you have made your page numbers on A-Master, so this will usually do the trick. If you have elements on A-Master that you need on the first page, but just not the page number, you can duplicate A-Master (which, by default will give you B-Master, but you can change the names if you like) and remove the page number on the duplicate and apply that to the document page.
    It might also be worth noting that you can apply master pages in the fly-out of the Pages panel. Go to the fly-out triangle and go down to Apply Master to Pages…, then select a master to apply and the range of pages (1-8 will give you all 8, 1, 3, 5, 7 will be the odds, 1-3, 4, 6-8 if you want continuous ranges and individual pages).

  • After starting a new account. How do I get my old music back from the first account?

    After starting a new account because I was unable to get my old id and password, I would like to know how to get my music back from the first account?

    Click here and request assistance.
    (79128)

  • Getting a field value from the first page on the second page in HTML

    I have a 2 page form I'm presenting in HTML to the user. The first page they select an action, enter a USERID and click the next page button. (The button executes "xfa.host.pageDown();" on the click action at the server)
    On the initialize of the second page I try to get the value of the USERID field from the first page and create a SQL statement to open my data connection. The issue I have is that I cannot get the value of the USERID field. This code works cause if I hardcode a valid value the query works. I tried to work around this by putting the same field on page 2, but it still did not work but the field was populated with displayed. I only assume the data is not populated at the time the initialize is invoked.
    Here is my code on the initialize..
    xfa.sourceSet.nodes.item(0).resolveNode("#command.query").commandType = "text"
    xfa.sourceSet.nodes.item(0).resolveNode("#command.query").select.nodes.item(0).value = "Select * from TABLE where userid = '" + xfa.form.resolveNode("form1.Page1.txt_EmployeeLogin").rawValue + "'"
    xfa.sourceSet.DataConnetion.open()
    Any help is greatly appreciated.
    THANKS!!

    Hi Steve,
    If you haven't already done so, I recommend posting this question in the LivCycle Forms forum.
    Jared

  • Message Mapping: Map value from the first element in a context in target el

    Hi experts,
    I have a problem with a message mapping in XI. I hope you can help me. At first I will give you a source and a target structure. Then I will explain the problem.
    <u>Source structure:</u>
    <E1EDP01>
       <E1EDPT1>
          <TDID> ... </TDID>
          <E1EDPT2>
             <TDLINE> ... </TDLINE>
          </E1EDPT2>
       </E1EDPT1>
    </E1EDP01>
    The structure can contain more than one E1EDP01-Elements, more than one E1EDPT1-Elements and more than one E1EDPT2-Elements.
    <u>target structure:</u>
    <LineItem>
       <vendmemo> ... </vendmemo>
    </LineItem>
    For every E1EDP01-Element my mapping creates one LineItem-Element in the target structure. To fill the element <vendmemo> the mapping should do the following steps:
    The mapping should search in E1EDP01 for a E1EDPT1 with the TDID = Z505. And from this E1EDPT1-Element (with the TDID=Z505) the mapping should take the value <TDLINE> from the first E1EDPT2-Element in the context of the E1EDPT1-Element (the E1EDPT1 with the TDID=Z505) and put this value in <vendmemo>.
    The mapping should do this action for every E1EDP01 -> so for every LineItem.
    I tried it with UDF but I didn't found a solution. Can anybody help me?
    best regards
    Christopher

    Hello experts,
    i was wrong ... my mapping isn't still working. I had created a test instance. and only for this test instance the mapping (see above) works.
    Can anybody help me? I'm trying the whole day but I can't find a solution. Here a second description of my problem:
    <u>Source Structure:</u>
    <E1EDP01>
       <E1EDPT1>
          <TDID> ... </TDID>
          <E1EDPT2>
             <TDLINE> ... </TDLINE>
          </E1EDPT2>
          <E1EDPT2>
             <TDLINE> ... </TDLINE>
          </E1EDPT2>
          <E1EDPT2>
             <TDLINE> ... </TDLINE>
          </E1EDPT2>
       </E1EDPT1>
    </E1EDP01>
    <E1EDP01>
       <E1EDPT1>
          <TDID> ... </TDID>
          <E1EDPT2>
             <TDLINE> ... </TDLINE>
          </E1EDPT2>
          <E1EDPT2>
             <TDLINE> ... </TDLINE>
          </E1EDPT2>
          <E1EDPT2>
             <TDLINE> ... </TDLINE>
          </E1EDPT2>
       </E1EDPT1>
    </E1EDP01>
    <u>Target Structure:</u>
    <LineItem>
       <vendmemo> ... </vendmemo>
    </LineItem>
    <LineItem>
       <vendmemo> ... </vendmemo>
    </LineItem>
    <u>Description of my Problem:</u>
    For each E1EDP01 in the source structure the mapping creates one LineItem in the target structure.
    The element "vendmemo" should be created in any case ... also if it will be empty.
    To fill the element "vendmemo" the mapping should search in E1EDP01 for a E1EDPT1 with the TDID=Z505. If there is an element E1EDPT1 with the TDID=Z505, the mapping should write the TDLINE from the first E1EDPT2 (under the element E1EDPT1 with the TDID=Z505) in the target field "vendmemo".
    The Problem is that TDLINE an TDID are not in the same context. I tried it with setting the context of both to E1EDP01. But it was not working ... have you any idea oder suggestion?
    Thank you very much
    best regards
    Christopher

Maybe you are looking for

  • Page orientation - In Design CC

    How do I add the odd landscape page into an In Design document which is mainly portrait? Any help would be appreciated.

  • Help with stacked bar chart

    Hello, I'm looking for help regarding horizontal stacked bar chart. Typically for stacked bars Publisher seems to want data for each stacks per row, but my data looks like this: <DATA> <ROW> <TYPE>Type 1</TYPE> <CLASS>A</CLASS> <TOTAL>10</TOTAL> </RO

  • Quality Notification Config

    Hi, My company implemented 4.6C in 2004. At that time, we had configured our Quality Notification types. Nearly 3 years later, I want to optimize their designs but since we have more than 6,000 QNs created by this point, I don't want to risk losing a

  • PO Hold Status

    Dear All, we have requirement like, If i created Purchase order with reference to UN-released Purchase requisition the PO has been saved on HOLD. I want to make validation, If my Purchase Requisition has been not released than User can not save PO on

  • Student edition use in the future?

    I'm planning on purchasing the Student/teacher edition of Photoshop CS6. I would be installing it on my laptop to use for the next year or so. If I get a desktop computer after I graduate, would I be able to install the software on that computer? I k