How to populate a set of fields multiple time in the page ?

Hi All,
JDev Ver : 11.1.1.5
I have a requirement as follows,
My page contains 1. Add Button
2. Five fields.(one input text and four select one choice)
The fields are like one input text and remaining select one choice. And also these fields contains validations.
Actions
On click of add button , I have to show the fields , similarly I have to add one more set of fields in the page below the first set when I click the add button, Like this I will add as many as I need.
How to achieve this requirement,
1. Do I need to generate the view objects dynamically from managed bean ?
2. Do I need to create a custom component ?
For Time being , I have added 3 set of fields pages and showing one by one. I want to do this dynamically.
Please let me know the suggestion for this Requirement.
Thanks,
Gopinath

Hi,
to do this:
1. reate a managed bean that exposes a HashMap property. The HashMap is of type e.g. Map<Person>
2. To create a new set of fields, add a new entry to the HashMap and refresh the af:form. The af:form contains and af:forEach that you use
to iterate as often as you have entries in the HashMap. Each text field you bind to #{bean.HashMapProperty['key'].attribute}, for example
#{bean.HashMapProperty['key'].FirstName}
#{bean.HashMapProperty['key'].LastName}
#{bean.HashMapProperty['key'].EmployeeId}
3. When the user updates a field, the HashMap is updated based on the "key"
4. The managed bean should be in viewScope and referenced from the field's value property
Frank

