Redraw a TextField during an addActionListener's execution

I'm new to swing, but what I have is a JFrame which contains 4 buttons named A,B,C and D (original I known) and 1 JTextField T
I have the main code:
JFrame f = new JFrame("ContentServer 7.02 Jumpstart Kit");
<some setup code for teh buttons>
JTextField tf2 = new JTextField("", 20);
tf2.setText("Jumpstart Kit Idle");
f.add(tf2);
DisplayTextStatus al = new DisplayTextStatus(tf2);
buttonA.addActionListener(al);
buttonB.addActionListener(al);
buttonC.addActionListener(al);
buttonD.addActionListener(al);
I have an action listener which works for all the buttons that looks like:
class DisplayTextStatus implements ActionListener {
private JTextField tf;
public DisplayTextStatus(JTextField tf) {
this.tf = tf;
so the JTextField is passed into the actionhandler, when the event finishes the JTextField gets updated by:
tf.setBackground (Color.gray);
tf.setText("Kit Newly Configured");
However the the code actually contains 2 updates to the TextField
<random code>
tf.setBackground (Color.red);
tf.setText("In progress");
<random code which takes about 5 minutes>
tf.setBackground (Color.gray);
tf.setText("Kit Newly Configured");
<end of event>
The middle update to the JTextField is not taken, as it appears that the JFRAME is only updated when the action finishes, I need to update this before the action completes . How is this done?
Thanks,
ERIC

Hi,
The important thing to remember about Swing is that it does its painting on the same thread as events are handled on (the Event Dispatch Thread or EDT). In your button event handler you configure the text field, do 5 minutes worth of work, then configure the text field again. The updates to text field are queued up on the EDT and thus will take place after the event handler is done, which is after your 5 minutes of work is completed.
To keep your UI responsive you need to keep your heavy processing off the EDT. Search for SwingWorker, read the API for JProgressBar, and look here:
http://java.sun.com/docs/books/tutorial/uiswing/components/progress.html
Paul
p.s. use the code tags around your source code when posting. And offer up some Dukes too :)

Similar Messages

  • How to find which SAP R3 table are read during SAP R3 extractor execution ?

    Hi Colleagues,
    I would like to know which sap r3 table are read during the execution of a sap r3 extractor ?
    1. I execute 2lis_03_bf extractor
    2- I select debug mode
    3. I put a break-point statement at abap command : select
    I just see the program going to technical table, mara table and user exit from.
    I am sure that this extractor read also MBEW table but I did not found it during the execution of the debug mode.
    Can someone help me ? What should I do to see from which table the extractor 2lis_03_bf extractor is retrieving data ?
    Thanks !

    HI Hanson,
    You maynot directly hit the source table when you debug a LO Extractor, as you should be aware that the data
    is read as below in case of a LO datasources ,
    INIT or FULL load --> from Setup tables
    Delta                    --> from the delta queue
    Also finding the Source table fora LO extractor is simple as you check the EC pool and understand that , check the
    below blog for more details
    /people/sap.user72/blog/2005/09/05/sap-bw-and-business-content-datasources-in-pursuit-of-the-origins
    But you can try with any other BI content extractor, for examle if you take a 0FI_AP_4
    you find the table BSIK and BSAK are being read using FM
    Regards,
    Sathya

  • Force redraw of TextField

    Hi,
    made a prototype which contains some TextFields. If I added text in textfield 0 the cursor jumps automatically to textfield 1 and so no. Problem is now, that sometimes the entered letter in a textfield is not displayed. The text was set to the textfield correctly, but the textfield shows only a white area. If the textfield gets the cursor, the content is displayed. Looks like a refresh problem? How can I force the redraw of a textfield?
    Regards
    Oliver
    Edited by: opfl on 30.07.2012 06:12

    Have to explain my use case in more detail. I do not use scenebuilder for this. My aim is to create a textfield on which I can style each character. The standard textfield does not support this and the HTMLEditor or WebView I have to deal with the html stuff and the text gets mixed up with html and content.
    So I wrote a little prototype....a Region Contains a HBox in which I create TextFields. One text field for earch character. Now I have to implement some behaviour like arrow keys, delete...
    It works so far, but randomly there are some text fields which are displaying not the character. The text field gets updated when I set the cursor in it.
    But I have observed something with the visually empty text fields. There are some pixels on the left side of the text field. So I suggest that the text field show the right end of the content. E. g. there is "d" in the field....in the case that I see nothing, the zone after the d is shown. If I select the content of the text field, the text field view show the d correctly. I have no idea to say the text field "show me the 1st position of the string". This would be sufficient because in my case there is only 1 character inside the field.

