Targetting a button in a component

I'm familiar with outerDocument as a way to get out of the
scope of a Component, but how do I target a button that is embedded
in a Component. For example, in the following function how do I
change the label of the button?
public function onButtonClick(event:Event, data):void{
//simon.label="Selected"
}

"SiHoop" <[email protected]> wrote in
message
news:gbu297$t48$[email protected]..
> I'm excited because I've finally figured out how to
create a component
> that
> will give me a minimal level of interactivity (I can
finally change the
> style
> of a button when it is selected), but now I suspect that
I've painted
> myself
> into a corner by using parentDocument. I also have a
reset button that
> sets
> several items to their original state, but when I select
reset I must also
> set
> the buttons in the datagrid back their original style.
I'm not sure that I
> can
> program the buttons as they appear to be 'unreachable'
from outside the
> component. I read the document that Amy recommended on
'good programming
> techniques', and some of it works for me now, but other
concepts are too
> advanced for me at the moment. Is there any way to reset
all of the
> buttons in
> the datagrid back to their original style?
>
> <?xml version="1.0" encoding="utf-8"?>
> <mx:Canvas xmlns:mx="
http://www.adobe.com/2006/mxml"
>
> <mx:Script>
> <![CDATA[
> private var someVar:Boolean=true
> public function changeButtonStyle():void{
> parentDocument.hideMapMarker()
> if(someVar){
> button1.styleName='linkButton1'
> }else{
> button1.styleName='linkButton'
> }
> someVar= !someVar
> }
> ]]>
> </mx:Script>
> <mx:Button id="button1" click= "changeButtonStyle() "
width="65"
> styleName="linkButton" />
> </mx:Canvas>
I'm on the way out the door so I can't get too much into
detail, but I'd
associate the button styles with _listData as is done here:
http://blog.flexmonkeypatches.com/2007/09/10/flex-tilelist-with-togglebuttons/
Or, if you're using a TileList or DataGrid (and you can also
make a TileList
work like List or HorizontalList), you can use the extended
TileList and
DataGrid from my blog (http:flexdiary.blogspot.com).
HTH;
Amy

