Dynamically create varying number of buttons

Hi.
The website I'm currently working on has an object gallery.
Whenever the user clicks one of the objects, it zooms in and
displays a sub-gallery with other images of said object. The images
that make up these galleries are loaded into dynamically created
empty MovieClips inside a sub-gallery MovieClip. Each object has a
varying number of images and they're loaded and unloaded when the
zooming in/out of the object ends.
When you click one of the sub-gallery images, the main image
should change and display the clicked image. However, I'm having
trouble telling the MovieClips containing the sub-gallery images to
do anything when they're clicked. See attached code, please.
I'm guessing this has to do with the onRelease being declared
inside the onMotionFinished. The thing is I can't thing of a way to
declare the onRelease for every sub-gallery image before they're
loaded.
Thanks in advance.

Frank,
Thank you for the response.
On the page2 of the pdf link you provided there is a picture of the tree table and it shows the hierarchy of the first level(or root) parent (President, Steven King). If the data had n presidents (n first or root level ) then this will dispaly all data in the same tree table like
King
--Kochhar
----Greenberge
King 2
--report 1
----report 1.1
King n
--report n
----report n.1
My requirement is pretty close to this but slighly different where these n first level should appear in n different tree tables like below:
Treetable for: King
King
--Kochhar
----Greenberge
Treetable for: King 2
King 2
--report 1
----report 1.1
Treetable for: King n
King n
--report n
----report n.1
That is the reason why I am playing with af:forEach and also have a separate VO which returns all the presidents(first level parents) and view linked that to EmployeesVO so that the AM looks like
AllPresidentsVO
-----EmployeesVO (with the view criteria wihch returns the first level parents)
---------reportingManagers
forEach prints n instances for PresidentsVO King, King2.. King n but all these instances have the same children the tree for King (tree for King2 ... King n does not appear)
May be it should be achieved in a different way?

