How to display a button with an icon?

Hi,
I'd like to display an SAP-icon on a button.
In this thread How can I show an Icon in the tapStripItem-title?
Thomas Jung gave the following example:
> I don't know if this definetely works with tabstrips
> items but it does work with buttons and toolbar
> buttons.  What I do is create a BEE and render that
> to a string. I then use that string as the text of
> the element I want to place my image into:
>
>   <%
>   data image type ref to cl_htmlb_image.
>   data: image_string type string.
>   create object image.
>   image->id = `UserSelectionCancel2`.
>   image->src = cl_bsp_mimes=>sap_icon( `ICON_CHECKED` D`).
>   image->tooltip = ``.
>   clear image_string.
>   image_string = image->IF_BSP_BEE~RENDER_TO_STRING( G( page_context ).
>   %>
> <xhtmlb:toolbarButton id            = "UserSelectionCancel"
> onClientClick = "closeiframe();"
> enabled       = "<%= enabled %>"
> text          = "<%= image_string %>" />
I didn't find anything else about this topic and
tried to adopt this for a button, but that doesn't work for me either.
<htmlb:button id            = "byButt"
   text    = "<%= image_string %> ENTER"
   onClick = "myClickHandler"  />
Is there a way/documentation to get this done?
Thanks in advance.
Cheers.
-Alf

> This technique is really just using a BEE, there is
> documentation on the BEE concept in the online help
> and Brian McKellar has a weblog on the subject as
> well.
OK, I think I get the idea. Will check the stuff. Thanks.
> Notice the strange D at the end of the line. This
> isn't in the original posting. Perhaps this is just
> bad cut and paste.
Just bad copy paste. Yes.
> You say that this isn't working for you - but you
> don't describe the results. Is there an error?  Does
> it render anything in the button at all?  Does the
> raw HTML get rendered?
I just saw coding in the button.
> You want to make sure that the
> text doesn't get encoded - which would cause the HTML
> source to display instead. On the htmlb:button you
> will want to set the attribute encode = FALSE.
OK, that was right on spot. This shows me the Icon! Strike!
> Also I am not sure that you can also pass in text
> with the image like that.  You might have to create a
> full BEE and add the image and a textView separately
> into the BEE.  Then render the entire BEE to a string.
I'll check the documentation on BEE and give it a try.
Thanks for your answer.
Thats a starting point for me.
Alf

Similar Messages

  • How to display Radio buttons with default selection on

    Hi
    I want to display Radio buttons using jsf
    i have done it using
    <h:dataTable id="apartmentList" value="#{userBean.allApartmentList}"
                   var="apartments">
                   <h:column>
                        <h:selectOneRadio id="selectedApartment" onclick="javascript:setSelectedApartment(this);">
                             <f:selectItem itemValue="#{apartments.apartmentVO.apartmentId}" />
                        </h:selectOneRadio>
                   </h:column>
    inside a data table
    now when i click some page i want to display the radio's with default radio button selected
    also when i select one radio button and click on some command button
    eg:<h:commandButton action="#{userBean.setSelectedApartment}"
    the Radio button's Selection should not disappear
    i have written a javaScript
    function setSelectedApartment(oRadio)
              oForm = oRadio.form;
              elems=oForm.elements;          
              for(iIndex=0;iIndex<elems.length;iIndex++)
                   if(elems[iIndex].type == 'radio')
                        if(elems[iIndex].name != oRadio.name)
                             elems[iIndex].checked=false;
              document.getElementById("apartmentListForm:selectedApartmentId").value=oRadio.value;
    To check which Raio button is Selected
    How do i show the Default Selected button and How the selection should not disappear
    Can any one suggest me links or the solution to this problem
    Thank you
    Geetanjalee

    -set the value binding expression of select items to a request scope bean
    - on the page load event() ,do
    setdefaultval("ur default value")
    so each time on the page load it sets the default value. and you can get selected value by getdefaultval()
    --raju                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Make a button with an icon

    Hi all.
    I have a new problem. I want to make a button as an icon e.g. when I push a button to open a file I want to display the button with the icon.
    I'm on devsuite 10g.
    Can someone tell me which are the steps to follow to do this???
    Thank,
    Fabrizio

    I have restarted the form builder and the http
    listener but I don't see the icon on my button.
    Here is the value of my
    UI_ICON_EXTENSION
    .gif;.jpg;.ico;.GIF;.JPG;.ICO
    And this is the value of my
    UI_ICON
    c:\oracle\devsuite10g\reports\plugins\resource;
    C:\ORACLE\devsuite10g\cgenf61\ADMIN\ICONS\PC;
    c:\oracle\devsuite10g\forms\java\icone.jar
    Fabrizioyou cause a Vertigo for your Forms Builder :-)
    Try to specify only one extension, .ico in Forms Builder are more accurate in size. Try it.
    Tony

  • How to associate a button with the selection/unselection of a JTable?

    hi,
    how to associate a button with JTable in this manna? i want to disable a button once there is no selection in the JTable, and enable the button when there is a selection. to associate the selection it is easy: just make an eventAction for the button on the click in the JTable and check whether there is a selection. but how to do this with the unselection? hope anyone can give me any hint. thanx!

    import javax.swing.*;
    import javax.swing.event.*;
    import java.awt.*;
    import java.awt.event.*;
    public class Test extends JFrame {
        String[] head = {"One","Two","Three"};
        String[][] data = {{"1-1","1-2","1-3"},{"2-1","2-2","2-3"},{"3-1","3-2","3-3"}};
        JTable jt = new JTable(data,head);
        public Test() {
         setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
         Container content = getContentPane();
         content.add(new JScrollPane(jt));
         jt.getSelectionModel().addListSelectionListener(new ListSelectionListener() {
             public void valueChanged(ListSelectionEvent lse) {
              if (lse.getValueIsAdjusting()) return;
              if (jt.getSelectionModel().isSelectionEmpty()) {
                  System.out.println("Nothing Selected");
              } else {
                  System.out.println("Something Selected");
         setSize(500,500);
         show();
        public static void main( String args[] ) { new Test(); }
    }

  • How to display polygons both with line contour and filled interior?

    How to display polygons both with line contour and filled interior?
    Java3D 1.3, Java 1.4.1-rc

    Hi,
    I just started with Java3D last week.
    I assume you mean drawing polygons with outlines (wireframe) in one color and polygon face filling with another color. If so, I've got the same question! (I usually think of "contour" to refers to plotting surface intensity of independent data like temperature or elevation, but I don't think you mean this.)
    The only solution I've found so far is to make two shapes with the same geometry.
    Here's an example - an outlined and filled cube. I made it using a generalize class DualShape which is two shapes with the same geometry, but one filled and one as a line.
    It works, although I can't say I understand the setPolygonOffset(), knowing what value to set. Without the command, the depthbuffer can't consistently decide which should be in front between the fills and lines so it looks bad.
    I certainly think it would be nicer to do both internally, like:
    pa.setPolygonMode(pa.POLYGON_LINE || pa.POLYGON_FILL);
    And then have setFillColor and setLineColor for each.
    I don't know why they don't allow this - maybe OpenGL can't do it like this so Java3D follows.
    If anyone has any better ideas I'd like to hear about it.
    Tom Ruen
    class DualCube extends DualShape // cube with outline and fill colors
    public DualCube(float ax, float ay, float az, //cube lower corner
    float bx, float by, float bz, //cube upper corner
    float br, float bg, float bb, //border color
    float fr, float fg, float fb) //fill color
    setGeometry(new CubeGeometry(ax,ay,az,bx,by,bz),br,bg,bb,fr,fg,fb);
    class DualShape extends BranchGroup //general shape with outline and fill colors
    Appearance ap1,ap2;
    PolygonAttributes pa1,pa2;
    ColoringAttributes ca1,ca2;
    Shape3D s1,s2;
    public void setGeometry(Geometry geo, float br, float bg, float bb, float fr, float fg, float fb)
    //filled shape:
    addChild(s1=new Shape3D(geo, ap1=new Appearance()));
    ap1.setPolygonAttributes(pa1=new PolygonAttributes()); pa1.setPolygonMode(pa1.POLYGON_FILL);
    ap1.setColoringAttributes(ca1=new ColoringAttributes()); ca1.setColor(fr,fg,fb);
    //lined (wire) shape:
    addChild(s2=new Shape3D(geo, ap2=new Appearance()));
    ap2.setPolygonAttributes(pa2=new PolygonAttributes()); pa2.setPolygonMode(pa2.POLYGON_LINE);
    ap2.setColoringAttributes(ca2=new ColoringAttributes()); ca2.setColor(br,bg,bb);
    pa2.setPolygonOffset(-1000); //Uncertain what "float" value to use!
    class CubeGeometry extends IndexedQuadArray //cube geometry data
    private static final int[] faces =
    0,3,2,1,
    0,1,5,4,
    1,2,6,5,
    2,3,7,6,
    3,0,4,7,
    4,5,6,7
    private static float[] verts = new float[24];
    public CubeGeometry(float ax, float ay, float az, //lower limit
    float bx, float by, float bz) //upper limit
    super(8, IndexedQuadArray.COORDINATES , 24);
    int n;
    n=0; verts[n]=ax; verts[n+1]=ay; verts[n+2]=az;
    n=3; verts[n]=bx; verts[n+1]=ay; verts[n+2]=az;
    n=6; verts[n]=bx; verts[n+1]=by; verts[n+2]=az;
    n=9; verts[n]=ax; verts[n+1]=by; verts[n+2]=az;
    n=12; verts[n]=ax; verts[n+1]=ay; verts[n+2]=bz;
    n=15; verts[n]=bx; verts[n+1]=ay; verts[n+2]=bz;
    n=18; verts[n]=bx; verts[n+1]=by; verts[n+2]=bz;
    n=21; verts[n]=ax; verts[n+1]=by; verts[n+2]=bz;
    setCoordinates(0, verts);
    setCoordinateIndices(0, faces);

  • How to display a cursor with sand glass ?

    I would like to know how to display a cursor with sand glass I am performing a long operation ?
    Thanks in advance.

    As long as you are using anything that extends Component...
    this.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
    doLongOperation();
    this.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));Hope this helps,
    Radish21
    PS the API is ALWAYS your friend
    http://java.sun.com/j2se/1.4.1/docs/api/
    http://java.sun.com/j2se/1.4.1/docs/api/java/awt/Cursor.html

  • How to display action buttons on iPad app?

    Hi all,
    I'm trying to display "action buttons" in my custom BO's TI in advanced list panes. For each of these table I created LayoutStackPanel where inside I have icon with defined event handler. In web UI version everything works fine. "Action button" appears and event handler is triggered on click.
    When I open same TI on iPad, first of all Table is displayed as grid, not table, but I assume that is how iPad player generates that. But my created icon is not visible in specific row (I haven't allowed hover option as I thought iPad can't handle hover event), and even switching TI into edit mode it's not appearing and event handler isn't triggered.
    I wonder if there is around some detailed guide, best practice doc which covers how we can design our screens for iPads.
    Thanks,
    Uldis

    Hello Uldis,
    Please try to follow these steps to create it from scratch. It guides you on how to create a Delete button, so you can use is as a reference for futher action buttons:
    1. Drag and Drop ‘LayoutStackPanel’ from ToolBox to List Column.
    2. Right Click on the column and Select Model ‘LayoutStackPanel’. Add an icon over there.
    3. Set the property ‘Visible on Hover’ of Layout Control to True.
    4. Create an action on your BO node called Delete<NodeName>. Generate the script file and add this snippet:
    this.Delete();
    5. Set the property ‘On Click’ in UI Designer.
    Create EventHandler calling the BO action. The EventHandler and "Misc" name must contain "Remove" or "Delete" as prefix to identify as a deletion column. As sample you can check the "Account Team" facet of account Thing Inspector:
    /BYD_COD/SalesOnDemand/Account/UI/COD_Account_TI.TI.uicomponent
    Click on the "Items" collection as following figure shows:
    Then set the Icon ‘OnClick' event to your delete event previously defined.
    Let me know if that worked for you.
    Best Regards,
    Fernando Giroleti
    Cloud Service Center AMEA

  • 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.

  • How to display 2 layouts with 2 different Header and Footer in a template.

    Hi,
    I am using XML Publisher 5.5. I have created one template which is having two layouts. I am using <?Start: Body?> and <?end body?> for displaying Headers and footers. Now my problem is, I need to display first layout with it's associated Header and footer and then second layout with other header and footer. But the two layouts should come in single template file. How is it possible?. Is there any work around? Please help me as this is the urgent requirement to my client.
    Thanks.
    Siva.

    No problem. Select Insert -> Break from the menu bar. Then select a "Section Break" - Next page.
    Header 1
    <?start:body?>
    Page 1
    <?end: body?>
    Footer 1
    ==================Section Break (Next Page)=================
    Header 2
    <?start:body?>
    Page 2
    <?end: body?>
    Footer 2
    Worked like a charm.
    Klaus

  • Satellite A210 - How to use muldimedia buttons with other than Media Player

    Hi,
    is it really not possible to use the Multimedia Buttons (Play, Pause, FF) on the top of my notebook for another application than the Windows Media Player?
    Is there any reason for this? I would like to control Winamp with this buttons.
    It seems quite sensless to restrict the acces to ONE application of HUNDREDS available, an then this one is the Media Player which is not used by the most people.
    I have the Satellite A210 Notbook.
    Can you tell my how to control my winamp with this buttons?
    Greetings from Robert

    Hello Robert
    Unfortunately there is no solution at the moment. If you check this forum you can find several very interesting threads about multimedia buttons and Winamp player. The fact is that some people have found solution for older notebook models running WXP. Winamp has offered plugin that must be installed.
    Now we have new situation. Your notebook runs newest Vista OS and I didnt find any plugin that can help. Problem is that your notebook is designed for Windows Vista and preinstalled OS contains all necessary plugins for running Windows media player as a part of preinstalled operating system.
    It is no kind of restriction. With preinstalled OS you can do what you want and if you can find a way to change it do this. You know very well that there are hundreds of different players on the market. You cannot expect that Toshiba take a time and create a plugins for all of them and satisfy the customers all over the world.

  • How to display html content with image in Adobe Flash and Flex mobile project?

    Hi,
      I have a html content with image in it. How to display it in Adobe Flash Builder and Flex mobile project? Which control needs to be used for this?

    Hello,
    The only current way is to use an iFrame, or if you only need some html tags you could use the Text Layout Framework.
    Here this is the iFrame approach:
    http://code.google.com/p/flex-iframe/
    If the swc do not work in Flex4 just use its ource code which works...
    ...it is basically based on this:
    http://www.deitte.com/archives/2008/07/dont_use_iframe.htm
    see also and vote, please:
    http://bugs.adobe.com/jira/browse/SDK-12291
    http://bugs.adobe.com/jira/browse/SDK-13740
    Regards
    Marc

  • HT2404 in incoming calls how to display company name with name

    Hello
    How we can get display of company name along with name while receiving incoming calls in iphone 4.
    Thanks

    actually according to this, t-mobile became the first carrier to offer the paid feature in 2011
    http://www.geek.com/mobile/t-mobile-becomes-first-major-us-carrier-to-add-caller -id-feature-1402597/
    i don't know if anything changed with verizon after 2011, but i don't see any such feature on their website. I know you can set/remove your own name that is displayed to others, with verizon. but i cant' specifically find this incoming name feature.

  • How to display addtocart button using Liquid

    I'm trying to output a custom layout of a product using Liquid, but can't figure out how to display the add to cart button as it's not included in the JSON. Liquid markup is all new to me so forgive me if I'm missing something obvious. Here is what I have for the layout but need an addtocart button.
    {module_product template="" collection="Classes" render="collection" catalogId="277528" productId="9231800"}
      <h1>{{Classes.title}}</h1>
       {{Classes.description}}
       <h3>Cost</h3>
       <p>{{Classes.saleprice}} + {{Classes.taxCode}} {{Classes.custom1}}</p>

    Ahh, Your rendering a product on just a page as a collection. May I ask why your trying to do that? Why are you not using the product eCommerce layouts.
    Doing what your doing you will only ever display information. You will never be able to do grouping, attributes or anything like that because they are more then just data output, they have functionality, BC script features and more to run off.
    Unless you 100% know how and you had all the info available (which you dont yet) to completely replicate every BC script feature etc - You will not be able to do what your doing.
    Liquid runs in layouts, just use product layouts and do things in there. I not seen on that page any reason why you would not be.

  • How to display positive value with a trailing plus sign

    I want to display positive value with a trailing plus sign and negative value with a trailing minus sign. How can I do it? Is there any character in custom format for this? I don't want to convert number to text and use case statement because I need two decimal places and thousands separator.

    Okay, try this...
    You will need to do a "UNION ALL" of three queries, one for positive values, one for zero values, and one for negative values.
    In the "negative values" query, do the following:
    1) Add a filter on the measure for values "less than 0"
    (This will ensure all values are negative.)
    2) In the Data Format tab, select "Custom" and type in #,##0.00-
    (This will add the trailing negative sign.)
    3) In the Edit Formula tab, add the absolute value function, ABS(insert measure here)
    (This will take get rid of the default leading negative sign.)
    For the "positive values" query, modify the above as follows:
    1) Change the filter to "greater than 0"
    2) In the Data format, change the custom format to #,##0.00+
    Step 3 is not needed since all values are positive.
    For the "zero values" query, just add a filter "equal to zero."

  • How to add a button with Javascript to Library

    Hi
    I am using Captivate 5.5 to create a template.
    In the files which will be created using this template, we will be adding a button which executes a Javascript. Now, my question is, since this button will be used on multiple slides in the file, can I add this button (with the Javascript) to the library? Currently, we create it manually everytime.
    We don't have a programmer in our team, so we can't create widget. Is there an alternative way?
    Thanks for your help.
    Sreekanth

    Thanks for that reply.
    I now have a blank slide with the button (including the javascript) on it which solves the problem of importing it manually.
    However, when we use this template to import PowerPoint presentations, when we publish the file, the first slide (the one on which I have this button) will be blank and has to be manually deleted.
    Is there a way to eliminate this manual work? I tried hiding and using some actions. But it was not of any use.

Maybe you are looking for

  • How can I login to CQ Cloud with an Adobe email

    I am an adobe employee and I created my adobe ID with my Adobe email. Then I login to CQ Cloud with this ID. After I input my email and password, it told me:"you will be receiving an email shortly from Adobe with a link to login with your Adobe ID cr

  • My Mac will no longer connect to my home Internet.

    This is frustrating. My MacBook pro laptop, purchased in September, will no longer connect to my home Internet through wi-fi. It was working fine this morning, but now when I attempt to connect, it asks me for my password. I type in the correct passw

  • How can I make an image link to a movie?

    I noticed something really awesome in the free Biology textbook on iBooks, and I wanted to try to recreate it in iBooks author, however I cant quite seem how to figure out how it was done. In the Biology book, there is an image of a gentleman on page

  • Sending mail to invalid mail address but domain valid.im not getting any NDR

    Hi, In my organisation I'm sending mail to invalid email address but domain is valid ...i'm not getting any NDR. I want NDR like this  The e-mail address you entered couldn't be found. Please check the recipient's e-mail address and try to resend the

  • Profile Picture question

    Ok sorry this is a noob question but for some reason I cannot remember how to enable this. When making a phone call I used to have my background as the wallpaper and the a small profile picture of the person I am calling on the upper right corner. Ho