How to make my code more modular? Please see thread.

Question
How do I go about doing something like the example below? Please see example.
Example of current form
My current method of painting to a component is as follows:
public class Pane extends JPanel{
public void paint(Graphics g){
... (all painting is done in here) ...
}What I want to do is break the painting method into multiple methods and or classes, so my program is less cluttered and more modular. For instance,
Method 1
public class Pane extends JPanel{
public void paintCustomButtons(Graphics g){
// (all painting of my custom buttons are done in here) ...
public void paintOtherComponents(2Graphics g){
// (all other painting is done in here) ...
}Or should I break it up into classes, the headers of those classes are:
Method 2
public class ButtonComponents extends JComponent
public class OtherComponents extends JComponent
//and then have a panel that contains all those components like so
public class Pane extends JPanel{
Pane(){
add(ButtonComponents);
Final Questions
How can I break my painting code up? Is it possible to do method 1 or 2? If so, which would you suggest? Or would you suggest another way of organizing blocks of code?
-Thanks for any suggestions as they are much appreciated
Edited by: watwatacrazy on Feb 6, 2010 10:17 AM

To break the paint method up you can always do the following:
    @Override
    public void paintComponent(Graphics g) {
        g2d = (Graphics2D) g;
        g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
        paintAxis(g2d);
        paintCrossHair(g2d);
    public void paintCrossHair(Graphics2D g2d) {
     public void paintAxis(Graphics2D g2d) {{
     }Edited by: calypso on Feb 6, 2010 1:39 PM

Similar Messages

  • How to make this code more simplified?

    hi, is there any possiibilty or logic to simply my code than below one?
    here my data is like that in a table
    sql>> select * from drawn order by effdate,code desc;
    CODE EFFDATE AMT
    1 01-JAN-06 30
    2 01-JUL-08 100
    2 01-JUL-09 150
    2 01-OCT-09 160
    1 01-OCT-09 50
    2 01-FEB-10 200
    2 01-MAR-10 250
    1 01-MAR-10 80
    1 01-APR-10 100
    from this my desired output should be:
    EXEC DUE_DRAWN ('01-SEP-08');
    code effdate amt(1+2)
    2 01-SEP-08 130
    2 01-JUL-09 180
    2 01-OCT-09 210
    2 01-FEB-10 250
    2 01-MAR-10 330
    1 01-APR-10 350
    here i want to display total amt as on particular date and with the particular code. if date are same in different code then code 2 will be given as priority . here outputput of amt is amt(code1+code2). so i have written below
    code...
    PROCEDURE DUE_DRAWN(V_DATE IN DATE) IS
    CURSOR C1(V_DATE IN DATE) IS SELECT * from drawn order by effdate,code desc;
    PREV_REC C1%ROWTYPE;
    CURR_REC C1%ROWTYPE;
    V_FDATE DATE;
    V_INL_GPY NUMBER(5):=0;
    V_BPY     NUMBER(5):=0;
    BEGIN
    OPEN C1(V_DATE);
    FETCH C1 INTO PREV_REC;
    V_INL_GPY:=PREV_REC.AMT;
    LOOP
         FETCH C1 INTO CURR_REC;
         EXIT WHEN C1%NOTFOUND;
         IF V_DATE > CURR_REC.EFFDATE THEN
              V_FDATE:=V_DATE;
         ELSE
              V_FDATE:=CURR_REC.EFFDATE;
         END IF;
         IF CURR_REC.CODE=2 THEN
              BEGIN
              SELECT AMT INTO V_INL_GPY FROM DRAWN WHERE CODE=1 AND EFFDATE=CURR_REC.EFFDATE;
              EXCEPTION
                   WHEN OTHERS THEN
                   NULL;
              END ;
              DBMS_OUTPUT.PUT_LINE(CURR_REC.CODE|| ' '||V_FDATE || ' '||(CURR_REC.AMT+V_INL_GPY));
         ELSIF CURR_REC.EFFDATE != PREV_REC.EFFDATE THEN
              SELECT AMT INTO V_BPY FROM DRAWN WHERE CODE=2 AND EFFDATE=(SELECT MAX(EFFDATE) FROM DRAWN
                                                                                                                            WHERE CODE=2 AND EFFDATE<=CURR_REC.EFFDATE);
                   DBMS_OUTPUT.PUT_LINE(CURR_REC.CODE|| ' '||V_FDATE || ' '||(CURR_REC.AMT+V_BPY));
              END IF;           
         PREV_REC:=CURR_REC;     
    END LOOP;
    END;
    please tell is there any other way to write this ...
    thanks
    Edited by: Hi FRNzzz!! on Jun 3, 2010 6:45 PM
    Edited by: Hi FRNzzz!! on Jun 3, 2010 7:43 PM
    Edited by: Hi FRNzzz!! on Jun 3, 2010 7:44 PM
    Edited by: Hi FRNzzz!! on Jun 3, 2010 7:47 PM

    The if condition is without an operator
    ELSIF CURR_REC.EFFDATE PREV_REC.EFFDATE THENwhat operator did you apply?
    When I run your code, with your sample data I get a different output to you, but I assumed a ">" operator for the above condition:
    SQL> declare
      2 
      3  V_DATE DATE :=TO_DATE('010908','ddmmyy');
      4  cursor c1 is
      5    select * from drawn order by effdate, code desc;
      6   
      7    PREV_REC  C1%ROWTYPE;
      8    CURR_REC  C1%ROWTYPE;
      9    V_FDATE   DATE;
    10    V_INL_GPY NUMBER(5) := 0;
    11    V_BPY     NUMBER(5) := 0;
    12   
    13  begin
    14 
    15    OPEN C1;
    16   
    17    FETCH C1 INTO PREV_REC;
    18    V_INL_GPY := PREV_REC.AMT;
    19   
    20    LOOP
    21      FETCH C1 INTO CURR_REC;
    22      EXIT WHEN C1%NOTFOUND;
    23     
    24      IF V_DATE > CURR_REC.EFFDATE THEN
    25        V_FDATE := V_DATE;
    26      ELSE
    27        V_FDATE := CURR_REC.EFFDATE;
    28      END IF;
    29     
    30      IF CURR_REC.CODE = 2 THEN
    31        BEGIN
    32          SELECT  AMT
    33          INTO    V_INL_GPY
    34          FROM    DRAWN
    35          WHERE   CODE    = 1
    36          AND     EFFDATE = CURR_REC.EFFDATE;
    37   
    38        EXCEPTION
    39          WHEN OTHERS THEN
    40            NULL;
    41 
    42        END ;
    43        DBMS_OUTPUT.PUT_LINE(CURR_REC.CODE || ' ' ||V_FDATE || ' ' || ( (CURR_REC.AMT + V_INL_GPY) * 0.1) );
    44 
    45      ELSIF CURR_REC.EFFDATE = PREV_REC.EFFDATE THEN
    46        SELECT  AMT
    47        INTO    V_BPY
    48        FROM    DRAWN
    49        WHERE   CODE    = 2
    50        AND     EFFDATE = (SELECT MAX(EFFDATE)
    51                           FROM   DRAWN
    52                           WHERE  CODE    = 2
    53                           AND    EFFDATE <= CURR_REC.EFFDATE);
    54                          
    55        DBMS_OUTPUT.PUT_LINE( CURR_REC.CODE|| ' ' || V_FDATE || ' ' || ( (CURR_REC.AMT+V_BPY) * 0.1 ) );
    56      END IF;
    57 
    58      PREV_REC := CURR_REC;
    59 
    60    END LOOP;
    61 
    62  END;
    63  /
    2 01-09-2008 00:00:00 13
    2 01-07-2009 00:00:00 18
    2 01-10-2009 00:00:00 21
    1 01-10-2009 00:00:00 21
    2 01-02-2010 00:00:00 25
    2 01-03-2010 00:00:00 33
    1 01-03-2010 00:00:00 33Also, could you kindly place before and after any code you post.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How to make tax codes in mm purchasing

    Dear Guru,
    1. How to make tax code for purchase of Raw materials with basic excise duty=14%, SECess=2%, HSEcess=1% and Additional Excise duty=4% as follows . If we consider basic prise=100 then
    BASIC                  =100
    BED    (14%)        =14
    SED     (2%)        =0.28----
    Sed=secondary Educational Cess
    HSECESS (1%)     =0.14
    SUB TOTAL        = 114.42
    AED (4%)           =4.56
    TOTAL             = 119
    For above all taxces(BED,SED,HSEcess,AED) , client gets 100% set off.
    Please tell me detail procedure.
    2.Do we need to assign (tax code)  them to any business area, as my system is giving an error at the time of saving in MIRO.
    3. What is the meaning of ticking ( check box tick) for calculate taxes under  basic tab in MIRO.

    Hi Nitin,
    Tax Set Off depends on the Account Key which you are using. Account Key in Tax Procedure will be defined by finance at SPRO - Financial Accounting - Financial Accounting Global Settings - Tax on Sales / Purchases -   Basic Settings - Check and Change settings for Tax Processing.
    Check the relevant condition type in the Tax Procedure (TAXINJ / TAXINN), and then check the account key of the procedure whether the Non Deductable indicator is set or not. you may take finance help for the same. Once it is done correctly then define the excise defaults for the relevant tax procedure at SPRO - Logistics General - Tax on Goods Movement - India - Basic Settings - Determination of Excise duty - Maintain Excise defaults
    Then create the tax code with the relevant condition types.
    You need to assign the Tax code to Company code if you use TAXINN procedure. No need for assignment of Tax code to Business Area
    Once you select the Check Box Calculate taxes in MIRO, then system calculates the Taxes based on the tax codes defined and also validates whether Part II Postings have been done or not also for the Excise relevant transactions
    Regards,
    Ramakrishna

  • Can you explain me clearly how to make company code visible in cost center

    can you explain me clearly how to make company code visible in cost center master data using tcode kmlv

    Hi,
    There is no way to activate the company code field. If your Controlling Area and Company Code have one to one Assignment, then Company code is defaulted from the Controlling Area. However, if multiple Company Codes are assigned to one Controlling Area, then Company Code becomes a mandatory field in the Cost Center master data
    Also, in case you have multiple company codes assigned to one controlling area, please check the setting of the Controlling Area in Configuration and see if have selected "Cross Company Code Cost Accounting" . Also, check if you have assigned all the company codes to the controlling area
    Regards
    Mahendra

  • How to make manager approve more than one request in one time in SSHR

    Dear All,
    Anyone has an idea on how to make manager approver more than one request in one time in SSHR??
    for example, manager is having 20 requests to approve on Change Pay Function, he don't want to check one by one and approve it, he want to approve the 20 requests directly from one time, is there any solution for that??
    Thanks and Regards

    Hi Adel,
    As Vignesh has mentioned we don't have any standard functionality which will allow bulk approvals. We had same kind of requirement in performance management where the business was asking for a bulk approval feature which should be available to Skip level manager for approving the rating suggested by line manager. We had created a custom page which will list all the notifications and user can select the ones which S/He wants to bulk approve and click submit button. Internally we had called the workflow with item key and other required parameter and do the approval.
    You can have a work with your technical guy and can work on the same lines.
    Thanks,
    Sanjay

  • How to make reason code compulsory while processing F-53

    Hi Boss,
    Can u plz. tell me How to make reason code compulsory while processing F-53. this is because I have defined differnet reason code and one is having blank text.
    Thanks
    S

    hi,
    Just check this one dont check previous one....
    goto TCODE OBC4 and then click on ur company FELD status variant and double click on field status group ....
    Then click on G067 RECONCILTION ACCOUNTS and then double clickn that in that and then click on payment transactions and then select REASON CODE AS REQUIRED.
    ur problem will solve...
    if useful assign points
    regards,
    santosh kumar

  • Anyone knows how to make this code to netbeans??

    anyone knows how to make this code to netbeans?? i just want to convert it into netbeans... im not really advance with this software... anyway..just reply if you have any idea...or steps how to build it... etc.... thanks guys...
       import javax.swing.*;
       import javax.swing.table.*;
       import java.awt.*;
       import java.awt.event.*;
       import java.util.regex.*;
       public class FilterTable {
         public static void main(String args[]) {
           Runnable runner = new Runnable() {
             public void run() {
               JFrame frame = new JFrame("Sorting JTable");
               frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
               Object rows[][] = {
                 {"AMZN", "Amazon", 41.28},
                 {"EBAY", "eBay", 41.57},
                 {"GOOG", "Google", 388.33},
                 {"MSFT", "Microsoft", 26.56},
                 {"NOK", "Nokia Corp", 17.13},
                 {"ORCL", "Oracle Corp.", 12.52},
                 {"SUNW", "Sun Microsystems", 3.86},
                 {"TWX",  "Time Warner", 17.66},
                 {"VOD",  "Vodafone Group", 26.02},
                 {"YHOO", "Yahoo!", 37.69}
               Object columns[] = {"Symbol", "Name", "Price"};
               TableModel model =
                  new DefaultTableModel(rows, columns) {
                 public Class getColumnClass(int column) {
                   Class returnValue;
                   if ((column >= 0) && (column < getColumnCount())) {
                     returnValue = getValueAt(0, column).getClass();
                   } else {
                     returnValue = Object.class;
                   return returnValue;
               JTable table = new JTable(model);
               final TableRowSorter<TableModel> sorter =
                       new TableRowSorter<TableModel>(model);
               table.setRowSorter(sorter);
               JScrollPane pane = new JScrollPane(table);
               frame.add(pane, BorderLayout.CENTER);
               JPanel panel = new JPanel(new BorderLayout());
               JLabel label = new JLabel("Filter");
               panel.add(label, BorderLayout.WEST);
               final JTextField filterText =
                   new JTextField("SUN");
               panel.add(filterText, BorderLayout.CENTER);
               frame.add(panel, BorderLayout.NORTH);
               JButton button = new JButton("Filter");
               button.addActionListener(new ActionListener() {
                 public void actionPerformed(ActionEvent e) {
                   String text = filterText.getText();
                   if (text.length() == 0) {
                     sorter.setRowFilter(null);
                   } else {
                     try {
                       sorter.setRowFilter(
                           RowFilter.regexFilter(text));
                     } catch (PatternSyntaxException pse) {
                       System.err.println("Bad regex pattern");
               frame.add(button, BorderLayout.SOUTH);
               frame.setSize(300, 250);
               frame.setVisible(true);
           EventQueue.invokeLater(runner);
       }

    its okay onmosh.....what we need to
    this...forum....is to have a good......relationship
    of programmers......and to start with .....we need to
    have a good attitude........right.....???.....no
    matter how good you are in programming but if you did
    not posses the right kind of attitude....everything
    is useless.....in the first place....all we
    want....is just to ask...some....help....but
    conflicts......but unluckily......we did not expect
    that there are members in here which......not
    good...to follow.....just as suggestion for those
    people not having the right kind of attidude...why
    can't you do in a very nice message sharing in a very
    nice....way....why we need to put some
    stupid....stuff...words.....can't you live with out
    ******* ****....its not.....lastly especially you
    have your children right now and people around...that
    somehow......idiolize...you even me....is one of
    them......but showing but attitude....is not
    good......tnx....hope you'll take it this....in the
    positive side.....be optimistic...guys....the
    world..is not yours....all of us will just past
    away....always..remember that one.....treasure..our
    stay in this....temporary home.....which...is
    world....Whoa. That post seems to be killing my brain.
    URK
    Join........us..........do not be..........afraid.......

  • How to make comnapy code defalut got 100 and 1001 in the PNP screen

    Hi Expart ,
    can u tell me my que how to make comnapy code defalut got 100 and 1001 in the PNP screen in HR reporting?
    Regards
    Razz

    Use the below code in the   INITIALIZATION   
                     INITIALIZATION                                      *
    initialization .
    " Make Default values for Company Code 2100 & 2200
      PNPBUKRS-LOW  = '2100'.
      PNPBUKRS-HIGH = '2200'.
      append PNPBUKRS.
    regards
    .....lakhan

  • How to make a global scope component to be thread safe?

    One of my global component preserves states in its member variables, I am afraid that it's might messed up in multi-threading conditions, so how to make a nucleus global component to be thread safe?
    Edited by: user13344577 on Jul 14, 2011 9:45 AM

    Hi,
    Just to help integrate Shaik's and my own seemingly contradictory replies:
    If the member variables in your global component actually need to be globally available, so that multiple threads/sessions need to seem the same data, then you need to use synchronization or some scheme to make this data thread-safe when updating it. If the member variables are non-global data and are simply for convenience of having data available for multiple method calls or something like that, then you should do as I said (don't use synchronization) and use one of my suggestions to avoid this.
    I have seen customers frequently do what I replied about and store non-global data in a global component, and Shaik simply interpreted what "user13344577" is trying to do differently. Clarification is needed to know which of our answers better applies.
    Thanks.
    Nick Glover
    Oracle Support for ATG Products

  • ADF_FACES-60097:For more information, please see the server's error log for

    HI
    when we login in to the Em and then try to navigate to the core applications server under the business intelligence Domain it gives the bellow Error message
    Stream closed
    ADF_FACES-60097:For more information, please see the server's error log for an entry beginning with: ADF_FACES-60096:Server Exception during PPR, #5
    and when we check the server error log then we got the below log
    >
    ####<Jun 2, 2013 10:08:05 AM GST> <Error> <oracle.adfinternal.view.faces.config.rich.RegistrationConfigurator> <obitst.oasiserp.com> <AdminServer> <[ACTIVE] ExecuteThread: '4' for queue: 'weblogic.kernel.Default (self-tuning)'> <weblogic> <> <d02e32166b4c953b:7cceca3a:13ef5c15d45:-8000-000000000000065f> <1370153285886> <BEA-000000> <ADF_FACES-60096:Server Exception during PPR, #2
    java.io.IOException: Stream closed
    at java.io.BufferedInputStream.getInIfOpen(BufferedInputStream.java:134)
    at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
    at java.io.BufferedInputStream.read(BufferedInputStream.java:237)
    at oracle.xml.parser.v2.XMLReader.pushXMLReader(XMLReader.java:416)
    at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:315)
    at oracle.jsp.parse.XMLUtil.getDocument(XMLUtil.java:447)
    at oracle.jsp.parse.OracleJsp2Java.transformImpl(OracleJsp2Java.java:402)
    at oracle.jsp.parse.OracleJsp2Java.transform(OracleJsp2Java.java:593)
    at oracle.jsp.runtimev2.JspPageCompiler.attemptCompilePage(JspPageCompiler.java:691)
    at oracle.jsp.runtimev2.JspPageCompiler.compileBothModes(JspPageCompiler.java:490)
    at oracle.jsp.runtimev2.JspPageCompiler.parseAndGetTreeNode(JspPageCompiler.java:457)
    at oracle.jsp.runtimev2.JspPageInfo.compileAndLoad(JspPageInfo.java:624)
    at oracle.jsp.runtimev2.JspPageTable.compileAndServe(JspPageTable.java:645)
    at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:385)
    at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:810)
    at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:734)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    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.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:179)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.sysman.eml.app.JSPFilter.doFilter(JSPFilter.java:93)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.sysman.core.model.targetauth.EMLangPrefFilter.doFilter(EMLangPrefFilter.java:158)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:524)
    at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:253)
    at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:410)
    at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch(ExternalContextDecorator.java:44)
    at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch(ExternalContextDecorator.java:44)
    at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch(ExternalContextDecorator.java:44)
    at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch(ExternalContextDecorator.java:44)
    at org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl$OverrideDispatch.dispatch(FacesContextFactoryImpl.java:267)
    at com.sun.faces.application.ViewHandlerImpl.executePageToBuildView(ViewHandlerImpl.java:469)
    at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:140)
    at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:189)
    at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:193)
    at oracle.sysman.emSDK.adfext.ctlr.EMViewHandlerImpl.renderView(EMViewHandlerImpl.java:157)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._renderResponse(LifecycleImpl.java:911)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:367)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:222)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
    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.sysman.emSDK.license.LicenseFilter.doFilter(LicenseFilter.java:101)
    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.help.web.rich.OHWFilter.doFilter(Unknown Source)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.sysman.emas.fwk.MASConnectionFilter.doFilter(MASConnectionFilter.java:41)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:179)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.sysman.eml.app.AuditServletFilter.doFilter(AuditServletFilter.java:179)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.sysman.eml.app.EMRepLoginFilter.doFilter(EMRepLoginFilter.java:203)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.sysman.core.model.targetauth.EMLangPrefFilter.doFilter(EMLangPrefFilter.java:158)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.sysman.core.app.perf.PerfFilter.doFilter(PerfFilter.java:141)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.sysman.eml.app.ContextInitFilter.doFilter(ContextInitFilter.java:542)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
    at java.security.AccessController.doPrivileged(Native Method)
    at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
    at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
    at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
    at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
    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:139)
    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)
    >

    Hi Timo,
    I check it :
    Caused by: java.lang.NullPointerException
      at cic.portal.Currencys.createCurrency(Currencys.java:24)
      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)
      ... 56 more
    When i click: at cic.portal.Currencys.createCurrency(Currencys.java:24) ---> it's call to method beans:
        public void createCurrency(PopupFetchEvent popupFetchEvent) {
                 if (popupFetchEvent.getLaunchSourceClientId().contains("create")) {
                       BindingContainer bindings = getBindings();
                       OperationBinding operationBinding = bindings.getOperationBinding("CreateInsert");
                       operationBinding.execute();
    this method is Popup: popupFetchListener="#{currencys.createCurrency}">
    I thing lines :
    OperationBinding operationBinding = bindings.getOperationBinding("CreateInsert");
    operationBinding.execute();
    it not working, i have no idea for this..

  • How can I make my code more efficient?

    Hello Everyone,
    I have a problem that is something like this:
    Say you have a database and inside that database you have a table called 'books' which has only 3 columns: id, title, author.
    Now let's say you have a servlet/jsp (servlet1) that expects a parameter called 'author' and it will display a list of all books by a certain author to the client. It will display this list such that each book is a link to another servlet/jsp (servlet 2)that accepts the book 'id' [primary key] as a parameter. Servlet 2 will display all the information about that book to the client.
    Servlet1 works by querying the database and building a list of beans, one of which will contain the same data as servlet 2 is going to need to display the book information. But I don't know how to make so that servlet2 can see the bean used in servlet 1. Right now servlet2 gets the primary key as a parameter and queries the database again. This can't be the right way to being going about this. Can anyone offer me some insight as to a better way to approach this problem?
    Thanks v. much.
    Chris Latimer

    put all the data you wish the 2nd servlet to recieve from the first servlet in a bean or object and pass it to the second. This works great with small amounts of data, but if you are going to have huge beans there are other ways of doing it.
    If you have huge beans, then you may consider updating/inserting into a table in the database and then reading the data from the table into the 2nd servlet.
    tnx,
    Les

  • How to make a code in which i have to detect 3 objects

    Hello everyone,
    I am new in Labview. I want to make a code in which i have to detect 3 objects and they are in different shapes (rectangle, triangle etc).
    1. How many objects in image.
    2. What is the size of each object in image
    3. At what position they are laying.
    4. Data array of histogram of each object.
    5. What is the color of each object.
    Please help me out. I am confused with the tool. Which tool i will use for this Vision Assistant or Vision Builder AI or if i use labview directly to make the code what steps should follow to make this code.
    Thanks
    Zeeshan

    Hello Zeeshan,
    this is Vanessa, AE from Germany. I really like to help you with your project but like the other members already told you it would be easier if you have a certain problem.
    Using your Shapes.jpg you have several options in the Vision Assistant. For identifiying circular objects of different size the tool "Find circular Edge" from the "Machine Vision" tab is the right choice (see screenshot attached). The result will be the center position and the radius so on. The pattern match function is not the right option because each of your objects has a different shape. In order to use this tool you need several copies of your object.
    Do you really need colored images? For most application it is sufficient to use grayscale images. Be aware that some functions are only available for grayscale and your program will speed up.
    Please tell us more details about your project.
    Kind regards,
    Vanessa
    Attachments:
    vision assistant.PNG ‏305 KB

  • How to make this code go faster?

    Hi,
    I have this code and its really slow. My question is how to make it faster since its taking about 10 hours.
    Code:
      loop at ti_equi.
        select matnr sernr lief_nr kunde datum uzeit bwart posnr
    appending corresponding fields of table ti_ser01
          from z_objk_ser01
         where sernr eq ti_equi-sernr
           and matnr eq ti_equi-matnr.
      endloop.
      delete ti_ser01 where not ( kunde in s_kunnr and
                                  bwart = '631' ).
      sort ti_ser01 by matnr sernr datum descending uzeit descending.
      delete adjacent duplicates from ti_ser01 comparing matnr sernr.
    What this code does is fetch all these fields and then just keeps the one that's been modified at last.
    I have created an index by sernr and matnr in table objk which makes it just a little bit faster.
    Any helpful answer will be appreciated.
    Regards,
    Roberto
    Edited by: Julius Bussche on Jan 27, 2009 4:29 PM
    Code tags added. Please use more meaningfull subject titles

    Hi roberto
    please avoid select statment inside loop.
    use code
    data: index type sy-tabix.
    data : ti-ser011 type standard table of zobjk-ser01 with header line.
    select matnr sernr lief_nr kunde datum uzeit bwart posnr
          from z_objk_ser01 into table ti_ser01.
    sort ti_ser01 by sernr matnr.
    sort ti_equi by sernr matnr.
    index = 1.
    loop at ti_equi.
        loop at ti_ser01 from index
         if  ti_ser01-sernr = ti_equi-sernr
              and ti_ser01-matnr = ti_equi-matnr.
            move-corresponding ti_ser01 to ti_ser011.
            append ti_ser011.
            index = sy-tabix.
            exit.  
         endif.
        endloop.
    endloop.
    here i have used one more internal table ti_ser011.
    you can delete specific record from ti_ser01 internal table on condition. at that time u don't need to create any other internal table like ti-ser011.
    in place of loop select statement---endloop.
    you can use this code. I think it will help you.
    please find if it is udeful.

  • How to Make Project Code as Mandatory

    Hi ! I Need Project code as mandatory in Po's and Sales Order in Row Level. How to Make that one. Also i have a issue with approved PO's. If some PO got approved is there any option to make amendment and resend for again approval.
    Thanks and Regards
    Kamal

    Hi Kamal.......
    Try this below SP for making project Code Mandatory........
    For Sales Order:
    If @object_type='17' and @transaction_type='A'
    BEGIN
    If Exists (Select T0.DocEntry from ORDR T0 Inner Join RDR1 T1
    On T0.DocEntry=T1.DocEntry
    Where T1.Project Is Null
    And T0.DocEntry = @list_of_cols_val_tab_del)
    BEGIN
    Select @error = -1,
    @error_message = 'Please select Project'
    End
    End
    For Purchase Order:
    If @object_type='22' and @transaction_type='A'
    BEGIN
    If Exists (Select T0.DocEntry from OPOR T0 Inner Join POR1 T1
    On T0.DocEntry=T1.DocEntry
    Where T1.Project Is Null
    And T0.DocEntry = @list_of_cols_val_tab_del)
    BEGIN
    Select @error = -1,
    @error_message = 'Please select Project'
    End
    End
    If your PO is approved and you want to ammend it then your approver has to reject the PO first and it will come to you and then make edition and send it again......
    Regards,
    Rahul

  • How to make material code field mandatory in VA01

    Dear all,
    I want to make material code field mandatory while creating sales order (VA01). As of now even if I dont enter material code , and just enter customer code and P.O. number ,  I am able to save my sales order.
    I tried to do it with incompletion log , but could not succeed.
    SHD0 could be an option, is there any simpler way out ?
    Please suggest.
    Regards,

    Hi,
    You have 2 options.
    1 - Incompletion Log
    If you add Material filed to your incompletion log, then when you try to save the sales order it'll give the "Save / Edit" pop up message. But then by pressing Save button you can save the sales order.
    If you want to avoid that pop up; do this. (To avoid user saving Incomplete sales orders)
    Go to VOV8 Tx.
    Go in to your sales document type
    Under "Transaction flow" section mark the "IIncompletion messages" tick box
    Then try with a new sales order without a material number
    If won't give that pop up message any more where as it'll always go in to the incompletion log. So you can't save it without maintaining the material.
    That's a alternative way of doing.
    2- SHD0.
    Best regards,
    Anupa

Maybe you are looking for