Calling a method on click of a hyperlink which opens popup

Hi,
I am new to the technology.
I have a hyperlink on .jspx page. Upon clicking it a pop up should open. I need to pass an object to a methd in the bean which will pre populate data in the pop up as soon as it opens. i.e. want to populate the data in the pop up from the data base. Please tell me how that can be done?
Using adf 11g jsf 2.0

1.On click of the hyper link, call a managed bean method. You can set the value to be passed to managed bean method on click of hyperlink via setActionListener.
Check this for setActionListner example: http://jdevadf.oracle.com/adf-richclient-demo/docs/tagdoc/af_setActionListener.html
2.And based on that parameter, populate the data from the data base.
3. After that launch the popup programatically. Read the article with heading How to launch a popup programatically from Java in http://www.oracle.com/technetwork/developer-tools/adf/learnmore/oct2010-otn-harvest-183714.pdf
-Umesh

Similar Messages

  • How to call a method on click of selectOneChoice dropdown box

    Hi,
    I am using selectOnceChoice whose list is coming from an arrayList.
    On the load of my page, I am populating the arrayList and it is getting visible in the selectOneChoice dropdown.
    But I have a scenario where I need to populate the arrayList(List Items) for selectOnceChoice on click of selectOnceChoice box. Not at the time of page load.
    I tried to do that with the help of clientListener and ServerListener but it seems that it is ServerListener is not the child attribute of selectOnceChoice.
    Can anyone please help me out to perform or call a method on click of selectOnceChoice box.
    Thanks,
    Vicky

    Could someone please explain to me the main difference between adapters and listeners? WindowListener is an interface, if you use it then you have to implement all its methos whether you use then or not while WindowAdapter is a class which implements WindowListener and provides empty implementations of all the methods in the listener, so basically by using windowAdapter you are avoiding
    the implementation of methods which you don't required.

  • Calling a method on clicking FileDownload UI

    Hi,
    I need to call a method when I am clicking FileDownload UI. Please tell me if there is any possibilites.
    Best Wishes,
    Idhaya R

    Hi Sumit,
    I want the file to be generated on clicking the filedownload UI. I am having a method to generate the file. If I am able to download and show the file to the user on clicking the button also will be fine. Please tell me is there any possibilities of downloading a file (Working as if clicking File Download) on clicking a button.
    Best Wishes,
    Idhaya R

  • How to call a method by clicking on a button

    hi, I have made a jsp page where I define a method toto.
    what the html source code for a button wich when you click it will process this method ?
    thanx

    There is no HTML source (or Javascript source either) that can directly call your toto JSP method. Think of it like this. You want to send a request from the browser to tell the JSP page to run method toto. For example, if the JSP page is named myPage.jsp, then the request could be as simple as myPage.jsp?action=runtoto (or http://yourwebserver/your/page/path/myPage.jsp?action=runtoto as an absolute URL). The JSP would then need to look for the action parameter as it is sent from the browser. If the action parameter equals "runtoto" then you could call the run tot method. Example:
    <%String action = request.getParameter("action");
    if(action.equalsIgnoreCase("runtoto"))
       toto();%>
    This could be coded in myPage.jsp and would run the toto method whenever the browser requested it via the action parameter. The HTML for the request could be coded as a button, a hyperlink, or anything that would generate a new page request.
    <form action="myPage.jsp" method="GET">
    <input name="action" type="button" value="runtoto"> Click to run the toto method.
    </form>
    Of course you have to consider the other parameters that will be submitted with the form. This may present some design issues/questions.

  • How to call a method on clicking Search Button in a jspx page.

    Hi All,
    I made a simple search page with two search criteria. Also i used LOV's for selecting the values to these view criteria's.
    Now i need to validate the criteria's being passed before page renders. Based on the validation i would like to change my base query of the page.
    Is this is possible to have two different query for the same page.
    If yes then please guide me to achieve this !!!
    Regards
    Siva

    Hi Arun ,
    Thanks for the reply,
    This is the actual scenario,
    I need to allow user to querying using a particular atrribute say A1 but applying A1 directly as a criteria on my base query along with other criteria will not fetch any details.
    Instead
    I need to fire the same query with A1 alone initially and on top of the fetched results i need to apply the other criteria
    OR
    I need to get the A1 from user and fetch some other attribute let's say A2 corresponding to A1 and this A2 has to applied as the new attribute along with the other attributes.
    Can this be achieved.
    Regards
    Siva
    I am using jdev 11.1.1.6

  • How to add a Hyperlink to open popup in dynamic data grid?

    Hi,
    I am a new bie in FLEX, the question which I am asking might be very easy but i am not able to find solution to it. Please can some one help me.
    I am creating a data grid dynamically using action script code now I want to add a Hyper link to couple of columns in a row. How can I do it in FLex?
    Thanks.

    HI Prashant,
    Thanks for the reply.
    This is what I am currently doing right now:
    for 
    (var i:int=0; i<colNameList.length;i++) { 
    var headerText:String = colNameList[i] + ""; 
    callSellGridCol = cols[i];
    callSellGridCol.headerText = headerText;
    if(headerText != null && headerText == "RIC"){
    var myRenderer : ClassFactory = new ClassFactory(com.db.carving.synthetic.dma.view.UrlLinkRenderer);
    In My Renderer class :
    public 
    class UrlLinkRenderer extends LinkButton{
     public var clickFunction:Function; 
    public function UrlLinkRenderer() { 
    super();}
    // Override the set method for the data property. 
    override public function set data(value:Object):void{
    super.data = value; 
    if (value != null){
    label = value[DataGridListData(listData).dataField];
    else{
    label =
    super.invalidateDisplayList();}
    Now what i want is to add a new Event Listner to this object so that I can click it?
    In your suggestion you said:
                         var classFacory:ClassFactory = new ClassFactory(LinkRenderer); // here LinkRenderer is any mxml/ as file Having Link Button defined.
    Where should be the Link button defined??
    Thanks.

  • Click on an icon, which opens up a full screen swiping gallery

    I have a project I am doing right now, which is basicaclly a book which showcases various printed materials and presentations.  The book is laid out where each page has a subject with a photo, a brief description and then 3-6 icons underneath which represent the different examples (brochure, presentation, etc.).  I want to be able to touch an icon, and then go to a full screen gallery where you can swipe through the various images.  I can do this with keynote (transparent keynote widget) but with keynote, you cannot swipe between slides.  Any ideas?

    Perhaps my first post was not clear.  I want the ability to touch a graphic icon button and then automatically launch a full screen gallery.  That is not possible with a gallery widget.  A gallery widget cannot open automatically to full screen and I cannot hide it or have a graphic icon represent it on the screen.  I can create a keynote that is 0% opacity and overlaps the icon button so that when you touch the icon, keynote opens in full screen automatically.  The only downside is that I do not get the swiping functionality, hence my question

  • Need call a method of one iview from another iview

    Hi,
    There are 2 iviews in a component.
    1) FirstView - contains abc() method & xyz() methods
    2) SecondView (a popup) - asdf() method
    i want to call abc() method from asdf() method. i.e. i want to call a method of the firstview from the secondview.
    Note:
    1) i couldn't able to copy the code of abc() method to component controller, as it has the code which uses (iview) local attributes (this can be done by context mapping) & main reason is from the method it calls the xyz() method of the same view (again i couldn't call a method of iview from component controller).
    2) firstView contain 5 tabs, i want to be in the same tab from which secondview (popup) was called, if i use fire plugs between both view, the current tab will be chnaged (i suppose, not sure).
    3) can we use event handlers, if yes how can we do that.
    Please provide a better solution for calling a method of view from another view.
    Thanks
    Maha
    Edited by: Maha Hussain on Jan 13, 2009 12:40 PM

    Hi Maha,
    It is better to have such methods in the component controller to make it reusable and avoid writing same code again and again.
    You can have that method in component controller and call that method on click on a button from Iview1 and can pass the parameters in the mthgod only.
    for example.
    Say Method abc() which is currently in Iview1 and you are passing values from context say aa bb cc to the method now what i am suggesting is
    have that method abc(String aa, String bb, String cc) ;
    and call it on click on button in Iview1 and pass the required parameters.
    Hope this will help
    Regards
    Narendra

  • Call AM method on ActionComponent  events

    Hi ,
    i need to perform some action like calling AM method ,isUserValid() tio check if user is valid or not on
    clicking action components like commandbutton and commandlink.
    i can archive this by adding PagePhaseLsitener ,and in beforePahseListener.
    i can handle action event update model process Phase.
    but the issue is i need to execute the AM method only actioncomponet event processing phase
    how to we know the event was generated by Action Component?
    please suggest
    Thanks,
    Karnakar

    Hi all
    requirement is to call AM method on clicking action compoents.
    and every page in application will call the above methods.
    i am overriding action component behiavour ,on clicking of actioncomoent it will execute AM method
    Thanks
    Karnakr

  • How to call a method from itemRenderer

    Hi,
    I need to call a method on click of a HBox rendered within DataGrid. However, when I try to call the method on click property of HBox control, an error appears stating " Call to a possibly undefined method goToAlertTab." I have duely defined that method within <mx:Script> tag. Here is the sample code. Can anyone please tell me what is the problem?
                <mx:DataGridColumn headerText="Alerts" dataField="alert">
                    <mx:itemRenderer>
                        <mx:Component>
                            <mx:HBox horizontalGap="2" horizontalAlign="center" click="goToAlertTab()">
                                <mx:Canvas height="100%" backgroundColor="Red" alpha="0.8"
                                    width="{data.alert.critical}" toolTip="{'Critical :'+data.alert.critical}">
                                    <mx:Label text=""/>
                                </mx:Canvas>
                                <mx:Canvas height="100%" backgroundColor="0xff6600" width="{data.alert.error}" toolTip="{'Error:'+data.alert.error}">
                                    <mx:Label text=""/>
                                </mx:Canvas>
                                <mx:Canvas height="100%" backgroundColor="Yellow" alpha="0.8"
                                    width="{data.alert.warning}" toolTip="{'Warning:'+data.alert.warning}">
                                    <mx:Label text=""/>
                                </mx:Canvas>
                            </mx:HBox>
                        </mx:Component>
                    </mx:itemRenderer>
                </mx:DataGridColumn>

    Here are some links on dispatching custom events:
    http://livedocs.adobe.com/flex/3/html/help.html?content=createevents_3.html
    http://livedocs.adobe.com/flex/3/html/help.html?content=createevents_1.html
    http://flexblog.faratasystems.com/?p=170
    http://www.beli.ws/blog/2009/04/technology/flex-3-creation-of-custom-events
    If this post helps, please mark it as such.

  • Call Java Method on Commanlink action without page refresh

    Hi,
    I have a radio button in my application which on click calls a new JSP page inside DIV tag of the same JSP. Now before calling that JSP Page i want to perform some functionality . So i placed a commandlink on radio like this -
    <h:commandLink action="#{controller.deleteData}">
         <h:selectOneRadio id="licenseType" layout="lineDirection" value="#{controller.licenseType}" onclick="javascript:getServerInfo();">
                 <f:selectItem itemValue="#{dataTableItem}"/>
         </h:selectOneRadio>
    </h:commandLink> What I am looking for is that when a user clicks on Radio, first a Java method named deleteData() is called and then onclick() event of Radio is processed which loads a new JSP Page inside DIV tag beneath the radio button.
    But what happens is that as i click on Radio, command link takes precedence and refreshes the page.
    Is it possible for commanlink to just call the method and don't refresh or reload the page ????
    Plz assist with some code example

    Thanks Milind..... :-)
    I've not tried it as yet but i guess it would wok for radio.
    Is there any such event available for command link or command button too.... in which i just call the method on click and the page may not refresh ?
    Would "actionListener" event like this -
    <h:commandLink actionListener="#{controller.getsaveData}">call a java method and refresh the page or just call the method and leave the page as it is.
    If thats possible can u assist with some code examples ???
    USAGE :_ Actually I have a commandLink on which I have put a graphic Image "Submit" and on clicking of this image I just want the java method to be called but the page should not refresh or reload. Here is the code -
    <h:commandLink actionListener=" action="#{controller.getsaveData}">
                      <h:graphicImage url="/IMAGES/save_changes.JPG" height="27"
                                      width="136"/></h:commandLink>{code}
    Can u assist me with this Plz.{code}{code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to handle the pop-ups in va02 transaction in Call Transaction Method

    Hi Experts ,
    I am trying to do bdc by call transaction method for  va02 transaction but i am getting popups .
    How can i handle the popups and for different sales orders i am getting different popups.
    is there any way to handle the pop ups dynamically.
    Thanks ain advance.

    hi,
    when you are using BDC then you will have to handle all the popups. this is minus point in using bdc as you need to feed each and every single bit of information so that bdc works fine and if anything misses then your bdc program will get stuck in middle of processing.
    best thing is check for function module or BAPIs available for those transactions. For VA02 there is a BAPI available ''BAPI_SALESORDER_CHANGE''. Try using this BAPI and if this BAPI doesnt handle the change you want to make in sales order then only go for BDC.
    you can also check BAPIs available in 'BAPI' tcode.
    hope this is helpful.
    Regards,
    Saba

  • How to call a method of an Action class from JSP on load?

    Hi guys
    Due to bad design pattern, i am forced to do something which i have not tried before.
    I need to call a method of a struts action class which invalidated the user session FROM the JSP itself on load. Which means it would not require user input.
    We have a subclass of a DispatchAction that handles all the incoming .dos.
    So http://blarblarblar:7001/blar/blar/doSomething.do?method=logout will dispatch to an Action class called DoSomething, into a method called logout().
    So when the webapp throws an exception, the ActionMapping actually displays an error.jsp and i have to invalidate the user at this stage.
    I can't change the most top level code in the base action class so i got to do it this way.
    Any help is much appreciated.
    Thanks.

    hi :-) DispatchAction is quite cool ;-)
    dont get much of your question but hope
    the suggestion below could help.
    A. use redirect?
    or
    B. autosubmit the form
    1. create your form in a jsp
       <html:form action="/doSomething" />
         <html:hidden name="method" value="logout" />
       </html:form>2. auto submit the form with method = logout
    put the function autosubmit in the "onLoad" event of the body
       <script>
         function autosubmit(){
         var form = document.yourformname;
         form.submit();
       <script>regards,

  • Calling a backing bean method by clicking on an image.

    I have several HtmlGraphicImage (h:graphicImage) objects on a page. I would like to be able to call a method inside the backing bean for the JSP page where the images are located when the user clicks on one of the images, and have a parameter sent to that method in the backing bean that will tell it which image was clicked on.
    How can this be done? Unlike buttons that have an action that gets listend to in the backing bean, HtmlGraphicImage objects do not have actions. I know that you can intercept clicks by an onClick Javascript method, but how can you call a mehtod in the backing bean using the Javascript onClick?
    For example, part of my JSP looks like this:
               <body style="background-color: rgb(255, 255, 255); -rave-layout: grid">
                    <h:form binding="#{InitialReport.form1}" id="form1">
                        <h:graphicImage binding="#{InitialReport.frontalImage}" height="204" id="frontalImage" style="left: 144px; top: 240px; position: absolute" width="242"/>
                        <h:graphicImage binding="#{InitialReport.profileImage}" height="198" id="profileImage" style="left: 432px; top: 240px; position: absolute" width="244"/>
                        <h:graphicImage binding="#{InitialReport.smileImage}" height="198" id="smileImage" style="left: 720px; top: 240px; position: absolute" width="244"/>If my backing bean (InitialReport.java) had a method that looked like this:
      public void setCurrentImage(String imageName)what would the javascript look like in order to send a name to setCurrentImage?
    Thanks!

    you can use the <h:button> with type='image'Thanks for the reply, but I cannot use that. The thing is, the images are read at run time from a database and are not present in the resources. The button's image only takes String file names, not URLs.
    There should be a way to do this using onClick.

  • How to call a method on panel tabbed click.

    Hi Friends,
    I am using JDeveloper 11.1.1.5.0.
    I have a method written in the AppModuleImpl class. It calls a procedure from the database.
    In my .jspx page, panel tabbed is used. When I am clicking the 2nd panel tab, I want the method to be executed.
    Please Help.
    Thanks,
    $@M$

    so on click of that tab, use getSource to find which tab in your bean, and there get the application module from the context, and call the method in your app module.

Maybe you are looking for