Setting attributes question

Hi,
I am trying to set attributes of a object in a for loop so that it sets the attribute as many time as there are elements in the for loop and then add the object to an array list and then after exiting the array list set the same attribute to some thing else and also add it to array list so now when I print it out the array list it should print like this....
first item in array list// coming from for loop
second item in array list // coming from for loop
third item // that I am setting out of array list ....
I am doing it like this
Bank bank = null;
ArrayList cchList = new ArrayList();
flag = true;
for (int i = 0; i < arrayList.size(); i++) {
          Cutomer cutomer = (Cutomer) arrayList.get(i);
          bank = new Bank();
     falg = false;
bank.setComments(cutomer.getDecs());
cchList.add(bank);
if(flag)
          bank = new Bank();
     bank.setComments(cutomer.getTxtDecs());
     cchList.add(bank);
My problem is it is printing it twice .....
can someone tell me what I am doing wrong here

If I understand your problem right, you're not grouping your if-statement.
if(flag)
bank = new Bank();
bank.setComments(cutomer.getTxtDecs());
cchList.add(bank);should be
if(flag)
    bank = new Bank();
    bank.setComments(cutomer.getTxtDecs());
    cchList.add(bank);
}

Similar Messages

  • Code that handles a set of questions from database and place it on JSP

    Hi,
    How to write a code that handles a set of Quiz questions from database and place it on JSP page..
    Thanks in advance
    Haritha

    975033 wrote:
    Hi,
    I hav got the answer from you r previous link, but not completly. I need help regarding on how to do code that handles a set of questions from database and place it on JSP.
    Any help is highly appreciated.Yes but what kind of help do you expect to get? What kind of help do you think is possible through something as cold and distant as a forum, where you clearly require personal guidance and tutoring?
    If you are going to answer "example code", I should warn you that the answers are not going to be to your liking.

  • How to create yes or no radiogroup dynamically for a set of questions

    hi,
    I am new to APEX.Depending upon my project requirement I need to create a set of questions with yes or no as radiogroup buttons,appended with a textarea for each question.For ex:
    1.Name o Y o N [ "text area"]
    The above line specifies the model I need.
    Here text area is used for writing comments.
    Now the question is how can I create them dynamically using apex_item.
    Its very urgent.Kindly reply me soon.
    Thanks in advance.

    Thanks for ur quick reply.
    But what actually I need is,I need to create the radiobuttons also dynamically.
    I have created them by the following syntax,
    select ename,apex_item.radiogroup(eno,'y' ) yes,apex_item.radiogroup(eno,'N')
    from emp;
    but the problem with this is ,
    when I inserted yes for the first one it is taking and if i am giving the second one also as YES then it is not accepting ..means it is checking the second item by clearing the first one.
    What I need is when I check the second one the first one should not get cleared.
    Thanks in advance.

  • Need to add row and set attribute value on pageload

    Guys,
    On my page based on the pageflowscope variable value, i need to add a row for master and one row for detail viewobject and set attribute values. (Some of the attribute are LOV and Checkboxes as well)
    I am using following code to create records.....records are being added but i am not able to set the attributes
    OperationBinding ob;
    ob = ADFUtil.findOperationBinding("Create");
    ob.execute();
    ob = ADFUtil.findOperationBinding("CreateInsert3");
    ob.execute();
    I am using following code to set the attributes value
    DCIteratorBinding dc1 = ADFUtil.getBindingIterator("firstiterator");
    DCIteratorBinding dc = ADFUtil.getBindingIterator("seconditerator");
    row1=dc1.getCurrentRow();
    row=dc.getCurrentRow();
    row.setAttribute("activest","A");
    row1.setAttribute("type","dc14");
    Anything i am doing wrong here or any suggestion to try is greatly appreciated....

    Vinod,
    Yes commit button is there and yes its also has entry in pagedef...
    When I open the same page on edit mode and i can edit regular record and save them
    Problem is that when i open the page on new mode and try to add rows on page load..... and setting values as described above.... save button somehow doesn't work...
    seems like after i add the rows on the fly, i need to refresh the binding?
    any help is greatly appreciated....
    thank you guys

  • How to redirect user from login page to "Set Challenge question" page

    How to redirect user from login page to "Set Challenge question" page (NOT custom page) after 3 un successful password attempts?
    Meaning when user types wrong password 3 times they will be redirected to set Challenge question page. If user answers the challenge question then password reset page should be appeared other wise (after remaining 3 un successeful challenge question answers) account should be locked out.
    thanks for your help.

    hi sandeep
    Thanks for your answer. Let me ellaborate more on the requirement here.
    - Password Policy and Lost Password management are set up in the identity system
    - Configure login tries allowed= 5. Verify accout is lock out after 5 unsucessful login.
    This is what need to achieve.
    1) If a user attempts to login 3(not 5) times using an incorrect login credential he/she should be redirected to set challenge question (security question) page.
    2) Then if the user attempts (remaining) 2 times incorrect challenge answer then his/her account should be locked out.
    3) If he/she answers the challenge answer correctly then he/she should be redirected to password reset page.
    Is this possible?

  • How to add set attribute method in webdynpro abap using code wizard.

    Hi developer,
    I am new to webdynpro abap , i have developed a small component from sap technical abap but i am not able to add the set attribute method using read context node /attribute in wizard code ,pleae guide me in solution.
    thanks,
    ravi.

    Hi,
    could you copy / past your code ?
    if you need help on webdynpro and your beginner, try to watch the video on internet of WebBProfessor. It's really good videos !
    regards
    Fred

  • Set attribute to be mandatory in set type

    Hi! Can I confirm whether it is possible to set certain attribute fields to be mandatory in a set type? The transaction code to create set attribute and assign to the set type is COMM_ATTRSET.
    Thanks!
    SF

    Hi SF,
    In the standard system, you cannot configure an attribute to be mandatory in a set .
    However, you can try using transaction SFAC in order to set an attribute as mandatory; I am not sure if this procedure will work for you, but is it good to take a look. Into this transaction, you cam define which fields are displayed/hidden/mandatory.
    Keep on mind that every time a set is create in transaction COMM_ATTRSET, a corresponding module pool SAPLZOM_<set type name> is created with Screen group 0100.
    I hope it helps.
    Kind Regards,
    Gabriel Santana

  • Sets of Question Papers and answers for SAP ECC 6.0- FICO Module

    Hi,
    If anybody has some material on sets of question papers and answers of SAP ECC 6.0  FI- CO Material please mail the same on [email protected]
    Useful replies will be awared points.
    Regards
    Milind Nair

    Hi,
    Please refer the below link and reward if helpful.
    http://help.sap.com/saphelp_nw04s/helpdata/en/e5/de86f335cd11d3acb00000e83539c3/content.htm

  • Set attribute value using plugins

    Hi Experts,
    I am facing error when setting the value of attribute in the event "OnInvestigationStartedEvent". Any suggestion to fix the issue
    code:
                Session ses = onInvestigationStartedEvent.getSessionContext().getInterviewSession().getRuleSession();
                Attribute start = ses.getGlobalEntityInstance().getEntity().getAttribute("test_start_time");
                Date start_date = new Date();
                start.setValue(ses.getGlobalEntityInstance(), start_date);
    Error:
    25750 [http-apr-8080-exec-9] INFO com.oracle.determinations.engine.Session  - User setting attribute test_start_time, entity global, instance name global, session 1 to value 7/21/13 2:17 PM
    25752 [http-apr-8080-exec-9] ERROR com.oracle.determinations.web.platform.templatingengine.ErrorRenderer  - A unauthorised change to the Rule Session has been detected.
    com.oracle.determinations.interview.engine.exceptions.CorruptSessionException: A unauthorised change to the Rule Session has been detected.
      at com.oracle.determinations.interview.engine.data.local.RuleSessionManager.checkSessionIntegrity(RuleSessionManager.java:760)
      at com.oracle.determinations.interview.engine.data.local.RuleSessionManager.getRuleSession(RuleSessionManager.java:144)
      at com.oracle.determinations.interview.engine.local.LocalInterviewSession.getRuleSession(LocalInterviewSession.java:203)
      at com.oracle.determinations.interview.engine.data.model.InterviewEntityInstanceIdentifier.findEntityInstance(InterviewEntityInstanceIdentifier.java:73)
      at com.oracle.determinations.interview.engine.local.AttributeGoal.getNextScreen(AttributeGoal.java:112)
      at com.oracle.determinations.interview.engine.local.LocalInterviewSession.getNextScreen(LocalInterviewSession.java:222)
      at com.oracle.determinations.web.platform.controller.actions.InvestigateAction.getResource(InvestigateAction.java:65)
      at com.oracle.determinations.web.platform.servlet.WebDeterminationsServlet.doGet(WebDeterminationsServlet.java:112)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at com.oracle.determinations.web.platform.util.CharsetFilter.doFilter(CharsetFilter.java:46)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
      at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1008)
      at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
      at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1852)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
    Thanks,
    Vinay

    Vinay,
    When working in an Interview Engine event handler, you need to use Interview Engine objects to set values. Have a look at the example "Use the OnInterviewSessionCreatedEvent to pre-seed data into a newly created session" in the "Oracle Policy Automation Developer's Guide"
    Your code should look something like:
    // get the globalInstance from a new InterviewUserData;
    InterviewUserData data = new InterviewUserData();
    InterviewEntityInstance globalInstance = data.getGlobalInstance();
    // set the test_start_time
    Date start_date = new Date();
    globalInstance.setValue("test_start_time", start_date );
    // submit the data to the Interview session.
    TransactionResult result = session.submit(data);
    Hope this helps.
    Cheers
    Frank

  • Different user options with different sets of questions

    Is there a way I can have two different options and when the user clicks on option A a whole set of questions/form fields appear. Or if they select option B a whole different set of questions/form fields appear?
    How would I go about programming something like that?
    Hopefully I was clear enough. Thanks so much! :)

    Hi Arnold,
    SAP Logon Tickets issued by the Portal contain two user ids, basically one for Java Systems and one for ABAP systems. See also note 843061 for details.
    You do not need passwords for the reference system, if the user mapping is maintained by the user administrator, and the UM property ume.usermapping
    .admin.pwdprotection is set to false, see http://help.sap.com/saphelp_nw04/helpdata/en/fe/d22a41b108f523e10000000a155106/frameset.htm. If you set the mapped user id programmatically, or if you retrieve it from an LDAP server, you also do not need to verify the ABAP password of the user (see https://media.sdn.sap.com/javadocs/NW04/SP12/ume/index.html and http://help.sap.com/saphelp_nw04/helpdata/en/0b/d82c4142aef623e10000000a155106/frameset.htm).
    Best regards,
    Joerg

  • Forcing Users to set Security Questions

    Hi All,
    Currently when a user joins the organization, the user can go to IdM user interface, login and set security questions. But this is an option only if user wants to use self service in IdM. So, it has been found that users are not setting it and it becaomes a pain when they call help desk for password change and help desk is not able to verify the user's identity because security questions are not set.
    Please share your thoughts how other organizations are handling this situation.
    Is there any way that we can force a user to set security questions when the user logs in first time?
    Regards,
    Gaurav

    Hello,
    In our Organization we did the following.
    Under the Security tab there is a Policy tab.
    There you should find a policy called: Default Identity Manager Account Policy.
    Under Secondary Authentication Policy Options make sure "Enforce Answer Policy at Login" is checked.
    In page help states:
    Select this option to enforce the authentication question policy when the user logs in to this interface.
    This solution works however it did become problematic while we had pass-thru authentication configured.
    All the best
    -IDMxml

  • Presenter 8 -- need help with proper settings to allow quiz retake (with a NEW set of questions from a random pool)

    We are publishing a Presenter 8 quiz to an LMS in a SCORM format.  I am having trouble with the following:  the quiz is built with multiple question groups, and a limited number of questions are being selected from each group.  E.g. we have 80+ questions in total, and 25 are presented to a user on a given attempt.
    When a user fails the quiz and exits the quiz normally, we want them to study and try again.  I set the quiz settings to allow infinite attempts, and set the LMS settings to make sure the quiz is not presented in "review mode".  When I test this quiz by failing it the first time, when I reenter the quiz, I am taken to the last slide in the quiz (which is the last one I viewed), and I can retake the quiz by navigating back to the first question.
    Here's the problem:  I am presented with the SAME set of questions, rather than a NEW set of random questions.  This will facilitate cheating (all a user has to do is take the quiz once, review the answers, and then take it again to pass it).
    How do I insure that the user is presented with a NEW set of questions when I retake the quiz?
    I am open to upgrading to Adobe Presenter 10, but would rather not have to do so.  There must be some setting I'm missing.
    Scott Richardson

    If you move a mailbox from one server to another, Outlook will automatically repair the Outlook profile.  Have you tried this, instead of trying to force a profile update using a PRF?

  • How to install Twitter app without setting security questions?

    Hello! I recently registered a Twitter account. iOS 6 includes Twitter integration - great. When I navigate to Settings - Twitter and tap the Install button, a dialog shows up: "Improve your Apple ID security" and "Set security questions" blah blah. There are two buttons in the dialog, "Set questions" and "Cancel". If I tap Cancel, Twitter app download doesn't begin and Twitter icon disappears from my SpringBoard. If I tap "Set questions", I need to answer some stupid questions. If I leave answer boxes empty, I can't continue. I will not set any security questions for my Apple ID, that's for sure.
    How I can install Twitter app?

    I just encountered the same problem when I tried to download Twitter on my husband's new iPhone 5.  There was no problem when I installed Twitter on my iPhone 3GS yesterday :-( 
    You've probably seen by now that there are many, many people who are having problems with the 'Help improve Apple ID security' message - not confined to iPhone but also on iTunes, iPod Touch, iPad etc.
    I chose the 'Not Now' button on his iPhone 5 and the Twitter app wouldn't allow me to proceed ....
    Looks like Apple aren't in any hurry to fix this because people have been complaining about it for months (after all,  your post is more than 3 months old and the problem is still occurring).
    Were you ever able to activate Twitter on your iPhone 4S?
    Tricia

  • Hi .. I can not re- set the questions of confidentiality in order to forget the answers in my account

    Hi .. I can not re- set the questions of confidentiality in order to forget the answers in my account

    If you aren't getting the reset link on the Password & Security section of your account on http://appleid.apple.com then you don't have a rescue email address (an alternate email address is different), and you won't be able to add one until you can answer your questions - you will have to contact Support in your country to get the questions reset.
    Contacting Apple about account security : Contact Apple for help with Apple ID account security
    If your country isn't on that page then try this form and explain and see what they reply with : https://ssl.apple.com/emea/support/itunes/contact.html
    When they've been reset you can add a rescue email address for potential future use : Manage your Apple ID primary, rescue, alternate, and notification email addresses

  • FRM-41014: Cannot set attribute of null canvas item PO_REQ_HDR.ATTRIBUTE8

    I am Doing Form Personalization on Dff in Requisition Headers form. My Requirement is
    requirement is like this
    Segment1 : Requsition Type
    Segment2: Project ID
    Segment3: CAF ID
    ATTRIBUTE7 will have two values
    1. Capex
    2. Opex
    if user selects Capex.. then ATTRIBUTE8 and ATTRIBUTE9 are manadatory
    otherwise optional
    i did personalization
    In Condition Tab:-
    I took Trigger Event as When-Validate-Record
    Trigger Object as PO_REQ_HDR
    Condition :PO_REQ_HDR.ATTRIBUTE7='Capex'
    When i validate it gives The Condition evaluates to false
    In Action Tab:-
    Type Property
    Language All
    Object Type Item
    Target Object Po_REQ_HDR.Attribute8
    Property Name :Required
    Value:True
    then i Pressed Apply Now then It fires Error:: FRM-41014: Cannot set attribute of null canvas item PO_REQ_HDR.ATTRIBUTE8
    Can Any one please sujjest what is the Cause of this Error.
    I am Using 12.0.4 application version.

    Please see these threads.
    Re: Personalization Problem
    How can I make a DFF segment diappear?
    Thanks,
    Hussein

