ADF JSF 10.13 how do you reference a binding from a command button?

I have developed the following code as a model as I am trying to utilise ADF JSF without using a database.
I have a collection called School. This has the appropriate operations that populate the school with a number of Child. A Child simply has a firstname and a surname.
I have generated data controls for these collections and created two JSP pages and added a navigation link as follows:
index.jsp --> goToSchool (navigation) --> school.jsp
I have then added a command button to the index.jsp page. When the button is then pressed the school.jsp page is displayed. This works correctly.
I would like to override the action of the button though so that before the navigation is executed I can get a handle on the school collection and populate it so that it will be displayed on the school.jsp page.
I have previously done this in 10.12 when I had the following setup:
index.jsp --> getSchool (dataAction) --> school.jsp
by overriding the getSchool dataAction.
I have looked through the 10.13 ADF user guides and tried various different things but have not managed to successfully acheive my goal of populating the school collection when the button is pressed prior to navigating to the school.jsp page.
I would appreciate it if you could offer any advice, and if possible let me know the recommended best practices to acheive this.
Thanks in advance for your help
David

Check out the ADF Tutorial (TopLink edition) chapter 5 has a section called:
Adding a Drilldown Link
I think this is what you are looking for.
http://www.oracle.com/technology/obe/ADF_tutorial_1013/ADF_tutorial.pdf