  • Redraw a JPanel during runtime

    Hi there,
    Im trying to redraw a whole JPanel during runtime.
    So basically I have this panel:
    public JPanel panel1 = new JPanel() {
         public void paintComponent(Graphics g) {
               super.paintComponent(g);
    }That panel is added to my JFrame during initialisation.
    I added an actionListener to a JButton that creates a whole new JPanel
    Then i try to set the default (panel1) to the new generated JPanel:
    public void actionPerformed(ActionEvent e) {
         if(e.getSource().equals(myButton)) {
         JPanel newPanel = generateNewPanel();
         panel1 = newPanel;
         panel1.validate();
         panel1.repaint();
    }After i done all that, it didn't redraw the jpanel
    Please advise on what I have gotten wrong.
    Thanks
    Edited by: Ruski on Mar 10, 2009 1:35 PM

    To be honest i recommend not using netbeans to code gui for a long term project which relies on code. NetBeans is useful - only for creating gui stubs and for throwaway gui prototypes but not in the long run, which is of my own experience. To be fair i have many years of coding gui's way back in the days when awt only started up.
    i know gui in java is "crap" because of it's repeated code and tedious mechanism to generate ui windows so to do that you might as well hard code it yourself using a proper or better IDE - "ECLIPSE" or any linux based code editors are good also. This way you learn much more about guis.

  • Writing variable value to a textfield during(not at the end of script) script.

    Hi,
    May be this is a stupid question, but I need to know the answer.
    The question is
    Is it possible to write a variable's value to a text field or numeric field during or in the middle of a script, not like at the end of script. Actually I found that live cycle designer forms writes values to fields when event script finishes.
    I tried on a click even of a button.
    TextField1.rawvalue  = "5" ;
    xfa.host.messageBox("test message");
    But code shows alert message first and then writes the value afterwards. When alert windows pops up text field is having old value or say blank.
    Thanks
    Arvind

    Hi Arvind
    You could try using the layout:ready event, you just need some way of working out what the next step is, maybe for form variable you can increment each time the layout:ready event is called so you know to write out the next thing.  There is an example of this in a sample here Adobe LiveCycle Designer Cookbooks by BR001: Season Planner (or Year Planner) PDF Template
    Regards
    Bruce

  • Error during dunning smart form execution

    Hello Experts,
                      I have a requirement to develop a smartform for dunning when i copied the standard program 'F150_DUNN_SF' and made some changes to windows and tried executing it.Its throwing me an error 'Printing dunning notices using SMARTFORMS,error during parameter transfer' i am wondering how to find the error. Even in F150 also its showin an error saying  'Form XXX language EN is not active and has no errors'.Please let me know how i can solve this erros.
    Thanks,
    Vijay Simha CR

    Hi,
    Did you copied that from 000 client and select the language en.If this is already done then please check the configurations settings.if still there is any issue please post.
    Regards,
    Madhu.

  • High cpu usage during JSF lifecycle phase execution

    In our performance test we encountered a high cpu usage (100%) and the thread dumps indicated that most of the times the threads are either executing restore view or render response phase of the JSF lifecycle or they are blocked while accessing the jar files which containing the xhtml pages.
    One of the thread dump of a runnable thread is
    java.lang.Thread.State: RUNNABLE
    at java.util.HashMap.get(HashMap.java:317)
    at javax.faces.component.ComponentStateHelper.get(ComponentStateHelper.java:174)
    at javax.faces.component.ComponentStateHelper.add(ComponentStateHelper.java:216)
    at javax.faces.component.UIComponent.setValueExpression(UIComponent.java:436)
    at com.sun.faces.facelets.tag.jsf.CompositeComponentTagHandler$CompositeComponentRule$CompositeExpressionMetadata.applyMetadata(CompositeComponentTagHandler.java:631)
    at com.sun.faces.facelets.tag.MetadataImpl.applyMetadata(MetadataImpl.java:81)
    at javax.faces.view.facelets.MetaTagHandler.setAttributes(MetaTagHandler.java:129)
    at javax.faces.view.facelets.DelegatingMetaTagHandler.setAttributes(DelegatingMetaTagHandler.java:102)
    at com.sun.faces.facelets.tag.jsf.CompositeComponentTagHandler.setAttributes(CompositeComponentTagHandler.java:246)
    at com.sun.faces.facelets.tag.jsf.CompositeComponentTagHandler.applyNextHandler(CompositeComponentTagHandler.java:184)
    at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:184)
    at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
    at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)
    at com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:93)
    at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)
    at com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:86)
    at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:308)
    at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:367)
    at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:346)
    at com.sun.faces.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:199)
    at com.sun.faces.facelets.tag.ui.IncludeHandler.apply(IncludeHandler.java:120)
    at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)
    at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:184)
    at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
    at com.sun.faces.facelets.tag.ui.DefineHandler.applyDefinition(DefineHandler.java:107)
    at com.sun.faces.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:178)
    at com.sun.faces.facelets.impl.DefaultFaceletContext$TemplateManager.apply(DefaultFaceletContext.java:395)
    at com.sun.faces.facelets.impl.DefaultFaceletContext.includeDefinition(DefaultFaceletContext.java:366)
    at com.sun.faces.facelets.tag.ui.InsertHandler.apply(InsertHandler.java:112)
    at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)
    at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)
    at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:184)
    at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
    at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)
    at com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:93)
    at com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:86)
    at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:308)
    at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:367)
    at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:346)
    at com.sun.faces.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:199)
    at com.sun.faces.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:155)
    at com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:93)
    at com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:86)
    at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:308)
    at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:367)
    at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:346)
    at com.sun.faces.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:199)
    at com.sun.faces.facelets.tag.ui.IncludeHandler.apply(IncludeHandler.java:120)
    at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)
    at com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:93)
    at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)
    at com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:86)
    at com.sun.faces.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:152)
    at com.sun.faces.application.view.FaceletViewHandlingStrategy.buildView(FaceletViewHandlingStrategy.java:774)
    at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:100)
    at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
    at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)
    at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1550)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:343)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)while a thread trace for a blocked thread is
    java.lang.Thread.State: BLOCKED (on object monitor)
    at java.util.zip.ZipFile.getEntry(ZipFile.java:302)
    - waiting to lock <0x00000000c0f678f8> (a java.util.jar.JarFile)
    at java.util.jar.JarFile.getEntry(JarFile.java:225)
    at java.util.jar.JarFile.getJarEntry(JarFile.java:208)
    at sun.misc.URLClassPath$JarLoader.getResource(URLClassPath.java:817)
    at sun.misc.URLClassPath$JarLoader.findResource(URLClassPath.java:795)
    at sun.misc.URLClassPath.findResource(URLClassPath.java:172)
    at java.net.URLClassLoader$2.run(URLClassLoader.java:551)
    at java.net.URLClassLoader$2.run(URLClassLoader.java:549)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findResource(URLClassLoader.java:548)
    at java.lang.ClassLoader.getResource(ClassLoader.java:1138)
    at java.lang.ClassLoader.getResource(ClassLoader.java:1133)
    at org.glassfish.web.loader.WebappClassLoader.getResource(WebappClassLoader.java:1156)
    at org.glassfish.web.loader.WebappClassLoader.getResourceFromJars(WebappClassLoader.java:1111)
    at org.apache.catalina.core.StandardContext.getMetaInfResource(StandardContext.java:7586)
    at org.apache.catalina.core.StandardContext.getResource(StandardContext.java:6979)
    at org.apache.catalina.core.ApplicationContext.getResource(ApplicationContext.java:382)
    at org.apache.catalina.core.ApplicationContextFacade.getResource(ApplicationContextFacade.java:260)
    at com.sun.faces.context.ExternalContextImpl.getResource(ExternalContextImpl.java:502)
    at com.sun.faces.application.resource.WebappResourceHelper.getURL(WebappResourceHelper.java:119)
    at com.sun.faces.application.resource.ResourceImpl.getURL(ResourceImpl.java:190)
    at com.sun.faces.facelets.tag.jsf.CompositeComponentTagHandler.applyCompositeComponent(CompositeComponentTagHandler.java:366)
    at com.sun.faces.facelets.tag.jsf.CompositeComponentTagHandler.applyNextHandler(CompositeComponentTagHandler.java:191)
    at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:184)
    at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
    at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)
    at com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:93)
    at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)
    at com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:86)
    at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:308)
    at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:367)
    at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:346)
    at com.sun.faces.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:199)
    at com.sun.faces.facelets.tag.ui.IncludeHandler.apply(IncludeHandler.java:120)
    at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)
    at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:184)
    at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
    at com.sun.faces.facelets.tag.ui.DefineHandler.applyDefinition(DefineHandler.java:107)
    at com.sun.faces.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:178)
    at com.sun.faces.facelets.impl.DefaultFaceletContext$TemplateManager.apply(DefaultFaceletContext.java:395)
    at com.sun.faces.facelets.impl.DefaultFaceletContext.includeDefinition(DefaultFaceletContext.java:366)
    at com.sun.faces.facelets.tag.ui.InsertHandler.apply(InsertHandler.java:112)
    at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)
    at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)
    at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:184)
    at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
    at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)
    at com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:93)
    at com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:86)
    at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:308)
    at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:367)
    at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:346)
    at com.sun.faces.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:199)
    at com.sun.faces.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:155)
    at com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:93)
    at com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:86)
    at com.sun.faces.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:152)
    at com.sun.faces.application.view.FaceletViewHandlingStrategy.buildView(FaceletViewHandlingStrategy.java:774)
    at com.sun.faces.application.view.StateManagementStrategyImpl.restoreView(StateManagementStrategyImpl.java:223)
    at com.sun.faces.application.StateManagerImpl.restoreView(StateManagerImpl.java:188)
    at com.sun.faces.application.view.ViewHandlingStrategy.restoreView(ViewHandlingStrategy.java:123)
    at com.sun.faces.application.view.FaceletViewHandlingStrategy.restoreView(FaceletViewHandlingStrategy.java:453)
    at com.sun.faces.application.view.MultiViewHandler.restoreView(MultiViewHandler.java:148)
    at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:192)
    at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
    at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:116)
    at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)
    at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1550)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:343)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)We use glassfish 3.1.1 as our application and the project_stage property is set to System_test. I would like to get suggestions on how should I investigate this further. Is this a normal behavior? Does glassfish provide an alternative for resolving blocked threads like some caching mechanism for resources etc?
    Thanks in advance

    Nik wrote:
    Even if it is legal, have you tried moving them out of there (just to pinpoint a possible bug since the stacktrace indicates a wait on a jar file)?Indeed. If that clears up the issue it is good information to put in a JSF bug report (which may even cascade to the Glassfish level).
    Putting resources in a jar file is only really useful when you want to share those resources among different web applications, which should be a rare case. Even when it happens I would probably still choose to simply copy the resources so they are individually managed and you don't get unnecessary dependencies between applications. Just because something is technically possible doesn't make it a good idea.

  • Error during SWN _ SELSEN  execution for exteneded mail notification

    Hi,
    I have configured all the requried settings for extended mail notification in SWNCONFIG. But when i execute SWN _ SELSEN I am getting an error'CX_OS_INTERNAL_ERROR'.
    More details are below
    "UNCAUGHT_EXCEPTION" "CX_OS_INTERNAL_ERROR"
    "CL_OS_SYSTEM==================CP" or "CL_OS_SYSTEM==================CM00L"
    "OS_GET_CLASS_AGENT_BY_REF"
    Version        : 2.0                                                   
    Precondition   : I_OBJECT is not initial and an instance of a          
                     persistent class.                                     
    Postcondition  : The class agent is active.                            
    OO Exceptions  : propagates GET_CLASS_AGENT, CX_OS_INTERNAL_ERROR      
    Implementation :                                                       
    Changelog:                                                             
    - 20010106 : (SB) Initial version                                      
    - 20050209 : (SB) Check for initial reference added.                   
    data DESCR_REF          type ref to CL_ABAP_TYPEDESCR.                 
      data CLASS_KEY          type SEOCLSKEY.                                
      data CLASS_NAME         type STRING.                                                                               
    Get classname                                                          
      call method CL_ABAP_TYPEDESCR=>DESCRIBE_BY_OBJECT_REF                  
        exporting                                                            
          P_OBJECT_REF = I_OBJECT                                            
        receiving                                                            
          P_DESCR_REF  = DESCR_REF                                           
        exceptions                                                                               
    Please let us know if u have any suggestion to resolve this issue.

    Hi,
    I have configured all the requried settings for extended mail notification in SWNCONFIG. But when i execute SWN _ SELSEN I am getting an error'CX_OS_INTERNAL_ERROR'.
    More details are below
    "UNCAUGHT_EXCEPTION" "CX_OS_INTERNAL_ERROR"
    "CL_OS_SYSTEM==================CP" or "CL_OS_SYSTEM==================CM00L"
    "OS_GET_CLASS_AGENT_BY_REF"
    Version : 2.0
    Precondition : I_OBJECT is not initial and an instance of a
    persistent class.
    Postcondition : The class agent is active.
    OO Exceptions : propagates GET_CLASS_AGENT, CX_OS_INTERNAL_ERROR
    Implementation :
    data DESCR_REF type ref to CL_ABAP_TYPEDESCR.
    data CLASS_KEY type SEOCLSKEY.
    data CLASS_NAME type STRING.
    Get classname
    call method CL_ABAP_TYPEDESCR=>DESCRIBE_BY_OBJECT_REF
    exporting
    P_OBJECT_REF = I_OBJECT
    receiving
    P_DESCR_REF = DESCR_REF
    exceptions
    Please let us know if u have any suggestion to resolve this issue.
    Attachment: Error.doc

  • Region Id during PL/SQL Region Execution

    If I have a region that has a source type of PL/SQL anonymous block, is there any way to obtain the currently executing region id?
    Attempting to use replacement strings in the PL/SQL source does not work (e.g. htp.p( '#REGION_ID#') ; ). It is interesting to note that the region header and region footer of the region definition will both properly replace the #REGION_ID#.

    Basically what it comes down to is that I am a developer of a framework that sits on top of APEX and it would be a better work process if I didn't have to instruct others to come up with a unique id per page for their regions and then copy it into a function call within their PL/SQL source.
    Using the static id is my current solution and you are right it is serviceable. I would however prefer to use the region id as it would fulfill my needs, provide an elegant solution, and reduce maintenance time costs later due to possible human error.

  • Setting step error during Post-Step substep execution

    There is custom step type, which defines Post-Step substep:
    void __declspec(dllexport) __stdcall PostStep(struct IDispatch* pSeqContextDisp)
    AFX_MANAGE_STATE(AfxGetStaticModuleState());
    PropertyObjectPtr spThisContext=pSeqContextDisp;
    try
    return PostStepEx(spThisContext);
    catch(_com_error& xComErr)
    void PostStepEx(PropertyObjectPtr& spThisContext)
    SequenceContextPtr spSeqContext=spThisContext;
    StepPtr spStep=spSeqContext->GetStep();
    PropertyObjectPtr spResultStep=spStep->AsPropertyObject();
    bool fSomeCondition=false;
    // Evaluate fSomeCondition
    if(fSomeCondition)
    spResultStep->SetValBoolean("Result.Error.Occurred", 0, VARIANT_TRUE);
    spResultStep->SetValString ("Result.Error.Msg", 0, "Some error message");
    spResultStep->SetValNumber ("Result.Error.Code", 0, -1);
    return;
    // Continue ...
    When step of this custom step type is beeing executed and fSomeCondition evaluated to true, the error is displayed:
    Details:
    "Error executing substep 'Post'.
    Some error message"
    How to instruct TestStand to not to add prefix "Error executing substep 'Post'." ?
    thanks.misha

    Hello Misha,
    If you do not want the "Error executing substep 'Post'." string added to the beginning of your error message, you could use the following method. 
    You can set only the Error message (Error.Msg) and Error code (Error.Code) and not the Error Occurred Flag (Error.Occurred) in the post step code module.  In the post-expression of that step, you can then detect whether the error code is non-zero and set the Error.Occurred flag to True if necessary.  See the screen shot below.
    Let me know if you have any questions implementing this solution.
    Message Edited by JettR on 03-27-2008 02:00 PM
    Best Regards,
    Software Engineer
    Jett R
    Attachments:
    ScreenShot.jpg ‏88 KB

  • AD-OID synchronisation  Agent Execution Successful, Mapping/IMPORT operati

    Hi
    We are trying the AD-OID synchronization,using ActiveImport profile.
    The bootstrap is successful. But synchronization status is Agent Execution Successful, Mapping/IMPORT operation Failure.
    Attaching the trace file for import :
    LDAP Connection success
    Writer Initialised!!
    MapEngine Initialised!!
    Filter Initialised!!
    searchF :
    searchF : objectclass=*
    [LDAP: error code 12 - 00000057: LdapErr: DSID-0C09065D, comment: Error processing control, data 0, vece]
    ActiveImport:Error in Mapping EngineODIException: DIP_GEN_SEARCH_EXCEPTION
    ODIException: DIP_GEN_SEARCH_EXCEPTION
         at oracle.ldap.odip.gsi.ActiveReader.searchChanges(ActiveReader.java:303)
         at oracle.ldap.odip.engine.AgentThread.mapExecute(AgentThread.java:395)
         at oracle.ldap.odip.engine.AgentThread.execMapping(AgentThread.java:278)
         at oracle.ldap.odip.engine.AgentThread.run(AgentThread.java:165)
    ActiveImport:about to Update exec status
    Updated Attributes
    orclodipLastExecutionTime: 20070117121046
    orclOdipSynchronizationStatus: Mapping Failure, Agent Execution Not Attempted
    orclOdipSynchronizationErrors: Failure During Search
    Ending Mapping execution.
    null
    Error in proxy connection : ODIException: DIP_GEN_AUTHENTICATION_FAILURE
    ODIException: DIP_GEN_AUTHENTICATION_FAILURE
         at oracle.ldap.odip.gsi.LDAPConnector.proxyConnectAs(LDAPConnector.java:350)
         at oracle.ldap.odip.engine.AgentThread.updateExecStatus(AgentThread.java:607)
         at oracle.ldap.odip.engine.AgentThread.run(AgentThread.java:208)
    Updated Attributes
    orclodipLastExecutionTime: 20070117121047
    orclOdipSynchronizationStatus: Agent Execution Successful, Mapping/IMPORT operation Failure
    orclOdipSynchronizationErrors: Agent Execution Successful, Mapping/IMPORT operation Failure
    null
    Error in updating the statusODIException: DIP_GEN_AUTHENTICATION_FAILURE
    ODIException: DIP_GEN_AUTHENTICATION_FAILURE
         at oracle.ldap.odip.gsi.LDAPConnector.proxyConnectAs(LDAPConnector.java:350)
         at oracle.ldap.odip.engine.AgentThread.updateExecStatus(AgentThread.java:680)
         at oracle.ldap.odip.engine.AgentThread.run(AgentThread.java:208)
    Please help us to solve this issue.
    we have one more issue.We used ActiveChgImp synchronization profiles for synchronization. But the profile ActiveChgImp deleted by mistake. Can create that profile (ActiveChgImp) one more time using createprofile, if so what prop_file I need to give for creating this?
    Thanks in advance

    You can use
    $ORACLE_HOME\ldap\odi\conf\backup\activechg.map.master to recreate activechgimp profile.
    DIP_GEN_SEARCH_EXCEPTION error is generic error. Try setting high debug level to generate more details.

  • Selecting and copying words from list to textfield

    I am trying to copy words from a list into a text field. I want to be able to select one word at a time, from the list, and have them create a sentence in the text field ie: you build up the sentence one word at a time. I have tried to code this (See code below) but you have to select all the words in one go and then copy them, you can't copy them over individually. Also the words rearrange themselves so that they are in the same order they were in, in the list. Any help would be most appreciated.
    Thanks in advance
    Jes
    import java.applet.Applet;
    import java.awt.*;
    import java.awt.event.*;
    //<applet code="MyList.class" width=400 height=300></applet>
    public class MyList extends Applet implements ActionListener {     
    private List wordList, copyList;
    private Button copy;     
    private TextField answer;     
    public MyList(){     
    public void init()     {     
    wordList = new List (5, true);
    copy = new Button ("Copy >>>");
    answer = new TextField (30);     
    copy.addActionListener(this);
    wordList.addItem("say");
    wordList.addItem("Oranges");     
    wordList.addItem("St.");     
    wordList.addItem("Lemons");     
    wordList.addItem("bells");     
    wordList.addItem("and");     
    wordList.addItem("Clements");     
    wordList.addItem("the");     
    wordList.addItem("of");
    add (wordList);          
    add (copy);          
    add (answer);     
    public void actionPerformed (ActionEvent e)     {
    String[] words = wordList.getSelectedItems();
    StringBuffer sentence = new StringBuffer();     
    for (int ii = 0; ii < words.length; ii++) {     
    sentence.append(words[ii]+" ");}          
    answer.setText(sentence.toString());     

    I'm a tad confused with your question. Do you NOT want multiple selection, or do you?

  • During hibernate query error in OC4J 10.1.3.4

    Hi friends,
    We get following error during one of Transaction execution..
    Anyone has idea abt this please let me know..
    2010-01-05 14:01:17,933(?:?) FATAL - java.lang.ClassCastException: oracle.jdbc.driver.T4CVarcharAccessor incompatible with java.io.Serializable
         at org.hibernate.loader.Loader.getKeyFromResultSet(Loader.java:1088)
         at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:554)
         at org.hibernate.loader.Loader.doQuery(Loader.java:689)
         at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
         at org.hibernate.loader.Loader.doList(Loader.java:2145)
         at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029)
         at org.hibernate.loader.Loader.list(Loader.java:2024)
         at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:375)
         at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:308)
         at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:153)
         at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1106)
         at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
    Hello friends,
    I am in a big trouble due to resultset behaviour....
    In my application during one hibernate query execution sometimes resultset.wasnull method stop returning any value.
    I have try to check same issue but no one i think have face this before.
    Sometime when I start OC4j application server, query get executed successfully.. only using connection pooling the same query fails
    even somtime ..
    I need a permenant solution for this. On debugging I come ot know that call to resultset.wasnull under
    hibernate class nullsafegettype somehow not returns any value..
    Return value set to oracle.jdbc.driver.T4CVarcharAccessor which creates problem.
    In my application I am using following versions.
    Oracle database. 10.1.0.5
    Application Server OC4j 10.1.3
    Hibernate Version 3.1
    Oracle JDBC Driver 10.1.0.5.0
    Thanks & Regards
    Edited by: user10313756 on 2010/01/20 18:34

    I am facing same issue ,have you get any work around

  • Monitoring pl/sql execution from Enterprise Manager

    I need to implement monitoring of PL/SQL code from within Oracle Enterprise
    Manger 10g. OEM has Custom user defined metrics (UDM) that allow one to issue
    queries against a database and decide whether the output from the query is a
    warning or a critical alert based on some threshold.
    In my case, my pl/sql will write to a database table that OEM will monitoring by
    querying periodically.
    My question is how does OEM know not to report on the same error about the same
    session multiple times. Once OEM has detected that my PL/SQL routine generated
    an exception during one of its execution, how will know not to alert on the same
    exception from the same pl/sql execution, the next time it's querying the
    database?
    It almost sound like the SQL query OEM will be executing needs to know what it
    reported on before.
    Any clarity on this would be appreciated.

    ok ..thanx .. can i view all historical SQL Text that is executed by a perticuler User say SCOTT.??? In the same page within SQL DETAIL you can find task owner also,

  • Owb process execution and alert message

    Hi,
    Do we have any provision to give an alert message in OWB during or before starting execution a process? If any please let me know.
    Thanks
    Ram

    HI,
    There is no such option as of now.
    You can maintain your own audit tables and you can register the messages of your processing. Whenever you start process or end process, you can log a record in ur defiend audit tables.
    If you want to implement in mappings, you can use premap and postmap operators to log the details.
    Regards,
    Gowtham.