Similar Messages

  • Targetting a button in flv skin

    Hi
    I want to be able to target a button that is within the skin for a flvplayback component. This is my first real adventure with AS3 and..... (feel like I want to scream!)
    In the library for the skin I get "fl.video.skin.FullScreenButtonOnOver" and paste this into the main timeline with some code like this.
    stop();
    function edward(event:MouseEvent):void{
    trace ("the button was pressed");
    fl.video.skin.FullScreenButtonOnOver.addEventListener(MouseEvent.CLICK, edward);
    which comes back with the error "Access of undefined property fl" - which doesn't surprise me really.
    What do I do to target taht button
    Thanks

    Thanks for reply
    My instance is called myVideo.
    so I do this:
    stop();
    function edward(event:MouseEvent):void{
         trace ("the button was pressed");
    myVideo.fullScreenButton.addEventListener(MouseEvent.CLICK, edward);
    ... lots more code...
    and still get an error. Is it something to do with the "delay" you mentioned?
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
         at index002_fla::MainTimeline/frame1()[index002_fla.MainTimeline::frame1:10]

  • Could not create the flash button because a component of Dreamweaver is missing. Please reinstall Dreamweaver.

    I have Dreamweaver MX 2004 and then upgraded to
    Dreamweaver Studio MX 2004 and decided to upgrade to Studio 8. At
    the time I got the Studio 8 I also upgraded my computer and now my
    purchased flash buttons do not work on my system. I get an error
    message Macromedia Dreamweaver Could not create the flash button
    because a component of Dreamweaver is missing. Please reinstall
    Dreamweaver. We tried uninstall and then reinstall and still no
    fix. My husband tried the software on his lap top and they work
    fine. I did have Contribute installed but uninstalled it . 1. What
    would the missing component be? and 2. Why didn't the reinstall
    work? Thanks for the help. I need to update a couple of sites that
    use the buttons and can't so far. Carol

    you probably have to install the Dreamweaver update so that
    you're on
    version 8.0.2. just search Adobe.com for Dreamweaver update
    and you
    should be able to find it pretty quickly.
    cpt_vom wrote:
    > After a reinstall of Window XP and Drewamweaver ver.8
    I'm running into a
    > problem.
    > When inserting a flash button I get the following
    message:
    > :Could not create the Flash Button because a Component
    of Dreamweaver is
    > missing. Please reinstall Dreamweaver:
    > Not a word about which Componement missing!
    > I have tried to instal Dreamweaver several times but
    without result - same
    > message appears.
    > The button in question is 'FZ Pack 3: Multi Buttons'.
    > I can insert the standard buttons with no problems and I
    have also tried to
    > insert this button on my second PC with succes which
    could indicate a problem
    > with my main PC, maybe something to do to Windows XP?
    > I really would appreciate an solution to this problem
    and hope somebody could
    > help.
    >
    > Kind regards,
    > Kjeld - Copenhagen - Denmark
    >
    >

  • How to get id of button in repeater component

    I want to get or set an id of button in repeater component:
    <mx:Repeater id="repeaterData"
    dataProvider="{xmldata.lastResult.names.name}">
    <mx:Button label="{repeaterData.currentItem}"
    id="{repeaterData.currentIndex}"/>
    </mx:Repeater>
    id="{repeaterData.currentIndex}" does not work because
    currentIndex returns int value.
    Please, is there a possible way to get id?

    "Amy Blankenship"
    <amySpamFilter@magnolia_pleaseNOspam_multimedia.com> wrote
    in message news:gb0mh3$rvg$[email protected]..
    >
    > "Borooooon" <[email protected]> wrote
    in message
    > news:gb0lqj$r5n$[email protected]..
    >>I want to get or set an id of button in repeater
    component:
    >>
    >> <mx:Repeater id="repeaterData"
    >> dataProvider="{xmldata.lastResult.names.name}">
    >> <mx:Button label="{repeaterData.currentItem}"
    >> id="{repeaterData.currentIndex}"/>
    >> </mx:Repeater>
    >>
    >>
    >> id="{repeaterData.currentIndex}" does not work
    because currentIndex
    >> returns
    >> int value.
    >>
    >> Please, is there a possible way to get id?
    >>
    >
    > Q: I'm using a Repeater to lay out the right number of
    components
    > on the screen for me based on a data source. I'm trying
    to set up the id
    > for each component dynamically like this:
    >
    > <mx:Repeater id="myRepeater"
    dataProvider="mySource">
    > <mx:Button id="{'myButton'+myRepeater.currentIndex}"
    > label="{myRepeater.currentItem.label}" />
    > </mx:Repeater>
    >
    > When I try to run the file, I get a compiler error
    > '{'myButton'+myRepeater.currentIndex}' is not a valid
    identifier.
    >
    > I need to be able to reference each of the repeated
    components. How can I
    > do this?
    >
    >
    >
    > A: If you give the component an ordinary id like this:
    > <mx:Button id="myButton"
    label="{myRepeater.currentItem.label}" />
    > Flex will create an Array for you called myButton that
    contains a
    > reference to each component the repeater created. For
    more information,
    > see Referencing Created Components here:
    >
    http://livedocs.adobe.com/flex/3/html/help.html?content=repeater_3.html
    >
    > From Amy's Flex FAQ. This FAQ gets posted weekly, and
    the latest version
    > of this FAQ is always available here (it just so happens
    this Q was added
    > this week, so it was not posted this Modnay):
    >
    >
    http://www.magnoliamultimedia.com/flex_examples/Amys_Flex_FAQ.pdf
    Correction: that should be "Referencing Repeated Components".
    HTH;
    Amy

  • Accessing a button in a Component from other component

    I have a two components Test_Interface.mxml & teacher_fullscreen. I called teacher_fullscreen.mxml from Test_Interface.mxml by
                  private var tfull:teacher_fullscreen = new teacher_fullscreen();
                  tfull.title = "Teacher Window";            
                  tfull.maximizable=true;             
                  tfull.systemChrome = 'none';
                  tfull.minWidth = 800;
                  tfull.minHeight = 600;             
                  tfull.open();              
    Now I created an instance of Test_interface in my 2nd mxml by
    public var par:Test_Interface=new Test_Interface();
    Actually, I wanted to disable a button in Test_interaface.mxml with id = "b1" from my 2nd mxml using the object created above.
    So I gave par.b1.enabled=false; It did not give any compile errors but during run time cannot access object or method of null reference sandbox error was returned for the statement par.b1.enabled=false. So how do I change the property of a button in one component from other. Please Help me.

    We need more information.
    1) Is this an AIR application?
    2) What is the name of the main app MXML file??
    3) Please boil this down to a minimal yet complete set of code files and post the entire code here for all files.
    I think based on what you mentioned you should be able to boil it down and post just a few lines of code for each file and the answer to your problem should come soon. But with the error you are getting it is too easy to make assumtions that may not reflect your situation.

  • Create a button in one component and use it in other component

    Hello, I have a problem(is not the first time but I don't have very clear that problem and I'm asking again). I'm creating a button in one component doing that
    Comp1:
    public var btn=Button;
    override public function main(args:IParams):void{
         var btn = new Button
        btn.label = ....
    And now I want to use this button in another component:
    Comp2:
    private var dia:Object; //It's my own object, it's a Dialog but with my properties,a dn the dialog need (button,string,boolean)
    private function onClick(event:Event):void{
                    dia = new Object(HERE I HAVE TO PASS THE BUTTON , "Tittle", false);
    I want know how can use the button that I have declared in the first component in my object. It's much more complicate but I have tried simplify my code.
    I hope that somebody can help me.
    Thanks!

    I'm sorry, probably I'm explainign wrong, I don't know if it's for my english or because I don't know how to say, but this is not the problem. I will put the code because I think that ou could understand better. Forget the buttons, the problem is the window parameter
    I'm very sorry because you're wasting time with me, but I hope that you can do the last try now with the code. If you don't understand something ask me before start thinking.
    MyModule
    <?xml version="1.0" encoding="utf-8"?>
    <AbstractVisualModuleExecutable
        xmlns:mx="http://www.adobe.com/2006/mxml">
        <mx:Script>
            <![CDATA[
                private var win:ITopComponent; //MY window
                private var dia:Dialog; //My Dialog
                override public function main(args:IParams):void{
                    win = initContext.environment.createTopComponent();
                    win.title = "Prueba Dialog"
                    win.contentPane = this;
                    win.visible = true;             
                private function onClick(event:Event):void{
                    dia = new Dialog(win, "Title", false); ((Here I use the window, because I have to say to the dialog who is her father. Win is the father or the dialog, the dialog will create when I do click in one button of my window(the father).
                    var btn2:Button = new Button();
                    btn2.label = "Cerrar";
                    btn2.addEventListener(MouseEvent.CLICK, function(event:Event):void{
                        dia.dispose();
                    dia.contentPane.addChild(btn2);
            ]]>
        </mx:Script>
        <mx:Button id="btn" click="onClick(event)" label="Dialog" />
    </AbstractVisualModuleExecutable>
    Now I want to divide this applicatión in one module and one component.
    MyNewModule (something like this):
    <mx:Script>
            <![CDATA[
                private var win:ITopComponent;
                private var dia:Dialog;
                //Here I create the window
                override public function main(args:IParams):void{
                    win = initContext.environment.createTopComponent();
                    win.title = "Prueba Dialog"
                    win.contentPane = this;
                    win.visible = true;               
    </Script>
    MyNewComponent (something like this):
    <Script>
              private var dia:Dialog;
             Here the instance of win I supose, but I don't know how. I have tried more than one thing
              private function onClick(event:Event):void{
                    dia = new Dialog(here the win, "Title", false); //here I want to use the win that I have created in MyNewModule, but I only get a null when I execute the module. I don't know how can I do, instance.top or something like this I suposse it.
                   //This part is not important
                    var btn:Button = new Button();
                    btn.label = "Cerrar";
                    btn.addEventListener(MouseEvent.CLICK, function(event:Event):void{
                        dia.dispose();
                    dia.contentPane.addChild(envio); //here I add the content of the dialog
                    //dia.contentPane.addChild(btn); //here I add only a button without content, but don't worry about that, like I said later this is not important. The import thing is how can I use win when I create the dialog.
                    dia.visible = true;
    </Script>
    <mx:Button id="toOpenDialod"  label="Open"  click="onClick(event)"/>
    THANKS!

  • Target a button inside of a Movie Clip

    I am trying to target a button inside a dynamically loaded
    movieclip, such as the following (but is not working):
    clipAnswerYesNo: Movieclip
    testbutton: embeded button
    Script is on main timeline.
    _root.clipAnswerYesNo.testbutton.onRelease = function() {
    trace(userAnswer);
    D

    ensure both the movieClip and the button have instance names.
    also, maybe change your trace to:
    trace("hit button"+userAnswer);
    it is possible that the trace and therefore the button is
    working, it's just the path to userAnswer is incorrect...

  • E.target on buttons

    Still learning after all of these years.
    I would like some help on this code section. It seems that only the last generated button can trace out.
    import fl.controls.Button;
    for (var i:int; i<5; i++) {
    var aButton:Button = new Button();
    addChild(aButton);
    aButton.label=String(i);
    aButton.toggle=true;
    aButton.move(50, i*aButton.height);
    aButton.addEventListener(MouseEvent.CLICK, buttonClick);
    function buttonClick(e:MouseEvent) {
    var button:Button=Button(e.target);
    trace(button.label);

    Generally flash only does what we tell it to do an not what we want it to do. You are telling flash to add one event listener and it is outside the loop (after the loop finishes) so that one listener is for the one last created aButton.
    Just move it inside the loop. Ned is correct.

  • Change Button text during component use of WDR_SELECT_OPTIONS

    Hello,
    I have implemented a WD component (WD for ABAP) by making use of component WDR_SELECT_OPTIONS. The selection screen is getting displayed. But the selection screen contains the button Copy, Check, Cancel and Reset.
    I want to rename the button tex "Copy" to "Search". Is it possible to do so?
    Please help!
    Thanks and Besd Regards,
    Maya

    Hi Maya,
    Unfortunately, this is not possible. There is also a translation bug while translating it from German into English. The button should have been translated into "Apply" instead of "Copy". This is issue is being addressed and should be fixed within one of the upcoming service packs.
    Nonetheless, there is a solution to your problem. Just hide the button (or the whole row) by calling method SET_GLOBAL_OPTIONS and add your own buttons below or above where you embed the SelectOptions component. The handler interface contains methods to reset the selection screen as well as for input validation.
    Kind regards,
    Thomas

  • Class Cast exception when clicking Search Button in Query component

    Hi
    We have to implement the Query component in ADF programmatically.. We are using Toplink as the Model layer for ADF.
    We followed the Web User Interface Guide for ADF development, Chapter 12 (Using Query Components) for the same.
    We already have implemented the following classes:
    1) QueryModel
    2) QueryDescriptor
    3) AttributeDescriptor
    4) ConjuctionCriterion
    5) AttributeCriterion etc.
    We are able to see the Search panel in UI with selected fields in Basic as well as Advanced mode.
    When we click on Search button, we are getting Class Cast exception.
    The stacktrace of the exception is below:
    <LifecycleImpl> <_handleException> ADF_FACES-60098:Faces lifecycle receives unhandled exceptions in phase INVOKE_APPLICATION 5
    javax.el.ELException: java.lang.ClassCastException: view.QueryDescriptorImpl cannot be cast to oracle.adfinternal.view.faces.model.binding.FacesCtrlSearchBinding$QueryDescriptorImpl
         at com.sun.el.parser.AstValue.invoke(Unknown Source)
         at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodExpression(UIXComponentBase.java:1300)
         at oracle.adf.view.rich.component.UIXQuery.broadcast(UIXQuery.java:116)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:902)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:313)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:186)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
         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:205)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
         at java.security.AccessController.doPrivileged(Native Method)
         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)
    Caused by: java.lang.ClassCastException: view.QueryDescriptorImpl cannot be cast to oracle.adfinternal.view.faces.model.binding.FacesCtrlSearchBinding$QueryDescriptorImpl
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlSearchBinding.processQuery(FacesCtrlSearchBinding.java:374)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         ... 44 more
    <RegistrationConfigurator> <handleError> ADF_FACES-60096:Server Exception during PPR, #1
    javax.el.ELException: java.lang.ClassCastException: view.QueryDescriptorImpl cannot be cast to oracle.adfinternal.view.faces.model.binding.FacesCtrlSearchBinding$QueryDescriptorImpl
         at com.sun.el.parser.AstValue.invoke(Unknown Source)
         at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodExpression(UIXComponentBase.java:1300)
         at oracle.adf.view.rich.component.UIXQuery.broadcast(UIXQuery.java:116)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:902)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:313)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:186)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
         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:205)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
         at java.security.AccessController.doPrivileged(Native Method)
         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)
    Caused by: java.lang.ClassCastException: view.QueryDescriptorImpl cannot be cast to oracle.adfinternal.view.faces.model.binding.FacesCtrlSearchBinding$QueryDescriptorImpl
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlSearchBinding.processQuery(FacesCtrlSearchBinding.java:374)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         ... 44 more
    Any help will be highly appreciated.
    Thanks in advance.
    Anup

    Gary Tam wrote:
    I am working on a project that utilize Oracle Ultra Search that will crawl and tag documents in the database.
    The initial code that uses pure JDBC was working fine, but when we switch to get database connection from dataSource, we are getting classCast exception inside Oracle's ultra search. The problems is that the class we get from dataSource.getConnection() returns
    "weblogic.jdbc.wrapper.JTSConnection_oracle_jdbc_driver_T4CConnection". But Oracle UltraSearch is not expecting that.
    Is there anyway to unwrap the connection that we get from dataSource ? I tried casting to OracleConnection,
    assign the connection to "oracle.jdbc.driver.T4CConnection" without any success.
    Any help would be appricated.
    ThanksHi Gary. If the code you want to run is running inside WebLogic, such as in a JSP,
    then look for our documentation on our JDBC extension 'getVendorConnection()". It
    will get you a direct Oracle connection for their mis-declared UltraSearch
    classes (they declare they take java.sql.Connection, but they really demand a
    concrete thin driver connection. No other Oracle driver will be given a chance).
    Joe

  • How to get the Search Button from RichQuery Component

    Hello All,
    How can I get the Search Button from RichQuery Componennt, I could do not locate from getChildren, getFacets
    any ideas ?
    Thank you,

    Not even able to get it from getViewRoot findComponent("clientId");
    which is not good, RichQuery component can be inside popup and I do not want to add an extra button just to close the popup window
    Any ideas ?
    Thank you,

  • How To Use a Custom Close Button In Window Component

    Hello,
    I have a window component, with the default close button
    turned off, and a new custom close button added to the movie clip
    that is displayed inside the window component. How do I get a click
    on the close button to close the window?
    This is the code I currently have to create the window (and
    the listeners to close the window using the default close button):

    basicalyyou have to use
    myWindow.deletePopUp();
    if my memory serves the content mc is loaded into a mc called
    contentHolder, inside the window component, so
    if you are referencing the window from the scope of your
    loaded mc it will be
    this._parent._parent.deletePopUp();
    or if from the button's scope
    this._parent._parent._parent.deletePopUp();
    try traceing the parantage down til you hit the window.

  • Challenge popup menu,  css stylesheet and button in table component

    Hello, in my last post i put the code of an example of popup menu but the only thing that need to run was a cdata tag. But in the example i only can open and close the popup menu in the top and left location that previously set in the css stylesheet .
    1.- I need to create a popup menu that can be diplayed if i click on a button in a table component of creator
    2.- The menu must waits and let me select the opcion I choose with a click otherrewise
    3.- The menu must dissapear if i move the cursor mouse away of the menu,
    I really need somebody helps me faster as u can, and i apreciate ur help, tnks!

    The best thing to do would be to find an existing popup menu widget in a JavaScript library, like dojo (dojotoolkit.org). If you can't find an existing JavaScript widget that fulfills your needs, you can write your own. It won't be easy, but you can use Creator's Auto Complete Text Field's JavaScript as a model. If that is the case, look at both the JavaScript at http://sunapp2.whardy.com/AjaxSamples2/faces/static/META-INF/autocomplete/script.js and the HTML source of the page located at http://sunapp2.whardy.com/AjaxSamples2/faces/DemoAutoCompleteTextField.jsp which is a page that is part of the Creator AJAX component catalog (http://developers.sun.com/ajax/componentscatalog.jsp).

  • Button in custom component not showing

    I made a very simple custom component with a TextField and Button but when I add multiple instances of it to a Layout, only the first Button shows up while the other show only when I focus the corresponding TextField. I'm quite new to fx and I'm not sure I did everything correctly but I don't see any obvious error in my code.
    The component:
    public class TestComponent extends BorderPane {
        @FXML
        private Button browseButton;
        @FXML
        private TextField textField;
        public TestComponent() {
            FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("TestComponent.fxml"));
            fxmlLoader.setRoot(this);
            fxmlLoader.setController(this);
            try {
                fxmlLoader.load();
            } catch (IOException exception) {
                throw new RuntimeException(exception);
    The fxml
    <?xml version="1.0" encoding="UTF-8"?>
    <?import java.lang.*?>
    <?import javafx.scene.control.*?>
    <?import javafx.scene.layout.HBox?>
    <fx:root type="javafx.scene.layout.BorderPane" xmlns:fx="http://javafx.com/fxml/1"
        xmlns="http://javafx.com/javafx/2.2">
        <center>
            <TextField fx:id="textField" prefWidth="200.0" />
        </center>
        <right>
            <Button fx:id="browseButton" mnemonicParsing="false" maxHeight="-Infinity"
                minHeight="-Infinity" prefHeight="${textField.height}" text="Browse"
                textAlignment="CENTER"  />
        </right>
    </fx:root>
    and the test code
    @Override
        public void start(Stage primaryStage) {
            VBox box = new VBox(5);
            box.setPadding(new Insets(5));
            TestComponent a = new TestComponent();
            TestComponent b = new TestComponent();
            TestComponent c = new TestComponent();
            box.getChildren().addAll(a, b, c);
            Scene scene = new Scene(box);
            primaryStage.setScene(scene);
            primaryStage.show();
    I'm running on Ubuntu with jdk-8-ea-bin-b111-linux-i586-10_oct_2013. I tested with jdk 1.7.0_40 and the buttons don't show.
    I'd include screenshots but the button to add images is disabled.
    Thanks for the help

    The issue is with the bind definition in the FXML, if you remove that definition, the buttons will display.
       prefHeight="${textField.height}"
    I think the binding is working, but when there is some kind of error (bug) in the layout process such that the scene is not automatically laid out correctly when the binding occurs.
    You can get exactly the same behaviour by removing the binding definition in FXML and placing it in code after the load.
                browseButton.prefHeightProperty().bind(textField.heightProperty());
    When the scene is initially displayed, the height of all of the text fields is 0, as they have not been laid out yet, and the browser button prefHeight gets set to 0 through the binding.
    That's OK and expected.
    Then the scene is shown and a layout pass occurs, which sets the height of the text fields to 26 and the prefHeight of all of the browser buttons adjust correctly.
    That's also OK and expected.
    Next the height of one of the buttons is adjusted via a layout pass.
    That's also OK and expected.
    But the height of the other buttons is not adjusted to match their preferred height (probably because a layout pass is not run on them).
    That is not OK and not expected (and I think a bug).
    If you manually trigger a layout pass on one of the components which did not render completely, the button will be displayed - but that should not be necessary.
    You can file a bug against the Runtime project at:
       https://javafx-jira.kenai.com/
    You will need to sign up at the link on the login page, but anybody can sign up and log a bug.
    Here is some sample code.
    import javafx.application.Application;
    import javafx.geometry.Insets;
    import javafx.scene.Scene;
    import javafx.scene.layout.VBox;
    import javafx.stage.Stage;
    public class ComponentTestApp extends Application {
      @Override
      public void start(Stage primaryStage) {
        VBox box = new VBox(5);
        box.setPadding(new Insets(5));
        TestComponent a = new TestComponent();
        TestComponent b = new TestComponent();
        TestComponent c = new TestComponent();
        box.getChildren().addAll(a, b, c);
        Scene scene = new Scene(box);
        primaryStage.setScene(scene);
        primaryStage.show();
        b.requestLayout(); // I don't understand why this call is necessary -> looks like a bug to me . . .
      public static void main(String[] args) {
        launch(args);
    import javafx.beans.value.ChangeListener;
    import javafx.beans.value.ObservableValue;
    import javafx.fxml.FXML;
    import javafx.fxml.FXMLLoader;
    import javafx.scene.control.Button;
    import javafx.scene.control.TextField;
    import javafx.scene.layout.BorderPane;
    import java.io.IOException;
    public class TestComponent extends BorderPane {
        private static int nextComponentNum = 1;
        private final int componentNum = nextComponentNum;
        @FXML
        private TextField textField;
        @FXML
        private Button browseButton;
        public TestComponent() {
          nextComponentNum++;
            FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("TestComponent.fxml"));
            fxmlLoader.setRoot(this); 
            fxmlLoader.setController(this); 
            try { 
                fxmlLoader.load();
                browseButton.prefHeightProperty().bind(textField.heightProperty());
                System.out.println(componentNum + " " + browseButton + " prefHeight " + browseButton.getPrefHeight());
                textField.heightProperty().addListener(new ChangeListener<Number>() {
                  @Override
                  public void changed(ObservableValue<? extends Number> observable, Number oldValue, Number newValue) {
                    System.out.println(componentNum + " " + textField + " height " + newValue);
                browseButton.prefHeightProperty().addListener(new ChangeListener<Number>() {
                  @Override
                  public void changed(ObservableValue<? extends Number> observable, Number oldValue, Number newValue) {
                    System.out.println(componentNum + " " + browseButton + " prefHeight " + newValue);
                browseButton.heightProperty().addListener(new ChangeListener<Number>() {
                  @Override
                  public void changed(ObservableValue<? extends Number> observable, Number oldValue, Number newValue) {
                    System.out.println(componentNum + " " + browseButton + " height " + newValue);
                    new Exception("Not a real exception - just a debugging stack trace").printStackTrace();
            } catch (IOException exception) {
                throw new RuntimeException(exception); 
    <?xml version="1.0" encoding="UTF-8"?>
    <?import java.lang.*?>
    <?import javafx.scene.control.*?>
    <?import javafx.scene.layout.HBox?>
    <fx:root type="javafx.scene.layout.BorderPane" xmlns:fx="http://javafx.com/fxml/1"
             xmlns="http://javafx.com/javafx/2.2">
        <center>
            <TextField fx:id="textField" prefWidth="200.0" />
        </center>
        <right>
            <Button fx:id="browseButton" mnemonicParsing="false" maxHeight="-Infinity"
                    minHeight="-Infinity" text="Browse"
                    textAlignment="CENTER"  />
            <!--<Button fx:id="browseButton" mnemonicParsing="false" maxHeight="-Infinity"-->
                    <!--minHeight="-Infinity" prefHeight="${textField.height}" text="Browse"-->
                    <!--textAlignment="CENTER"  />-->
        </right>
    </fx:root>
    Here is the output of the sample code:
    1 Button[id=browseButton, styleClass=button]'Browse' prefHeight 0.0
    2 Button[id=browseButton, styleClass=button]'Browse' prefHeight 0.0
    3 Button[id=browseButton, styleClass=button]'Browse' prefHeight 0.0
    1 Button[id=browseButton, styleClass=button]'Browse' prefHeight 26.0
    1 TextField[id=textField, styleClass=text-input text-field] height 26.0
    2 Button[id=browseButton, styleClass=button]'Browse' prefHeight 26.0
    2 TextField[id=textField, styleClass=text-input text-field] height 26.0
    3 Button[id=browseButton, styleClass=button]'Browse' prefHeight 26.0
    3 TextField[id=textField, styleClass=text-input text-field] height 26.0
    2 Button[id=browseButton, styleClass=button]'Browse' height 26.0
    java.lang.Exception: Not a real exception - just a debugging stack trace
      at testcomponent.TestComponent$3.changed(TestComponent.java:69)
      at testcomponent.TestComponent$3.changed(TestComponent.java:65)
      at com.sun.javafx.binding.ExpressionHelper$Generic.fireValueChangedEvent(ExpressionHelper.java:347)
      at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:80)
      at javafx.beans.property.ReadOnlyDoubleWrapper$ReadOnlyPropertyImpl.fireValueChangedEvent(ReadOnlyDoubleWrapper.java:177)
      at javafx.beans.property.ReadOnlyDoubleWrapper.fireValueChangedEvent(ReadOnlyDoubleWrapper.java:143)
      at javafx.beans.property.DoublePropertyBase.markInvalid(DoublePropertyBase.java:113)
      at javafx.beans.property.DoublePropertyBase.set(DoublePropertyBase.java:146)
      at javafx.scene.layout.Region.setHeight(Region.java:915)
      at javafx.scene.layout.Region.resize(Region.java:1362)
      at javafx.scene.layout.BorderPane.layoutChildren(BorderPane.java:583)
      at javafx.scene.Parent.layout(Parent.java:1063)
      at javafx.scene.Parent.layout(Parent.java:1069)
      at javafx.scene.Scene.doLayoutPass(Scene.java:564)
      at javafx.scene.Scene$ScenePulseListener.pulse(Scene.java:2341)
      at com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:329)
      at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:479)
      at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:460)
      at com.sun.javafx.tk.quantum.QuantumToolkit$13.run(QuantumToolkit.java:327)
      at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
    java.lang.Exception: Not a real exception - just a debugging stack trace
      at testcomponent.TestComponent$3.changed(TestComponent.java:69)
      at testcomponent.TestComponent$3.changed(TestComponent.java:65)
      at com.sun.javafx.binding.ExpressionHelper$Generic.fireValueChangedEvent(ExpressionHelper.java:347)
      at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:80)
      at javafx.beans.property.ReadOnlyDoubleWrapper$ReadOnlyPropertyImpl.fireValueChangedEvent(ReadOnlyDoubleWrapper.java:177)
      at javafx.beans.property.ReadOnlyDoubleWrapper.fireValueChangedEvent(ReadOnlyDoubleWrapper.java:143)
      at javafx.beans.property.DoublePropertyBase.markInvalid(DoublePropertyBase.java:113)
      at javafx.beans.property.DoublePropertyBase.set(DoublePropertyBase.java:146)
      at javafx.scene.layout.Region.setHeight(Region.java:915)
      at javafx.scene.layout.Region.resize(Region.java:1362)
      at javafx.scene.layout.BorderPane.layoutChildren(BorderPane.java:583)
      at javafx.scene.Parent.layout(Parent.java:1063)
      at javafx.scene.Parent.layout(Parent.java:1069)
      at javafx.scene.Scene.doLayoutPass(Scene.java:564)
      at javafx.scene.Scene$ScenePulseListener.pulse(Scene.java:2341)
      at com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:329)
      at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:479)
      at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:460)
      at com.sun.javafx.tk.quantum.QuantumToolkit$13.run(QuantumToolkit.java:327)
      at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
    1 Button[id=browseButton, styleClass=button]'Browse' height 26.0

  • Custom button in FPM component

    Hello experts,
    In a requirement i want to add custom button in FPM_OIF_COMPONENT. For this i followed following steps -
    1. In SE80 transaction open FPM_OIF_COMPONENT
    2. Select the requisite component configuration.
    3. Start Configurator.
    4. In configuration, enter component name & configuration ID then select option 'Continue in Display mode'.
    5. In display mode, in 'Additional Functions', select 'Create customization' or if configuration already exists, then select 'Edit Configuration'.
    6. In toolbar schema, I added one toolbar element as 'Other Function' and set the properties as enabled checked and visibility as 'Is Visible'.
    7. Save.
    8. After this to control the action of the new button, i added the action 'ZACT' in 'CNR_VIEW' by enhancing the view.
    9. In SPRO->SRM->Cross application basic settings->Extensions & fieldcontrol->Assign actions, i assigned the action to set type and business object.
    10. Then in SPRO->SRM->Cross application basic settings->Extensions & fieldcontrol->Control Actions->Configure control on header level, I added PDO action type, BO type, PDO action enabled, dynamic class & method to control the button visibility.
    After doing all the steps above, when i open the required window in SRM portal, I am unable to view the custom button added.
    Please let me know where i am going wrong.

    Hi Yayayi,
    You need to refer FPM event id of the corresponding button but not action id. As you said you have given FPM_EVENT_ID as ZACT, write the code in process event of component controller of  your WDP component in which IF_FPM_UI_BUILDING_BLOCK interface has been re-implemented.
    But dont forget to follow the below steps shown in snapshot.
    Hope this helps you.
    Thanks
    KH

Maybe you are looking for

  • Value displayed in the cube but not in BEx query

    Hi gurus, I have the field for no. of orders  (ANZAU) in the datasource 2LIS_11_VAHDR. It is displaying all the values in the column as '1' in the RSA3 and also in the cube but when the same field is selected in the query there is no display of value

  • Error MDX when executing WBI query with different prompt but same text

    Current version is BO XI 3.1 SP2 FP 2.6 Connected with SAP BI7 Identified problem : when using same text prompt in different filters, only the first one is correctly answered, the MDX code for following ones are not correctly generated : the engine u

  • Issue with Writeback in OBIEE 11g

    Hello, I have a created writeback report and it is working fine as of now .Now I changed the writeback template to use stored procedure to update the data.When I am trying to update integer columns it is working fine but when I try to update varchar

  • MRP creating additional purchase requisitions for the existing sales order

    Hi, We have scenario where we switch materials from POD material to ARP material. POD material is just like make to procurement which creates purchase requisition and purchase order upon saving the sales order. ARP (Auto replenishment) material creat

  • Commit Handling In RFC adapter

    hi... Can any one explain what is the commit Handling in RFC Adapter scenario venkat