Canvas Component Problem

Hi
I am using canvas component  and in order to refresh my page every time I am using show attribute in the root instead of creation Complete.
Thats working fine with all screens but in one Screen I am using canvas as the root and inside it I am using 4 canvas containers each of  which has many combos.In this case its restoring the previous values.Its not refreshing.
Now I need to refresh the page And all the combo must display the prompt as Select a value.Though I have given  the prompt attribute its not working.
Can Anyone Help Pls

Hi Divya,
Do you have the canvas component placed inside a ViewStack or else did you place the component within the main Application without including in the ViewStack container.
What about your other screens ...? You said for other screens show is working then where did you put those components...?
Try to post some sample code reproducing your problem.
Thanks,
Bhasker Chari

Similar Messages

  • Problem with Canvas component.

    Hello all,
    I am building a sort of flowcharting software using Swing. The software is standalone. The "flowcharting" component is a sort of canvas, However it does not extend the Canvas class from AWT, but rather extends a JComponent. The paint() method simpy says g.fillRect(color) and this produces the backdrop. Ok, to the point, every once in a while, some components or text will not render at all on this canvas. If if I were to close and load the flowchart, the same component will not render, and usually it is text with user defined fonts that will not render. I would say they render correctly on 80% of the machines on which it has been installed. It may be a font problem, but other text with the same exact font will render. Assuming that the components are instructed to render(I am fairly convinced of this) are there any possible reasons that these components will not render. All components render on my machine, and some will not render on other machines. Has anyone ever dealt with anything like this? Perhaps my canvas should actually subclass Canvas from AWT? Any feedback is much appreciated.
    Thanks.

    Thanks,
    Actually, this canvas overrides the JComponent class and is not an AWT Canvas component. A couple of things I did notice however....
    Maybe overriding JPanel would be more suitable.
    Currently the paint() method is being overridden as opposed to the paintComponent() method. I think overriding paintComponent would be the right thing to do.
    Thanks for help anyways.

  • Popup menu appears behind canvas component

    Has anybody encountered this problem?
    I attach the popup menu to the canvas component, like this:
    public void mousePressed(MouseEvent e)
         if (e.getSource() == psuCanvas && e.getButton() == MouseEvent.BUTTON3)
              pmenu.show((Component)psuCanvas, e.getX(), e.getY());
              contextText.setText("Right Click!!!");
    The popup menu is only visible when I click the edge of the Canvas component, that is how I know that the popup is actually showing but behind the Canvas component!!!
    Please help

    You mean your 1 step of calling "JPopupMenu.setDefaultLightWeightPopupEnabled(false);"?
    That method is meant specifically for using popup menus when you are mixing AWT and Swing components. The reason is because of the problem you first posted about. It's a way to get around that problem. But really, it's more of a hack that is used when dealing with old AWT-based components which you can't (or won't), for whatever reason, "update" to Swing versions. (Say from a 3rd-party library).
    It is not recommended to mix AWT and Swing components, as already mentioned. The provided link above is an article that explains the issues with this. The fact that you can doesn't mean you should.
    If you are writing this Canvas subclass yourself, and it's going to be typically used in a Swing application, you will have problems later, most likely. For example, why don't you try puting your Canvas class in a JScrollPane so you can make it bigger then the window and scrollable? You'll have scrollbar visibility issues. Fine, you can use java.awt.ScrollPane, I guess. Then I can think of several things one might do with JLayeredPanes which would create problems as well. And there is no simple "setDefaultLightWeightEnabled()" option to fix those.
    So eventually, as your app, or library, matures, you start running into these problems cuz you are using AWT components where you should be using Swing components, and you start making more hack-like fixes for all these problems like using setDefaultLightWeightPopupEnabled() and explicit sizing instead of layout managers and limiting yourself to what you can do with your components.
    That's why.

  • Calling a function every time a canvas component is viewed

    hi all,
    i have a function in a canvas component which i need to call
    every time i view that component. is there a way to generate an
    event each time a i view that component.. 'show' works only when
    the component turns from invisble to visible..
    thanx in advance

    the code is
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Canvas xmlns:mx="
    http://www.adobe.com/2006/mxml"
    xmlns:custom=".*"
    backgroundColor="#ccccccc" width="100%" height="100%"
    creationComplete="findCreatePermission(); addListeners();"
    show="findCreatePermission();"
    >
    <mx:Script>
    <![CDATA[
    private function findCreatePermission():void
    if(myPermission & 2)
    createPermission = true;
    else
    createPermission = false;
    ]]>
    </mx:Script>
    <mx:ViewStack id="mainStack" width="100%" height="100%"
    >
    <mx:Canvas id="mainCanvas"
    show="createPatient.visible=false;patientList.visible=true;sample2();">
    <mx:VBox width="100%" height="100%">
    <custom:patientInfo id="patientList" label="Room search"
    backgroundColor="#ECECD9" width="100%" height="100%"
    visible="true" />
    <mx:HBox horizontalAlign="center" width="100%" >
    <mx:Button id="create" label="Create New Patient"
    height="30" styleName="buttonBlue"
    enabled="{createPermission}"
    click="{mainStack.selectedChild=createPatient;}" />
    </mx:HBox>
    </mx:VBox>
    </mx:Canvas>
    <custom:create_patient id="createPatient" label="Create
    Patient" width="100%" backgroundColor="#ECECD9" visible="false"
    returnStack="{mainStack}" returnCanvas="{mainCanvas}"
    show="patientList.visible=false;createPatient.visible=true;"/>
    </mx:ViewStack>
    </mx:Canvas>
    i need to call findcreatePermission() every tme this
    component is viewed

  • Slow component problem (logon page, login - logout)

    Hi All,
    since some time i'm experiencing a "slow component" problem with EP.
    As a sympthom portal is slow during first logon page and during login - logout.
    Jarm trace report the situation below:
    Component Name     Avg Gross Time (ms)     Total Gross Time (ms)     Max Gross Time (ms)
    UME:SAPJ2EEAuthenticator:getLoggedInUser     90,045     450,226     n/a
    AppServer:Security:Authentication:LOGIN:com.sap.security.core.server.jaas.SPNegoLoginModule     90,023     450,116     n/a
    AppServer:Security:Authentication:FastLoginContext:login     90,022     900,229     n/a
    AppServer:Security:Authentication:LOGIN:com.sun.security.auth.module.Krb5LoginModule     90,006     450,031     n/a
    (90 seconds to load login page!!)
    Seems to be an UME problem, but logs are OK and the configuration is the same of other systems that work fine.
    Anyone has any idea ?
    Thanks guru !
    Lorenzo

    Hi,
    I am dealing with exactly the same problem. I hope you should have fixed this problem by now. Please help me fix mine.
    Many thanks in advance.
    Regards,
    Pawan.

  • Sun Team: Help who are suffering with component problem(It's your product)

    Why dont you help people who are facing problems using your IDE.
    People expect more from you and after all its your product. I do agree the pain you had in developing this IDE. But atleast take a look and try to rectify the problems facing in using IDE.We all have faith in you and leaving this message to take as a grant.Please do favour in calendar component problem. As i already posted a comment regarding this.
    Thank You in Advance,

    Hi there,
    Sorry about the inconvinience you are facing. We are trying our level best to answer all your issues as best as we can. But with the forum posts increasing exponentially, it very diffucult for us to catch up wih all.
    Please repost your problem again so we can help you.
    Also we do have inexpensive paid support options which will get you quicker responses.
    Please see
    http://developers.sun.com/prodtech/javatools/jscreator/support/index.jsp
    for details
    Thanks
    K

  • Problem displayin a picture in a Canvas Component

    Hello.
    I've a little problem of picture displaying, with this code:
    import java.awt.*;
    import java.awt.Image;
    import java.awt.Graphics;
    public class Terrain extends java.applet.Applet
         GridLayout terrain = new GridLayout(15,26);
         Image sol;
         Canvas c01_01;
         public void init()
              sol = getImage(getCodeBase(),"terrain.bmp");
              c01_01 = new Canvas();
              setLayout(terrain);
              add(c01_01);
         void paint(Canvas toto)
              toto.drawImage(sol, 0, 0, this);
    a classical "Cannot resolve symbol" error is returned, about the method drawImage. I don't understand why, cause the examples i read also use "this" as ImageObserver.
    If someone has an idea about that, it will be helpful.
    Thanks by advance!
    Ciao!

    You can trytoto.getGraphics ().drawImage (sol, 0, 0, toto);but it still won't work like you expected.
    Kind regards,
      Levi

  • Graph canvas size problem - missing rows

    Hi all,
    we have a simple horizontal bar graph based on a view, with just one total value pr. company showing.
    Problem is, if we set the canvas size too a small value, e.g. 400x400, then instead of resizing bars down so that all rows are shown, the graph starts to omit rows at the end!
    Even when enabling "Zoom and Scroll", we're still missing those rows.
    Only way to make sure all rows are displayed is to increase canvas size to a large enough value. Problem is, the number of rows is dynamic - so "big enough" might change over time....
    Is this a bug in the OBIEE graph component, or are we missing something here?
    Regards,
    -Haakon-

    hi,
    can anybody give me a hand.i'm in urgent!
    my request is how to display line graph according to the table rows.
    for example:in the table,i have 100 records(values),then the table range size is 10,so,each time when i scroll down the table,then graph will oso change to the another 10 records(values).
    while,i m adding the graph using jheadstart(10g).
    thank you very much.

  • 11.1.2: Declarative-component problem!

    Hi!
    We're just evaluating 11.1.2. I converted some declarative components to 11.1.2/Facelets style, but I am running into problems.
    As a test, I created some new components from scratch, confirming the issue.
    I create a declarative component and choose "Facelets" and choose "Use custom component class".
    JDeveloper then creates an entry in the jsf:
            <afc:component>
                <afc:display-name>testComponent</afc:display-name>
                <afc:component-class>component.TestComponent</afc:component-class>
                <afc:facet>
    ....After deployment, I just get an error. Facelets is reporting that there is no tag for "component-class", and examining component.taglib.xml in adf-richclient-impl-11.jar shows: Facelets is right! There is none!
    Now, I cannot just remove the component-class entry. If I do that, then deployment works, but then JDeveloper creates during compilation a wrong "TestComponentComponent" class (which should extend TestComponent but doesn't!).
    It just extends RichDeclarativeComponent, just like my original TestComponent class. All code in TestComponent is not available at runtime.
    RichDeclarativeComponent
       |
       |
    TestComponent    <---- This class is now for the birdsand
    RichDeclarativeComponent
       |
       |
    TestComponentComponent      <----- That class is used by the handlerIf I leave the component-class entry in, then - as expected - I get the correct hierarchy:
    RichDeclarativeComponent
       |
       |
    TestComponent
       |
       |
    TestComponentComponentbut the component doesn't run.
    So, now what? This cannot be the way it's supposed to work, can it. Manually edit the "component-class" stuff out of the jsf in the jar after deployment!?
    Edit: Created SR 3-3856944401: Facelets-based declarative component with custom component class not working
    Sascha
    Edited by: Sascha Herrmann on Jun 17, 2011 6:41 PM

    This is bug 12717940.
    Sascha

  • Smart Objects...changing canvas size problem

    When changing the canvas size of a smart object, the layer on the original document will distort visually since it doesn't update the size of the smart object.
    Is there a solution to this, or an easy way to quickly update every instance of the smart object on the original doc?
    To clarify: I know that you can change the dimensions of the smart object on the original doc and it'll fix it, my question is if there's a way to automatically have that happen and have the original doc smart objects respect your canvas size changes on the smart object doc.
    Reproduce:
    1) Draw a circle
    2) Turn it into a smart object
    3) Go into the smart object, change the canvas size by increasing the height of the canvas. The smart object should now have a circle with blank space above/below it.
    4) Save the smart object
    5) The circle on the original document will now be squished.
    I'm using Photoshop CS5

    xg3 wrote:
    When changing the canvas size of a smart object, the layer on the original document will distort visually since it doesn't update the size of the smart object.
    When you change the canvas size of a document the only layer that will change is a backgroung layer for it does not support transparency so its pixels will be changed.  However a background layer should not distort it may be cropped  and have canvas added in which case the color of the empty canvas can be set in the canvas size dialog.  All other layer including Smart Object layer should not chang at all.  Layer positioning in relationship to the canvas  and the new canvas size is set during the canvas size change.  Layers can be any size and have any aspect ratio. Their sizes can be smaller, the same or larger then the canvas size. Even layer that can fit  within a documents canvas size may be positioned so that all, some or none of the layer is over the documents canvas.
    I do not know what you mean when you write the original document chages. A smart object layer has an embedded copy of an object. The original document is not touched. You can open the smart object layer embedded object in  Photoshop by double clicking on the smart object icon in the layers palette smart object layer and change it size. And distort it f you wish. When you use Photoshop save. Photoshop will change the enbedded object in the smart object layer. You can also leave the embedded smaro object as is and change the smart object layer size and distort it using transform on the smart object layer itsself.
    I think what you did was to open the smart object in photoshop change its canvas saze then save it. The updated smart object is realy round but you dont see that it is becaue it is being transformec ti fit the original documents canvas. If you do a Canvas size on the codument you will see the original docyment canvas size is not change and thet your now squaching a now changed taller object into a shorter canvas.  With each Smart Obkect layer there is as associated transform.
    No I was wrong I just tried that and it looks like the transform was not the problem as yo can see I dir a Ctrl+T so you can see the size of the smart object layer is now biger then the original document and is positioned centered canvas is still 300x300 white area in image

  • File upload component problem

    hi,
    When i use fileupload component in my page, Turkish characters is not renderind and i see them as question mark. Changing page encoding is not working and solving my problem, too.
    any suggestion would be appreciated.
    Regards...

    I got exact the same problem, but with Chinese characters display. Does that means we can only use upload with English characters? Any solutions in the future?
    Thanks,

  • Creating Declarative Component problem.

    Dear all
    I use Jdeveloper 11.1.1.4.0.
    I am planing to create an ADF declarative Component.The component will be a panel collection layout which contains menu (Action>Export to excel) and command button (Add new record).
    The scenario will be like this:
    1- The developer will drag my new component (myCustomPanel) to his page and will drag the data control inside this comonent to create ADF Read only table.
    2- at runtime the table should appear surrounded by (myCustomPanel) and the user can use the "Action" menu to export the content to Excel, and can click on "Add new Record"to navigate to another page to add record.
    The solution I made is:
    in my "myCustomPanel" I created two attributes , the first one is "tableID" and the second is "targetPage" represents the outcome of the navigation to the "Add new record" page.
    The developer must provide these two attributes when using "myCustomPanel".
    The problem is:
    at runtime when the user click on "Add new record" button an error is raised .
    The error in this line:
    <af:commandToolbarButton text="Add" id="dc_ctb1" action="#{attr.targetPage}"/>
    the action property of the command button expects a managed bean. But i proved it with page attribute.
    I want to dynamicly provides the naviation outcome to the button using attribute name. Is this possible?
    regards

    Thank you so much for you replying.
    Your solution is helpful
    I tried to do the following :
    1- in my "customcomponent" project I removed the attribute "taregtPage"
    2- I added a method attribute
    name: targetPage
    method-signature: java.lang.String method()
    <af:componentDef var="attrs" componentVar="component">
        <af:panelCollection id="collection">
          <f:facet name="menus">
            <af:menu text="Action" id="dc_m1">
              <af:commandMenuItem text="Export To excel" id="dc_cmi1"/>
            </af:menu>
          </f:facet>
          <f:facet name="toolbar">
            <af:toolbar id="dc_t1">
              <af:commandToolbarButton text="Add" id="dc_add"
                                       action="#{attrs.targetPage}"/>
            </af:toolbar>
          </f:facet>
          <f:facet name="statusbar"/>
          <af:facetRef facetName="tableContent"/>
        </af:panelCollection>
        <af:xmlContent>
          <component xmlns="http://xmlns.oracle.com/adf/faces/rich/component">
            <display-name>dhamanTable</display-name>
            <facet>
              <facet-name>tableContent</facet-name>
            </facet>
            <attribute>
              <attribute-name>tableID</attribute-name>
              <attribute-class>java.lang.String</attribute-class>
              <required>true</required>
            </attribute>
            <component-extension>
              <component-tag-namespace>dhaman.custom</component-tag-namespace>
              <component-taglib-uri>/componentLib</component-taglib-uri>
              <method-attribute>
                <attribute-name>targetPage</attribute-name>
                <method-attribute>
                  <attribute-name>targetPage</attribute-name>
                  <method-signature>java.lang.String method()</method-signature>
                </method-attribute>
                <required>false</required>
              </method-attribute>
            </component-extension>
          </component>now My question is how to use it?
    I do not understand this
    action="#{component.handleTargetPage}" Do you mean that i will create amanaged bean "component" and add a methos "handleTargetPage"??
    Edited by: ta**** on Mar 9, 2011 1:58 PM
    Edited by: ta**** on Mar 9, 2011 2:00 PM
    Edited by: ta**** on Mar 9, 2011 2:01 PM

  • Custom Tag -- Custom Component problems with iframes

    I have a "project" component that originally iterated over a list of models and created/renderered the corresponding (and fairly complex) interactive UI components for those models. On the client-side, the output from these were then organized neatly into "tabs" via CSS ... all on one page. Since these UI Components are so hefty, when any iteraction was done on one of them, the whole page had to re-render and things got just plain slow. To get around this limitation, I decided to have my "project" component no longer create the UI components himself, but instead generate an IFRAME that points to a page that will generate a single component. This way, any iteraction will just cause that single IFRAME to refresh.
    Due to the fact that an IFRAME can only be populated by using the src attribute, I have created a page that contains a JSF View (<faces:view>) and inside is a single custom tag of mine (<mine:displayView>). Let's call this page singleDisplayView.jsf. I create iframes that point to singleDisplayView.jsf with different request params for each (singleDisplayView.jsf?modelName=Foo, singleDisplayView.jsf?modelName=Bar, etc.)
    The displayView tag has one attribute called requestQueryString and I use the tag like so:
    <t:displayView requestQueryString="<%=request.getQueryString()%>" />The displayView tag's class is DisplayViewTag. In DisplayViewTag::setProperties(UIComponent uiComponent) method, I get the model name out of the request map and set this property on the UIComponent.
    The problem is that I'm noticing that as the main page (that contains these frames) loads, setProperties() is only being called twice. After that, the components created by subsequent iframes just seem to be using the modelName from the second frame.
    Is there a syncronization issue I don't understand?
    Any ideas?
    Any help would be much appreciated.
    Thanks in advance,
    Mark

    On a possibly related note, I read this in an article of the JSF application lifecycle:
    In the first phase of the JSF lifecycle -- restore view -- a request comes
    through the FacesServlet controller. The controller examines the request and
    extracts the view ID, which is determined by the name of the JSP page.Could it be that the lifecycle is trying to reuse components from a single view, since all these iframes are pointing to the same page?

  • FLVplayback component problem

    my flash movie contains FLVPlayback component to play videos.
    In the begining of the movie( frame 1) I have a simple pre-loader.
    When I test my swf on a browser the pre-loader appear only after
    few second, not immediately. (my pre-loader start from 40%). I
    think the reason is that flash load the FLVPlayback component on
    the first frame although my component appears only on the second
    frame . Is there any work around this issue?
    Thanks

    I am having the exact same problem. Thanks for info that this
    is caused by movie being the same size as the stage. I am also
    working on a solution and will let you know if I find one.

  • COM Component problem with BPC Excel

    Hi!
    We are using BPC MS 7.5 service pack 3 version. Microsoft Office 2007
    On one of our client machines we got problem when trying to enter BPC for excel,nothing appears and something is downloading showing Installing COM Component from http://activex.microsoft.com/objects/ocget.dll site. And after a while Excel is shut down.
    It´s the same errro entering from Launch Page or Log on from native Excel.
    We have already tried uninstalling and installing BPC client and uninstalling and installing Microsoft Office on this specific client machine with the problem.
    Regards
    Fredrik

    This was solved by this Microsoft fix:
    http://support.microsoft.com/kb/323207/en-us

Maybe you are looking for

  • Problem with flash banners in browser

    I have a very frustrating problem with my browser (any browser) opening a flash banner.  On my website we have a rotating flash banner and when I open it all four banners open at the same time.  It happens on several pages, but not in every page with

  • Neo2 Platinum and X2 4800+ Wont POST

    Alright, so I am have a really interesting problem that some of you may have possibly had or are having.  I just upgraded my FX-53 (Revision CG) to a X2 4800+ (Revision E6) and I am having a issues getting to board to post.  I just flashed my bios wi

  • TS4006 How can I locate my phone after swiping the data?

    Got my phone stolen, swiped it with Find My Phone. Need help locating it now.

  • Where can I get replacement software?

    I recently bought a used Macbook Pro but did not get the software, is there any place I can go to get replacement disks? The laptop had been slicked before I took possesion to ensure no personal data was on the hard drive.

  • PO approver not notified. Was: Doubt in Authorisation

    Hi, I have created PO. I want to know who are all the apporvers for that. Next i need to find out now approval is pending with which approver. One approver is saying still he not received any notification for a particular PO.(he is the approver for t