Advanced generics, Maps and double use of '?'

I have a variable declared like this
private Map<Class<? extends Customer>, CustomerManager<? extends Customer>> customerManagers;
This map maps from some class of customer to the manager that manages customers of this class. To fetch the correct manager I have a method
public <V extends Customer> CustomerManager<V> getCustomerManager(Class<V> customerClass) {
     CustomerManager<V> customerManager = customerManagers.get(customerClass);
     return valueManager;
Unfortunately this method does not compile. The compiler says that I cannot asume that the customer I get crom the customerManagers is of type CustomerManager<V> - rather it is of type CustomerManager<? extends Value>.
Thinking about this for a while I concluded that the problem is caused by the fact that according to my code the customerManagers map could map from classes of one type of customer (FooCustomer) to managers of another and potentially different subtype of customer (BarCustomer) , whereas my method uses the map as if it maps from classes of FooCustomer to managers of FooCustomer. And that is exactly what I want the map to do. So how do I write a map which acts like this
private Map<Class<T extends Customer>, CustomerManager<T extends Customer>> customerManagers;
so that T is exactly the same type? That would make my method correct - however I have not been able to express such a map in my code. Can this be done, or is there some other work-around?
Thanks
Randahl

And that is exactly what I want the map
to do. So how do I write a map which acts like this
private Map<Class<T extends Customer>,
CustomerManager<T extends Customer>> customerManagers;
so that T is exactly the same type? That would make my
method correct - however I have not been able to
express such a map in my code. Can this be done, or is
there some other work-around?A map has exactly the same types for every key-value-pair it contains, so you cannot declare a map that maps different types of keys to different, albeit pre-defined types of values.
But your original declaration of the map (using wildcards) was perfectly ok, you simply need to augment it with the correct set of public acess methods that enforce the relation between the key-types and value-types.
The method getCustomerManager that you wrote does that already, it just needs a cast before the returned value. This will provoke an "unchecked" warning, though, which cannot be avoided. If you add another method
public <V extends Customer> void setCustomerManager(Class<V> cl, CustomerManager<V> mgr)you're on safe grounds!
NOTICE TO USERS OF THIS SITE: By continuing to use this site, you certify that you have read and agree to abide by Sun's "Terms Of Use" which are linked to this site at the bottom of the page. Any users of this site who state that they work for Sun Microsystems, Inc. are deemed to be doing so solely for identification purposes. All information, data, text, software, music, sound, photographs, graphics, video, messages, or other materials ("Content") posted to this site by any users are the sole responsibility of those users. Sun does not guarantee the accuracy, integrity, or quality of such Content. Posting a name in a discussion forum places that personal information into a public forum.
Company Info | About This Site | Press | Contact Us | Employment
How to Buy | Licensing | Terms of Use | Privacy | Trademarks
Copyright 1995-2004 Sun Microsystems, Inc. A Sun Developer Network Site
Unless otherwise licensed, code in all technical manuals herein (including articles, FAQs, samples) is provided under this License.
Content Feeds

Similar Messages

  • How do i search mapi and invoke it by java program ?

    how do i search mapi programme and invoke it by java program ?
    plz help ?

    Write a C/C++ DLL to access MAPI and then use JNI to invoke the functions from Java.
    -Aprajit

  • Multi-Mapping and Message Split using BPM UDFs Error

    hi
    As per the below blog
    Illustration of Multi-Mapping and Message Split using BPM in SAP Exchange Infrastructure
    I have just modified the UDFs(1.selectnodeifA 2.selectNodeifB)
    1.selectnodeifA
    for(int i=0;i<=n;i++)
    if(Name<i>.equals("A"))
    result.addValue(Node<i>);
    2.selectNodeifB
    for(int i=0;i<=n;i++)
    if(Name<i>.equals("B"))
    result.addValue(Node<i>);
    while checking I am getting the following errors
    Source code has syntax error: 
    D:/usr/sap/D10/DVEBMGS01/j2ee/cluster/server0/./temp/classpath_resolver/Mapdc8fa4d0896011dd907d001cc01cef0d/source/com/sap/xi/tf/_bpm_mm_.java:132: cannot resolve symbol
    symbol : variable n
    location: class com.sap.xi.tf._bpm_mm_
    for(int i=0;i<=n;i++)
    ^
    D:/usr/sap/D10/DVEBMGS01/j2ee/cluster/server0/./temp/classpath_resolver/Mapdc8fa4d0896011dd907d001cc01cef0d/source/com/sap/xi/tf/_bpm_mm_.java:140: cannot resolve symbol symbol : variable n
    location: class com.sap.xi.tf._bpm_mm_
    for(int i=0;i<=n;i++)
    ^
    2 errors
    The source code given in the blog is correct ? I thought for loop has not completed
    pls help
    manian

    Hi manian,
    I was having a look to Illustration of Multi-Mapping and Message Split using BPM in SAP Exchange Infrastructure blog.
    The functions are not the same. I mean, yours and blogs functions.
    Each function has two parameters, Name and node. Furtheremore, in the blogs' functions is using arrays and you don't.
    So, the right code will be
    1.selectnodeifA
    for(int i=0;i<=node.length();i++)
    if(Name<i>.equals("A"))
    result.addValue(Node<i>);
    However, if you don't need an advance user defined function as you want to process just one element of the node's queue, you will not need to use for sentence.
    Something like:
    1.selectnodeifA
    // for(int i=0;i<=n;i++)
    if(Name.equals("A"))
    result.addValue(Node);
    Hope it is usefull for you.
    Carlos

  • PO7.31 and BPM: Using Operation Mapping within BPM

    Hello everyone!
    I am facing an issue while trying the import/execute an Operation Mapping within a BPM. Have a PO 7.31SP07 installation (NWDS also on 7.31 SP07), and the process already have some working interface calls to PI, however still having issue while trying to execute the Operation Mapping:
    1. After deploying the process, going to NWA -> SOA tab -> Application and Scenario Communication -> Application Communication -> select the process -> check the "localhost"/WS group for "Local System". The  "Processing State" shows the error below:
    Configuration for service group [localhost] failed. Error details:
    [No endpoints found. Check if the service is configured and if its
    endpoints are available in the . Service:
    [{http://fusionconsultoria.com.br/sales_order_create}fusionconsultoria_salesord_om_SalesOrderSplit_ServicePortType]
    Assigned Provider: [Local System]
    Service Group: [localhost]
    Service Group application: [fusionconsultoria/salesord]
    Service Reference application: [fusionconsultoria/salesord]
    2. During runtime, when trying to execute the OM automated step, on log viewer:
    Error during SCA Processing
    [EXCEPTION]
    com.sap.engine.interfaces.sca.config.exception.ESBConfigurationException:
    Could not process message for operation om_SalesOrderSplit_Service in
    web service plugin module.
    at com.sap.engine.services.sca.plugins.ws.WebServiceImplementationInstance.accept(WebServiceImplementationInstance.java:223)
    at com.sap.engine.services.sca.das.SCADASImpl.invokeReference(SCADASImpl.java:314)
    Caused by: com.sap.esi.esp.lib.mm.config.exceptions.ObjectNotExistsException:
    Configuration not found for application:
    fusionconsultoria/salesord,serviceRefId:{http://www.sap.com}salesord_fusionconsultoria~salesord~BPMcomponent_29768b4e-f59a-4ba3-a2ff-dee594b01ecf_WS.
    Please check the configuration details from the NWA. You may have not
    assigned the Service Group to a Provider System, or the generation of
    the configuration has failed.
    3. Carried out the steps from the referenced links below. They are quite similar to each other, however still facing the issue:
    Reuse PI Operation Mapping as a service in SAP NetWeaver BPM
    Using Operation Mappings (PI) in a BPM Process - Process Orchestration - SAP Library
    Using NetWeaver PI’s Mapping in NetWeaver BPM
    - Marked as "local provider" and WS;
    4. Tried deleting, creating the automated step aswell reimporting the Operation Mapping.
    5. Already reviewed the input/output mapping of the automated activity;
    6. On ESR, the mapping works correctly.
    7. Tried changing the outbound and inbound Service interfaces for the OM from stateless to stateless XI3.0, as well from synchronous to asynchronous.
    At this moment I've completely ran out of ideas. Appreciate if anyone could give any insights, since I am running out of time with this project!
    Thanks in advance to all and
    Best regards,
    Lucas Santos

    Hi Lucus
    I'm facing the same type of problem.
    Why would re-creating the BPM fix this issue ?.    I fear I would spend all this effort for nothing.
    What does your operation mapping wsdl:service > soap:address look like ?   What does your NWA BPM application Communication Configuration look like now - before you had that red light - like I have now.  
    The WSDL that is generated from the imported Operation Mapping : what end point is expected here. My wsdl:service > soap:address location has a port of 50500 - which does not even exist!. How can it work  Does this get automatically deployed onto the Service Registry?.
    I have built and deployed this but I get a run time error when it executes the operation mapping.   A technical error during invocation: Could not invoke service reference name.
    I have seen in the deployed BPM's Application Configuration against the Consumed Service Groups an error against the associated service group
    Configuration for service
    group [SG_localhost] failed. Error details: [No endpoints found. Check if the  service is configured and if its endpoints are available in the . Service
    It almost seems that it wants me to publish the end point on the service registry -  no idea how....but I none of the blogs and post indicate that I need to fiddle with this at all.
    I have this question in SDN too if you care to take a look.

  • HCM forms - Use of Advanced Generic serivce

    Hi,
    I am using Advanced Generic Service to update data. I am using the flush method. but the data is not getting updated. Please let me know what should be writtenin OPEN and CLOSE_LUW methods.
    Thanks,
    Nikhil

    hi Chris,
    Did you find a way for this. if yes please share it with me.

  • Custom Map in flash using XML data for dynamic map and point of intrest loading...

    Been some time since I have used Flash for anything...
    I'm working on a little project to dynamically build a map
    and set points of interest on the map. At this time I have the
    (mySQL) data being queried and formatted with PHP and pushing the
    data to Flash as XML.
    In starting the project I'm a bit lost... I mean I have my
    data and a good XML format but as it is I'm lost on parsing the
    data in Flash and assigning its values to movie clips or other...
    I've looked at the Loader Component and the XML Connector
    Component and find I can get that to work at all...
    My second though was to create a single movie clip on stage
    and give it an instance name of "Background" and have it load the
    URL of an image given in the attached XML doc... Node "a_zone" and
    the value given to attribute "image"... But this brings me back to
    square one of not quite understanding Flash and parsing XML... With
    this second idea I would use AS to create a movie clip, set it's X
    & Y cords and load an image to it based on the XML attributes
    listed in the "Gatherable" node (one for each node).
    Any suggestions, examples or related info is welcome...
    Thanks in advance!

    Okay, that really wasn't what I was looking for... But I did
    go back and RTM :-)
    Here's what I have... 1st frame:
    2nd Layer: movieclip with the instance name "currentPicture"
    The image loads into "currentPicture" from the URL given in
    the XML "a_zone" node attribute "image" just fine....
    But I'm not able to grab the attributes of each "Gatherable"
    node it seems... am I missing something or just not pointing to the
    right node?
    I keep getting:
    undefined
    undefined
    undefined
    Error opening URL
    "file:///C|/apache2triad/htdocs/gatherer/flash/undefined"
    Error opening URL
    "file:///C|/apache2triad/htdocs/gatherer/flash/undefined"
    Error opening URL
    "file:///C|/apache2triad/htdocs/gatherer/flash/undefined"

  • Please Help::How to display a Map with LIsts as Keys and Values using JSTL

    Hi,
    I need some assistance on how to display a Map in JSP using struts or core JSTL. I have a HashMap which has a List of keys and each key maps to a value of an ArrayList.i.e I have an ArrayList of taxCodes and each taxCode maps to a value of taxDetails which is an ArrayList of details for for that particular taxCode. I have some trouble to display each taxCode then display taxDetails for each taxCode. Here is my code below:
    OrderDetails.java
    package orderitems;
    import java.sql.*;
    import java.util.*;
    public class OrderDetails {
        private LineOder lineOrder;
        private Map lineItems;
        //returns an item number, key_item, from its unique keys
        public int getItemNumber(int key_item, String key_year,
                String key_office,String key_client,String key_company){
            Connection conn = null;
            Statement stat = null;
            ResultSet rst = null;
            int itmNum = 0;
             * key_item a unique number for an item.
             * key_year,key_office,key_client,key_company unique keys
             * for each order where this key_item is taken
             * from.
            String select = "SELECT key_item FROM "+
                    Constants.WEB_TABLE +" WHERE key_item = " + key_item +
                    " AND key_year = '" + key_year + "'" +
                    " AND key_office = '" + key_office + "'" +
                    " AND key_client = '" + key_client + "'" +
                    " AND key_company = '" + key_company +"'";
            DbConnection dbConn = new DbConnection();
            try {
                conn = dbConn.getDbConnection(Constants.WEB_JNDI);
                stat = conn.createStatement();
                rst = stat.executeQuery(select);
                if(rst.next()){
                    itmNum = Integer.parseInt(rst.getString("key_item"));
            } catch (SQLException ex) {
                ex.printStackTrace();
            } finally{
                SQLHelper.cleanUp(rst, stat, conn);
            return itmNum;
        //get a list of item number(item codes)
        public List getAllItemNumbers(String key_year,
                String key_office,String key_client,String key_company){
            List itemNumbers = new ArrayList();
            LineItem itemNumber = null;
            Connection conn = null;
            Statement stat = null;
            ResultSet rst = null;
            String select = "SELECT key_item FROM "+ Constants.WEB_TABLE +
                    " WHERE key_year = '" + key_year + "'" +
                    " AND key_office = '" + key_office + "'" +
                    " AND key_client = '" + key_client + "'" +
                    " AND key_company = '" + key_company + "'";
            DbConnection dbConn = new DbConnection();
            try {
                conn = dbConn.getDbConnection(Constants.WEB_JNDI);
                stat = conn.createStatement();
                rst = stat.executeQuery(select);
                while(rst.next()){
                    itemNumber = new LineItem();
                    itemNumber.setKey_item(Integer.parseInt(rst.getString("key_item")));
                    itemNumbers.add(itemNumber);
            } catch (SQLException ex) {
                ex.printStackTrace();
            } finally{
                SQLHelper.cleanUp(rst, stat, conn);
            return itemNumbers;
        //get a list of tax codes
        public List getAllTaxCodes(int key_item, String key_year,
                String key_office,String key_client,String key_company){
            Connection conn = null;
            Statement stat = null;
            ResultSet rst = null;
            ItemTax taxCode;
            List taxCodes = new ArrayList();
            int itemNum = getItemNumber(key_item, key_year,
                    key_office,key_client,key_company);
            String select = "SELECT key_tax_code FROM "+
                    Constants.WEB_TABLE +" WHERE key_item = " + itemNum +
                    " AND key_year = '" + key_year + "'" +
                    " AND key_office = '" + key_office + "'" +
                    " AND key_client = '" + key_client + "'" +
                    " AND key_company = '" + key_company +"'";
            DbConnection dbConn = new DbConnection();
            try {
                conn = dbConn.getDbConnection(Constants.WEB_JNDI);
                stat = conn.createStatement();
                rst = stat.executeQuery(select);
                while(rst.next()){
                    taxCode = new ItemTax();
                    taxCode.setKey_tax_code(rst.getString("key_tax_code"));
                    taxCodes.add(taxCode);
            } catch (SQLException ex) {
                ex.printStackTrace();
            } finally{
                SQLHelper.cleanUp(rst, stat, conn);
            return taxCodes;
        /////This methode returns a Map which am trying to display in JSP
        //use tax code to get tax details
        public Map getItemTaxDetails(String key_year,String key_office,
                String key_client,String key_company,int key_item){
            ItemTax taxDetail = null;
            List taxDetails = new ArrayList();
            List itemTaxCodes = new ArrayList();
            Map itemTaxDetails = new HashMap();
            Connection conn = null;
            Statement stat = null;
            ResultSet rst = null;
            //get a list of all tax codes of an item with a
            //given item number
            itemTaxCodes = getAllTaxCodes(key_item,key_year,
                    key_office,key_client,key_company);
            DbConnection dbConn = new DbConnection();
            try {
                conn = dbConn.getDbConnection(Constants.WEB_JNDI);
                stat = conn.createStatement();
                for(Iterator taxCodeIter= itemTaxCodes.iterator(); taxCodeIter.hasNext();){
                    ItemTax itemTaxCode = (ItemTax)taxCodeIter.next();
                    String taxCode = itemTaxCode.getKey_tax_code();
                    String select = "SELECT tax_type,tax_value," +
                            "tax_limit_val FROM "+ Constants.WEB_TABLE +
                            " WHERE key_item = "+ key_item +
                            " AND key_year = '" + key_year + "'" +
                            " AND key_office = '" + key_office + "'" +
                            " AND key_client = '" + key_client + "'" +
                            " AND key_company = '" + key_company +"'" +
                            " AND key_tax_code = '" + taxCode + "'";
                    rst = stat.executeQuery(select);
                    while(rst.next()){
                        taxDetail = new ItemTax();
                        //records to be displayed only
                        taxDetail.setKey_item(Integer.parseInt(rst.getString("key_item")));
                        taxDetail.setTax_value(rst.getString("tax_value"));
                        taxDetail.setTax_limit_val(Float.parseFloat(rst.getString("tax_limit_val")));
                        //////other details records ommited//////////////////////////
                        taxDetails.add(taxDetail);////An ArrayList of taxDetails for each taxCode
                     * A HashMap which has all taxCodes of an item as its keys
                     * and an ArrayList of taxdetails as its values.
                     * I return this for display in a JSP.
                    itemTaxDetails.put(taxCode,taxDetails);
                System.out.println();
                System.out.println("*********CONSOLE OUTPUT*************");//display on console
                Set set = itemTaxDetails.keySet();
                Iterator iter = set.iterator();
                System.out.println("Key\t\tValue\r\n");
                while (iter.hasNext()) {
                    Object taxCode=iter.next();
                    Object details=itemTaxDetails.get(taxCode);
                    System.out.println(taxCode +"\t" + details);
                System.out.println("************************************");
            } catch (SQLException ex) {
                ex.printStackTrace();
            } finally{
                SQLHelper.cleanUp(rst, stat, conn);
            return itemTaxDetails;
        //details of an item with all its taxes
        public List getAllItemDetails(String key_year,
                String key_office,String key_client,String key_company){
            List lineItems = new ArrayList();
            List itemNumbers = new ArrayList();
            Map taxDetails = new HashMap();
            LineItem item = null;
            Connection conn = null;
            Statement stat = null;
            ResultSet rst = null;
            //A list of all item numbers in the declaration
            itemNumbers = getAllItemNumbers(key_year,
                    key_office,key_client,key_company);
            DbConnection dbConn = new DbConnection();
            try {
                conn = dbConn.getDbConnection(Constants.WEB_JNDI);
                stat = conn.createStatement();
                for(Iterator itemIter= itemNumbers.iterator(); itemIter.hasNext();){
                    LineItem itemNum = (LineItem)itemIter.next();
                    int itemNumber = itemNum.getKey_item();
                    String select = "SELECT item_description,item_mass," +
                            "item_cost" +
                            " FROM " + Constants.WEB_TABLE +
                            " WHERE key_year = '"+key_year+"'" +
                            " AND key_office = '"+key_office+ "'"+
                            " AND key_client = '"+key_client+ "'"+
                            " AND key_company = '"+key_company+ "'"+
                            " AND key_item = " + itemNumber;
                    rst = stat.executeQuery(select);
                    while(rst.next()){
                        item = new LineItem();
                        item.setItem_description(rst.getString("item_description"));
                        item.setItem_mass(Float.parseFloat(rst.getString("item_mass")));
                        item.setKey_item(Integer.parseInt(rst.getString("item_cost")));
                        //////other details records ommited//////////////////////////
                        /* A HashMap of all itemTaxeCodes as its keys and an
                         * ArrayList of itemTaxedetails as its values
                        taxDetails = getItemTaxDetails(item.getKey_year(),item.getKey_office(),
                                item.getKey_client(),item.getKey_company(),item.getKey_item());
                        //item tax details
                        item.setItmTaxes(taxDetails);
                        //list of items with tax details
                        lineItems.add(item);
            } catch (SQLException ex) {
                ex.printStackTrace();
            } finally{
                SQLHelper.cleanUp(rst, stat, conn);
            return lineItems;
        public Set getOrders(String key_year,String key_office,
                String key_client,String key_company){
            List lineItems = new ArrayList();
            Set lineOrders = new HashSet();
            Connection conn = null;
            Statement stat = null;
            ResultSet rst = null;
            LineOder lineOrder = null;
            String select = "SELECT * FROM " + Constants.WEB_TABLE +
                    " WHERE key_year = '" + key_year + "'" +
                    " AND key_office = '" + key_office + "'" +
                    " AND key_client = '" + key_client + "'" +
                    " AND key_company = '" + key_company + "'";
            DbConnection dbConn = new DbConnection();
            try {
                conn = dbConn.getDbConnection(Constants.WEB_JNDI);
                stat = conn.createStatement();
                rst = stat.executeQuery(select);
                while(rst.next()){
                    lineOrder = new LineOder();
                    lineOrder.setKey_year(rst.getString("key_year"));
                    lineOrder.setKey_office(rst.getString("key_office"));
                    lineOrder.setKey_client(rst.getString("key_client"));
                    lineOrder.setKey_company(rst.getString("key_company"));
                    ////list of items with all their details
                    lineItems = getAllItemDetails(lineOrder.getKey_year(),lineOrder.getKey_office(),
                            lineOrder.getKey_client(),lineOrder.getKey_company());
                    //setting item details
                    lineOrder.setItems(lineItems);
                    //a list of order with all details
                    lineOrders.add(lineOrder);
            } catch (SQLException ex) {
                ex.printStackTrace();
            } finally{
                SQLHelper.cleanUp(rst, stat, conn);
            return lineOrders;
    Controller.java
    package orderitems;
    import java.io.*;
    import java.util.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class Controller extends HttpServlet {
        private Map taxDetails = new HashMap();
        private OrderDetails orderDetails = null;
        protected void processRequest(HttpServletRequest request,
                HttpServletResponse response)throws
                ServletException, IOException {
            response.setContentType("text/html;charset=UTF-8");
            String key_year = "2007";
            String key_office = "VZX00";
            String key_company = "DG20";
            String key_client =  "ZI001";
            int key_item = 1;
            String nextView = "/taxdetails_list.jsp";
            orderDetails = new OrderDetails();
            taxDetails = orderDetails.getItemTaxDetails(key_year,key_office,
                    key_company,key_client,key_item);
            //Store the collection objects into HTTP Request
            request.setAttribute("taxDetails", taxDetails);
            RequestDispatcher reqstDisp =
                    getServletContext().getRequestDispatcher(nextView);
            reqstDisp.forward(request,response);
        protected void doGet(HttpServletRequest request,
                HttpServletResponse response)throws
                ServletException, IOException {
            processRequest(request, response);
        protected void doPost(HttpServletRequest request,
                HttpServletResponse response)throws
                ServletException, IOException {
            processRequest(request, response);
    taxdetails_list.jsp
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
        <head>
            <title>Simple Tax Detail Diaplay ::</title>
            <link rel="stylesheet" type="text/css" href="imgs/orders.css"/>
        </head>
        <body>
            <jsp:useBean id="taxDetails" class="java.util.HashMap" scope="request"/>
            <table>
                <c:forEach items="${taxDetails}" var="hMap">
                    <tr>
                        <td><c:out value="${hMap.key}" /></td>
                        <!--td><%--c:out value="${hMap.value}" /--%></td-->
                    </tr>
                </c:forEach>
            </table>
        </body>
    </html>am displaying taxCodes(in this case i have VAT and ICD) fine but cant figure out how to display a list of value for each taxCode.Here is the output am getting
    both in my JSP and on the console:
    *******************************CONSOLE OUTPUT****************************
    Key          Value
    ICD     [orderItems.ItemTax@13e6226, orderItems.ItemTax@9dca26]
    VAT [orderItems.ItemTax@13e6226, orderItems.ItemTax@9dca26]
    Edited by: aiEx on Oct 8, 2007 6:54 AM

    hi evnafets,
    yes i need a nested for loop.I have tried your advice but my bean properties are not found.Am getting this error:
    javax.servlet.ServletException: Unable to find a value for "key_item" in object of class "java.lang.String" using operator "."
    I have tried this as stated earlier in the post:I have tried to make the method getItemTaxDetails return a List and get the returned list value as taxDetails. I then tested to display this list on JSP and its displaying fine.
    public List getItemTaxDetails(String key_year,String key_office,
                String key_client,String key_company,int key_item){
            ItemTax taxDetail = null;
            List taxDetails = new ArrayList();
            List itemTaxCodes = new ArrayList();
            Map itemTaxDetails = new HashMap();
            Connection conn = null;
            Statement stat = null;
            ResultSet rst = null;
            //get a list of all tax codes of an item with a
            //given item number
            itemTaxCodes = getAllTaxCodes(key_item,key_year,
                    key_office,key_client,key_company);
            DbConnection dbConn = new DbConnection();
            try {
                conn = dbConn.getDbConnection(Constants.WEB_JNDI);
                stat = conn.createStatement();
                for(Iterator taxCodeIter= itemTaxCodes.iterator(); taxCodeIter.hasNext();){
                    ItemTax itemTaxCode = (ItemTax)taxCodeIter.next();
                    String taxCode = itemTaxCode.getKey_tax_code();
                    String select = "SELECT tax_type,tax_value," +
                            "tax_limit_val FROM "+ Constants.WEB_TABLE +
                            " WHERE key_item = "+ key_item +
                            " AND key_year = '" + key_year + "'" +
                            " AND key_office = '" + key_office + "'" +
                            " AND key_client = '" + key_client + "'" +
                            " AND key_company = '" + key_company +"'" +
                            " AND key_tax_code = '" + taxCode + "'";
                    rst = stat.executeQuery(select);
                    while(rst.next()){
                        taxDetail = new ItemTax();
                        //records to be displayed only
                        taxDetail.setKey_item(Integer.parseInt(rst.getString("key_item")));
                        taxDetail.setTax_value(rst.getString("tax_value"));
                        taxDetail.setTax_limit_val(Float.parseFloat(rst.getString("tax_limit_val")));
                        //////other details records ommited//////////////////////////
                        taxDetails.add(taxDetail);////An ArrayList of taxDetails for each taxCode
                     * A HashMap which has all taxCodes of an item as its keys
                     * and an ArrayList of taxdetails as its values.
                     * I return this for display in a JSP.
                    itemTaxDetails.put(taxCode,taxDetails);
            } catch (SQLException ex) {
                ex.printStackTrace();
            } finally{
                SQLHelper.cleanUp(rst, stat, conn);
            //return itemTaxDetails;
            return taxDetails;
        }And my JSP
    taxdetails_list.jsp
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
            <link rel="stylesheet" type="text/css" href="imgs/orders.css"/>
        </head>
        <body>
            <table>
                <c:forEach var="curRecord" items="${taxDetails}" varStatus="rowCounter">
                        <c:choose>
                            <c:when test="${rowCounter.count % 2 == 0}">
                                <c:set var="rowStyle" scope="page" value="odd" />
                            </c:when>
                            <c:otherwise>
                                <c:set var="rowStyle" scope="page" value="even" />
                            </c:otherwise>
                        </c:choose>
                        <tr class="${rowStyle}">
                            <td>${curRecord.key_item}</td>
                            <td>${curRecord.tax_value}</td>
                            <td>${curRecord.tax_limit_val}</td>
                        </tr>
                    </c:forEach>
            </table>
        </body>
    </html>I can't see where am going wrong even with your advice.Please help.
    Thnx.

  • HT5429 I am not able to get any directions on my maps i am using iphone 4s and updated to ios 6.1.3 and whenever i try to find a route it always says directions could not be found can anyone help in fixing it

    I am not able to get any directions on my maps i am using iphone 4s and updated to ios 6.1.3 and whenever i try to find a route it always says directions could not be found can anyone help in fixing it

    Maps: Turn-by-Turn Navigation
    Argentina Australia Austria Belgium Brunei Bulgaria Canada Croatia Czech Republic Denmark Egypt Estonia Finland France Germany Greece Hong Kong Hungary Ireland Israel Italy Japan Latvia Liechtenstein Lithuania Luxembourg Macau Malaysia Malta Mexico Morocco Netherlands New Zealand Norway Poland Portugal Romania Russia San Marino Singapore Slovakia Slovenia South Africa South Korea Spain Sweden Switzerland Taiwan Thailand Turkey UK Ukraine USA
    Back to Top

  • Multi-Mapping and Message Split using BPM

    Hi All,
    Could anyone pls let me know clearly how message mapping can be done for this weblog
    /people/sudharshan.aravamudan/blog/2005/12/01/illustration-of-multi-mapping-and-message-split-using-bpm-in-sap-exchange-infrastructure
    Thanks,
    Ram

    Hi,
    When you are doing Message mapping after adding the Messaget types for source and target messages. You can click on the "" button in the target message and add one more tab. You can go to Message tab as shown in the 5th image and click "" button to add one more message type. Then do the mapping as usual.
    <b>Based on the value of the element(name), the node of input(details)should be directed to one of the two message types</b>
    Here in this blog it is done based on the Name.
    You need to use IFTHENELSE boolean function and do the mapping.
    Thanks,
    Prakash

  • File to file with out message mapping and using variable substitution

    Hi,
    Can any one send me a scenario where we can have file to file scenario with out message mapping and where i can use variable substitution.
    As of now i am using integrate configurations where i cant use variable substitution as the message does not reflect in integration engine. I need to populate time stamp between <filename><timestamp>.txt.pgp
    I am as of now using configuration scenario.
    The time stamp always writes before the last file extension.
    Let me know your thoughts?
    Thanks,
    Chandra.

    Hi Chandra,
    u can use the Variable substitution even without IR contents also(Mapping....).
    in the receiver communication channel just specify the path u want to access for a value...
    eg: filename                             payload:mt_name,1,records,1,name,1
    and in th file name give it as %filename%.txt... or vt ever ur requirement
    Babu

  • I have just bought four songs from iTunes store using my iMac. I can play the music on my iMac and throughout my Apple TV. However after several restarts and double checks I can't get the four tunes to sync with either my iPhone or my iPad.

    I have just bought four songs from iTunes store using my iMac. I can play the music on my iMac and throughout my Apple TV. However after several restarts and double checks I can't get the four tunes to sync with either my iPhone or my iPad. All the software is up to date.

    do you use the same Apple ID on your iMac, your iPhone and iPad? This is a requirement.

  • In an album, many pictures would show on the screen and double clicking one would enlarge it for adjustments. Now one larger photo shows and along the bottom severa smaller ones. Options which used to be at the top right of screen no longer show. Whel

    In Aperture album about 16 photos would show on screen and double clicking on one would enlarge it for adjustments. Now one larger image shows with about 7 photos at bottom. Options for controlling this no longer appear at top right. How do I correct this?

    Do you mean the "View" controls are missing in your Toolbar?
    To add these controls back to the Toolbar, use the View menu and select "Customize Toolbar". Drag the View Controls back to the Toolbar.

  • Since I uploaded the new OS X Mavericks the App Store, Messages, Notes, Calendar, Maps and Preview will not launch/open. In Finder cannot find my files. Most crucially cannot upgrade OS X Mavericks software. I had two apple ID's, the old one not used

    Since I uploaded the new OS X Mavericks the App Store, Messages, Notes, Calendar, Maps and Preview will not launch/open. In Finder cannot find my files. Most crucially cannot upgrade OS X Mavericks software. I had two apple ID's, the old one not used

    Please read this whole message before doing anything.
    This procedure is a test, not a solution. Don’t be disappointed when you find that nothing has changed after you complete it.
    Step 1
    The purpose of this step is to determine whether the problem is localized to your user account.
    Enable guest logins* and log in as Guest. Don't use the Safari-only “Guest User” login created by “Find My Mac.”
    While logged in as Guest, you won’t have access to any of your documents or settings. Applications will behave as if you were running them for the first time. Don’t be alarmed by this behavior; it’s normal. If you need any passwords or other personal data in order to complete the test, memorize, print, or write them down before you begin.
    Test while logged in as Guest. Same problem?
    After testing, log out of the guest account and, in your own account, disable it if you wish. Any files you created in the guest account will be deleted automatically when you log out of it.
    *Note: If you’ve activated “Find My Mac” or FileVault, then you can’t enable the Guest account. The “Guest User” login created by “Find My Mac” is not the same. Create a new account in which to test, and delete it, including its home folder, after testing.
    Step 2
    The purpose of this step is to determine whether the problem is caused by third-party system modifications that load automatically at startup or login, by a peripheral device, by a font conflict, or by corruption of the file system or of certain system caches.
    Please take this step regardless of the results of Step 1.
    Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards, if applicable. Start up in safe mode and log in to the account with the problem. You must hold down the shift key twice: once when you turn on the computer, and again when you log in.
    Note: If FileVault is enabled, or if a firmware password is set, or if the startup volume is a software RAID, you can’t do this. Ask for further instructions.
    Safe mode is much slower to start up and run than normal, with limited graphics performance, and some things won’t work at all, including sound output and Wi-Fi on certain models. The next normal startup may also be somewhat slow.
    The login screen appears even if you usually log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.
    Test while in safe mode. Same problem?
    After testing, restart as usual (not in safe mode) and verify that you still have the problem. Post the results of Steps 1 and 2.

  • Detecting click ( single and double) on row (displayed using iterator)

    Hello All,
    I am using jdev 11.1.1.6
    I am displaying a list as below.
                                   <trh:tableLayout>
                                        <af:iterator value="#{pageFlowScope.Bean.List}" var="temp">
                                         <trh:rowLayout>
                                          <trh:cellFormat>
                                           <af:outputText value="#{temp.value1}"/>
                                          </trh:cellFormat>
                                          <trh:cellFormat>
                                           <af:outputText value="#{temp.value2}"/>
                                          </trh:cellFormat>
                                          <trh:cellFormat>
                                           <af:outputText value="#{temp.value3}"/>
                                          </trh:cellFormat>
                                          <trh:cellFormat>
                                           <af:outputText value="#{temp.value4}"/>
                                          </trh:cellFormat>
                                        </trh:rowLayout>
                                        </af:iterator>
                                      </trh:tableLayout>
    My requirement is, when user clicks on a row, that row should be detected in backend and those value will be used.
    My requirement is, On single click row should be detected(in backend/bean)
    On double click, the values is saved(in backend/bean).
    How can i detect single and double click on a particular row ?

    I have updated the code as below, single click and double click are getting detected on a row
        <af:resource type="javascript">
                function singleClick(){
                    alert("Single Click");
                function doubleClick(){
                    alert("Double Click");
        </af:resource>
                                   <trh:tableLayout>
                                        <af:iterator value="#{pageFlowScope.Bean.List}" var="temp" onclick="singleClick()" ondblclick="doubleClick()">
                                         <trh:rowLayout>
                                          <trh:cellFormat>
                                           <af:outputText value="#{temp.value1}"/>
                                          </trh:cellFormat>
                                          <trh:cellFormat>
                                           <af:outputText value="#{temp.value2}"/>
                                          </trh:cellFormat>
                                          <trh:cellFormat>
                                           <af:outputText value="#{temp.value3}"/>
                                          </trh:cellFormat>
                                          <trh:cellFormat>
                                           <af:outputText value="#{temp.value4}"/>
                                          </trh:cellFormat>
                                        </trh:rowLayout>
                                        </af:iterator>
                                      </trh:tableLayout>
    Now,
    suppose i have following values for some/any row,
    value1=20, value2="abc", value3=009, value4="Language" 
    How can i retrieve these values in java script (if in backing bean then very good)

  • Is there anyway to have maps not take highways, and only use back roads?

    Is there anyway to have maps not take highways, and only use back roads?
    Sometimes I enjoy taking the longer, scenic route, but have no idea how to get maps to give me directions that don't keep trying to direct me to the highway, or if it's even possible!
    Thanks!

    Hello,
    Welcome to Adobe Forums.
    Adobe Captivate 6 won't be able to do this workflow, you can use Adobe Flash Pro CS6.
    Thanks,
    Vikram

Maybe you are looking for