Maybe you are looking for

  • Canon PIXMA MP640 WiFi on Arch Linux x86_64

    I have a Canon PIXMA MP640 series multifunctional device connected wirelessly to my home router. On Windows Vista the device works flawlessly, I can print or scan without any problems. Now I decided to configure at least the printer part on my Arch L

  • Automatic goods issue for outbound delivery without picking/packing

    Hi, I have the following flow: sales order -> outbound delivery -> goods issue. I would like to to be able to post an automatic goods issue on my delivery. Could someone please let me me know how to perform the customizing for this or give me the ref

  • OBIEE - Reporting using different time measures - year - month

    I have a request where the user wants to enter in an account period (YYYYMM - example: 200911). The report should display the YTD amount up to the end of that month, the same YTD amount for last year, and then show the amount for that month and the a

  • DISABLING OF A BLOCK

    Hi all,   I've used an LDB "PNP",I've two blocks.i want only one block in it, the other block should not be displayed. Is there any code which can disable this block,so that it cannot be seen on selection screen.And in that block's place i want to ge

  • OdiWaitForChildSession Name filter in paralele execution

    Hi, we are using ODI version 11.1.1.6. For parallel execution of child interfaces, we will be using interface scenarios set to asynchronous mode execution inside the package using java api's. For example: -master interface -child1 interface scen in a