Similar Messages

  • Namedquery using same table field multiple times with the use of a label

    Hi all,
    i'm having some trouble with a namedquery. I'm trying to
    use the following namedquery in Toplink to retrive some
    data out of a database.
    select proj.id
    , proj.code
    , proj.name
    , proj.budget
    , proj.status
    , proj.startdate
    , proj.enddate
    , proj.mdr_id projleader_id
    , med_leader.name projleader
    , proj.mdr_id_valt_onder promanager_id
    , med_promanager.name promanager
    , proj.mdr_id_is_account_from accmanager_id
    , med_accmanager.name accmanager
    from uur_projecten proj
    , uur_medewerkers med_leader
    , uur_medewerkers med_promanager
    , uur_medewerkers med_accmanager
    where ( #p_name is not null or #p_search_string is not null )
    and med_leader.id = proj.mdr_id
    and ( proj.mdr_id = nvl( #p_name, proj.mdr_id )
    or proj.mdr_id_valt_onder = nvl( #p_name, proj.mdr_id )
    or proj.mdr_id_is_account_van = nvl( #p_name, proj.mdr_id ))
    and (( #p_status is not null
    and substr( proj.status, 1, 1 ) = upper( #p_status ))
    or ( #p_status is null ))
    and ( upper( proj.code ) like upper( '%' || #p_search_string || '%' )
    or upper( proj.name ) like upper( '%' || #p_search_string || '%' ))
    and med_promanager.id = proj.mdr_id_valt_onder
    and med_accmanager.id = proj.mdr_id_is_account_van
    order by decode( substr( proj.status, 1, 1 )
    , 'A', 2, 'T', 3, 'F', 4, 1 ), proj.code desc
    As you all can see the table ‘uur_medewerkers’ is been used trice to
    determine the name for the corresponding ID. I have a Java class with
    the fields for the results and created a Toplink descriptor to map
    the fields to the database fields.
    The problem is that for the 'projleader', 'promanager' and 'accmanager'
    fields the results are null. The reason is probably that Toplink doesn't
    recognize the fields because of the label for the tables.
    Is there a way to make this work?
    Greets, René

    Post Author: quafto
    CA Forum: .NET
    Your query is not too clear so I'll do my best to answer it broadly.
    You mentioned that you have a .NET web application where your users enter data on one screen and then may retrieve it on another. If the data is written in real time to a database then you can create a standard Crystal Report by adding multiple tables. The tables should be linked together using the primary and foreign keys in order to optimize the database query and give you a speedy report. Using unlinked tables is not recommended and requires the report engine to index the tables (it is quite slow).
    You also mentioned you have a "PropID" to be used in a WHERE clause. This is a great place to use a parameter in your report. This parameter can then be used in your record selection formula inside Crystal Reports. The report engine will actually create the WHERE clause for you based on the parameter value. This is helpful because it allows you to simply concentrate on your code rather than keeping track of SQL queries.
    Now, what Crystal does not do well with is uncertainty. When you design a report with X number of tables the report engine expects X number of tables to be available at processing time. You should not surprise the print engine with more or less tables because you could end up with processing errors or incorrect data. You may need to design multiple reports for specific circumstances.
    Regarding the group expert question. I'm not sure how you would/could use the group expert to group a table? A table is a collection of fields and cannot be compared to another table without a complex algorithm. The group expert is used to group and sort records based on a field in the report. Have a look at the group expert section of the help file for more information.
    Hopefully my comments have given you a few ideas.

  • How to avoid triggering of a workflow multiple times at the same time?

    Hello Workflow Gurus,
      This is the situation.
    I have a Notify requisition creator workflow. This workflow is triggered only when a PO is completely released(this Po is created with respect to a purchase req). I have implemented multiple release strategy in my PO workflow. Meaning, if a PO is created for 5 million, 4 entries are created in the release strategy(P0, P2, P3 and P4). Some approvers have authorization to approve P0 and some have authorization to release P2 etc. Before an approver can release P4, P0, P2 and P3 shuould be approved first.
    My problem is when a approver has auth to release both P3 and P4, and if he hits the SAVE button, it is completely released and  2 notify req workflows are being triggered. I use the release indicator = 'C' (completely released) to trigger thos notify req creator workflow. In this case both workflows are triggered at the same time and date. I somehow have to say if this is triggered at the same date and time, complete one workflow.
    BTW, I am not using any user exit to trigger this. This notify req creator WF is triggering event is "RELEASED'. When pO is completely released, 'RELEASED' event gets triggered which caused the notify req creator WF trigger.
    How can I accomplish this?
    Thanks
    Rachana

    Hi Rachana,
    Another way you could acheive this is to use start conditions for your workflow. You could specify that your workflow should get triggered only for release codes = XX or release strategy = XX, etc.. This way even after 1 stage of approval, when the approver clicks on SAVE, the release codes change and because there is start conditions in the workflow that would prevent another instance of the workflow from getting triggered.
    For example, in your case, I presume PO, P1, P2, etc are your release codes.
    You can have a start condition in your workflow wherein you specify that the workflow should get only triggered for release code = P2 [assuming release code P2 is always the 1st stage of approval]. So, once the approver for P2 has completed and Saved, since there is a start condition, there wouldnt be any other workflow instance started. By this way, any stages of approval wouldnt cause another workflow to initiate.
    Hope this is what you have been looking for ?
    Satish

  • How can I make apps show up multiple times on the iphone?

    Hi, call me pedantic if you will, but I want some of my iphone apps to show up in several locations so I can sort out the folders.
    For example, I have loads of games. I want to categorize them as sports games, puzzle games, racing games, etc.. but I also want a folder called favourite games. I want any games in the favourite games folder to show up in the correct category folder as well.
    I know that we probably can't do that with a normal iphone but if I was to jailbreak, could I do it?

    Do you go around chastising others for providing answers to other people's questions just because you don't seem to find the answer helpful? Isn't it really up to the original poster to decide what is helpful and what is not?
    Could I respectfully request that it would be more effective if you either provided an answer to the original question, if you know it, and if not just avoid posting solely to criticize someone who has been helping here for many, many thousands of posts (and been acknowledged for doing so by hundreds of users who have been helped)? Otherwise it really is you that's wasting time and bandwidth.
    Regards.

  • How to play one clip multiple times at the same time?

    I am writing a little game where a certain sound has to be played quite frequently. I load it as a Clip and play it with
    myClip.setFramePosition(0);
    myClip.loop(0);If the sound has to be played again but is still being played by another event, the setFramePosition() method resets the sound and the first playing instance is cut off.
    A workaround would be that each object that needs to play this sound would get its own copy, but that is not feasible due to heavy memory consumption.
    So here it goes: How can I play a single sound multiple times at the same time? Is that possible?
    Edited by: andrasz on Feb 27, 2009 12:37 AM

    If the sound has to be played again but is still being played by another event, the setFramePosition() method resets the sound and the first playing instance is cut off.
    A workaround would be that each object that needs to play this sound would get its own copy, but that is not feasible due to heavy memory consumption.
    So here it goes: How can I play a single sound multiple times at the same time? Is that possible?Ummmm, if you're using a clip, you'll have to maintain one copy per object that needs to play the sound concurrently. You could keep one master copy, and then create copies of the clip as necessary to play them, and then just dump the copies to decrease memory consumption.
    A second idea would be to write your own Clip class. Esentially, all you would need to do is dump some sound data onto a TargetDataline to play it. It'll handle the buffering and playing at the correct speed itself. If that's all you did, you should be able to dump multiple times from the same instance and play it multiple times.
    Obviously, that's just a theory. In practice, it may not work that way...

  • I have a library set up for my i-pop touch, how can my wife set up her i-phone on the same pc?

    I have a library set up for my i-pod touch, how can my wife set up her i-phone on the same PC but with a seperate library location?

    You can sync multiple iPods and iOS devices with the same iTunes library on one computer. Each device has its own sync preferences with iTunes and iTunes creates and updates a separate backup for each device.
    Under the same computer login account, you can have separate iTunes libraries which will require manually having to log in and out of each one with iTunes which isn't necessary.
    If you want separate iTunes libraries for you and your wife, probably best to create a separate computer login account for your wife where her iTunes library is completely seperate along with the rest of her data on the computer.

  • How do I apply same adjustments to multiple photos at the same time?

    How do I apply same adjustments to multiple photos at the same time?

    You can't but you can copy the adjustments made on one photo and apply/paste it onto another by:
    1 - Control (right)-clicking one the edited photo in the Edit mode and selecting Copy Adjustsments
    2 - Control-clicking on the next photo and selecting Paste Adjustments.
    OT

  • I can convert almost things multiple times at the same time including CMYK to RGB (or sRGB), but not RGB to CMYK and not brighten/contrast. How?

    I can convert almost things multiple times at the same time including CMYK to RGB (or sRGB), but not RGB to CMYK and not brighten/contrast. How?

    If you want a relevant answer you may have to elaborate on what you actually mean. Posting screenshots might help, too.
    In any case multiple conversions of an image are not advisable in general.

  • I've problem with Game Center . I can't sign in Game Center on my iPad . I tap on the Game Center icon but the page is blank. I tried go to setting, my Apple ID appear but the page keep on loading and  nothing pop up. How to resolve this issue?

    I've problem with Game Center . I can't sign in Game Center on my iPad . I tap on the Game Center icon but the page is blank. I tried go to setting, my Apple ID appear but the page keep on loading and  nothing pop up. How to resolve this issue?

    Hi, bamboo64. 
    Try closing all open applications in multitasking and power cycling the device.  Once this is done test the results.  If the issue persists, I have included a couple troubleshooting articles that I would recommend going through. 
    iOS: Force an app to close
    http://support.apple.com/kb/ht5137
    Troubleshoot issues on an iPhone, iPad, or iPod touch
    If you haven't been able to connect to the iTunes Store:
    Make sure your date, time, and time zone are correct in Settings > General > Date & Time.
    Note: Time Zone may list another city in your time zone.
    Make sure that your iOS software is up to date by tapping Settings > General > Software Update (iOS 5 or later) or connecting your iOS device to iTunes and clicking Check for Update on your device's Summary page.
    Check and verify that you're in range of a Wi-Fi router or base station. If you're on a device with cellular service, make sure that cellular data is turned on from Settings > General > Cellular.
    Note: If connected to cellular data, larger items may not download. You may need to connect to Wi-Fi to download apps, videos, and podcasts.
    Make sure that you have an active Internet connection. You can check the user guide for your device for help with connecting to the Internet.
    Make sure that other devices (portable computers, for example) are able to connect to the Wi-Fi network and access the Internet.
    Try resetting (turning off and then on again) your Wi-Fi router.
    If the issue persists, try troubleshooting your Wi-Fi networks and connections.
    Can't connect to the iTunes Store
    http://support.apple.com/kb/ts1368
    Cheers,
    Jason H. 

  • Burning a set of pictures multiple times onto CDs

    I'm trying to burn a set of pictures multiple times onto CDs with Lightroom. Using Export I can burn one set but if I'd like to burn another set I need to Export again and overwrite the existing files every time. Is there no way in Lightroom to burn another CD with the files that are already there?

    The transfer is meant to be one-way from iTunes to iPod. Are the songs on the playlist iTunes Store purchases or were they ripped from your personal collection. If iTunes purchases, you should be able to transfer those from the iPod. Read the following doc for specifics:
    http://docs.info.apple.com/article.html?artnum=93063
    If not iTunes purchases, your best bet is probably to connect the iPod to the first computer and enable disk use on the iPod. Then copy the song files to the iPod's hard drive space. When you connect to the second computer, drag the files from the iPod's hard drive to your computer. You will then have to authorize the computer to play them. (You're allowed up to five authorizations.)
    Post back if you need more help.

  • How do I send single notifications to multiple people in the workflow?

    HI
    As I see you can send notification to one person at a time.
    For example, the approval notification goes to a approver once someone submits a expense report or po approval.
    How do I send single notifications to multiple people in the workflow?
    Any idea?
    Thanks in advance.

    Hi,
    You need to send the notification to a role, which can comprise one or more than one users. If you check the "Expand roles" checkbox, then a different copy of the notification will be sent to each member of the role; otherwise one notification is sent which can be viewed by all holders of the role.
    You should always send a notification to a role rather than a user, anyway - roles do not go on holiday, get sick or leave the company; users do.
    HTH,
    Matt
    WorkflowFAQ.com - the ONLY independent resource for Oracle Workflow development
    Alpha review chapters from my book "Developing With Oracle Workflow" are available via my website http://www.workflowfaq.com
    Have you read the blog at http://thoughts.workflowfaq.com ?
    WorkflowFAQ support forum: http://forum.workflowfaq.com

  • Elements 11 opens in the Import Media Screen. How can I access setting to make it open in the original Organizer / Photo Editor screen?

    Elements 11 opens in the Import Media Screen. How can I access setting to make it open in the original Organizer / Photo Editor screen?

    Elements 11 opens in the Import Media Screen. How can I access setting to make it open in the original Organizer / Photo Editor screen?

  • How can I have use the same div ID multiple times on the same page?

    Okay so a problem I encounter a lot is that often times I want to use the same div ID several times on the same page. An example of this is when I'm creating table like designs.
    Let's say for instance I create a div ID called 'product-container'. I want to use 'product-container' multiple times on the same page but if I do this it is improper XHTML and will throw errors in any XHTML validator (you are only allowed to use a div ID once on any XHTML page in order for it to be standards compliant).
    Now the first option is that I could define 'product-container' in my CSS style sheet multiple times by doing something like this...
    #product-container {
         width: 300px;
    #product-container-2 {
         width: 300px;
    #product-container-3 {
         width: 300px;
    #product-container-4 {
         width: 300px;
    What you will see there however is that it seems pointless to define the same ID numerous times over (just adding a number on the end) when each ID is the exact same thing and has the exact same attributes.
    Now what I have noticed is that there are some sites out there who manage to have the same ID appear several times in the code but add a number to it just like above. The difference is that they only have one definition for 'product-cointainer' in their CSS document but in their actual XHTML code they have IDs for 'product-container' but with numbers on the end like 2,3,4,5, etc. It's almost as if JavaScript or some other code is automatically appending a number on the end of the ID so the validator won't consider the markup to be invalid, but yet it knows that it's using the same 'product-container' style that is contained in the CSS style sheet.
    I hope I explained this correctly. I'm just hoping to find a way that I can put the same div ID on a page multiple times without having to define it over and over again in my CSS.
    Any help is much appreciated!

    Because it seems like by using a class you can't make this position as 
    well as you can by using an ID. Am I wrong?
    An ID name can be used only one time per page.  A class name can be used multiple times per page.
    .product {
    width: 300px;
    text-align:left;
    color: #FF0000
    border: 2px solid #666;
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    www.alt-web.com/
    www.twitter.com/altweb
    www.alt-web.blogspot.com

  • How do I attach multiple files from the pages app to my email

    I'm trying to attach multiple documents from the "Pages" app to my email.  I'm using an ipad.  It is only letting me attach one at a time and send each document as individual emails.  I would like to be able to send one email with all 4 documents at the same time.  Any suggestions?
    Another thought- When I go to my gmail app to compose an email, I have the following to send:
    to:
    cc:
    subject:
    But there is not a paperclip to click to attach any documents either.  Is this all connected and something in my ipad settings needs to be adjusted?

    You can only attach one file at a time to email in the Pages app
    You cannot attach files in the mail app. If you want to email a file, you do it from within the app where the file is saved such as what you did with Pages.

  • Using multiple timer in the same SessionBean

    Hello,
    Is it possible to use multiple timer in the same Stateless Session Bean. In my application a user can schedule some task to execute. To do so I was thinking of creating a Session Bean which would create calendar timer on user request and, when one of the timer expires, retrieve the task to execute thanks to the information stored in the timer.
    When I tried the solution explained above, it seems that the @timeout method is synchronized on 1 timer. For example if I create a timer that will be executed every 10 seconds and another one executed every 30 seconds, the timeout callback is called every 30 seconds but 4 times.
    My code looks like that :
    @Stateless
    @LocalBean
    public class TimeManager {
        public void onUserRequest(ScheduleExpression expression) {
            Timer timer = timerService.createCalendarTimer(expression, timerCfg);
        @Timeout
        void timeout(Timer timer) {
            logger.log(Level.INFO, (String) timer.getInfo());
    }Is there a way to do what I want?
    Thank you

    This doesn't make any sense to me. If i were to write a bunch of schemas for a particular applicaion, would
    I have them all in the same namespace? You would normally have one schema that describes the information model associated with the one namespace that the different documents in your application use.
    If so, why can't I load more than one in the same name space?The parser chooses the schema based on the namespace alone. There is no other information used to decide which schema to use, so you can only have one schema for the namespace.
    They all have different root elements.You can have different root elements in the one schema.
    I don't even need the namespaces, but I can't
    figure out how to get rid of them (the schema isn't valid with out them according to XML Spy). You can set the schema explicitily before parsing, but not (AFAIK) set after parsing has begun, except by using the mapping of namespace to schema location.
    I have also tried to use the external-noNameSpaceSchemaLocationproperty, but it doesn't seem like you can pass in an array of schemas to that one. It only expects a
    String as the Object you pass in to setProperty. Yes, you can only validate a document against the one schema.
    So, how can I load all my schemas so I don't have to reference them in the XML documents? Either combine your schemas so you have one schema for your namespace that validates elements which are defined in that namespace (the formal/correct way of doing it), or construct a filter that inserts a PI to point to the schema once the root element is opened (the pragmatic/bit of a hack way of doing it).
    Pete

Maybe you are looking for