ADF-JClient Refresh (Newbie question)

I've gotta believe this is an easy thing to do with ADF, yet after perusing the documentation I could find (most is struts oriented) I just can't seem to get this working and I'm sure somebody here has done it. Also I'm pretty green when it comes to this ADF stuff so hopefully I use all the right terms, etc.
I have a simple app, that hooks up to a EJB application using a session facade. I have an Order bean, and I have an order line item bean and as you may guess there is a 1-M relationship between the two.
I set up the page with all the ADF stuff, and basically both are displayed as JTables. When I go to add a line item I:
1)want to call the ADF operation to do so
2) refresh both tables with their appropriate data (orders has a total price item that needs to be incremented)
3) select the orders JTable's order record that corresponds to the line item I just inserted
4) select the lineItems JTable's line item record that I just inserted.
The way I currently try to do this, which doesn't quite work is:
1) call the ADF operation "addLineItem" passing it appropriate details
2) define an ActionBindingListener class that has an afterActionPerformed() method that:
a) calls panelBinding.execute() (to refresh the orders table)
b) calls ordersTable.changeSelection(x, y, false, false) to try and select the appropriate row in the orders table
c) calls "getLineItems" operation which looks at the row that ordersTable is pointing to to update the line items table
d) calls lineItemsTable.changeSelect(x, y, false, false) to select the appropriate row in the line items table
Doing this, after I add an item, I see the correct order get selected, but then the table seems to switch off of it and select the row at the top of the table (as if a refresh had been requested again). The odd thing is that sometimes the above logic seems to work. I'm thinking my problems probably stem from calling panelBinding.execute(), but I haven't found any other clear way to refresh the data without doing that. What am I doing wrong? or am I right and there is a bug with the refresh?
Any ideas/suggestions, no matter how stupid it may seem are appreciated. I think this is something simple, I'm convinced I've just missed something obvious.

I think I figured out my problem. The key was to not use the JTable.changeSelection() method to set my selection post update. I needed to set it on the the JUTableBinding via a using a NavigatableRowset, so I did something like:
void selectLineItemRecord(Long oid)
JUTableBinding tableBinding = (JUTableBinding) panelBinding.findControlBinding("lineItemList");
NavigatableRowIterator iter = tableBinding.getIteratorBinding().getNavigatableRowIterator();
if(oid != null)
for(int i = 0; i < iter.getRowCount(); i++)
Row row = iter.getRowAtRangeIndex(i);
if(oid.equals(row.getAttribute("oid")))
iter.setCurrentRow(row);
return;
// fall through if not found or oid doesn't exist
iter.reset();
This seems to work much better now. Now if I just need to figure out some scroll bar stuff and I should be all set.
FYI, the thread I garnered this information from is Re: JTable returning to previously selected row after executeQuery()

