Muti-Maps in a single Form

Hi, everyone.
It's actually sth related to Struts. Just a simple question: can an ActionForm contain Muti-Maps instead of a single map?
Something like below:
public class ProfileableForm extends ActionForm
* get the map that keeps all children of the current container
public Map getChildrenMap()
return this.childrenMap;
public void setChildrenMap(Map cm)
this.childrenMap = cm;
public void setChild(String childName, Object child) throws Exception
getChildrenMap().put(childName, child);
public Object getChild(String childName) throws Exception
return getChildrenMap().get(childName);
* get the map that keeps all ancestries of the current container
public Map getAncestryMap()
return this.ancestryMap;
public void setAncestryMap(Map am)
this.ancestryMap = am;
public void setAncestry(String ancestryName, Object ancestry) throws Exception
getChildrenMap().put(ancestryName, ancestry);
public Object getAncestry(String ancestryName) throws Exception
return getChildrenMap().get(ancestryName);
private Map childrenMap = null;
private Map ancestryMap = null;
}

Nicky,
When the iterate tag is evaluated, the code checks the type of the provided collection. If it's a Map, the tag calls ((Map)collection).entrySet().iterator() on it to get the iterator. So the items being iterated are instances of Map.Entry (an inner class of Map). Map.Entry includes getKey() and getValue() methods, which you can access from within the iteration like this:
<logic:iterate  id="mapEntry" name="profileableForm" property="ancestryMap">
      <html:link forward="getprofileableinfo">
            <bean:write name="mapEntry" property="key"/>
            <bean:write name="mapEntry" property="value"/>
      </html:link><BR>
</logic:iterate>Jonathan

