How to pass params to Action Event handler in treeNode?

Trying to use Tree in portlet I found impossible to determine selected node. (bug # 6354989).
But I can (despite what is written in manual) use Action Event Handler. It works now (at least, I hope so).
But I generate tree dynamically and cannot write event handlers for all its nodes. May be there's a way to write one event handler but distinguish node that triggered it? May be by passing additional params to handler?

The tree component does not work well in portlets. This is a known problem.
It uses cookies to pass the value of the selected node, but cookies do not work inside of portlets. So, the methods that would normally tell you which node is selected, return nothing. There are also no javascript properties which would allow you to output javascript to store the value somewhere in the page.
Unfortunately there is no workaround for the bug you mentioned so far so far.
Rose

Similar Messages

  • How to access UI components in event handler

    Hi
    How can I access all or a particular UI component's object in my event handler of a event which is not caused by that UI component which is being accessed.

    You need variable resolution:
    FacesContext context = FacesContext.getCurrentInstance();
    Application application = context.getApplication();
    WaferMap waferMap = (WaferMap)application.getVariableResolver().resolveVariable(context, "waferMap");or you can ask the event for ones near by
        //action from an h:commandLink
         public void seeMore(javax.faces.event.ActionEvent event)
           System.out.println("action: seeMore "+((HtmlCommandLink)event.getSource()).getAttributes());
            java.util.List map=((HtmlCommandLink)event.getSource()).getChildren();
            Iterator i=map.iterator();
            System.out.println("action: seeMore ");
            while(i.hasNext())
                Object obj=i.next();
                if(obj instanceof UIParameter)
                    UIParameter param=(UIParameter)obj;
                    System.out.println("\t seeMore "+param.getValue()+" ");
        }

  • How to pass parameter to action methods

    Hi,
    I have a button.  Enter action method is associated with this.  In the Enter action method, I have added a parameter named param1.  When the button is clicked, this method is called automatically.  But how do I pass parameters to this method, which I have declared ?
    Regards,
    Suresh.

    Hi Suresh Babu,
    The associated method (Event Handler) is triggered by default and cannot pass the values. Instead, use the context node or attributes to set/get the values in the event handler method.
    Regards,
    Sravan Varagani

  • Passing parameters to an event handler

    I am successfully using event handlers to respond to user
    inputs(mouse click, enter key, etc.)
    The handler can also use the event objects parameters to
    perform operations based on who called the function. An example of
    this is the target._name, which is apparently passed when the event
    occurs.
    In addition, I have a need to call an event handler from
    within AS to essentially mimic a mouse click or keyboard entry.
    This call from AS is no problem. Just use the event handler
    name. For instance, mc.click(); and the handler is invoked.
    However, with the AS call there is no object passed to the
    handler. This differs from an event-driven call where an object
    identifying the event source is passed to the handler.
    The question is: Can you pass a parameter(s) or object to an
    event handler from a call in ActionScript? I have tried various
    ways, but nothing has worked.
    Does anyone know the insides of event handling and how the
    "eventObject" is passed when
    a user event occurs? Knowing how that works might give some
    clues as to how to pass an object from an AS call.

    You would need to use a modified version of the
    mx.utils.Delegate package. The link below has just that;
    http://www.person13.com/articles/proxy/Proxy.htm

  • Passing Param to Mouse Event in AS3

    Hello All,
    I want to make a tooltip box , when I mouse over an object it will appear with the object color and some other data
    how can I send the color param and other param to mouse event?
    Thanks in Advance

    Hi,
    Maybe this will help you :-
    http://www.ultrashock.com/forums/actionscript/as3-adding-parameter-to-eventlistener-104729 .html
    http://www.orlandmedia.com/blog/actionscript-3/passing-parameters-to-a-mouseevent-listener /

  • JRC with JavaBeans datasrc - how to pass params into javabean.getResultSet?

    Hi.
    I'm developing javabeans data sources for crystal reports for the java/JRC engine.  I've seen the document entitled Javabeans Connectivity for Crystal.  It TALKS ABOUT passing params into the methods that return java.sql.ResultSets but there is absolutely no example code anywhere that I can find on how to do it.
    What I don't understand is:  Since the JRC engine is basically controlling the instantiation of the javabean, other than calling some type of fetch method in the constructor, how the heck am I supposed to pass in db connection info and a sql string? 
    Anybody got sample code for how to call/where to call parameters that I would put in a custom getResultSet method??
    Thanks.

    I don't think that a Connection Pool class would be an ideal candidate for becoming a JavaBean. One of the most prevalent use of a JavaBean class it to use it as a data object to collect data from your presentation layer (viz. HTML form) and transfer it to your business layer. If the request parameter names match the Bean's property names, a bean can automatically get these values and initialize itself even though it has a zero argument ctor. Then a Bean could call methods in the business layer to do some processing, to persist itself etc.

  • Action Event Handler on Tree nodes

    I have an actionListener event handler registered on a tree node as follows:
    <af:tree value="#{bindings.SomeViewObj1.treeModel}" var="node" rowSelection="none" id="t1"
    binding="#{EditFormBean.tree1}" displayRow="selected" summary="Tree"
    partialTriggers=":::cb1 :::cb2">
    <f:facet name="nodeStamp">
    <af:panelGroupLayout id="pgl3">
    <af:outputText value="#{node}" id="ot1"/>
    <af:commandImageLink text="E" id="cil3" partialSubmit="true"
    *actionListener="#{EditFormBean.onEdit}"* binding="#{EditFormBean.cmdImageLink}">
    <af:setPropertyListener from="#{node.hiertType.structureDefName}" type="action"
    to="#{viewScope.formView}"/>
    <f:attribute name="node" value="#{node}"/>
    </af:commandImageLink>
    <af:commandImageLink text="A" id="cil1"/>
    <af:commandImageLink text="D" id="cil2"/>
    </af:panelGroupLayout>
    </f:facet>
    </af:tree>
    I have at each node stamp facet a panelGroup Layout that contains the node value and a command Image link. The tree has two hierarchical levels. When I press the command Image link on the first tree noe level, the actioListener method in teh managed bean (EditFormBean.onEdit) gets called. When I press the same commandImage link on the second tree level, the same action listener does not get called. I need to get past this problem before I code the actionListener which needs to set the current row in the iterator based on the key selected on the tree node. I simply have a print statement in the action listener method which shows something when the first level command image link is clicked but does not print anything when the second level command image link is clicked.
    I am using JDeveloper 11.1.2.1.0
    There is also adf faces code around this snippet that uses an af:switcher facea component to display the appropriate form based on the nodee level in which the comman d image link is clicled but it is irrelevant to the problem I am getting.
    Any help on that would be appreciated

    Hi,
    hard to say . Didn't see this before. Can yoiu remove "binding="#{EditFormBean.cmdImageLink}"" from the command link. The tree stamps its children so that it doesn't make sense to keep a handle to the component instance
    Frank

  • How to pass params to another class which accepts keyboard input?

    How can I pass params to a stand-alone Java class that, when executed, gathers params using readLine()?
    In other words, MyClass, when executed from the command-line, uses readLine to gather params for program execution. I'd like to test this class by calling it from another class using Runtime.exec("java MyClass") or calling MyClass.main(args) directly. But, how can I simulate the input expected from the keyboard?
    Thanks!

    Alright, so it looks like this:
    proc = Runtime.getRuntime().exec("java Client");
    br = new BufferedReader(new InputStreamReader(proc.getInputStream()));
    bw = new BufferedWriter(new OutputStreamWriter(proc.getOutputStream()));
    bw.write("test");
    bw.newLine();
    But, how can write doesn't seem to be passed to the original client class.
    Suggestions?

  • How to pass data at 'wait' event ?

    Hello,
    I created a workflow starting from a form: the user can chose a production order number.
    Inside the workflow there's a step (= wait ) and the system wait until an event (BUS2005-DELETE) is raising.
    My requirement is:
    When the event BUS2005-DELETE is raising I have to finish the workflow but only if the event is raising for the
    production order number entered from the user.
    So, my question is:
    How to pass the production order number at the WAIT event ??
    Tks.

    Hello Roberto Baldassarre  !
                   To instantiate your BOR, release it and do the event binding at workflow and also the binding at wait step perfectly.
    Regards,
    S.Suresh

  • My action event handler isn't being invoked when I activate a button

    The button is of type 'submit' and I have an event handler defined in my Page bean, but it isn't getting called.

    Do you have a message group component on your page? There might be a validation or some other error that is preventing the action.

  • How to call a view without event handler onaction method.

    Hi Experts,
    I have develop a WD application. It has three views let view1, view2 and view3.
    In view1 one button is there (onaction) which navigates to view2 through outbound plug  wd_This->Fire_Out_Screen1_Plg(   ). where Out_Screen1 is outbound plug of view1.
    Now view2 appears , I want that after 10 seconds view2 automatically call view3, without action on view2.
    I have written like  wd_This->Fire_OUT_SCREEN2_Plg(  ). where OUT_SCREEN2 is outbound plug of view2, which navigates to inbound plug of view3.
    But its not working. Please suggest how to and where to write code to call a view without action .
    for ur ref.

    Hi Bhagat,
    Yes, you can attach media objects into a view
    Using IFRAME ui element and html mime object.
         Please refer the below link
    To insert video in webdynpro - Web Dynpro ABAP - SCN Wiki
    Using Flash Islands
              Here, you need to have your audio/video file as flash object
         Please refer the below tutorial on flash islands( a generic example )
         Adobe Flash Islands for Webdynpro ABAP
    Hope this helps you.
    Regards,
    Rama

  • How open a service order using event handling

    HOw to open a service order using event handling

    Hi,
    Can you explain your requirement elaborately.
    I understand from it as, you want to open Service order creation page, based on some event(may be submit button).
    For that technically you can use navigation->goto_page('Provide the URL').
    or you can use inbound-plug and out-bound plug concept for naviagation.
    Regards,
    Devender V

  • Please Help !!!How to pass variable defined in Event Listener Method outside it.

    Hi, everybody
    I have 3-4 swf those i want to load one after another like a slideshow.What i  want to do is get the total frames of loaded swf and want to pass that value to Timer object's delay parameter.  i have converted total frames to milliseconds so i can use it in timer constructor. But i am not getting the value of that variable outside of my Event.COMPLETE listener method. Here is my code what i have done, Please have a look and guide me what i am missing.
    var fr = stage.frameRate;
    var m:MovieClip = new MovieClip();
    var ms;
    var swf:XML =
                       <swfs>
                                 <swf filename="1.swf"/>
                            <swf filename="2.swf"/>
                            <swf filename="3.swf"/>
                    </swfs>;
    import flash.display.*;
    import flash.net.URLRequest;
    function loadSwf(num)
       var ldr:Loader = new Loader();
        var url:String = swf.swf[num].attribute("filename");
        var urlReq:URLRequest = new URLRequest(url);
        ldr.load(urlReq);
       ldr.loaderInfo.addEventListener(Event.COMPLETE, onC);
    function onC(e:Event):void
       var m:MovieClip = e.target.content as MovieClip;
       ms = m.totalFrames/fr;
       ms = ms * 1000;
    var timer:Timer = new Timer(ms);
    timer.addEventListener(TimerEvent.TIMER, onT);
    function onT(e:TimerEvent)

    Hi Ned,
    Thanks for your reply. i want to call loadSwf method in timerEvent. My aim is to load next swf movie after playhead play all frames of loaded swf. I hope you are getting my point. My aim is to play a slide show of swfs with not equal interval but after completion of each swf's animation, those total frames may differ. Am i going right or if you can suggest me a  better way then please tell me.

  • Event Handling in treeNode

    Hi!
    How can I handle the onNodeClick event associated with the treeNode.
    Thank You.

    HI,
    You can see the application SBSPEXT_HTMLB page Tree.bsp.
    If in layout your tree is like:
    <htmlb:tree id = "myTree1"
                title   = "INBOX"
                toggle  = "X"
              width="240">
    <htmlb:treeNode id      = "root"
                     text    = "LIST"
                     isOpen  = "true">
             <htmlb:treeNode id    = "node2<%=sy-tabix%>"
                          text  = "<%=tab_1-MRF_NUM%>"
                           image = "@01@"
                            onNodeClick="show"  >
    Then on Input Processing you can get the node selected by handling the onnodeClick as:
    if event_id = cl_htmlb_manager=>event_id.
      event ?= cl_htmlb_manager=>get_event( runtime->server->request ).
       if  event->id = 'myTree1' and event->event_type = 'click'.
         data : t_event type ref to cl_htmlb_event_tree.
         t_event ?=  event.
        temp = t_event->node.
    where temp type string
    This way you can get the ID of the node selected by onNodeSelection.
    Regards,
    Siddhartha

  • Passing data to event handler function

    I am trying to pass value to the event handler function but I
    am getting the following error. Can someone please tell me what I
    am doing wrong?
    1067: Implicit coercion of a value of type void to an
    unrelated type function
    here is the code
    private function myClickListener(myid:int):void{
    Alert.show("The button was clicked");
    public function handleStringResult(event:ResultEvent):void{
    catInfo = event.result as ArrayCollection;
    for each(var o:Object in catInfo){
    var b:Button = new Button();
    b.label = o.FILLCOLOR;
    b.id=o.CATID;
    b.setStyle("fillColors",['#'+o.FILLCOLOR,'#'+o.FILLCOLOR]);
    b.setStyle("color","#FFFFFF");
    b.setStyle("fontFamily","Arial");
    b.setStyle("fontSize",8);
    b.setStyle("textRollOverColor", "red");
    b.addEventListener(MouseEvent.CLICK,
    myClickListener(o.CATID));
    myvbox.addChild(b);
    ]]>

    "Merlyn MM" <[email protected]> wrote in
    message
    news:[email protected]...
    > Sure, Here is the code. I am very new to flex and if my
    code doesn't make
    > sense
    > then please let me know the correct way to do this. I
    really appreciate
    > you
    > taking time!
    >
    > <?xml version="1.0" encoding="utf-8"?>
    > <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    > layout="absolute"
    > backgroundColor="#FFFFFF"
    > initialize="myService.getcategories.send()">
    > <mx:WebService id="myService"
    > useProxy="false"
    > wsdl="
    http://devsite/rc/category.cfc?wsdl"
    > showBusyCursor="true">
    > <mx:operation name="getcategories"
    > result="handleStringResult(event)"
    > fault="Alert.show(event.fault.message)"/>
    > <mx:operation name="getsubcounties"
    result="handleStringResult(event)"
    > fault="Alert.show(event.fault.message)"/>
    > <mx:request>CATID</mx:request> //need to
    pass category ID here
    > </mx:operation>
    > </mx:WebService>
    >
    > <mx:Script>
    > <![CDATA[
    > import mx.collections.ArrayCollection;
    > import mx.rpc.events.ResultEvent;
    > import mx.rpc.events.FaultEvent;
    > import mx.controls.Alert;
    > import mx.controls.Button;
    >
    > [Bindable]
    > private var catInfo:ArrayCollection;
    >
    > private function myClickListener(myId:String):void{
    >
    > myService.getcounties.send() // I need to send catid
    here to the
    > webservice
    > }
    >
    >
    > public function
    handleStringResult(event:ResultEvent):void{
    > catInfo = event.result as ArrayCollection;
    > for each(var o:Object in catInfo){
    > var b:Button = new Button();
    > b.label = o.FILLCOLOR;
    > b.id='btn'+o.CATID;
    >
    >
    b.setStyle("fillColors",['#'+o.FILLCOLOR,'#'+o.FILLCOLOR]);
    > b.setStyle("color","#FFFFFF");
    > b.setStyle("fontFamily","Arial");
    > b.setStyle("fontSize",8);
    > b.setStyle("textRollOverColor", "red");
    > b.addEventListener("click", myClickListener);
    > myvbox.addChild(b);
    > }
    > }
    > ]]>
    > </mx:Script>
    I'd change it to this:
    private function myClickListener(e:Event):void{
    //I don't see where you're using the ID, but to get it,
    //use this code:
    var myID = e.currentTarget.data;
    myService.getcounties.send() // I need to send catid here to
    the
    webservice
    public function handleStringResult(event:ResultEvent):void{
    catInfo = event.result as ArrayCollection;
    for each(var o:Object in catInfo){
    var b:Button = new Button();
    b.label = o.FILLCOLOR;
    //note that you couldn't have used your ID
    //as a "handle" to anything, so I replaced
    //that logic with something you _could_ use
    b.data=o.CATID;
    b.setStyle("fillColors",['#'+o.FILLCOLOR,'#'+o.FILLCOLOR]);
    b.setStyle("color","#FFFFFF");
    b.setStyle("fontFamily","Arial");
    b.setStyle("fontSize",8);
    b.setStyle("textRollOverColor", "red");
    b.addEventListener("click", myClickListener);
    myvbox.addChild(b);
    You could also use a Repeater and set this up in MXML.
    HTH;
    Amy

Maybe you are looking for

  • Partial clearing document reversal

    I have posted customer receipt document as partial payment.  While I am returning the document error message  - Document includes already cleared items. Reversal not possile. I have tried for FBRA with the document - Then system is showing it is not

  • What's this reason code of error mean?

    Date: Jun 14 10:49:57 Machine Name: CUCMPUB Severity: Error App ID: Cisco CTIManager Message: CTIManager: 694021: CUCMPUB.concordia.ca: Jun 14 2012 14:49:57.486 UTC : %UC_CTI-3-CtiProviderOpenFailure: %[CTIconnectionId=694134][LoginUserId=xxx][Reason

  • Apple Remote Desktop version 3.5.1. to version 3.5.2

    I originally purchased Apple Remote Desktop version 3.5.1 from the App Store.  Apparently Apple Remote Desktop version 3.5.2 has been released.  Guess what???  The App Store does not have the update for version 3.5.2.  I downloaded the update from th

  • IDOC_INPUT_DESADV for IDOC input deliveries can post also good receipt?

    Hello all: Does any body can help me  to know if idoc with Process code DESA that call function module IDOC_INPUT_DESADV besides creates an input delivery (like vl31n) can ALSO POST THE GOOD RECEIPT if the confirmation control key at item level is co

  • How to report possible Port scanning and DOS/Fraggle Attack??

    I have been experiencing lag while surfing the internet. One temporary solution was to get a new IP from VZ but this fix was short lived. So I became curios and dtarted to log connection attempts to my router and noticed what I saw resembled port sca