Similar Messages

  • ADF/JClient problem

    Hi @all,
    I have a problem using bc4j. I have an ADF/JClient application that shows a Master/Detail Log from a database to the user.
    But the connection to the database should by dynamic: With a combo box I select the database to connect to
    and than I want to see the Master/Detail Log.
    Actually, the problem is that the Master/Detail tables (normal JTables with BC4J bindings) do not refresh their views,
    so I ever see the same Matser/Detail Log.
    The connection to the database is established using my own classes MyConnectionStrategy (derived from DefaultConnectionStrategy)
    and MyEnvInfoProvider (derived from DefaultEnvInfoProvider).
    Bootstrap code look like this:
    JUMetaObjectManager.setBaseErrorHandler(new JUErrorHandlerDlg());
    JUMetaObjectManager.getJUMom().setJClientDefFactory(null);
    mCtx = new BindingContext();
    mCtx.put(DataControlFactory.APP_PARAM_ENV_INFO, new MyEnvInfoProvider(mDBConn));
    HashMap map = new HashMap(4);
    map.put(DataControlFactory.APP_PARAMS_BINDING_CONTEXT, mCtx);
    JUMetaObjectManager.loadCpx("DataBindings.cpx", map);
    mDataControl = (DCDataControl)mCtx.get("AppModuleDataControl1");
    mDataControl.setClientApp(DCDataControl.JCLIENT);
    How can I update (refresh, reinitialize, ...) the bindings between my AppMod and the 2 JTables?
    Please help me.
    Thanks in advanced,
    Dorian.

    You may use the 'key' on the row from one VO to find it in another and then set the currency using the found row.

  • Newbie question - XML version, searching by artist

    Probably quite a common problems - apologies for newbie questions.
    I've changed the URL of my MP3s in my XML to a new location and refreshed my feed. Is there a way of seeing what version of the XML iTunes is using? (it takes around 24 housr to refresh, right?)
    Also, when I'm searching for my podcast by author it's not coming up (<channel><itunes:author>) - is there a reason for this or a way to get it to show up when people search for the artist, other than doubling it in the title? (This works by the way, but I'd prefer not to!)
    Thanks.

    you can do it in just one loop, going through all the image
    tags in index_content and for each tag fill the values of all four
    arrays
    for (i...) {
    get the appropriate child of index_content
    first_array[ i ] = value of first tag
    second_array[ i ] = value of second tag
    no need for multiple loops.
    flash has functionality for xml files, but it helps to write
    a little wrapper around it, to simplify programming, especially if
    you work with xml a lot.. I wrote my for work, so I can't show it
    to you, but it's not very complicated to do

  • Total Newbie Question ... Sorry :-(

    I know it's a windows thing, and I am now converted to Mac but I gotta know this because it's doing my head in. It's a complete stupid green gilled newbie question.
    When installing new programs on a Mac can you create shortcuts to the programs on the Dock? I did what I THOUGHT it would be, i.e I made an Alias and stuck it in the dock, but on rebooting my Mac later on, in place of the shortcuts where 3 question marks which when clicked on did absolutely nothing???
    Help?
    A.L.I
    Windows XP Pro Desktop, Macbook Pro, 60GB iPod Video   Mac OS X (10.4.5)   OS X

    You aren't installing something from a dmg file are you? The dmg is a disk image – kind of a virtual CD. So when you double click the dmg and then get the little disk/hardrive/custom icon on your desktop that is the same as if you had mounted a CD. You then need to drag the application off of that "CD" into your application folder. Then it is truly installed.
    You can then "eject" the icon your your desktop. This is what happens when you shutdown and without remounting the image your dock shortcut can't find the original.
    Just a thought.

  • How to create and use custom exceptions with ADF JClient

    Hi
    The forms developed using ADF JClient by default use pessimistic locking and throw an AlreadyLockedException if more than one user tries to modify the same record. I need to customize this exception so as to display the name of the Oracle user who has locked the record. Is this feasible? If yes, how can I achieve this.
    PS: I've already tried creating my own messageBundle to customize the error messages. Even though I can change the message there, I'm unable to find any information in AlreadyLockedException or JboException that directly gives me the user or the oracle session id that has locked the record.

    T A,
    this information is not exposed through the JDBC driver and thus nit available to BC4J. So the answer is that you can't get this information.
    Frank

  • Newbie Question. just installed IE7.. how do I set up a local host to preview sites?

    Sorry for the newbie question... but it's been a long time since I have done this
    Thanks!

    Just define your site in DW as always.  For a static site, that's all you need to do.

  • Newbie Question about FM 8 and Acrobat Pro 9

    Hello:
    I have some dcouments that I've written in FM v8.0p277. I print them to PDF so that I can have a copy to include on a CD and I also print some hard copies.
    My newbie question is whether there is a way to create a  PDF for hard copy where I mainitain the colors in photos and figures but that the text that is hyperlinked doesn't appear as blue. I want to keep the links live within the soft copy. Is there something I can change within Frame or with Acrobat?
    TIA,
    Kimberly

    Kimberly,
    How comes the text is blue in the first place? I guess the cross-reference formats use some character format which makes them blue? There are many options:
    Temporarily change the color definition for the color used in the cross-reference format to black.
    Temporarily change the character format to not use that color.
    Temporarily change the cross-reference definition to not used that character format.
    Whichever method you choose, I would create a separate document with the changed format setting and import those format into your book, create the PDF and then import the same format from the official template.
    - Michael

  • ADF: Tree Refresh after Expanding a node. Please Frank have a look!

    About this post:
    Re: ADF: Tree Refresh after Expanding a node
    Frank answered that he doesn't notice that behavior. I found out that this happens if an appication uses a custom skin.
    In SRDemoSampleADFBC, SRManage.jspx (Management from menu), if you make the explorer window small enough not to cover the whole tree, you can notice this (the page jumps to the top).
    Now if you change in adf-faces-config.xml the "skin-family" tag to "oracle", you will see that the tree component has changed (it has no triangle icons why this happens) and the page doesn't refresh.
    Minas

    It seems that there's more to the tree expansion icon than the skin definition. We're using the minimal skin and ADF puts out a special character to represent the disclosure symbol (which by the way, renders differently on IE6, than IE7, than Safari or Firefox on Mac). However, switching to the Oracle skin, the disclosure symbol comes out as a full-on image (triangle including the +). We have found this frustrating because the triangles seem not sufficiently suggestive to our users - but switching to the Oracle skin has other issues with white-on-white text.
    But in any case, the tree refresh after node expansion is another annoyance as I described in the other thread linked here (including URL to see problem in action).
    Cheers, Mark

  • Domain name settings - Newbie question

    Sorry for a newbie question!
    I am already pointing a domain name to web hosting for email account. Now, I need an application server to run ERP software and Oracle, and installing Solaris and Oracle need a domain name.
    If I point my domain name to the server, how do I receive emails from web hosting???
    Install an email server to the application server instead? What can I do if I want the same domain name? Any option?

    Setting up a mailserver and making sure it doesn't suddenly turn into a spambox is not something you do with the use of a few commands. I suggest to dive into the Solaris admin guide on docs.sun.com and read up on e-mail and network services.
    If that is asking too much of your time you'll be better off getting your ISP to handle all this for you.

  • Domain Name settings in Solaris - Newbie question

    Sorry for a newbie question!
    I am already pointing a domain name to web hosting for email account. Now, I need an application server to run ERP software and Oracle, and installing Solaris and Oracle need a domain name.
    If I point my domain name to the server, how do I receive emails from web hosting???
    Install an email server to the application server instead? What can I do if I want the same domain name?

    Your questions are completely off-topic for the forum.
    These SunOS forums are for questions on <i>"how do I install my OS"</i>
    You particular question is in the <i>"how can I install Solaris while using the CD drive"</i> forum.
    So, if you had a question on how to edit the /etc/inet/hosts file to establish a FQDN on the computer, then it might be appropriate for the forum.
    Unfortunately, I don't have a clue on where to redirect you, except perhaps to the Sun Java Enterprise System suite of applications?

  • Performance Issues due to Loading of ADF/JClient View Objects

    Hi,
    I developed a two-tier ADF/JClient application.
    When the ADF/JClient application opens for the first time, there's a big delay
    However opening it subsequently, takes less than half of the time to open the screen.
    I think it might the xml files of different view objects which the framework loads for the first time, and thus takes a lot of time. And after that, the time to open the application reduces.
    We have around 200 view objects in our application. Can this be the reason?
    If yes, then can we load the view objects before ahead, or can we just load them at the very time they are requested ?
    Thanks,
    Makrand Pare

    Hi Makrand,
    Check this out:
    "Limiting Fetching of Business Components Attributes in ADF Swing
    http://www.oracle.com/webapps/online-help/jdeveloper/10.1.3/state/content/navId.4/navSetId._/vtTopicFile.developing_jclient_applications%7Cjui_plimitingfetching%7Ehtml/
    Note: In local mode deployment (the client and Business Components reside in the same VM), the fetching of attribute properties is not supported.
    You can optimize startup time for a Business Components client application and the remotely deployed Business Components by specifying the list of view object attributes that your client uses. If you create a project without the metadata, by coding to the API, you will want to add fetchAttributeProperties() to the bootstrap code of the client forms with a list of only the attributes used by the form. Without this method call, your client form would fetch all control hint properties (including the attributes format and label for example) for all the attributes of the named view objects in the application module, in a single network roundtrip.
    For example, when you do not intend to use all the attributes of the ADF Swing form's bound view object, with the fetchAttributeProperties() method, your ADF Swing form fetches only the information required to layout your forms, while ignoring the attributes you do not require.
    Note: In local mode deployment (the client and Business Components reside in the same VM), the fetching of attribute pro
    Calling fetchAttributeProperties() will prevent property methods such as getFormat() or getLabel() from being called on the Business Components attribute definition whenever the form is created."
    Vlad

  • How to filter data in custom ADF JClient lov panel

    hi
    I'm developing with JDev 10.1.2.
    i have a Panel that use custom ADF JClient lov panel and i want to filter the lov data.
    i used setWhereClause() method to do it in lov panel but didn't work.
    Any help will be greatly appreciated.

    This was a lot more involved than I would have estimated (than I actually did estimate with my boss on our project timeline).
    Anyway, here is the solution for those of you trying to do the same thing;
    http://blogs.oracle.com/michaellee/2009/09/pre_filtering_table_data.html
    My personal request, create a Criteria for a VO, then allow me to just drag that over to a jsp page and give me a table/tree option, not just a query/button/link, and then give me a pop up box allowing me to bind variables.
    Edited by: user10419690 on Sep 14, 2009 9:03 AM

  • Newbie Question:  How much computer do I need?

    Newbie Question:
    I would like to use MainStage 3 in a live performance environment to play bars, parties, etc.  I'm not looping, using it to playback recordings, processing outboard equipment or vocal processing.  I want to stop carrying Rolands, Nords, Korgs, etc and get to a controller and a rack with a Mac Mini in it.
    I tested a download of Mainstage 3 on my home Mac Mini (late 2012, 3.5 Ghz i5, 4GB RAM, 500GB drive) and it seemed to run fairly well.  $30 well invested so I trekked forward... I purchased a Mac Mini (late 2009,  2.52GHz Core 2 Duo, 6GB RAM, 128GB SSD) for $200.  I started to do more elaborate keyboard setups to see how the CPU would hold up.  It typically runs from 30% to 50% of capacity (CPU and Memory)  It actually boots and runs better than the i5.  I hear the occasion gitch, but it actually seems to be getting better in time (or I'm rock and roll deaf.
    I got a rack, an Airport Express, a Radial USB interface and a Nektar Panorama P6.  It's starting to get expensive, but I'm emboldened by the actual quality for the sound and the flexibility of arranging for live performance.  What used to take me two and three keyboards to play, I can now fit on one performance patch.
    OK, now the question... am I at the limits of this little Core 2 Duo?  Should I upgrade the i5 with more RAM and a bigger SSD and use that?  Should I get a new(er) i7 and bite the $1,500 bullet for the additional RAM and SSD?
    I see that most of you are running pretty nice Macbook Pros with i7 and lots of everything.  My needs are modest; am I OK? 
    BTW, I want to run a Mac Mini in a box because I don't want to carry a laptop out in the open.  If I was doing bigger shows I wouldn't care but I play some rowdy bars and constantly have folks hanging off me while I'm playing.  It's fun, but hard on gear.  If you can't drop it or dip it in beer, it won't last long where I work.
    Matt Donnelly

    Rule of thumb: newer and faster is better. But, depending the complexity of your needs you may be OK with an older Mac. Some glitches that happen in a live performance are due to loss of communication with USB or Firewire inputs, so make sure they're secure. I recently upgraded from a 2010 Mac Mini 2.6 dual core with 16 GB RAM, which was used live for nearly four years, to the latest Mac Mini 3.0 i7 with 16 GB RAM and a 500 GB SSD. I was getting an occasional stuck note with the older one. The new one is rock solid. Some of my patches may have up to a dozen channel strips mapped to three keyboards. The Mini is mounted in a rack next to a MOTU Ultralite Hybrid. It is a good idea to map a panic button on your keyboard to controller # 123(all notes off). Also, you might want to invest in a battery backup power supply(APC, Cyberpower, etc.-$40-$60) to protect your Mac against power loss, which can damage you hard drive.

  • Multiple version of JRE in company..How to manage? (newbie question)

    Greetings..this is a newbie question
    We have 48 versions of JRE running in on XP IE6 in our company.
    Some version beat up other JAVA applications.
    It's a mess.
    How can anyone manage this many versions?
    Can we consolidate down to a few versions?
    I saw some posts on changing the JRE dynamically or perhaps using a wrapper with a product from "sourceforge".
    Are these viable?
    Thanks in advance

    We have 48 versions of JRE running in on XP IE6 in
    our company.
    Some version beat up other JAVA applications.
    It's a mess.can you elaborate on how some versions "beat up" other apps?
    How can anyone manage this many versions?you don't, each computer should periodically upgrade (IMO) but you shouldn't care. if you do, tell your users to load the latest version
    Can we consolidate down to a few versions?sure
    I saw some posts on changing the JRE dynamically or
    perhaps using a wrapper with a product from
    "sourceforge".
    Are these viable?i have no idea what this is, but I have doubts about your problem, if it exists at all

  • ADF JClient migration (JDev 9.0.5.2 -- JDev 10.1.3.2)

    Hi all,
    is there anybody out there who could share some experiences in migrating a huge ADF/JClient-based application. Does anybody know a migration guide, or at least a description of a supported migration path?
    Would it be more promising to try it stepwise (9.0.5.2 -> 10.1.2 -> 10.1.3.x)?
    About a year ago we spend a few days to try to migrate from 9.0.5.2 to 10.1.2 but we encountered so many issues that we had to stop in order to keep in time with our release schedule.
    Now we plan to change the Java version from 1.4 to 1.5 and upgrade to JDev 10.1.3.2. Keeping the old ADF libraries everythings seems to work. But I would feel better with a more current version and improved Oracle support. We had to apply a few fixes to the ADF libs on our own. I would love to get rid of them. It's hard to get backports for such an old version.
    We currently use the following JDev related libraries in our project:
    adfjclient.jar, adfm.jar, bc4jct.jar, bc4jdomorcl.jar
    Which of the bunch of ADF-libraries in 10.1.3.2 do we have to add to our project? I would like to include as few JARs as possible.What about:
    bc4jui.jar, adfm.jar, bc4jct.jar, bc4jdomorcl.jar?
    Someone told me that the definition/structure of UIModels has changed between 10.1.2 and 10.1.3. He told me that the ADF code is capable to handle both version via if/else-constructs, but it would be better to use the new XML-layout in order to participate in new features. Is this true?
    As far as I could see JDev 10.1.3 only migrates project files and does not touch any of the ADF definition files. Is there any migration tool or script available in order to convert pre-10.1.3 UIModels?
    Thanks for any hints on that topic!
    Regards,
    Eric

    Hi Steve,
    thanks for your answer and sorry for the late response. Meanwhile I made a few tests on my own. In our application we don't use BC4J, only ADF for data binding.
    We have a lot of issues with 9.0.5.2 which weren't addressed in 10.1.2. In order to save resources we would like to load the ADF binding context (cpx-File) for our whole application only once during application startup. JUMetaObjectManager.getJUMom().loadCpx() and from then on only pass the binding context reference to setup the panel bindings (binding containers). When we close our forms we release the datacontrols. If we open a form for the second time (and try to setup the panel binding) we receive an error. If I recall correctly, the data control is (mistakenly?) removed from the context map inside of the binding context while releasing the datacontrol. But to my understanding the datacontrol has to be released in order to setup a fresh binding container while opening a form. If one removes the code to release the datacontrols one will receive an jbo error, that the binding container is alread there, which seems logically to me.
    In order to test the behavior of different ADF versions I extracted some code and build a simple testcase in JDev 9.0.5.2. Ofcourse the test case didn't work. I then migrated to 10.1.2 and the testcase didn't work. I migrated the testcase to 10.1.3.2 and what? The testcase still didn't work. I observed that the UIModels haven't changed during migration. I then copied all my code to a newly created project in 10.1.3.2 and rebuild the testcase. Now most of the XML files look different. I observed some other JDev design time issues as I did use Java 1.4 style code. After I changed the code to use generics these issues were resolved. Finally the testcase worked, without any code changes (besides the usage of generics in the model class).
    So I came to the conlusion that ADF has some kind of compatibility mode if it finds old XML files from previous versions. Ohter (probably old) code paths are chosen and you potentially suffer the same bugs as in previous versions. So it seems to be best to somehow migrate all XML-files to the new layout. Maybe via some XSL-transformations. That's why I asked for some kind of converter. Unfortunately there seems to be no real migration support from Oracle. This looks like a nightmare for huge projects like ours.
    Steve, your test seems to confirm my observations. Did you try to build the same form in 10.1.3 from scratch? What do you observe if you then compare all XML-Files (binding context definitions, page definitions, bean definitions...)?
    Regards,
    Eric

Maybe you are looking for

  • Photoshop CC 2014 crashing on Quit (OS X 10.9.3)

    Hi there. I just updated my entire CC suite yesterday to CC 2014. All the new apps works fine, but my brand new Photoshop CC 2014 crashes EVERYTIME when I quit it. This is my crash report. Can you guys explain me what is going on and what can I do to

  • Need instruction how to install Windows XP on Satellite A200-1AE

    Hello can some one write a instruction of installing Windows XP Professional on this notebook? What I need before instalation? I have oryginal Windows XP. Which drivers i must have before? And what about boot? I guess that my PC have SATA drive and X

  • Create Button  in Abap Program

    Hi anybody,   I want to use click event button inside abap programe. how to use click events of button. anybody tell me. thanks s.muthu

  • Restriction of Document type

    Dear Sir we have created document type by one user and i want to restrict for other user for change in that document type with user specific eg. user 1 created document with doc type dev and save        user 2 has creation authorisation of save doc t

  • How to hide the Slidelite close button [X]

    I'm using Captivate 4. I would like to know how to hide this ugly close button [X] when a slidlet is displayed on a slide ? I understand that this is usefull when the option Stick Slidelet is selected but i think the [X] makes little sens otherwise.