Maybe you are looking for

  • Questions on Saving and mining data with Labview and DIAdem

    Hi, I am sampling two signals at 200k sampling rate. I am trying to save the data on harddisk and analyzing the data using DIAdem. If I save the data using mesurement file format .tdm and .lvm, the file size will be about 4 Gigabytes for only 10 mins

  • Can my family in Australia buy music for me?

    I live in the UK, with a UK passport, payment card and address. I have family on a working VISA in Australia. They have an Australian card and current address but they are UK nationals. There is some music I'd like on the Australian iTunes. If she wa

  • Update link on officejet j4540 shows on desktop will not respond. Using windows 7

    Had an older computer using Windows XP with the Officejet j4540 with no problems.  Computer died.  Bought new computer running Windows 7 Home.  Installed printer & downloaded new software.  Got the blue tag on desktop to update but tag would not work

  • Help needed to install a service for Solaris machines

    Hello, I have installed an admin server and 2 managed servers on the solaris box. How do I start the server using a cron job? Can someone point me to the steps please? All help will be greatly appreciated.

  • Apple TV - iOS 8 and Radio Station Error

    Hello, I recently updated my two Apple TV's to iOS 8 when the new release came. After doing so, whenever I would play a radio station, any one, it would play for about 10 minutes and then an error would appear on the screen saying "An error occurred