Different behavior when various Exceptions is applied

Hi all:

I wrote a class analysis and extraction of font properties, which uses Apache FontBox.

Here's the thing: when FontBox analyzes a font, if it does not recognize its format, it throws a FontFormatException.

In my code, a list of the fonts in the system directory is iterated, within which I surround the part analysis of fonts with try-catch block, if fishing is
catch(FontFormatException e){e.printStackTrace();} 
the whole iteration stops when an exception occurs and the application exits; However, when the plug is
catch(Exception e){e.printStackTrace();}
While it is still State of emergency, the iteration Won't stop - he just jump worth to the other.

I must have missed some point of knowledge regarding the management of exceptions.

Please inform me.

Thank you, John

Johnny_hunter wrote:
the whole iteration stops when an exception occurs and the application closes.

No it's not. As jverd, that takes place only if the exception is NOT a FontFormatExceptionhas said.

BTW, if you want a thrown exception, even when he is intercepted by a catch block, it must rise again , namely:

...
catch(SomeException e) {
   // do some stuff
   throw e;
}

However, in the case of your example above, it's pretty useless, since when the program fails it will usually print stacktrace anyway.

Winston

Tags: Java

Similar Questions

  • Network of ESXi - different behavior when installing adapter

    Hi Experts,

    I came across a strange problem on the network adapters section:

    • I was installing the ESXi 5.5 in a standalone Machine (re-usable)
    • When installing, it showed me the error on non detected network cards and I checked the compatibility of the guide and found that it was not a supported network card.
    • Then I installed 'VMware Workstation 10' on the same machine on the host operating system
    • I have created a virtual machine and tried to install 'ESXi' inside the virtual machine [just for curiosity\
    • He installed perfactly without error / warning (s).

    My concern is 'how and why ESXi comes with two different behaviors between installation Metel naked Machine v/s install inside a virtual machine on the same physical host.

    Thanks for your response in advance and I apologize if I am not able to present the screenplay with clarity.

    -Kuldeep Singh

    Under vmware workstation, the virtualized esxi uses the virtual NIC (probably E1000) driver, which is supported.  The host operating system uses its own realtek driver.

    When you try to run ESXi on bare metal, it doesn't have a realtek driver, if it fails.

    It is a driver problem.

  • (correct) different behavior when a shared variable IO node is replaced with programming

    I work with the following system:

    LV2010 running in Windows 7 and a cRIO-9073

    My RT and FPGA code is generated and deployed.  I have a pair of variables published network hosted and deployed on the cRIO.  I wrote a simple application for my PC save variables of network in the disc.  The vi running on my PC uses the variables nodes that were driven from the project window and are configured as "absolute".  When I run this logging vi he told me that variables are part of a startup RT application and the system must be restarted.  It makes no sense to me - they are hosted and already deployed on the cRIO.

    When I right click on both variable nodes and replace them with "programmatic access" (and do NOTHING ELSE), I can run this VI without any problem.  It "clearly a bug here or I don't use node IO variable shared properly."  Any ideas?

    Thank you!

    Ethan

    In your project, right-click on desktop and select 'Disable Autodeploy Variables'

  • I have version 9 (I think) running on windows 10. Works fine EXCEPT when I try to apply automatic updates. It checks, downloads, copies the files and when it is almost by it says it has encountered an error and cancels everything. Frustrat

    I have version 9 (I think) running on windows 10. Works fine EXCEPT when I try to apply automatic updates. It checks, downloads, copies the files and when it is almost by it says it has encountered an error and cancels everything. Frustrating!

    Hi rct_nv ,

    Please provide the exact version of the acrobat application (given that no update available for acrobat 9 as its an older version)

    In addition, I wish to inform that Acrobat 9 is not compatible with Win 10 OS. Refer to this article:- Adobe Acrobat required configuration

    Kind regards

    Christian

  • Strange behavior of gray levels when the shadow is applied.

    I have a file with four images inside. One is RGB and three grayscale jpeg images. They all look good.

    Now, when I put a shadow effect on the images, the RGB image looks as expected. but the grayscale images all consider them lighter than before.

    I exported a PDF file of the two pages (I made a duplicate then a page in the shade and we do not) with a profile of PDF - X/1. All images in grayscale look more light, even the page without the shadow, which seems more dark in InDesign. The RGB image looks the same on both pages in the PDF file.

    Why the images to greyscale looks more light when a shadow is applied? Or, perhaps a better question is, why does the image without the eye of shadow down more dark? (The darker image looks more natural. I opened the images to grayscale in Photoshop and premiere the two Apple. Preview displays the image more dark most beautiful appearance, but Photoshop displays the images as being lighter, the way he looks in the exported PDF file.

    Any ideas?

    InDesign is not a grayscale working space. Instead, he puts in grayscale on the black plate unaltered data and displays using the current CMYK working profile. To have a precise idea of the behavior of the file you should activate preview overprinting.  I also trust with Photoshop and Acrobat much more overview.

  • iOS 10 Mail: moving Messages, inconsistent behavior when you tapoterez folder icon

    iPhone 6, iOS 10

    I see inconsistent behavior when I try to move a message in Mail from in the message.

    In previous versions of iOS, during playback of an e-mail message, I could tap the icon of the folder at the bottom of the messages, and which would lead to the top of the hierarchy of the folders for the email of the message account. From there on, it was just a matter of tapping on the file I want to move the message to, and he settled there the message and look back to the Inbox display (or the folder view I moved this message of).

    In iOS 10, when I hit this folder icon, two things happen: it happens the same thing I described above, or sometimes, rather than see the hierarchy of folders, I see three buttons slide up from the bottom of the screen. The top button allows me to move the message directly to a folder in my account called 'Action' I created (I don't know why he chose this particular file to the default value for this button - maybe because it is first in alphabetical order of all my folders created by the user), the second button says "Another mailbox" and when it takes me to the hierarchy of the mailbox as described above, and the third button is a Cancel button.

    I can't understand what dictates which of those two things happening. I tried again and again on a bunch of different messages. Some do happen, some do the other thing happens, and sometimes I'll have a different behavior in the message even if I try again later.

    I prefer the old way. But I could get used to the new way, if I could at least choose what default folder appears in the first box.

    Anyone else seeing this?

    Someone knows how to change the default folder in the first box of this new process?

    Thank you!

    I seem to have solved the problem on my own. I went to settings > Mail, and in the "Threading" section, I have disabled "Complete Threads."

  • my mouse continues to go to different place when you enter?

    My mouse keep jumping to different locations when you type any text. Can anyone help?

    Wow, that's a first.  I've never seen a jumping mouse.  How is your work table?
    Perhaps mean you your cursor instead?

    In general, a jumping cursor is associated with a laptop.  You have a laptop?  This problem occurs when your wrist gets too close to the touchpad while you type, causing the cursor to move.  If you can't find a setting in your control panel to decrease the sensitivity of your touch pad, you can try the following free software:

    TouchFreeze: <> http://code.google.com/p/touchfreeze/ >
    Article: <> http://www.pcworld.com/downloads/file/fid, 83501/description.html >

    HTH,
    JW

  • Different behavior on the eyes; layer names are correct?

    Different behavior on the eyes; scales up and down, left right behaves as expected. All layer names are correct in artificial intelligence. Where to find a solution?Ai_layers_different_eye_behaviors.JPG

    Hmm, the sent JPG seems to be broken.

    But here's a place to look: in the Panel of the puppet, with no layers selected, you should see the behavior of face in the properties panel. Twirl in the group "Handles" to see what parts of the face it found. It shows the layers that you expect to find? (ToolTips will tell you what he's looking for.) Twirl down replacements also to see the layers of flashing. Note that if it does not find a layer of Blink for a certain look, it dimensionnera the eye that you close the eye rather than go to the work of replacement blink.

  • How can I make the menu title of a different color when it is horizontal Spry menu menu?

    How can I make the menu title of a different color when it is horizontal Spry menu menu?

    Dreamweaver CS5.5

    Apple OS X.6.8

    Display of the site to: http://Dorsay-Easton-Indian-law.com/staging/index.html

    Steps to follow:

    1. click on the link to land on the home page

    2 link see Home in the Spry horizontal navigation menu

    Real:

    Title of the home menu is the same color as all the others.

    Expected:

    The title of the active menu is color: #FFC.

    I was hoping that a: active would give me this feature, but it's not how it is described. All suggestions are welcome!

    The tag BODY nothing that I tried in the editable model. This is why I wonder how to disconnect the model individual pages. Adding an ID to each body tag is a condition sine qua non of the how-to page that you provided.

    You are not theeditable in a template tag.

    You are the attributes of theeditable tag.

    Do not unplug the model child pages.

    Specify editable tag attributes in a template

    http://help.Adobe.com/en_US/Dreamweaver/CS/using/WScbb6b82af5544594822510a94ae8d65-7aa3a.h tml

    In the model:

    1. Select ittag (in the tag selector, or click inside the)tag in Code view)
    2. Modify > templates > make attribute editable
    3. Select the code in the drop down attribute
    4. If there is no ID attribute then click Add and type the ID in the next dialog box
    5. Attribute: ID
      Check the box 'Make attribute editable '.
      Enter anything in the field of the default label for example foo
      Ok
    6. Dreamweaver will change thetag to read
    7. The ID is now editable
    8. Save the model and update the child page

    In each page of the child:

    1. Edit > properties of the model
    2. Select the id attribute in the list (it's probably the only one listed)
    3. Change its name in the box to any name matches your CSS rule for the active state of the page
    4. Ok
    5. Save
    6. Download
  • Assignment of the different behaviors for instances of a symbol

    Hello everyone, I want to assign a different behavior (action script) to different instances of (a) symbol, what should I do? Thank you very much. Sincerely Mohsena

    give everyone a different instance name and assign different behaviors for each.

  • 11g - new: NOT IN has a different behavior with key FOREIGN ACTIVE!

    Oracle has changed NOT IN way that works?
    The NOT IN operator is supposed to return no rows when there are NULL values, see example below:
    Two table c1 (table 1), p2 (table 1 in the parent).

    create table c1 (c_col, p_col number);
    create table p1 (number p_col);
    insert into p1 values ('1');
    insert into values p1 (2);
    Insert in the values of c1 (100, 1);
    Insert in the values of c1 (200, 2);
    Insert in the values of c1 (300, null);
    Select * C1
    If p_col not in (select p_col from p1)
    NO RETURNS NO LINE! <-this is the expected behavior

    When adding a foreign key, the variations in results:
    ALTER TABLE p1
    Add CONSTRAINT p_PK PRIMARY KEY (p_col)
    ALTER TABLE c1
    ADD CONSTRAINT FOREIGN KEY FK1
    (p_col) P1 REFERENCES;

    THE RESULT OF THE CHANGE:
    Select * C1
    If p_col not in (select p_col from p1)
    RETURNS:
    C_COL P_COL
    ---------------------- ----------------------
    300

    1 selected lines

    WHY?
    When the foreign key is disabled, the result does not change back to the old.
    -
    ALTER table disable forced fk1 c1
    Select * C1
    If p_col not in (select p_col from p1)
    NO RETURNS NO LINE!

    Activation of the constraint:
    ALTER table ENable constraint fk1 c1
    Select * C1
    If p_col not in (select p_col from p1)
    RETURNS:
    C_COL P_COL
    ---------------------- ----------------------
    300

    1 selected lines

    That's happened?

    This is a bug caused by a combination of two elements: [join elimination | http://optimizermagic.blogspot.com/2008/06/why-are-some-of-tables-in-my-query.html] introduced in 10 gr 2 and [Null-aware anti-jointures | http://structureddata.org/2008/05/22/null-aware-anti-join/] introduced in 11 GR 1 material. 11 g CBO to the first query transformations via unnesting of the subquery:

    *****************************
    Cost-Based Subquery Unnesting
    *****************************
    SU: Unnesting query blocks in query block SEL$1 (#1) that are valid to unnest.
    Subquery Unnesting on query block SEL$1 (#1)SU: Performing unnesting that does not require costing.
    SU: Considering subquery unnest on query block SEL$1 (#1).
    SU:   Checking validity of unnesting subquery SEL$2 (#2)
    SU:   Passed validity checks.
    SU: Transform ALL subquery to a single null-aware antijoin.
    

    and then eliminates the join:

    *************************
    Join Elimination (JE)
    *************************
    JE:   cfro: C1 objn:61493 col#:2 dfro:P1 dcol#:2
    JE:   cfro: C1 objn:61493 col#:2 dfro:P1 dcol#:2
    Query block (32724184) before join elimination:
    SQL:******* UNPARSED QUERY IS *******
    SELECT "C1"."C_COL" "C_COL","C1"."P_COL" "P_COL" FROM "TIM"."P1" "P1","TIM"."C1" "C1" WHERE "C1"."P_COL"="P1"."P_COL"
    JE:   eliminate table: P1
    Registered qb: SEL$F9980BE6 0x32724184 (JOIN REMOVED FROM QUERY BLOCK SEL$5DA710D3; SEL$5DA710D3; "P1"@"SEL$2")
    ---------------------
    QUERY BLOCK SIGNATURE
    ---------------------
      signature (): qb_name=SEL$F9980BE6 nbfros=1 flg=0
        fro(0): flg=0 objn=61492 hint_alias="C1"@"SEL$1"
    
    SQL:******* UNPARSED QUERY IS *******
    SELECT "C1"."C_COL" "C_COL","C1"."P_COL" "P_COL" FROM "TIM"."C1" "C1" WHERE "C1"."P_COL" IS NULL
    Query block SEL$F9980BE6 (#1) simplified
    

    which is obviously false.
    With optimizer_features_enable = '10.2.0.4' CBO transforms a NOT EXISTS query, since he cannot transform into normal join:

    SELECT "SYS_ALIAS_1"."C_COL" "C_COL","SYS_ALIAS_1"."P_COL" "P_COL" FROM "TIM"."C1" "SYS_ALIAS_1"
    WHERE  NOT EXISTS (SELECT 0 FROM "TIM"."P1" "P1" WHERE LNNVL("P1"."P_COL"<>"SYS_ALIAS_1"."P_COL"));
    

    and elimination of join is not even considered.
    So as a workaround, you can disable elimination join on either the session or application level via the index OPT_PARAM (although course after approval of Oracle support):

    SQL> explain plan for
      2  select /*+ opt_param('_optimizer_join_elimination_enabled' 'false') */ * from c1
      3  where p_col not in (select p_col from p1)
      4  /
    
    Explained
    
    SQL>
    SQL> select * from table(dbms_xplan.display)
      2  /
    
    PLAN_TABLE_OUTPUT
    --------------------------------------------------------------------------------
    Plan hash value: 1552686931
    ---------------------------------------------------------------------------
    | Id  | Operation          | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    ---------------------------------------------------------------------------
    |   0 | SELECT STATEMENT   |      |     1 |    39 |     5  (20)| 00:00:01 |
    |*  1 |  HASH JOIN ANTI SNA|      |     1 |    39 |     5  (20)| 00:00:01 |
    |   2 |   TABLE ACCESS FULL| C1   |     3 |    78 |     3   (0)| 00:00:01 |
    |   3 |   INDEX FULL SCAN  | P_PK |     2 |    26 |     1   (0)| 00:00:01 |
    ---------------------------------------------------------------------------
    Predicate Information (identified by operation id):
    ---------------------------------------------------
       1 - access("P_COL"="P_COL")
    

    BTW, elimination of join has two major bugs: [bad results: https://metalink2.oracle.com/metalink/plsql/f?p=130:14:9360445691478960109:p14_database_id, p14_docid, p14_show_header, p14_show_help, p14_black_frame, p14_font:NOT, 6894671.8, 1, 1, 1, helvetica] with outer joins and [suboptimal plan | https://metalink2.oracle.com/metalink/plsql/f?p=130:15:9360445691478960109:p15_database_id, p15_docid, p15_show_header] [, p15_show_help, p15_black_frame, p15_font:BUG, 7668888, 1, 1, 1, helvetica], making this dangerous service in 10 gr 2 also.

  • Different behaviors in MAX vs LabVIEW when writing the attribute IMAQdx GigE

    Hi, I'm controlling a Dalsa GigE camera in LabVIEW RT using IMAQdx.  Apart from a few quirks with interface we are image acquisition without a lot of problems at the moment.

    However, there are one or two issues that are confusing.  In this case, it is possible to set a MAX attribute (an attribute of command that tells the device to perform the internal calibration), but when you set the attribute in LabVIEW, the error 0xBFF69010 (-1074360304) unable to create the attribute is thrown.  See the attached images.

    I check if the attribute is writable before making an entry.  It is, however, the write failed, and read the iswritable attribute and then returns false.  In MAX, I can write to this attribute with no problems.

    I have to set up/read/write in my LabVIEW code that makes MAX.  MAX writes all the attributes (based on the values in the XML file) when he opens the camera or he reads simply all the values of the camera.  When LabVIEW opens a reference camera does perform the same steps that what MAX - I'm trying to figure out what could be the difference between MAX and LabVIEW, which might be the cause of this behavior.

    Any help will be appreciated.

    AnthonV wrote:

    Hi, I'm controlling a Dalsa GigE camera in LabVIEW RT using IMAQdx.  Apart from a few quirks with interface we are image acquisition without a lot of problems at the moment.

    However, there are one or two issues that are confusing.  In this case, it is possible to set a MAX attribute (an attribute of command that tells the device to perform the internal calibration), but when you set the attribute in LabVIEW, the error 0xBFF69010 (-1074360304) unable to create the attribute is thrown.  See the attached images.

    I check if the attribute is writable before making an entry.  It is, however, the write failed, and read the iswritable attribute and then returns false.  In MAX, I can write to this attribute with no problems.

    I have to set up/read/write in my LabVIEW code that makes MAX.  MAX writes all the attributes (based on the values in the XML file) when he opens the camera or he reads simply all the values of the camera.  When LabVIEW opens a reference camera does perform the same steps that what MAX - I'm trying to figure out what could be the difference between MAX and LabVIEW, which might be the cause of this behavior.

    Any help will be appreciated.

    Hi AnthonV,

    "Weird" is a good way to describe the Spyder3 when it comes to the GigE Vision/GenICam interface (as opposed to the Dalsa driver that communicates using custom commands via ethernet camera series)...

    The Spyder3 has many questions focused on the calendar. It is possible that the time between the opening of the camera and the setting of this function is different by MAX vs your code in LabVIEW. In addition, there are some cases where MAX will be deletes the error to display. Ignoring the error indicated vs you see the feature to take effect in both cases?

    The base between MAX and LabVIEW behavior is the same. In both cases when you open the unit all parameters are responsible for our camera file that has the registered device settings. This file is created the first time that you open the unit and are updated every time you click on save to MAX or call an API function to save the settings. In any case, I know that the Spyder3 has various questions backup/restore the settings of our camera files.

    I suggest talking with Dalsa on the issues you are experiencing. They might be able to put up with a newer firmware that addresses some of these issues (we have worked with them in the past to identify several of them).

    Eric

  • Different results when contacting 11g DB using various connection methods

    Greetings:

    First of all, thank you in advance for any help you can provide.

    I'm looking for help to determine why certain methods of connection to a working DB production 11.2.0.3.0 64-bit, while others do not.  I tried 7 connection methods, some work, some give an ORA-12541: listener TNS:no error.  When connecting to a test instance, all 7 work very well.

    I'm not a server admin, but the following information obtained from them: both servers are running Linux RedHat Enterprise Server 5.10 (Tikanga).  Both run Oracle 11 g Enterprise Edition 11.2.0.3.0 64 bit.  Each is on a different subnet.  Each has a different DNS suffix up to the last section of the suffix, which is the same on both.  I don't know if the firewall rules are different.  Production server is a physical box, test server is a virtual machine.

    Results below are attempts to connect to the production server made from my Win7 64-bit workstation.  Once again, all attempts to test server are successful.

    Method                                                                                                      Result

    ODP.net 12.1.0.1.0 or 12.1.0.1.2 as an object in PowerShell 32 or 64 bit ORA-12541 .net

    . UDL file by using the provider, Oracle OLE DB of the ODAC 64bits 11.x or ORA-12541 12.x

    SqlPlus of Oracle Instant Client 11.x or ORA-12541 12.x

    Toad with entry in file TNSNames.ora success

    SQL Developer using the success TNSNames.ora file entry

    ODBC System DSN using Oracle 11 g pilot success

    TNSPing with entry in file TNSNames.ora success

    So, what's different in the methods of connection or network protocols between these methods that fail and those who succeed?  Our Oracle DBA has tried to help me and claims that the file of the listener on the server is correctly configured.  It seems to be useful, so I don't think it's brushing me off.  I did not have access to check it myself, so must continue in the event that it is.  So I'm assuming that the TNS listener error is generated because my traffic does not reach the DB rather than the listener being misconfigured file.  However, if

    My ultimate goal is to connect to prod using ODP.net in the PS script to make read-only SQL queries.  Works very well with the test, but of course, this data is not current.

    Thanks for any help! -EW

    EW, were all the client tries the same machine or different machines?  I hope your problem is either the entry in the file tnsnames.ora for connections of problem which can be different even from other tools on the machine even if multiple Oracle homes exists on the client.  Check the files tnsnames.ora entries.  If host names are referenced, verify that the client can recognize the hostname (DNS).  You may need to use an IP address instead.  Here's a more complete list of the possible causes of this problem.

    - -

    * Action:

    -If you are using local naming (TNSNAMES. ORA file):

    S ' ensure that "TNSNAMES" is cited as one of the values of the

    NAMES. DIRECTORY_PATH parameter in the Oracle Net profile

    (SQLNET. ORA)

    -Check that a TNSNAMES file. ORA file exists and is in good

    Directory and is accessible.

    -Make sure that the name of the network used as the connect identifier service

    It exists in the TNSNAMES file. ORA file.

    -Make sure that there are no errors of syntax anywhere in the TNSNAMES file. ORA

    file.  Search for unmatched parentheses or stray characters. Errors

    in a TNSNAMES file. ORA file can make it unusable.

    -If you use the directory naming:

    -Check that "LDAP" appears as one of the values of the

    NAMES. DIRETORY_PATH parameter in the Oracle Net profile

    (SQLNET. ORA).

    -Check that the LDAP directory server is in place and that it is

    accessible.

    -Check that the net service name or the database name used as the

    connect identifier is configured in the directory.

    -Check that the default context used is correct by

    by specifying a full network service name or a unique display name of LDAP

    as the login

    -If you use easy connect naming:

    -Check that "EZCONNECT" appears as one of the values of the

    NAMES. DIRETORY_PATH parameter in the Oracle Net profile

    (SQLNET. ORA).

    -Make sure that the host name, port, and specified service

    are correct.

    -Try putting the identifier of connection between quotation marks.

    //

    - -

    As mentioned that a firewall between the client and the database can cause problems.

    - -

    HTH - Mark D Powell.

  • Different behavior of LOV dependent when copying folder

    Dear gurus,

    I use Jdeveloper 11.1.2.3.0

    method 1 is the new method that I wrote today, the record copy and depend on LOV is also refreshing about changing the parent value LOV LOV dependent same bit is also populated as the Franchise of the brand and the Type of mark, but the problem with this is little InputTextLOV load value is not complete when you copy as ASM SM, RFAM, RSM, TYPE of ACTIVITY, the NAME of the HIERARCHY and BRAND MANAGER who is highlighted in yellow.  as shown in the image below.


    https://outlook.office365.com/owa/service.svc/s/GetFileAttachment?id=AAMkADM4NzcwNjk5LWI2MTgtNDY1My05NzZmLWRlNGFiMGFmMjUwMwBGAAAAAACm8DyCMaD%2BQp7yH%2BWFWMVGBwBTXXB8hJYiTLjuY1paep%2BAAAAAAAEJAABTXXB8hJYiTLjuY1paep%2BAAAB9TPUOAAABEgAQAOgMHOGjUJJKmNT1aIvwLXw%3D&X-OWA-CANARY=QObvCeI93Eam98r9h2x6ouAdx8aU_9IY28_fuumJ1-0uhB5QaTdkinlT9oUPC5qZOENwaeKCD0I.

    Transient attribute with update = never is commented in the method 1. even tried transitional attribute update = ALWAYS,

    
           //method-1
                  public void copyProposal(javax.faces.event.ActionEvent actionEvent) {
                  // Add event code here...
            
                   System.out.println("Inside copyProposal Method::::");
                    AdfFacesContext adfctx = AdfFacesContext.getCurrentInstance();
                    java.util.Map pageFlowScope = adfctx.getPageFlowScope();
                    String userName = (String) pageFlowScope.get("user").toString();
                    Date date = new Date();
                    System.out.println("date::: " +date);
                    String date1 = new SimpleDateFormat("dd-MMM-yyyy").format(new Date()).toString();
                    System.out.println("date1::: " +date1);
                    String date2 = new SimpleDateFormat("mm/dd/yyyy").format(new Date()).toString();
                    
                    Calendar currenttime = Calendar.getInstance();
                        Date sqldate = new Date((currenttime.getTime()).getTime());
                        System.out.println("current Date_Time::: " +sqldate);
                    AppModuleImpl am = this.getAm();
                    ViewObject proposalHeaderVO = am.getProposalHeaderView2();    
                    //        ViewObjectImpl proposalHeaderVO = this.getProposalHeaderView2();
                    Row propHeaderCurrentRow = proposalHeaderVO.getCurrentRow();
                    String[] propHeaderAttrs = propHeaderCurrentRow.getAttributeNames();
                    //Skip copying the primay key attributes or any attributes which you want to skip
                    String[] skipAttrs = new String[] {"BranchProposalNumber", "BranchHoSerial","ProposalId","ProposalDate","CreationDate","ApprovalStatus","Attribute9","Attribute10",
                                                       "ProposalAmt","ApprovalRemarks","ApproverRemarkTemp","BudgetAmt","ConsumedAmt","RemainingAmt","AmountUtilized", "TotalLineAmount",
                                                       "TotalBudgetAmount","TotalRemainingAmount","TotalConsumedAmount"};//,"L1Approver","L2Approver","L3Approver","L1Code","L2Code","L3Code"
                    List skipAttrList = Arrays.asList(skipAttrs);
                    //creating a new duplicate row
                    Row dupRow = proposalHeaderVO.createRow();
          
            dupRow.setAttribute("ProposalDate", sqldate);
            dupRow.setAttribute("ProposalType", propHeaderCurrentRow.getAttribute("ProposalType"));
            dupRow.setAttribute("EffectiveStartDate", propHeaderCurrentRow.getAttribute("EffectiveStartDate"));
            dupRow.setAttribute("EffectiveEndDate", propHeaderCurrentRow.getAttribute("EffectiveEndDate"));
            dupRow.setAttribute("BranchId", propHeaderCurrentRow.getAttribute("BranchId"));
            dupRow.setAttribute("BranchName", propHeaderCurrentRow.getAttribute("BranchName"));
            dupRow.setAttribute("State", propHeaderCurrentRow.getAttribute("State"));
            dupRow.setAttribute("BusinessLine", propHeaderCurrentRow.getAttribute("BusinessLine"));
            dupRow.setAttribute("BrandFranchise", propHeaderCurrentRow.getAttribute("BrandFranchise"));
            dupRow.setAttribute("BrandType", propHeaderCurrentRow.getAttribute("BrandType"));
            dupRow.setAttribute("ApprovalStatus", "Pending");
            dupRow.setAttribute("BrandManager", propHeaderCurrentRow.getAttribute("BrandManager"));
           dupRow.setAttribute("ProposalAction", propHeaderCurrentRow.getAttribute("ProposalAction"));
            dupRow.setAttribute("ActionRemarks", propHeaderCurrentRow.getAttribute("ActionRemarks"));
            dupRow.setAttribute("ActivityTypeId", propHeaderCurrentRow.getAttribute("ActivityTypeId"));
            dupRow.setAttribute("ActivityType", propHeaderCurrentRow.getAttribute("ActivityType"));
            dupRow.setAttribute("Attribute1", propHeaderCurrentRow.getAttribute("Attribute1"));
            dupRow.setAttribute("Attribute2", propHeaderCurrentRow.getAttribute("Attribute2"));
            dupRow.setAttribute("Attribute3", propHeaderCurrentRow.getAttribute("Attribute3"));
            dupRow.setAttribute("Attribute4", propHeaderCurrentRow.getAttribute("Attribute4"));
            dupRow.setAttribute("BusinessLineName", propHeaderCurrentRow.getAttribute("BusinessLineName"));
            dupRow.setAttribute("BudgetAmt", propHeaderCurrentRow.getAttribute("BudgetAmt"));
            dupRow.setAttribute("ConsumedAmt", propHeaderCurrentRow.getAttribute("ConsumedAmt"));
            dupRow.setAttribute("RemainingAmt", propHeaderCurrentRow.getAttribute("RemainingAmt"));
            dupRow.setAttribute("ProposalAmt", propHeaderCurrentRow.getAttribute("ProposalAmt"));
            dupRow.setAttribute("ProposalDescription", propHeaderCurrentRow.getAttribute("ProposalDescription"));
            dupRow.setAttribute("CreatedBy", userName);
    //        dupRow.setAttribute("CreationDate",sqldate);
            dupRow.setAttribute("LastUpdatedBy", propHeaderCurrentRow.getAttribute("LastUpdatedBy"));
    //        dupRow.setAttribute("LastUpdateDate", sqldate);
            dupRow.setAttribute("AdfCreatedBy", userName);
            dupRow.setAttribute("ApprovalRemarks", propHeaderCurrentRow.getAttribute("ApprovalRemarks"));
            dupRow.setAttribute("Attribute6", propHeaderCurrentRow.getAttribute("Attribute6"));
            dupRow.setAttribute("Attachment", propHeaderCurrentRow.getAttribute("Attachment"));
            dupRow.setAttribute("Attribute7", propHeaderCurrentRow.getAttribute("Attribute7"));
            dupRow.setAttribute("Attribute8", propHeaderCurrentRow.getAttribute("Attribute8"));
            dupRow.setAttribute("Attribute9", propHeaderCurrentRow.getAttribute("Attribute9"));
            dupRow.setAttribute("Attribute10", userName);
            dupRow.setAttribute("Segment1", propHeaderCurrentRow.getAttribute("Segment1"));
            dupRow.setAttribute("Segment2", propHeaderCurrentRow.getAttribute("Segment2"));
            dupRow.setAttribute("Segment3", propHeaderCurrentRow.getAttribute("Segment3"));
            dupRow.setAttribute("Segment4", propHeaderCurrentRow.getAttribute("Segment4"));
            dupRow.setAttribute("Segment5", propHeaderCurrentRow.getAttribute("Segment5"));
            dupRow.setAttribute("Segment6", propHeaderCurrentRow.getAttribute("Segment6"));
            dupRow.setAttribute("L1Approver", propHeaderCurrentRow.getAttribute("L1Approver"));
            dupRow.setAttribute("L2Approver", propHeaderCurrentRow.getAttribute("L2Approver"));
            dupRow.setAttribute("L3Approver", propHeaderCurrentRow.getAttribute("L3Approver"));
            dupRow.setAttribute("L1Code", propHeaderCurrentRow.getAttribute("L1Code"));
            dupRow.setAttribute("L2Code", propHeaderCurrentRow.getAttribute("L2Code"));
            dupRow.setAttribute("L3Code", propHeaderCurrentRow.getAttribute("L3Code"));
            dupRow.setAttribute("ExpenceCategory", propHeaderCurrentRow.getAttribute("ExpenceCategory"));
            dupRow.setAttribute("ExpenceCategoryId", propHeaderCurrentRow.getAttribute("ExpenceCategoryId"));
            dupRow.setAttribute("HierarchyName", propHeaderCurrentRow.getAttribute("HierarchyName"));
            dupRow.setAttribute("FinYear", propHeaderCurrentRow.getAttribute("FinYear"));
            dupRow.setAttribute("Posm", propHeaderCurrentRow.getAttribute("Posm"));
            dupRow.setAttribute("HiqBrandManager", propHeaderCurrentRow.getAttribute("HiqBrandManager"));
            dupRow.setAttribute("Projectcode", propHeaderCurrentRow.getAttribute("Projectcode"));
    //        dupRow.setAttribute("PendingAppName", userName);
    //        dupRow.setAttribute("InHierarchy", propHeaderCurrentRow.getAttribute("InHierarchy"));
            dupRow.setAttribute("CurrentUser", userName);
            dupRow.setAttribute("CurrencyCode", propHeaderCurrentRow.getAttribute("CurrencyCode"));
            dupRow.setAttribute("ExchangeRate", propHeaderCurrentRow.getAttribute("ExchangeRate"));
    //        dupRow.setAttribute("ApStatus", propHeaderCurrentRow.getAttribute("ApStatus"));
    //        dupRow.setAttribute("StateCodeName", propHeaderCurrentRow.getAttribute("StateCodeName"));
            dupRow.setAttribute("BudgetLevel", propHeaderCurrentRow.getAttribute("BudgetLevel"));
            dupRow.setAttribute("AdfCreatedName",userName);
            dupRow.setAttribute("StateName", propHeaderCurrentRow.getAttribute("StateName"));
    //        dupRow.setAttribute("TotalLineAmount", propHeaderCurrentRow.getAttribute("TotalLineAmount"));
    //        dupRow.setAttribute("ExpenceMainCategory", propHeaderCurrentRow.getAttribute("ExpenceMainCategory"));
    //        dupRow.setAttribute("TotalBudgetAmount", propHeaderCurrentRow.getAttribute("TotalBudgetAmount"));
    //        dupRow.setAttribute("TotalRemainingAmount", propHeaderCurrentRow.getAttribute("TotalRemainingAmount"));
    //        dupRow.setAttribute("TotalConsumedAmount", propHeaderCurrentRow.getAttribute("TotalConsumedAmount"));
    //        dupRow.setAttribute("BudgetId", propHeaderCurrentRow.getAttribute("BudgetId"));
    //        dupRow.setAttribute("ExpenseCategorySwitcher", propHeaderCurrentRow.getAttribute("ExpenseCategorySwitcher"));
    //        dupRow.setAttribute("AmountUtilized", propHeaderCurrentRow.getAttribute("AmountUtilized"));
    //        dupRow.setAttribute("ApproverRemarkTemp", propHeaderCurrentRow.getAttribute("ApproverRemarkTemp"));
            dupRow.setAttribute("SpotLightAtt", propHeaderCurrentRow.getAttribute("SpotLightAtt"));
           
                    //Inserting the duplicate row
                    proposalHeaderVO.insertRow(dupRow);
                    
                    //EXECUTING SETPARAM for SelectActivities..
                    String activityType = (String)propHeaderCurrentRow.getAttribute("ActivityType");
                      activityType =   activityType.substring(0,activityType.indexOf("-",0));
                      System.out.println("value in activity Type::: " +activityType);
                    setParam(activityType);
                   
        }
    

    and here's the method 2

    method 2 is to copy all the fields, but change of LOV dependent parent or child LOV don't is not re-rested

    public void copyProposal(javax.faces.event.ActionEvent actionEvent) {
    // Add event code here...
            System.out.println("Inside copyProposal Method::::");
                    AdfFacesContext adfctx = AdfFacesContext.getCurrentInstance();
                    java.util.Map pageFlowScope = adfctx.getPageFlowScope();
                    String userName = (String) pageFlowScope.get("user").toString();
                    Date date = new Date();
                    System.out.println("date::: " +date);
                    String date1 = new SimpleDateFormat("dd-MMM-yyyy").format(new Date()).toString();
                    System.out.println("date1::: " +date1);
                    String date2 = new SimpleDateFormat("mm/dd/yyyy").format(new Date()).toString();
                    
                    Calendar currenttime = Calendar.getInstance();
                        Date sqldate = new Date((currenttime.getTime()).getTime());
                        System.out.println("current Date_Time::: " +sqldate);
                    AppModuleImpl am = this.getAm();
                    ViewObject proposalHeaderVO = am.getProposalHeaderView2();    
                    //        ViewObjectImpl proposalHeaderVO = this.getProposalHeaderView2();
                    Row propHeaderCurrentRow = proposalHeaderVO.getCurrentRow();
                    String[] propHeaderAttrs = propHeaderCurrentRow.getAttributeNames();
                    //Skip copying the primay key attributes or any attributes which you want to skip
                    String[] skipAttrs = new String[] {"BranchProposalNumber", "BranchHoSerial","ProposalId","ProposalDate","CreationDate","ApprovalStatus","Attribute9","Attribute10",
                                                       "ProposalAmt","ApprovalRemarks","ApproverRemarkTemp","BudgetAmt","ConsumedAmt","RemainingAmt","AmountUtilized"};  //,"L1Approver","L2Approver","L3Approver","L1Code","L2Code","L3Code"
                    List skipAttrList = Arrays.asList(skipAttrs);
                    //creating a new duplicate row
                    Row dupRow = proposalHeaderVO.createRow();
                    //copying all attributes one by one
                    for (int i = 0; i < propHeaderAttrs.length; i++) {
                        String propHeaderAttrName = propHeaderAttrs[i];
                    
                        if ("ProposalDate".equals(propHeaderAttrName))
                            dupRow.setAttribute(propHeaderAttrName, sqldate);
                        
                        int attrIndex = dupRow.getAttributeIndexOf(propHeaderAttrName);
                        //Checking if the attribute is in the skip attribute list and the attribute is updatable
                        if (!skipAttrList.contains(propHeaderAttrName) &&
                            dupRow.isAttributeUpdateable(attrIndex))
                            //Setting the value for the attributes
                            dupRow.setAttribute(propHeaderAttrName,
                                                propHeaderCurrentRow.getAttribute(propHeaderAttrName));
                        
                
                        System.out.println("nm,"+propHeaderAttrName+" k, j," +" " +propHeaderAttrName+" , ");
                    }
                    
                    dupRow.setAttribute("AdfCreatedBy",userName);
                    dupRow.setAttribute("Attribute10",userName);
                    dupRow.setAttribute("ApprovalStatus", "Pending");
                    dupRow.setAttribute("L1Approver", propHeaderCurrentRow.getAttribute("L1Approver"));
                    dupRow.setAttribute("L1Code", propHeaderCurrentRow.getAttribute("L1Code"));
                    dupRow.setAttribute("L2Approver", propHeaderCurrentRow.getAttribute("L2Approver"));
                    dupRow.setAttribute("L2Code", propHeaderCurrentRow.getAttribute("L2Code"));
                    dupRow.setAttribute("L3Approver", propHeaderCurrentRow.getAttribute("L3Approver"));
                    dupRow.setAttribute("L3Code", propHeaderCurrentRow.getAttribute("L3Code"));
                    
                    dupRow.setAttribute("ActivityType", propHeaderCurrentRow.getAttribute("ActivityType"));
                    dupRow.setAttribute("HierarchyName", propHeaderCurrentRow.getAttribute("HierarchyName"));
                    
                    dupRow.setAttribute("HiqBrandManager", propHeaderCurrentRow.getAttribute("HiqBrandManager"));
    
                    //Inserting the duplicate row
                    proposalHeaderVO.insertRow(dupRow);
                    
                    //EXECUTING SETPARAM for SelectActivities..
                    String activityType = (String)propHeaderCurrentRow.getAttribute("ActivityType");
                      activityType =   activityType.substring(0,activityType.indexOf("-",0));
                      System.out.println("value in activity Type::: " +activityType);
                    setParam(activityType);
                   
        }
    

    kindly help me to get the copy feature and feature update dependent lov.

    Best regards,

    MD Jahangir Pasha

    Dear gurus,

    Thank you for your support and answers.

    Problem solved, I added view accessors name in the attribute skip list. now it does not work as expected.

    Kind regards

  • Loss CSS &amp; behaviors when you apply the template

    I created my site and then realized that I could use a model for big changes. Then, I saved an and start copying on my content files. Everything was going well until I came to be copied into a page with a form validator. I can't get the upcoming help text and I also can't conduct must trigger on the Send button.

    TThis is the link to the page that has a form of work and is NOT based on a model


    This is the link to the page that had the model applied and no longer works

    Thanks for any advice I can get on it.

    Samantha

    Samantha,

    Look towards the bottom of the page that works for one

Maybe you are looking for