Similar Messages

  • Dynamically create Variant Data Socket items with multiple writers

    I want to use variant or cluster items with data socket connection. I want to allow multiple writers.
    So far I can create these items dynamically but not set them to allow multiple writers.
    For numeric, string, and Boolean items I can set these properties by predefining them in the data socket server manager. I could not predefine a variant or cluster in the manager.
    I realize I can flatten to string the item needed but would prefer to do this in the cluster or variant formats.
    Any suggestions?

    unclebump wrote:
    Could you accomplish this using a functional global architecture??
    An interesting concept which might work and did just open up a new host of possibilities!
    When I get the time I might give this a try. I just did a quick test in another program.
    Through VI server I opened a reference to a remote machine. I then created strictly typed reference to a “functional global vi” that I knew would be in memory. It reads the functional global just fine!
    Thanks for the suggestion.
    Here is the work around I used for the data socket program.
    Here is the original problem.
    I needed to know on the server side when a new value was written to the message cluster, which consisted of a string and a variant. Checking the string portion of the cluster let me know what command to send the device being controlled on the server machine. The variant is used to hold the various parameters that accompanied the command. Since the same command type could be sent several times I needed to reset the string control after the server read the command. This required writing to the data socket from the client & server machine (multiple writers). Also since the client could be any PC in the subnet I needed to allow all these machines to have write access.
    I solved this by using a second data socket item for the new message flag. This item is a string value that could be pre-defined and set to allow multiple writers. I then used the cluster item to handle the commands and wrote to the string item a signal that a new command was ready. The server then recognizes a new command is ready, reads the command, and then flags the string message received.
    Thanks again for those who took the time to answer this.
    Randall

  • How to create varying number of tree hierarchies

    I have a db table with recursive tree structure established through id and parentId columns. There can be n first level parents(records with parentId=null); below data shows two first level parents(A and X).
    Name Id ParentId
    A 1 null
    B 2 1
    C 3 2
    X 4 null
    Y 5 4
    Z 6 5
    The requirement is to create ADF UI with n number of tree tables for these n first level parents with all their children. In the above example it should create 2 tree tables(A and it's children and X and it's children in separate tree tables).
    TreeTable - A
    A
    -->B
    ----->C
    TreeTable - X
    X
    -->Y
    ----->Z
    I am able to create a single tree table as below using self referencing viewlinks as explained here http://docs.oracle.com/cd/E17904_01/web.1111/b31974/web_masterdetail.htm#BJEFHDIJ
    TreeTable
    A
    -->B
    ----->C
    X
    -->Y
    ----->Z
    I tried to put an af:forEach around the tree table making it point to bindings.<firstlevelparentsVO>.rangeset and it prints two tables but both have hierarchy for both A and X
    I also tried making the firstlevelparentsVO a child of another VO which also would essentially return the first level parents and linking them through viewlink hoping af:forEach when prints will evaluate children only for a specific first level parent but there it printed 2 tree tables but both has only the hierarchy for the first first level parent(A) only. If there is an explicit navigation to X in the parent VO then both treetables will show the tree for X.
    I appreciate any suggestion to achieve this requirement.

    Frank,
    Thank you for the response.
    On the page2 of the pdf link you provided there is a picture of the tree table and it shows the hierarchy of the first level(or root) parent (President, Steven King). If the data had n presidents (n first or root level ) then this will dispaly all data in the same tree table like
    King
    --Kochhar
    ----Greenberge
    King 2
    --report 1
    ----report 1.1
    King n
    --report n
    ----report n.1
    My requirement is pretty close to this but slighly different where these n first level should appear in n different tree tables like below:
    Treetable for: King
    King
    --Kochhar
    ----Greenberge
    Treetable for: King 2
    King 2
    --report 1
    ----report 1.1
    Treetable for: King n
    King n
    --report n
    ----report n.1
    That is the reason why I am playing with af:forEach and also have a separate VO which returns all the presidents(first level parents) and view linked that to EmployeesVO so that the AM looks like
    AllPresidentsVO
    -----EmployeesVO (with the view criteria wihch returns the first level parents)
    ---------reportingManagers
    forEach prints n instances for PresidentsVO King, King2.. King n but all these instances have the same children the tree for King (tree for King2 ... King n does not appear)
    May be it should be achieved in a different way?

  • Dynamic create Drop List

    Hi, i'm building a form to gather info on the number of sessions there are in a day. So on this form, there is a drop list which allows the user to select from 1 to 10 sessions.
    Now, all the sessions are different times, so i have to create different number of drop based on the number select.
    Therefore if the user select 5, 5 new drop list appears and if 8, 8 new drop list appears. These new drop list would show times value for the user to select.
    Eg of drop list would have
    <select name=...>
    <option value='1'>1</option>
    i've so far manage to dynamically the select drop boxes but they do not show the option times values as i wish to.
    How can i get the drop list to show the options?
    can anyone help?
    function createSessionTimes(){
    var aElement=document.createElement("<select name='Session1'>")
    document.body.insertBefore(aElement);
    var aElement2=document.createElement("<select name='Session2'><options value='1'>1</option>")
    aElement.insertBefore(aElement2);
    }

    Yes, i know this is javascript. but i was hoping there is a jsp way to dynamically create new number of drop lists based on the value of the drop list above.
    so far i only seen javascript but i wish to do in jsp alone. Can anyone provide a jsp solution?

  • Can we create JTable with multiple rows with varying number of columns ?

    Hi All,
    I came across a very typical problem related to JTable. My requirement is that cells should be added dynamically to the JTable. I create a JTable with initial size of 1,7 (row, columns) size. Once the 7 columns are filled with data, a new row should be created. But the requirement is, the new row i.e. second row should have only one cell in it initially. The number of cells should increase dynamically as the data is entered. The table is automatically taking the size of its previous row when new row is added. I tried by using setColumnCount() to change the number of columns to '1' for the second row but the same is getting applied to the first row also.
    So can you please help me out in this regard ? Is it possible to create a JTable of uneven size i.e. multiple rows with varying number of columns in each row ?
    Thanks in Advance.

    Well a JTable is always going to paint the same number of columns for each row. Anything is possible if you want to rewrite the JTable UI to do this, but I wouldn't recommend it. (I certainly don't know how to do it).
    A simpler solution might be to override the isCellEditable(...) method of JTable and prevent editing of column 2 until data in column 1 has been entered etc., etc. You may also want to provide a custom renderer that renderers the empty column differently, maybe with a grey color instead of a white color.

  • Create a number of Dynamic Charts based on "Work Centre" in BEx Workbook?

    Hi all,
    We are on BI 7.0
    I am trying to create a number of dynamic charts in a BEx workbook based on the different values of "Work Centre" so that each unique work centre has its own chart.
    All titles and descriptions would have to be dynamic based on the work centre.
    I.e If there are 20 work centres we would need 20 charts. 30 work centres 30 charts etc.
    Also to add a little more complexity we need to only show a chart if a key figure (Demand Hrs) has a value greater than ZERO.
    Would be very grateful and would assign generous points for a solution.
    This needs to be done in a BEx workbook.
    Thanks in advance,
    Steve Jones
    BI Consultant

    Hello,
    The only possible way you can have a work around is with help of VB macros.
    The logic would be simple: Have a VB Script to check the varying work centres from the report. Then for each work centre check for demand hrs greater than zero. Then you can go with a for or while loop to create the graphs as per needed.
    Take help of VB Script expert for this if needed. Also if you want to work around for yourself you can check the record marco functionality of the excel. VB Script Macro is your only way out and as in your case youu2019re using workbook, this satisfies your need.
    Regards,
    Shashank

  • How to create a table with varied number of columns?

    I am trying to create a balance table. The colunms should include years between the start year and end year the user will input at run time. The rows will be the customers with outstanding balance in those years.
    If the user input years 2000 and 2002, the table should have columns 2000, 2001, 2002. But if the user input 2000 and 2001, the table will only have columns 2000 and 2001.
    Can I do it? How? Thanka a lot.

    Why did you create a new thread for this?
    How to create a table with varied number of columns?

  • Prob in displaying the dynamically created ui elements on click of a button

    hi all
    i created 1 inputfield, 2 buttons & i wrote the following code in wddomodifyview() of view.
    IWDInputField inf1=(IWDInputField)view.createElement(IWDInputField.class,"inf1");
        inf1.bindValue("Student.name");
        IWDButton but1=(IWDButton)view.createElement(IWDButton.class,"button1");
        but1.setText("Button1");
        IWDButton but2=(IWDButton)view.createElement(IWDButton.class,"button2");
        but2.setText("Button2");
        IWDTransparentContainer tc=(IWDTransparentContainer)view.getElement("TransparentContainer");
         tc.addChild(inf1);
        tc.addChild(but1);
        tc.addChild(but2);
         IWDButton button1= (IWDButton) view.getElement("button1");
         IWDAction theAction=wdThis.wdCreateAction(IPrivateDynCompView.WDActionEventHandler.DISPLAY,"");
                        but1.setOnAction(theAction);
                             IWDParameterMapping bm1 = button1.mappingOfOnAction();
                             bm1.addParameter("id", "b1");
                   IWDButton button2= (IWDButton) view.getElement("button2");
                   IWDParameterMapping bm2 = button1.mappingOfOnAction();
                   bm1.addParameter("id", "b2");
    and i wrote the following code in onactiondisplay()
    if (id.equals("b1"))
         wdContext.currentStudentElement().setName("First Button Clicked");
         else
         wdContext.currentStudentElement().setName("Second Button Clicked");
    when i run the application, the following error is displaying.....
    The initial exception that caused the request to fail, was:
       com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: View: Cannot add element with duplicate ID "inf1" of type com.sap.tc.webdynpro.clientserver.uielib.standard.impl.InputField
        at com.sap.tc.webdynpro.progmodel.view.View.addElement(View.java:481)
        at com.sap.tc.webdynpro.progmodel.view.ViewElement.<init>(ViewElement.java:43)
        at com.sap.tc.webdynpro.progmodel.view.UIElement.<init>(UIElement.java:188)
        at com.sap.tc.webdynpro.clientserver.uielib.standard.impl.AbstractInputField.<init>(AbstractInputField.java:143)
        at com.sap.tc.webdynpro.clientserver.uielib.standard.impl.InputField.<init>(InputField.java:71)
        ... 35 more
    com.sap.tc.webdynpro.services.exceptions.WDCreationFailedException: Cannot create view element implementation com.sap.tc.webdynpro.clientserver.uielib.standard.impl.InputField
         at com.sap.tc.webdynpro.progmodel.view.ViewElementFactory.createElement(ViewElementFactory.java:75)
         at com.sap.tc.webdynpro.progmodel.view.View.createElement(View.java:89)
         at com.sap.dynactions.DynCompView.wdDoModifyView(DynCompView.java:140)
         at com.sap.dynactions.wdp.InternalDynCompView.wdDoModifyView(InternalDynCompView.java:240)
         at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.doModifyView(DelegatingView.java:78)
         at com.sap.tc.webdynpro.progmodel.view.View.modifyView(View.java:190)
         at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.doModifyView(ClientComponent.java:398)
         at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.modifyView(ClientApplication.java:679)
         at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.handleActionEvent(WebDynproMainTask.java:381)
         at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.execute(WebDynproMainTask.java:649)
         at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:59)
         at com.sap.tc.webdynpro.clientserver.cal.ClientManager.doProcessing(ClientManager.java:248)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doWebDynproProcessing(DispatcherServlet.java:154)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:116)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doPost(DispatcherServlet.java:55)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:390)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:95)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:160)
    Caused by: java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
         at com.sap.tc.webdynpro.progmodel.view.ViewElementFactory.createElement(ViewElementFactory.java:65)
         ... 30 more
    Caused by: com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: View: Cannot add element with duplicate ID "inf1" of type com.sap.tc.webdynpro.clientserver.uielib.standard.impl.InputField
         at com.sap.tc.webdynpro.progmodel.view.View.addElement(View.java:481)
         at com.sap.tc.webdynpro.progmodel.view.ViewElement.<init>(ViewElement.java:43)
         at com.sap.tc.webdynpro.progmodel.view.UIElement.<init>(UIElement.java:188)
         at com.sap.tc.webdynpro.clientserver.uielib.standard.impl.AbstractInputField.<init>(AbstractInputField.java:143)
         at com.sap.tc.webdynpro.clientserver.uielib.standard.impl.InputField.<init>(InputField.java:71)
         ... 35 more
    pls tell me how to run this application without errors.....
    thanks & regards,
    vila.

    Hi Vila,
    Issue here is you are trying to create Input field with already used id "inf1" in first line of code
    IWDInputField inf1=(IWDInputField)view.createElement(IWDInputField.class,"inf1");
    Please change it to
    IWDInputField inf1=(IWDInputField)view.createElement(IWDInputField.class,"inf2");
    and correspondingly line
    tc.addChild(inf2);
    Your code will work.
    Please note that you should follow....following code style in wdDoModifyview
    if(firstTime)
    //dynamic view elements creation

  • Adding f:Attribute dynamically to a dynamically created Button

    Hi ,
    I am trying to dynamically create a CommandButton and attach a f:Attribute to the same. But somehow I am not able to get hold of the correct API to do the same -
    >RichCommandButton button=new RichCommandButton();
    >button.setText("Ok");
    >AttributeTag attr=new AttributeTag();
    >attr.setValue("DC_OPERATION_BINDING", "bindings.DENY");
    >button.getChildren().add(attr);
    The issue is that the add method expects a UIComponent and attr is of type com.sun.faces.taglib.jsf_core.AttributeTag

    gues u can use it like
    button.getAttributes().put(DC_OPERATION_BINDING", "bindings.DENY");
    {code}
    http://docs.oracle.com/cd/E17802_01/j2ee/j2ee/javaserverfaces/1.2/docs/api/javax/faces/component/UIComponent.html#getAttributes%28%29                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Futureproof and dynamically created button

    I have been looking solution how to make buttons dynamically so that I can fetch dynamically values for buttons:
    - value,onclick,class,type,request
    This excellent page has very closely what I am looking: http://www.laureston.ca/2012/04/20/simple-workflow-implementation-in-apex/
    but I have challenges getting the escaped special characters to work especially for the apex.submit - part.
    Maybe that is just because 'copy-pasting' the plsql-region code from www-page didn't work out of the box
    Application Express 4.2.3.00.08
    Because dealing with the escape chars make the page easily break and there are now the new dynamic actions, I need to check what would be futureproof way of dynamically creating the buttons.
    If this is anyway the most practical way to proceed, then where I should look for further information about htp.p(....) button creation examples with rich escapes?
    Made small test page, where you can see one of my trials trying to get the escapes right.
    user test
    pass test
    http://apex.oracle.com/pls/apex/f?p=1403:2
    rgrds paavo
    --below the code for dynamic plsql region -- very likely the escape chars are not copypasted and shown correctly:
    DECLARE
    --PL/SQL Dynamic Region
    --thisworks too??
      v_showme varchar2(3000);
    BEGIN
      for c in (select sysdate||'asdasd;asdasas'  as button_label
                , 'PIMREQUEST'  as button_request
                , 'button-gray' as button_class
                , 'button'      as button_type
                , 'P38_XPIMPOM' as button_setme
                , 'JUUSTOA'     as button_setme_value
                from dual) loop
    htp.p('<button value='''||c.button_label||''' onclick=\"apex.submit('''||c.button_request||''');'' class='''||c.button_class||''' type='''||c.button_type||'''>
    <span>'||c.button_label||'</span>
    </button>');
      end loop;
    END;

    Hi Paavo,
    Your right about the button_id. It's value comes from an input parameter. The button won't show up in the "When button pressed"-list_of_values. This is not only because you write the id yourself, but more because the entire button is created on the fly. The button isn't stored internal in an apex table, that's why it won't show up in a list of values.
    If you want to trigger a dynamic action with the button, you can use a jQuery selector as triggering element. Here you can refer to the button_id using the '#' as jQuery marker for ID, e.g. '#myButton'.
    What the button that you render does, depends on what you put in the p_link parameter. A normal save button would submit the page with condition 'SAVE', you can do that by setting p_link to 'apex.submit("SAVE")'. If the button should do a page redirect, you set p_link to 'http://www.page2go.com', or whatever url you wish to redirect to.
    The text you put in the button attributes is added as HTML element definition, so if you set p_attrs to 'alt="alternate text"', that will be added to the html of your button.
    An example for a conditional button call could be:
          if p_order_id is null
          then
            create_button
              ( p_id        => 'newOrder'
              , p_link    => 'javascript:apex.submit("CREATE"');'
              , p_label     => 'New Order'
              , p_css       => 'customButton'
          else
            create_button
              ( p_id        => 'updateOrder'
              , p_link    => 'javascript:apex.submit("SAVE"');'
              , p_label     => 'Update Order'
              , p_css       => 'customButton'
          end if;     
    This would create a 'CREATE' button for a new order (p_order_id is null), or a 'SAVE' button for an existing order.
    Regarding your ps: if you mean can you conditionaly create a button using dynamic actions? Then the answer would be yes. Yes you can use the create_button procedure in a dynamic action, however by writing it as stored procedure in the database, or in a database package, you can easily reuse your code and still have only one version of your procedure that you need to maintain.
    Regards,
    Vincent
    http://vincentdeelen.blogspot.com

  • Creating a Function logic for dynamically created XML buttons

    Hi!
    It's me...... again! Now I've dynamically created some buttons using XML. They're spread around the stage and I've modified a tooltip script to give each button a tooltip on Mouse_Over. But to se the logic and make it work using AS3 is hard (for me). I want a function that accept to parameters: Tooltip text and  Object to tooltip.
    In my code I get this error msg when initiating the function on dynamically created buttons:
    1118: Implicit coercion of a value with static type flash.display:Sprite to a possibly unrelated type flash.display:MovieClip.
    I beleive there are more than one thing here needing a fix.
    Can someone have a look and give me a pointer?
    Thanks
    function contentTooltip(ttt:String, ttclip:MovieClip):void {
        ttclip.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler);
        function mouseOverHandler(e:MouseEvent):void {
            ttip.descr.text=ttt;
            ttip.x=stage.mouseX;
            ttip.y=stage.mouseY-15;
            ttclip.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler);
            ttclip.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler);
            ttip.visible = true;
        function mouseOutHandler(e:MouseEvent):void {
            ttip.visible = false;
            ttclip.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler);
            ttclip.removeEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler);
        function mouseMoveHandler(e:MouseEvent):void {
            ttip.x=stage.mouseX;
            ttip.y=stage.mouseY-15;
    contentTooltip("Scale button",scale_btn);
    contentTooltip("Hide button",hide_btn);

    I totally agree with what Ned says and suggests. Nevertheless, I would like to support your thinking process.
    From the way you wrote the tooltip functionality it is apparent to me that you conceptualize as a programmer. Again, as Ned said, nested functions are evil. BUT, in a way, what classes accomplish is encapsulation/nesting of properties and functions under the same umbrella. It actually feels that what timeline does in general is nesting named functions within a single function we have no access to.
    How you wrote the code is actually a blueprint for a class that could handle the functionality. You, perhaps, are very ready to start coding with classes - not on the timeline.
    With that said, for the sake of theory, here is how your functionality can be rewritten on timeline:
    scale_btn.toolTip = "Scale button";
    test_btn.toolTip = "Test button";
    hide_btn.toolTip = "Hide button";
    scale_btn.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler);
    test_btn.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler);
    hide_btn.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler);
    var overTarget:MovieClip;
    function mouseOverHandler(e:MouseEvent):void {
         overTarget = e.currentTarget;
         ttip.descr.text = overTarget.toolTip;
         ttip.x = stage.mouseX;
         ttip.y = stage.mouseY - 15;
         overTarget.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler);
         overTarget.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler);
         setChildIndex(ttip, numChildren - 1);
         ttip.visible = true;
    function mouseOutHandler(e:MouseEvent):void {
         ttip.visible = false;
         overTarget.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler);
         overTarget.removeEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler); 
    function mouseMoveHandler(e:MouseEvent):void {
         TweenMax.to(ttip, .5, { x:stage.mouseX, ease:Quart.easeOut } );
         TweenMax.to(ttip, .5, { y:stage.mouseY - ttclip.height / 2, ease:Quart.easeOut } );
         //ttip.x=stage.mouseX;
         //ttip.y=stage.mouseY-ttclip.height/2;

  • (Urgent) Dynamically created buttons: which one?

    I need to dynamically create an array of gridpanels. There is a button and some other components on each gridpanel. I need to implement an action handler for the button (using method binding). But how do I know which button fires the event?
    Thanks a lot!

    Hi,
    One of the possible solutions is:
    Have a hidden field in the form. For each of the buttons write a javascript onclick event method in which the id of the button clicked is assigned to the hidden field. The value of this hidden field is available in the method handler. This helps in identifying which button was clicked.
    Hope this helps
    Cheers
    Giri

  • Accessing Dynamically created Button

    Hi,
    Can someone give me an example how to access dynamically created button? 
    I know how to create a button dynamically but don't know how to access from AS3.
    Thanks!

    Hi,
    Please go through following links.
    1) http://www.daveoncode.com/2009/05/20/objectcollector-accessing-dynamic-generated-flex-obje cts-by-id/
    2) http://stackoverflow.com/questions/6740813/flex-assigning-events-to-dynamically-created-bu ttons
    3) http://www.justskins.com/forums/adding-click-event-to-35785.html
    Thanks and Regards,
    Vibhuti Gosavi | [email protected] | www.infocepts.com

  • Dynamically create button

    Good evening,
    Can you help me,
    How can i dynamically create button?
    Can you give me example code, and how i can make event for this button.
    Regards.
    Points garantied.

    <a href="http://help.sap.com/saphelp_nw04s/helpdata/en/11/ba74412cba127de10000000a155106/frameset.htm">Sap Library</a>

  • Dynamically creating components on the page gives problems

    Hello,
    we are creating a number of custom UI components dynamically on the page, depending on informations we only know at runtime (for some reasons, we could not just create them statically and hide and show them dynamically- please don't suggest doing this way for now).
    The custom components are derived from ADF components, this way, as an example:
    public class MyRichInputText extends RichInputText implements Serializable {
    }They are successfully created dynamically in a bean associated with a button and used for the first time. That is, once wle navigate the page, for example via tabs or fragments, we always get a "Session timeout" exception. Below is the log from the server:
    <Error> <org.apache.myfaces.trinidadinternal.application.StateManagerImpl> <BEA-000000>
    java.lang.InstantiationException: mycompany.lib.MyRichInputText
         at java.lang.Class.newInstance0(Class.java:340)
    <Warning> <oracle.adfinternal.view.faces.lifecycle.LifecycleImpl> <BEA-000000> *<ADF_FACES-60098:Faces lifecycle receives unhandled exceptions in phase RENDER_RESPONSE 6*
    java.lang.NullPointerException
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._renderResponse(LifecycleImpl.java:978)
    javax.faces.application.ViewExpiredException: viewId:/myPage - ADF_FACES-30107:The view state of the page has expired.  Reload the page.
    Also, just to your knowledge, we use javax.faces.STATE_SAVING_METHOD="client" in web.xml. Note that MyRichInputText is already Serializable.
    Do you have any solution?

    Hello Frank,
    thanks for the quick answer. Below is the full stack. I think it will be difficult to quickly change all the code by building RichInputText directly. I'll do my best to be back to you with all the necessary informations as soon as possible. However, for now, if you have any possible idea by just look at the following more accurate log, let me know:
    <Error> <org.apache.myfaces.trinidadinternal.application.StateManagerImpl> <BEA-000000> <
    java.lang.InstantiationException: mycompany.lib.MyRichInputText
         at java.lang.Class.newInstance0(Class.java:340)
         at java.lang.Class.newInstance(Class.java:308)
         at org.apache.myfaces.trinidadinternal.application.Structure.createComponent(Structure.java:86)
         at org.apache.myfaces.trinidadinternal.application.Structure.createComponent(Structure.java:107)
         at org.apache.myfaces.trinidadinternal.application.Structure.createComponent(Structure.java:107)
         at org.apache.myfaces.trinidadinternal.application.Structure.createComponent(Structure.java:107)
         at org.apache.myfaces.trinidadinternal.application.Structure.createComponent(Structure.java:107)
         at org.apache.myfaces.trinidadinternal.application.Structure.createComponent(Structure.java:107)
         at org.apache.myfaces.trinidadinternal.application.Structure.createComponent(Structure.java:107)
         at org.apache.myfaces.trinidadinternal.application.Structure.createComponent(Structure.java:95)
         at org.apache.myfaces.trinidadinternal.application.Structure.createComponent(Structure.java:95)
         at org.apache.myfaces.trinidadinternal.application.Structure.createComponent(Structure.java:107)
         at org.apache.myfaces.trinidadinternal.application.Structure.createComponent(Structure.java:95)
         at org.apache.myfaces.trinidadinternal.application.Structure.createComponent(Structure.java:107)
         at org.apache.myfaces.trinidadinternal.application.Structure.createComponent(Structure.java:107)
         at org.apache.myfaces.trinidadinternal.application.Structure.createComponent(Structure.java:107)
         at org.apache.myfaces.trinidadinternal.application.Structure.createComponent(Structure.java:95)
         at org.apache.myfaces.trinidadinternal.application.Structure.createComponent(Structure.java:95)
         at org.apache.myfaces.trinidadinternal.application.Structure.createComponent(Structure.java:95)
         at org.apache.myfaces.trinidadinternal.application.Structure.createComponent(Structure.java:95)
         at org.apache.myfaces.trinidadinternal.application.Structure.createComponent(Structure.java:95)
         at org.apache.myfaces.trinidadinternal.application.Structure.createComponent(Structure.java:95)
         at org.apache.myfaces.trinidadinternal.application.Structure.createComponent(Structure.java:95)
         at org.apache.myfaces.trinidadinternal.application.Structure.createComponent(Structure.java:95)
         at org.apache.myfaces.trinidadinternal.application.Structure.createComponent(Structure.java:107)
         at org.apache.myfaces.trinidadinternal.application.Structure.createComponent(Structure.java:107)
         at org.apache.myfaces.trinidadinternal.application.Structure.createComponent(Structure.java:107)
         at org.apache.myfaces.trinidadinternal.application.Structure.createComponent(Structure.java:107)
         at org.apache.myfaces.trinidadinternal.application.StateManagerImpl.restoreView(StateManagerImpl.java:697)
         at com.sun.faces.application.view.ViewHandlingStrategy.restoreView(ViewHandlingStrategy.java:123)
         at org.apache.myfaces.trinidadinternal.application.ViewDeclarationLanguageFactoryImpl$ChangeApplyingVDLWrapper.restoreView(ViewDeclarationLanguageFactoryImpl.java:334)
         at com.sun.faces.application.view.MultiViewHandler.restoreView(MultiViewHandler.java:148)
         at javax.faces.application.ViewHandlerWrapper.restoreView(ViewHandlerWrapper.java:288)
         at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.restoreView(ViewHandlerImpl.java:245)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._restoreView(LifecycleImpl.java:689)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:342)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:204)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:312)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:173)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:122)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:469)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:469)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:293)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:199)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
         at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:181)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
         at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
         at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    >
    <Mar 28, 2012 12:28:46 PM CEST> <Warning> <oracle.adfinternal.view.faces.lifecycle.LifecycleImpl> <BEA-000000> <ADF_FACES-60098:Faces lifecycle receives unhandled exceptions in phase RENDER_RESPONSE 6
    java.lang.NullPointerException
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._renderResponse(LifecycleImpl.java:978)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:334)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:232)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:313)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:173)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:122)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:293)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:199)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:180)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
         at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    >
    javax.faces.application.ViewExpiredException: viewId:/myPage - ADF_FACES-30107:The view state of the page has expired. Reload the page.
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._restoreView(LifecycleImpl.java:718)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:341)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:204)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:312)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:173)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:122)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:469)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:469)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:293)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:199)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
         at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:181)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
         at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
         at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)

Maybe you are looking for

  • What is the best way to graph CAN data?

    Hi All, Even after years of trying, I am still really lousy at using the LabVIEW graphing functions, so I hope you will be patient with me. I am currently writing code to monitor a CAN bus.  I have messages with five different arbitration IDs coming

  • Safari 6: What happened to "Activity" view? Also Web Inspector Network view doesn't work.

    Hi all, I "upgraded" to Safari 6 and while it's super-fast and snappy as ****, I'm missing two features: 1) Activity view is gone! It was the easiest way to see what kind of crap websites are loading and you could double click on files and view them.

  • Nokia asha 305, a worst phon

    It is a one and only a smartphone in the world which do not play normal 3gp videos and etc at a unbelievable price Thanks to nokia ha ha haaaaaaaaaaaaaaaa

  • Creation of Position on Workflow  Approval

    Hi We have a scenario like when we are creating any position or org. unit in the T code PP01 a Work Flow should trigger immmediately to the supervisor for approval on approval only the user should be able to create new postion on OM. Is there any sta

  • Oracle.jdbc.driver.T4CPreparedStatement -Locked

    We are seeing lock on oracle.jdbc.driver.T4CPreparedStatement and rest of the threads are waiting for the lock to release. Each thread uses a different preparedStatement or a single preparedstatement???? How to resolve the problem? "ExecuteThread: '4