Similar Messages

  • How to show dynamically created popup from created command button?

    In my region I have a toolbar. The buttons in the toolbar are created dynamically in the bean. When one of the buttons is clicked I’d like to display a popup dialog.
    So, the code looks something like this:
    RichCommandToolbarButton button = new RichCommandToolbarButton();
    // set icons, text, etc….
    RichPopup popup = new RichPopup();
    // set id etc.
    RichDialog dialog = new RichDialog();
    dialog.setType(“cancel”);
    // add title, text, another button to toolbar, etc.
    popup.getChildren().add ( dialog);
    ClientListenerSet set = button.getClientListeners();
    if (set == null)
    set = new ClientListenerSet();
    button.setClientListeners(set);
    set.addFeatureDependency("AdfShowPopupBehavior");
    set.addBehavior("new AdfShowPopupBehavior('" + popup.getId() + "', AdfRichPopup.ALIGN_AFTER_END,null,'action')");
    button.setPopup(popup);
    In the corresponding .jsff the toolbar and the buttons are rendered in the following way:
    <af:toolbar id="t1" styleClass="AFStretchWidth"
    visible="#{backingBeanScope.MyBean.visible}" >
    <af:forEach items="#{backingBeanScope.MyBean.buttons}" var="adfButton" >
    <af:commandToolbarButton binding="#{adfButton}" />
    </af:forEach>
    This kind of works, except the button shows up with the down-arrow menu icon, which when clicked shows a tiny empty rectangle/menu. When the button itself is clicked, it correctly shows the popup with the dialog.
    So… how do I do this w/o doing the button.setPopup() so that I do not get the empty menu, but just get the popup to show when the button is clicked? Or is there a way to disable showing of the (empty) menu?
    I have tried adding the popup to the toolbar, but that did not work.
    I have tried adding action listener to the button, and adding the popup to the toolbar there and then showing it (by doing new RichPopup.PopupHints(); popup.show(ph)), but that did not work.
    I have tried adding action listener to the button, and adding the popup to the button getChildren().add() then showing it ((by doing new RichPopup.PopupHints(); popup.show(ph)), but that did not work.
    ANY help will be most appreciated!

    Hi,
    Do u mean to say that u need to open another PLD in when ur user form is open.?
    Please provide more information.
    Thanks,
    Vasu Natari.

  • How would you reference respective video from diff class?

    Hi. I wanted to get a couple of points of view (if you're willing to look ) on how others would do this because Im not sure where to even start.
    I have a buttons class that puts 9 pictures on the stage and each one represents a different movie and leads to that movie when clicked (or will lead there once I figure out how to reference it to the specific movie).
    I have 9 movies referenced through XML. And I am using flvPlayer. Currenly I can only have one movie loading. I am not sure how to get each one to play upon click of the respective btn.
    Here is some of the code I think is pertinent if figuring how to go about this:
    ProjectOneButtons class
    //I have each picture loaded through an array and each button is waiting for the right code through a Switch statement:
    public function onButtonClick(e:MouseEvent):void {
         var releventImageAray:Array = this["rowOfImages" + MovieClip(e.currentTarget).row];
         var imageWanted:String = relaventImageArray[MovieClip(e.currentTarget).column];
         switch (imageWanted) {
              case "Video1" :
                   //Have not figured out the specific video code in class below
                   //This switch statement continues for the rest of the buttons.
                   //this code works but it just loads one movie and so I don't think this is what I need.
                   projectOneVideos = new projectOneVideos();
                   addChild(projectOneVideos);
                   projectOneVideos.x = 0;
                   projectOneVideos.y = 0;
    Here is the ProjectOneVideos class where the videos are loaded and played:
    package asFiles.projectOne{
         //import statments taken out for post
         public class ProjectOneVideos extends Sprite {
              public var videoX:Number;
              public var videoY:Number;
              public var projectOneVideos:XMLList;
              public var projectOneTotal:Number;
              public var projectOneXML:XML;
              public var xmlLoader:URLLoader;
              public var player:FLVPlayback;
              public var playBtn:VideoPlayBtn;
              public var pauseBtn:VideoPauseBtn;
              public var videoContainer:MovieClip = new MovieClip;
              public function ProjectOneVideos() {
                   xmlLoader = new URLLoader();
                   xmlLoader.load(new URLRequest("projectOneVideos.xml"));
                   xmlLoader.addEventListener(Event.COMPLETE, processXML);
              public function processXML(e:Event):void {
                   projectOneXML = new XML(e.target.data);
                   projectOneVideos = projectOneXML.VIDEO;
                   projectOneTotal = projectOneXML.length();
                   makePlayer();
                   addButtons();
              public function makePlayer():void {
                   player = new FLVPlayback();
                   player.skinBackgroundColor = 0x47ABCB;
                   player.skinBackgroundAlpha = .85;
                   player.x = 40.3;
                   player.y = 220;
                   player.width = 1200;
                   player.height = 594.2;
                   videoContainer.addChild(player);
                   player.addEventListener("complete", backToVideoMenu);
              public function addButtons():void {
                   trace("addButtons initiated");
                   playBtn = new VideoPlayBtn();
                   videoContainer.addChild(playBtn);
                   playBtn.x = 625.6;
                   playBtn.y = 930;
                   pauseBtn = new VideoPauseBtn();
                   videoContainer.addChild(pauseBtn);
                   pauseBtn.x = 625.6;
                   pauseBtn.y = 930;
                   pauseBtn.visible = false;
                   addChild(videoContainer);
                   videoContainer.x = 0;
                   videoContainer.y = 0;
                   playBtn.addEventListener(MouseEvent.CLICK, playVideo);
                   pauseBtn.addEventListener(MouseEvent.CLICK, playVideo);
              public function playVideo(event:MouseEvent):void {
              // this is where I have the video referenced to play.
                   trace("play/pause button clicked");
                   if (player.playing || player.paused) {
                        if (player.paused) {
                             player.play();
                        } else {
                             player.pause();
                        playBtn.visible = player.paused;
                        pauseBtn.visible = ! player.paused;
                   } else if (player.stopped) {
                        player.play();
                        playBtn.visible = false;
                        pauseBtn.visible = true;
                   } else {
                                    //this will obviously not work because then its just this one movie referenced
                        player.play("videos/projectOneVideos/videoOne.f4v", 0, false);
                        pauseBtn.visible = true;
                        playBtn.visible = false;
    The reason I included a bunch of code is to show that there is a play/pause button that is supposed to play the movie. But the thing is I only have the one movie referenced and I am not sure how to have it variable as to which movie is played and make it depend on the button that is clicked from the button class above.
    thanks for any input you can give!!! 
    Note: All of this code works as it is and I am getting no errors.

    Ok, how about this:
    After reviewing my code again, this is what I find.
    I process the xml and then never use it when playing the video. To play the video I had just put the path straight to the video and not even used the xml. In the xml.
    So I guess my question is how to I refer to the xml to load the video and then when dealing with the buttons lead to the right video from the xml.
    kglad: Now I think I see why you were saying define a method of the ProjectOneVideos class that accepts a path/name string to the load target.
    I think the code I need to change is:
         if (player.playing || player.paused) {
                        if (player.paused) {
                             player.play();
                        } else {
                             player.pause();
                        playBtn.visible = player.paused;
                        pauseBtn.visible = ! player.paused;
                   } else if (player.stopped) {
                        player.play();
                        playBtn.visible = false;
                        pauseBtn.visible = true;
                   } else {
               //this is the part that needs to be changed to recognize from the xml
                        player.play("videos/projectOneVideos/videoOne.f4v", 0, false);
                        pauseBtn.visible = true;
                        playBtn.visible = false;
    But then I have to be able to pull the right video when I hit the button.
    So, what tools should I be using?

  • How do you reference assembly resources from MP in PowershellGrid Widget script

    Instead of shipping my custom assemblies to a known location on the system center 2012 server in separate files, I'm trying to use assembly resources to do this.  The issue I am having is referencing these assemblies in the script for the PowershellGrid
    widget I am using.
    As suggested in technet answer -
    https://social.technet.microsoft.com/Forums/systemcenter/en-US/e752fb63-0d5f-43e3-a2be-7db54934e29a/how-to-use-attached-to-bundle-dll-resource-in-powershell-module?forum=operationsmanagerauthoring
    I am using this convention -
    $FileResource[Name=”MyResource”]/Path$
    To illustrate what I am using, I've put in an exception to try and return the assembly path -
    throw "Test that the Assembly Path is returned:" + "$FileResource[Name='PaulsMP!DSUtilsTest']/Path$"
    Part of the exception is the following where you can see the Path$ has not been translated -
      [Microsoft.SystemCenter.Visualization.Component.Library.DataProviders.PowershellProvider,
    Microsoft.SystemCenter.Visualization.Component.Library.DataProviders, Version=7.0.5000.0, Culture=neutral,
    PublicKeyToken=31bf3856ad364e35].Test that the Assembly Path is returned:[Name='PaulsMP!DSUtilsTest']/Path$ ---> 
    So the questions are - can these assembly resources be referenced in Powershell grid widget scripts and if so, what is the syntax?
    BTW, my MP resources fragment looks like this - 
    <Resources>
    <Assembly ID="DSUtilsTest" QualifiedName="DSUtilsTest1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" FileName="DSUtilities.dll" Accessibility="Public" HasNullStream="false"
    />
    </Resources>
    Many Thanks,
    Paul  

    Paul,
    I was unable to find info specific to the issue you are hitting, however I've found the following links that I believe can help you:
    http://www.systemcentercentral.com/scom-2012-create-an-mpb-to-deploy-files-using-vsae/
    http://overcast.fehse.ca/2014/08/scom-management-pack-bundles-and-vsae
    hth,
    Jose

  • How do you reference a Formular Object on a Crystal Report using Java

    Hi all,
    I am trying to reference an object on my report which contains a Formula field.
    I have read the following 2 threads, but they refer to textObjects:
    [How do you reference a textObject on a Crystal report using Java|Re: How do you reference a textObject on a Crystal report using Java?]
    [Changing the text of ITextObject programatically|Re: Changing the text of ITextObject programatically]
    But I cannot even get those to work. I can reference a object which refers to a database field but as soon as I try
    reference a textObject or reportObject I just get a NULL variable.
    Below is the code I am useing
    IReportObject dbField = reportClientDocument.getReportDefController().findObjectByName("BOB1");
    IReportObject textBob = reportClientDocument.getReportDefController().findObjectByName("BOB2");
    "BOB1" is the name of my DB field Object, and "BOB2" can be a Text box or a Formula item and I just get nothing.
    I have just tested it with a FieldHeadingObject and that returns a valid object, so clearly I am going about this the wrong way
    for objects I place on the reports which are not driven by the database items.
    Ultimately what I want to do is reference an object in the Report Footer which will contain the RecordCount of the number of
    records contained in the report, which I am them going to use to determine if the report holds data,
    if it does I will print it, else ignore it and move on the the next report. I am doing this so that I can at an extra filter to split
    a report up into groups and produce a sinlge PDF for each group instead of one massive PDF containing all the groups.
    So if someone has a solution to any of my problems I would be very greatful, and I dont mind being told Im an idiot and should
    rather do it another way, as long as you supply that other way
    Thanks for the help
    Darren
    Edited by: Darren Jackson on Dec 16, 2009 7:29 PM
    Forgot to add am using CR4Ev2 SP3

    Right I have made some headway.
    Firstly, Im an idiot. I was making changes and setting up test fields on my report, but then when running the app, I had it looking at
    the backup report, which would explain why all the new textbox fields were not being found.
    The stupiditity did force me to delve deep and work out a fair bit of how the reports work, so cant complain too much. BUT, I am still
    not able to return values of Formula fields and formulas extra. Could someone tell me if this is even possible. I get retrieve the formula field
    name, and properties but not its value once the report has been populated. Am I wasting my time?
    Well I will continue dismantling my reports till I find the answer, or someone points me in the right direction.
    If any one is interested this is the code I used to drill down to my text boxes:
    IReportObject recCount = reportClientDocument.getReportDefController().findObjectByName("TB1");
    ITextObject obj_RecCount = (ITextObject) recCount;
    System.out.println(obj_RecCount.getName());
    Paragraphs objP = obj_RecCount.getParagraphs();
    for (int i = 0; i < objP.size(); i++){
         ParagraphElements pE = objP.getParagraph(i).getParagraphElements();
         for (int j = 0;j < pE.size(); j++){
              IParagraphTextElement pEE = (ParagraphTextElement) pE.getParagraphElement(j);
              System.out.println(pEE.getText());
    Cheers

  • How do a reference a container from one of its objects?

    If i have on object in a container, how do i reference the
    container from inside the object. For instance, if i have
    a textbox and i want it to change color depending on
    a value in the container, how do i get to the container.
    thanks for any help
    owen brandon

    If you are asking about AWT or Swing, the Component class has a getParent() method that returns a Container.

  • How do you remove credit card from apple store ios7

    How Do You Remove Credit Card From Apple Store With IOS7

    After establishing the Credit Card account (i.e. after you have made purchases), you can remove the credit card information by editing your payment info, choosing "None".
    Settings>iTunes and App Stores>Apple ID>View Apple ID>Sign-in>Payment Information

  • How do you remove credit card # from iTunes account

    How do you remove credit card # from iTunes account without entering a new one because added money to account from gift card?

    On your computer's iTunes you should be able to edit your payment info by going into the Store > View Account menu option and logging into your account, and on your account's details page there should be a payment link.  If you are doing it on your iPhone then try tapping on your id in Settings > iTunes & App Store and select 'View Apple ID' on the popup - that should also give you a payments link on your account's page.
    Changing payment info : http://support.apple.com/kb/HT1918

  • How do you get your apps from the i tunes library onto your mac?

    how do you get your apps from i tunes library onto your mac

    You don't.  Apps from iTunes are for iOS devices.  Apps for the Mac come from the Mac app store.  Click the apple >> app store.

  • How do you transfer voice memos from your phone to your macbook? I don't want voice memos from my computer to go to my phone. It's so easy with other PC's.

    how do you transfer voice memos from your phone to your macbook? I don't want voice memos from my computer to go to my phone. It's so easy with other PC's.

    Hi King Arthur 2000,
    Voice memos can be shared back to a computer in a number of different ways, described in this article -
    Share a voice memo - Voice Memos - iPhone Basics - Apple Support
    http://support.apple.com/kb/TI227
    Thanks for using Apple Support Communities.
    Best,
    Brett L

  • How do you transfer voice memos from your phone to computer

    How do you transfer voice memos from your phone to computer

    Is it possible to transfer a voice memo to my computer and then convert that to text that can be printed?
    Here is my problem. I study harbor seals and have always taken hand written notes that then must be typed into the computer when I get home from an observation. Is there any way I can dictate what I see to a voice memo and then have that translated to text. If there is which would do it best an iphone or ipad (I have neither, just a tracphone for an emergency).
    Perhaps this is asking too much from the technology available but it would be a great help if I could do this.
    Thanks for any help you can give!

  • From two given tables, how do you fetch the values from two columns using values from one column(get values from col.A if col.A is not null and get values from col.B if col.A is null)?

    From two given tables, how do you fetch the values from two columns using values from one column(get values from col.A if col.A is not null and get values from col.B if col.A is null)?

    Hi,
    Use NVL or COALESCE:
    NVL (col_a, col_b)
    Returns col_a if col_a is not NULL; otherwise, it returns col_b.
    Col_a and col_b must have similar (if not identical) datatypes; for example, if col_a is a DATE, then col_b can be another DATE or it can be a TIMESTAMP, but it can't be a VARCHAR2.
    For more about NVL and COALESCE, see the SQL Language manual: http://docs.oracle.com/cd/E11882_01/server.112/e26088/functions119.htm#sthref1310
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables involved, and also post the results you want from that data.
    Explain, using specific examples, how you get those results from that data.
    Always say which version of Oracle you're using (e.g., 11.2.0.2.0).
    See the forum FAQ: https://forums.oracle.com/message/9362002

  • How do you delete purchased songs from your itunes library?

    How do you delete purchased songs from your itunes library - My adult kids who now have their own itunes accounts, when they were in high school purchased songs on my account and I'd like to get rid of them - Don't really want to hear the music they listened to when they were in high school!  help!

    Click here and follow the instructions. You may also need to turn off automatic downloads.
    (111585)

  • How do you delete a song from a playlist in iTunes?

    I feel stupid asking this question but how do you delete a song from a playlist? right clicking doesn't give a menu option to do it, and neither does the file menu. The highlight/delete option doesn't work either.
    Also, I've ended up with several copies of the same songs in my library . Can i delete the excess tracks in one go without highlighting them?
    Thanks,
    Dom

    Option-delete will remove a selected track from a playlist AND the library. Delete will just remove the track from a regular playlist.
    Yes, you need to highlight all the songs you want to delete. Sort your library by song title. This should put all the dups together for easy highlighting and deleting.

  • How do you transfer a ringtone from your itunes library to your iphone? because my hp will not let me download a tone to my iphone

    how do you transfer a ringtone from your itunes library to your iphone? because my hp will not let me download a tone to my iphone

    How to create a ringtone for iPhone on iTunes 10  http://www.simonblog.com/2010/09/06/how-to-create-ringtone-for-iphone-on-itunes- 10/

Maybe you are looking for

  • Uploading a CSV file

    When I try to upload a CSV file in my program it gives me an error message - Do not have an E-mail address column even though I do have an E-mail column and a list of E-mail addresses. How can I resolve this problem?

  • Error running source setup.sh

    This is my first time to get in touch with flex at all. So I am a blind rookie, hungry fro some action. I had two problems sourcing the setup.sh 1. The source.sh was unable to find the flash player gz. # 2. I dont have the default ant and jdk on my u

  • Image with URL action in a table

    Hi, it is possible to assign a hyperlink to an image so o click an window with the given URL will open. How can I do this with an image wihtin a table. I assign the same URL action but the image is not clickable although the table is set to selectabl

  • Companion CD for 10g R2 upgrade in Ebiz

    Can anyone know why we require Companion CD in 10gR2 database upgrade in Ebiz 11.5.10.2 setup.

  • I cannot view a certain webpage.

    I am unable to view the web page www.aincharityauction.wix.com/auction I can see this when I use IE but not Firefox. Why is this?