Similar Messages

  • Multiple Input ports - Single Form

    Hi,
    I have a RFC which has multiple input ports. How do i use a single form to provide data to all the input ports.
    Regards
    Bharathwaj

    Hi,
    you can create the single form direct, if you pull a line out of the RFC, then the form must be created with the fields. If not, then you have to create it manually and map the fields with the input port.
    Best Regards,
    Marcel

  • How to merge two maps in a single map

    i have two maps existing. i want to merge both the maps into a single map through coding. do we have any function which can solve this problem. If not then please provide me some suggestions to solve this problem.
    thanks,
    amit

    Amit,
    I did this once using the HashMapUtils found in the apache myfaces code...
    package se.inserve.util;
    import java.util.HashMap;
    import java.util.Map;
    import java.util.Set;
    import java.util.Iterator;
    public class HashMapUtils
        //~ Constructors -------------------------------------------------------------------------------
        protected HashMapUtils()
            // block public access
        //~ Methods ------------------------------------------------------------------------------------
         * Calculates initial capacity needed to hold <code>size</code> elements in
         * a HashMap or Hashtable without forcing an expensive increase in internal
         * capacity. Capacity is based on the default load factor of .75.
         * <p>
         * Usage: <code>Map map = new HashMap(HashMapUtils.calcCapacity(10));<code>
         * </p>
         * @param size the number of items that will be put into a HashMap
         * @return initial capacity needed
        public static final int calcCapacity(int size)
            return ((size * 4) + 3) / 3;
         * Creates a new <code>HashMap</code> that has all of the elements
         * of <code>map1</code> and <code>map2</code> (on key collision, the latter
         * override the former).
         * @param map1 the fist hashmap to merge
         * @param map2 the second hashmap to merge
         * @return new hashmap
        public static HashMap merge(Map map1, Map map2)
            HashMap retval = new HashMap(calcCapacity(map1.size() + map2.size()));
            retval.putAll(map1);
            retval.putAll(map2);
            return retval;
         * spit out each name/value pair
        public static String mapToString(Map map){
            Set entries = map.entrySet();
            Iterator iter = entries.iterator();
            StringBuffer buff = new StringBuffer();
            while (iter.hasNext())
                Map.Entry entry = (Map.Entry) iter.next();
                buff.append("[" + entry.getKey() + "," + entry.getValue() + "]\n");
            return buff.toString();
    }Then then just calling the methods from within a rule in XPRESS.
    <Rule name='Inserve - mergeHashMap'>
      <RuleArgument name='map1'/>
      <RuleArgument name='map2'/>
      <block>
        <set name='map1'>
          <map>
            <s>A</s>
            <s>1</s>
            <s>B</s>
            <s>2</s>
          </map>
        </set>
        <set name='map2'>
          <map>
            <s>C</s>
            <s>3</s>
            <s>D</s>
            <s>4</s>
          </map>
        </set>
        <invoke name='merge' class='se.inserve.util.HashMapUtils'>
          <ref>map1</ref>
          <ref>map2</ref>
        </invoke>
      </block>
      <MemberObjectGroups>
        <ObjectRef type='ObjectGroup' id='#ID#Top' name='Top'/>
      </MemberObjectGroups>
    </Rule>This gives the output:
    <Map>
      <MapEntry key='A' value='1'/>
      <MapEntry key='B' value='2'/>
      <MapEntry key='C' value='3'/>
      <MapEntry key='D' value='4'/>
    </Map>I typically create a jar-file with my custom classes which i place in $WSHOME/WEB-INF/lib.
    Good luck and hope this helps. Im sure there are better ways to do this, but this did the trick for me.
    /Anders

  • Multiple Selects in a single form

    I have six select boxes and I want them in a single form.
    Below are the outputs for the select boxes.
    <cfform
    action="Resolution_History.cfm?year=#year#&sessiontype=#sessiontype#&btype=res"
    name="form">
    <select name="SRINPUT">
    <option value="">SR
    <CFOUTPUT Query="findSR"><Option
    Value="#BILLNUMBER#">#BILLNUMBER#</cfoutput>
    </select>
    <select name="HRINPUT">
    <option value="">HR
    <CFOUTPUT Query="findHR"><Option
    Value="#BILLNUMBER#">#BILLNUMBER#</cfoutput>
    </select>
    <select name="SCRINPUT">
    <option value="">SCR
    <CFOUTPUT Query="findSCR"><Option
    Value="#BILLNUMBER#">#BILLNUMBER#</cfoutput>
    </select>
    <br>
    <select name="HCRINPUT">
    <option value="">HCR
    <CFOUTPUT Query="findHCR"><Option
    Value="#BILLNUMBER#">#BILLNUMBER#</cfoutput>
    </select>
    <select name="SJRINPUT">
    <option value="">SJR
    <CFOUTPUT Query="findSJR"><Option
    Value="#BILLNUMBER#">#BILLNUMBER#</cfoutput>
    </select>
    <select name="HJRINPUT">
    <option value="">HJR
    <CFOUTPUT Query="findHJR"><Option
    Value="#BILLNUMBER#">#BILLNUMBER#</cfoutput>
    </select>
    <INPUT TYPE="Submit" VALUE="Submit" alt="submit
    button">
    </cfform>
    Once a user selects a number it will send them to an action
    page. On the action page I need the below IF statement to work so
    it will set the variables. It isn't working at this time. Its not
    bringing the values of billnumber, houseorig or the billtype.
    Does anyone have any thoughts? I know it is close to working
    and I need to set all of the inputs to input4 to generate my
    queries so I don't have to duplicate them.
    <cfif form.srinput gt "0">
    <cfset s = '#houseorig#'>
    <cfset r = '#billtype#'>
    <cfset input4 = '#srinput#'>
    <cfelseif form.hrinput gt "0">
    <cfset h = '#houseorig#'>
    <cfset r = '#billtype#'>
    <cfset input4 = '#hrinput#'>
    <cfelseif form.scrinput gt "0">
    <cfset s = '#houseorig#'>
    <cfset cr = '#billtype#'>
    <cfset input4 = '#scrinput#'>
    <cfelseif form.hcrinput gt "0">
    <cfset h = '#houseorig#'>
    <cfset cr = '#billtype#'>
    <cfset input4 = '#hcrinput#'>
    <cfelseif form.sjrinput gt "0">
    <cfset s = '#houseorig#'>
    <cfset jr = '#billtype#'>
    <cfset input4 = '#sjrinput#'>
    <cfelse>
    <cfset h = '#houseorig#'>
    <cfset jr = '#billtype#'>
    <cfset input4 = '#hjrinput#'>
    </cfif>

    give'em a break. he is probably under pressure (like we all
    have been). in response, i do not even see some of the variables
    you are checking in the second script in the first. get this one
    straight and i think it'll work.

  • Multiple DataBase Connection in a Single Form

    hi all
    Is it Possible to have Multiple Database Connection With a Single Form
    Block a : Retriving data from a database Service a/Schema A.
    Block b : Retriving data from a Remote Database Service b / Schema B.
    If yes how to do this.
    regards
    jai
    email:[email protected]

    Sure you can access a database this way,
    but can you base a block on this database connect? No you can't.
    Frank

  • How do I insert multiple rows from a single form ...

    How do I insert multiple rows from a single form?
    This form is organised by a table. (just as in an excel format)
    I have 20 items on a form each row item has five field
    +++++++++++ FORM AREA+++++++++++++++++++++++++++++++++++++++++++++++++++++
    +Product| qty In | Qty Out | Balance | Date +
    +------------------------------------------------------------------------+
    +Item1 | textbox1 | textbox2 | textbox3 | date +
    + |value = $qty_in1|value= &qty_out1|value=$balance1|value=$date1 +
    +------------------------------------------------------------------------+
    +Item 2 | textbox1 | textbox2 | textbox4 | date +
    + |value = $qty_in2|value= $qty_out1|value=$balance2|value=$date2 +
    +------------------------------------------------------------------------+
    + Item3 | textbox1 | textbox2 | textbox3 | date +
    +------------------------------------------------------------------------+
    + contd | | | +
    +------------------------------------------------------------------------+
    + item20| | | | +
    +------------------------------------------------------------------------+
    + + + SUBMIT + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    Database Structure
    +++++++++++++++++
    + Stock_tabe +
    +---------------+
    + refid +
    +---------------+
    + item +
    +---------------+
    + Qty In +
    +---------------+
    + Qty Out +
    +---------------+
    + Balance +
    +---------------+
    + Date +
    +++++++++++++++++
    Let's say for example user have to the use the form to enter all 10 items or few like 5 on their stock form into 4 different textbox field each lines of your form, however these items go into a "Stock_table" under Single insert transaction query when submit button is pressed.
    Please anyone help me out, on how to get this concept started.

    Hello,
    I have a way to do this, but it would take some hand coding on your part. If you feel comfortable hand writing php code and doing manual database calls, specificaly database INSERT calls you should be fine.
    Create a custom form using the ADDT Custom Form Wizard that has all the rows and fields you need. This may take a bit if you are adding the ability for up to 20 rows, as per your diagram of the form area. The nice thing about using ADDT to create the form is that you can setup the form validation at the same time. Leave the last step in the Custom Form Wizard blank. You can add a custom database call here, but I would leave it blank.
    Next, under ADDT's Forms Server Behaviors, select Custom Trigger. At the Basic tab, you enter your custom php code that will be executed. Here you are going to want to put your code that will check if a value has been entered in the form and then do a database INSERT operation on the Stock_table with that row. The advanced tab lets you set the order of operations and the name of the Custom Trigger. By default, it is set to AFTER. This means that the Custom Trigger will get executed AFTER the form data is processed by the Custom Form Transaction.
    I usually just enter TEST into the "Basic" tab of the Custom Trigger. Then set my order of operations in the "Advanced" tab and close the Custom Trigger. Then I go to the code view for that page in Dreamweaver and find the Custom Trigger function and edit the code manually. It's much easier this way because the Custom Trigger wizard does not show you formatting on the code, and you don't have to keep opening the Wizard to edit and test your code.
    Your going to have to have the Custom Trigger fuction do a test on the submitted form data. If data is present, then INSERT into database. Here's a basic example of what you need to do:
    In your code view, the Custom Trigger will look something like this:
    function Trigger_Custom(&$tNG) {
    if($tNG->getColumnValue("Item_1")) {
    $item1 = $tNG->getColumnValue("Item_1");
    $textbox1_1 = $tNG->getColumnValue("Textbox_1");
    $textbox1_2 = $tNG->getColumnValue("Textbox_2");
    $textbox1_3 = $tNG->getColumnValue("Textbox_3");
    $date1 = $tNG->getColumnValue("Textbox_3");
    $queryAdd = "INSERT INTO Stock_table
    (item, Qty_In, Qty_Out, Balance, Date) VALUES($item1, $textbox1_1, $textbox1_2, $textbox1_3, $date1)"
    $result = mysql_query($queryAdd) or die(mysql_error());
    This code checks to see if the form input field named Item_1 is set. If so, then get the rest of the values for the first item and insert them into the database. You would need to do this for each row in your form. So the if you let the customer add 20 rows, you would need to check 20 times to see if the data is there or write the code so that it stops once it encounters an empty Item field. To exit a Custom Trigger, you can return NULL; and it will jump out of the function. You can also throw custom error message out of triggers, but this post is already way to long to get into that.
    $tNG->getColumnValue("Item_1") is used to retrieve the value that was set by the form input field named Item_1. This field is named by the Custom Form Wizard when you create your form. You can see what all the input filed names are by looking in the code view for something like:
    // Add columns
    $customTransaction->addColumn("Item_1", "STRING_TYPE", "POST", "Item_1");
    There will be one for each field you created with the Custom Form Wizard.
    Unfortunately, I don't have an easy way to do what you need. Maybe there is a way, but since none of the experts have responded, I thought I would point you in a direction. You should read all you can about Custom Triggers in the ADDT documentation/help pdf to give you more detailed information about how Custom Triggers work.
    Hope this helps.
    Shane

  • How to running a single form on the browser

    Hi below is the link for deployment of our application on app server.
    http://100.180.127.225:7779/forms90/f90servlet?config=abc
    and this is the entries in formsweb.cfg file.
    [abc]
    form=G:\Oracle10gBinaries\abc\FMX\test.fmx
    otherparams=prm_init_file=G:\abc.INI prm_itype=0 prm_impli_type=9W prm_debug_mode=NO
    pageTitle=Heading
    envFile=abc.env
    separateFrame=TRUE
    lookAndFeel=generic
    archive_jini=f90all_jinit.jar
    imagebase=codebase
    Now i want to run a form named test2.fmx directly by passing the value as *test2.fmx on the browser.
    what change i needs make in the formsweb file to achieve this.

    Hi all thanks for ur help.
    i am able to run the .fmx directly .this i have achieved by putting the .fmx in the forms90 folder and using the link.
    http://100.180.127.225:7779/forms90/f90servlet?form=test2.fmx
    it is working fine and showing the single form but now i want to pass a parameter
    from the link to the test2.fmx directly/
    when launched from the link ,test2.fmx shows all the records. as this form contains customer information so it list all the customer no.
    i want to launch this form with only the customer id passed thro the link.
    i am trying something like
    http://100.180.127.225:7779/forms90/f90servlet?.fmx&PRM_CUST_NO=000000014
    where 000000014 is the customer no.
    when launch the forms it still gives all records and not this customer record.
    prm_cust_no is the oracle form parameter which is defined in the form.
    please suggest?

  • Mutiple Canvases Single form

    Hi,
    I'm facing a problem of having multiple canvases(3) in single form.
    I've two Data blocks(Master & Detail). Master having one canvas. But details have two different canvases.
    I've created 3 different menus for 3 canvases.
    say Master,Detail1,Detail2. Now the problem is when i try to open detail1 or detail2 from oracle apps menu it opens master canvas only.
    i've created functions in apps & in NEW_FORM_INSTANCE trigger coded like
    If (fnd_function.current_form_function = 'CRM_FC_PPC') then
    GO_BLOCK('CRM_CUSTO_FORCAST_DET');
    SHOW_VIEW('PPC');
    HIDE_VIEW('CUST_FORECAST');     
    HIDE_VIEW('SHIPPING');
    Elsif (fnd_function.current_form_function = 'CRM_FC_SHIP') then
    SHOW_VIEW('SHIPPING');
    HIDE_VIEW('PPC');
    HIDE_VIEW('CUST_FORECAST');     
    Else
    SHOW_VIEW('CUST_FORECAST');
    HIDE_VIEW('PPC');
    HIDE_VIEW('SHIPPING');
    Go_item('CRM_CUST_FORCAST_HDR.CUSTOMER_ID');also my master canvas is Content & details are stacked. should i create different windows for details canvases ? i also did that but failed.
    what could be the solution here ?
    Forms 6i
    DB 9.2
    Regards

    Hi,
    Sorry for delayed reply.
    Francois,
    I've tried with go_item but it doesn't worked. i knew it & tried it before asking here. but thanks anyway.
    Ahmed,
    i've only one window show all these canvases.I'm now trying with multiple windows.
    The code is as follow
    If (fnd_function.current_form_function = 'IRS_CRM_FC_PPC') then
         GO_ITEM('IRS_CRM_CUSTO_FORCAST_DET.CUSTOMER_ID');
    Set_window_property('CF_PPC',VISIBLE,PROPERTY_TRUE);     
    Set_window_property('MAIN',VISIBLE,PROPERTY_FALSE);     
    Set_window_property('CF_PPC',TITLE,'IRS CRM PPC Details'||:global.div);
    GO_BLOCK('IRS_CRM_CUSTO_FORCAST_DET');
    SHOW_VIEW('PPC');
    HIDE_VIEW('CUST_FORECAST');     
    HIDE_VIEW('SHIPPING');
    Elsif (fnd_function.current_form_function = 'IRS_CRM_FC_SHIP') then
    SHOW_VIEW('SHIPPING');
    HIDE_VIEW('PPC');
    HIDE_VIEW('CUST_FORECAST');     
    Else
    SHOW_VIEW('CUST_FORECAST');
    HIDE_VIEW('PPC');
    HIDE_VIEW('SHIPPING');
    Go_item('IRS_CRM_CUST_FORCAST_HDR.CUSTOMER_ID');Regards
    PS. Master is Content & details are stacked.
    Edited by: user10569054 on Apr 5, 2010 3:10 PM edited for canvas details

  • MULTIPLE SESSIONS IN SINGLE FORM

    HELLO ALL
    HOW CAN I HAVE MULTIPLE SESSIONS IN A SINGLE FORM? MY REQUIRMENT
    IS SUCH THAT I HAVE A CONTROL BLOCK WHICH IS MARKED AS UPDATED
    WHEN USER PRESS COMMIT BUTTON, BUT I WANT TO ROLL IT BACK AND I
    HAVE ISSUED SOME UPDATE COMMANDS MYSELF WHICH I WANT TO BE
    COMMITED. ANYONE HAVE ANY IDEA?
    THANKS IN ADVANCE

    Give the submit button a name. It will be sent as well, so you can see it in the request variables.

  • Multiple submit on single form

    hi all,
    My current system have 1 submit button with single form. This submit button will call file_content.upload.
    htp.p('function on_submit() {');
    htp.p('     ...the rest of my code here..');
    htp.p('     document.forms[0].submit();');
    htp.p('     return true;');
    htp.p('}');
    htp.p('<form enctype="multipart/form-data" method="post" action="file_content.upload">');
    htp.p('     ...the rest of my code here..');
    htp.p('<input type="button" id="btn_Submit" value="Submit" onclick="on_submit()"></form>');My question is, i want to enhance this by adding additional 1 submit button with value "Save". But this new "Save" button will call/trigger different file. This new button will call file_content.update. How to accomplish this and how to differentiate these 2 button?
    htp.p('<input type="button" id="btn_Submit" value="Submit" onclick="on_submit()"> 
              <input type="button" id="btn_Save" value="Save"></form>');Appreciate any help from you guys. Thanks
    Edited by: morezack on Jul 21, 2011 2:08 PM

    You again did accident like one below
    multiple submit button on a single form
    Take care..
    Regards,

  • Multiple submit button on a single form

    hi all,
    My current system have 1 submit button with single form. This submit button will call file_content.upload.
    htp.p('function on_submit() {');
    htp.p('     ...the rest of my code here..');
    htp.p('     document.forms[0].submit();');
    htp.p('     return true;');
    htp.p('}');
    htp.p('<form enctype="multipart/form-data" method="post" action="file_content.upload">');
    htp.p('     ...the rest of my code here..');
    htp.p('<input type="button" id="btn_Submit" value="Submit" onclick="on_submit()"></form>');
    My question is, i want to enhance this by adding additional 1 submit button with value "Save". But this new "Save" button will call/trigger different file. This new button will call file_content.update. How to accomplish this and how to differentiate these 2 button?
    htp.p('<input type="button" id="btn_Submit" value="Submit" onclick="on_submit()"> 
    <input type="button" id="btn_Save" value="Save"></form>');
    Appreciate any help from you guys. Thanks
    Edited by: morezack on Jul 20, 2011 8:21 PM
    Edited by: morezack on Jul 20, 2011 8:29 PM

    PLEASE IGNORE THIS THREAD. ACCIDENTLY SUBMIT IT. I WANT TO DELETE THIS BUT CANNOT

  • Creating vecor art from a single form field.

    How do I create vector art from a single form field within a pdf that has serveral form fields in it?
    Thanks
    Chris

    I need to create vector art from text within one form field on a page with several form fields on it.
    1- single form field
    2- create vector art from text within the single form field mentioned above
    3- if possible export to a file
    4- if not possible how can I create vector art from a pdf automatically?
    5- if possible, create a button that will allow users to create vector art from text in a single form field
    Thank you,
    Chris

  • Handling multiple submits in single form with JSP

    HI,
    I need to handle multiple submits in single form in a JSP.
    <html>
    <body>
    <form action="/Compute" method="post">
    <input type = "Submit" value="Find"/>
    <input type = "Submit" value="Add"/>
    <input type = "Submit" value="Delete"/>
    </form>
    <body>
    <html>
    /Compute wld take the control to a servlet named ComputeController.java .
    In this servlet how should I distinguish which Submit has been clicked(Find or add or Delete).
    TIA

    Give the submit button a name. It will be sent as well, so you can see it in the request variables.

  • Mulitple grid in single form

    hi all,
    we are developing one report. its have multiple tabs. each tab having separate grid. but its not working. when i press second tab its show the error. example:Open,closed,Completed,hold,inactive
    thanks & regards
    B.Lakshmi Narayanan

    sorry njmog1
    sorry for late replies.
    Error is: Matrix - invalid column number.
    But i am using only grid. when single form having multiple grid show this error
    Thanks & Regards
    B.Lakshmi Narayanan

  • Replicating MS Access single form record selectors functionality

    I am very new to APEX.
    I would like to rebuild and improve on all our departments MS Access userforms using APEX.
    At the moment I am trying to replicate the standard MS Access "single form" view of a record in a database table, with the record selector navigation buttons (prev, next, new record).
    I have scoured the internet and this forum but have not successfully found the solution.
    I need to be able to select a subset of records from a view/table and present them on a page one at a time, so the user can scroll through them (prev, next) and make edits. Because of the amount of info in each record, the whole screen will be taken up by each record (hence the single form view).
    I have created a form pagination process that is supposed to get the next/previous primary key value, however I can't seem to get the buttons displayed on the form that should be firing off these processes.
    What combination of features should I be using to replicate this functionality? I am using the "Form on a table/view" style page at the moment.
    Cheers,
    Richard.

    Hi
    Even if you created a form pagination process, you need to "initialise" the PK field(s) -- by default, they are null and the pagination buttons will not show (this is very different from how access works).
    You can do it using a conditional computation (e.g. selecting the min PK value when the PK field is null).
    I hope this helps.
    Luis

Maybe you are looking for

  • Does sun Cluster 3.0/3.1 HA Oracle agent support to use Oracle spfile?

    When defining the resource, the 'parameter_file' properties is usually sets to the Oracle pfile. Is it possible to use Oracle spfile? It is said if leaving 'parameter_file' NULL, it will be default to Oracle default. Suppose leaving it NULL and with

  • How to sync app on iphone after reinstalling mac OS X

    Hello, I had to reinstall the whole system Mac OS. Now, Itunes doesn't allow me to sync applications I have bought on my iphone. Canno't even restore the iphone. How to do to to make it work again ? Thank's. Message was edited by: Michael Salama Mess

  • Sapscript via mail: attachment with body

    Hi all I need your opinion in order to solve the problem in object I've an old bill message to be sent via mail, so I've set the customizing by NACE and now it works fine The problme is the sapscript is attached to e-mail as pdf but any text is inser

  • Wepage not displaying content

    I am using a math homework website, Webassign.net, and certain features that were displaying normally a few days ago are suddenly not displaying now, and a link to the textbook is not displaying the content either. My plug-ins are all updated, I chec

  • Groupwise 2012 Hangs after someone sends to everyone Distro

    When a users sends to the everyone group or uses the * address.. the groupwise clients lockup/hang up for about 5-10 seconds.. My system is not very large.. only about 185 mailboxes... is there a reason why groupwise would hang like this while sendin