How to display checkbox within button using skin?

Hi,
I am trying to put checkbox inside spark button using skin. The button looks like  -
I want the button to repond mouse event (which is any way responding), but I also want check box too should respond to mouse event when mouse pointer is over check box.
I am able to create button which looks like above. But when I move mouse pointer over button, the button look changed and looks like -
As can be seen that there is no check box. I need check box to be shown always in button and should also be clickable.
Do any one have idea how to solve it?
Thanks,
Prithveesingh Zankat.

Hi,
Here is complete skin code-
<s:SparkButtonSkin xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:fb="http://ns.adobe.com/flashbuilder/2009"
                   minWidth="21" minHeight="21"
                   alpha.disabled="0.5"
                   width.up="84">
    <fx:Metadata>
        <![CDATA[
         * @copy spark.skins.spark.ApplicationSkin#hostComponent
        [HostComponent("spark.components.Button")]
        ]]>
    </fx:Metadata>
    <fx:Script fb:purpose="styling">
        <![CDATA[        
            import spark.components.Group;
            /* Define the skin elements that should not be colorized.
            For button, the graphics are colorized but the label is not. */
            static private const exclusions:Array = ["labelDisplay"];
             * @private
            override public function get colorizeExclusions():Array {return exclusions;}
             * @private
            override protected function initializationComplete():void
                useChromeColor = true;
                super.initializationComplete();
             *  @private
            override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number) : void
                var cr:Number = getStyle("cornerRadius");
                if (cornerRadius != cr)
                    cornerRadius = cr;
                    shadow.radiusX = cornerRadius;
                    fill.radiusX = cornerRadius;
                    lowlight.radiusX = cornerRadius;
                    highlight.radiusX = cornerRadius;
                    border.radiusX = cornerRadius;
                if (highlightStroke)
                    highlightStroke.radiusX = cornerRadius;
                if (hldownstroke1)
                    hldownstroke1.radiusX = cornerRadius;
                if (hldownstroke2)
                    hldownstroke2.radiusX = cornerRadius;
                super.updateDisplayList(unscaledWidth, unscaledHeight);
            private var cornerRadius:Number = 2;
        ]]>       
    </fx:Script>
    <!-- states -->
    <s:states>
        <s:State name="up" />
        <s:State name="over" />
        <s:State name="down" />
        <s:State name="disabled" />
    </s:states>
    <!-- layer 1: shadow -->
    <!--- @private -->
    <s:Rect id="shadow" left="-1" right="-1" top="-1" bottom="-1" radiusX="2">
        <s:fill>
            <s:LinearGradient rotation="90">
                <s:GradientEntry color="0x000000"
                                 color.down="0xFFFFFF"
                                 alpha="0.01"
                                 alpha.down="0" />
                <s:GradientEntry color="0x000000"
                                 color.down="0xFFFFFF"
                                 alpha="0.07"
                                 alpha.down="0.5" />
            </s:LinearGradient>
        </s:fill>
    </s:Rect>
    <!-- layer 2: fill -->
    <!--- @private -->
    <s:Rect id="fill" left="1" right="1" top="1" bottom="1" radiusX="2">
        <s:fill>
            <s:LinearGradient rotation="90">
                <s:GradientEntry color="0xFFFFFF"
                                 color.over="0xBBBDBD"
                                 color.down="0xAAAAAA"
                                 alpha="0.85" />
                <s:GradientEntry color="0xD8D8D8"
                                 color.over="0x9FA0A1"
                                 color.down="0x929496"
                                 alpha="0.85" />
            </s:LinearGradient>
        </s:fill>
    </s:Rect>
    <!-- layer 3: fill lowlight -->
    <!--- @private -->
    <s:Rect id="lowlight" left="1" right="1" top="1" bottom="1" radiusX="2">
        <s:fill>
            <s:LinearGradient rotation="270">
                <s:GradientEntry color="0x000000" ratio="0.0" alpha="0.0627" />
                <s:GradientEntry color="0x000000" ratio="0.48" alpha="0.0099" />
                <s:GradientEntry color="0x000000" ratio="0.48001" alpha="0" />
            </s:LinearGradient>
        </s:fill>
    </s:Rect>
    <!-- layer 4: fill highlight -->
    <!--- @private -->
    <s:Rect id="highlight" left="1" right="1" top="1" bottom="1" radiusX="2">
        <s:fill>
            <s:LinearGradient rotation="90">
                <s:GradientEntry color="0xFFFFFF"
                                 ratio="0.0"
                                 alpha="0.33"
                                 alpha.over="0.22"
                                 alpha.down="0.12"/>
                <s:GradientEntry color="0xFFFFFF"
                                 ratio="0.48"
                                 alpha="0.33"
                                 alpha.over="0.22"
                                 alpha.down="0.12" />
                <s:GradientEntry color="0xFFFFFF"
                                 ratio="0.48001"
                                 alpha="0" />
            </s:LinearGradient>
        </s:fill>
    </s:Rect>
    <!-- layer 5: highlight stroke (all states except down) -->
    <!--- @private -->
    <s:Rect id="highlightStroke" left="1" right="1" top="1" bottom="1" radiusX="2" excludeFrom="down">
        <s:stroke>
            <s:LinearGradientStroke rotation="90" weight="1">
                <s:GradientEntry color="0xFFFFFF" alpha.over="0.22" />
                <s:GradientEntry color="0xD8D8D8" alpha.over="0.22" />
            </s:LinearGradientStroke>
        </s:stroke>
    </s:Rect>
    <!-- layer 6: highlight stroke (down state only) -->
    <!--- @private -->
    <s:Rect id="hldownstroke1" left="1" right="1" top="1" bottom="1" radiusX="2" includeIn="down">
        <s:stroke>
            <s:LinearGradientStroke rotation="90" weight="1">
                <s:GradientEntry color="0x000000" alpha="0.25" ratio="0.0" />
                <s:GradientEntry color="0x000000" alpha="0.25" ratio="0.001" />
                <s:GradientEntry color="0x000000" alpha="0.07" ratio="0.0011" />
                <s:GradientEntry color="0x000000" alpha="0.07" ratio="0.965" />
                <s:GradientEntry color="0x000000" alpha="0.00" ratio="0.9651" />
            </s:LinearGradientStroke>
        </s:stroke>
    </s:Rect>
    <!--- @private -->
    <s:Rect id="hldownstroke2" left="2" right="2" top="2" bottom="2" radiusX="2" includeIn="down">
        <s:stroke>
            <s:LinearGradientStroke rotation="90" weight="1">
                <s:GradientEntry color="0x000000" alpha="0.09" ratio="0.0" />
                <s:GradientEntry color="0x000000" alpha="0.00" ratio="0.0001" />
            </s:LinearGradientStroke>
        </s:stroke>
    </s:Rect>
    <!-- layer 7: border - put on top of the fill so it doesn't disappear when scale is less than 1 -->
    <!--- @private -->
    <s:Rect id="border" left="0" top="0" bottom="0" radiusX="2"
            right.disabled="0" width.disabled="69" height.disabled="20"
            right.down="0" width.down="69" height.down="20"
            right.over="0" width.over="69" height.over="20"
            left.up="0" right.up="0" top.up="0" bottom.up="0">
        <s:stroke>
            <s:LinearGradientStroke rotation="90" weight="1">
                <s:GradientEntry color="0x000000"
                                 alpha="0.5625"
                                 alpha.down="0.6375" />
                <s:GradientEntry color="0x000000"
                                 alpha="0.75"
                                 alpha.down="0.85" />
            </s:LinearGradientStroke>
        </s:stroke>
    </s:Rect>
    <!-- layer 8: text -->
    <!--- @copy spark.components.supportClasses.ButtonBase#labelDisplay  -->
    <s:Label id="labelDisplay" left="10" top="2" bottom="2" maxDisplayedLines="1" textAlign="center"
             verticalAlign="middle"
             right.disabled="10" horizontalCenter.disabled="0" verticalCenter.disabled="1"
             left.down="20" right.down="5" top.down="2" bottom.down="2" horizontalCenter.down="7"
             left.over="20" right.over="5" top.over="2" bottom.over="2" horizontalCenter.over="7"
             left.up="20"  right.up="5"    top.up="2"   bottom.up="2"   horizontalCenter.up="7"
             verticalCenter.up="2">
    </s:Label>
    <s:CheckBox includeIn="up" left="2" top="2" bottom="2" width="16" verticalCenter="0"
                right.disabled="10" horizontalCenter.disabled="0" verticalCenter.disabled="0" width.disabled="18"
                left.down="2" top.down="2" bottom.down="2" verticalCenter.down="0" width.down="18"
                left.over="0" top.over="2" bottom.over="2" verticalCenter.over="0" width.over="18"
                left.up="2"   top.up="2"   bottom.up="2"   verticalCenter.up="0"   width.up="18"
                />
</s:SparkButtonSkin>
Thank,
Prithveesingh Zankat.

Similar Messages

  • How to display another window by using Check box

    Hi Friends,
    I have one doubt in Webdynpro with java. How to display another window by using Check box?
    For Exam My requirement is I am getting BAPI from ECC System. So I have to go given input details in first view and output details in Second View. So in Second View I will taken Table that data will displayed in rows. each and every row first check box is available.
    Here Select Check Box of particular row then click Edit button. That row data will be displayed in one popup window.
    empid, name, sal ,firstname, last Name
    empid, name, sal ,firstname, last Name
    empid, name, sal ,firstname, last Name
    Suppose I have to select check box in First Row Click on EDIT button That row data will be displayed in another popup window here customer will change details depending up requirement click on SAVE Button that update data will saved in ECC System.
    How to display another window by using Check box?
    Regards
    Vijay

    Hi Vijay
    Your question is not clear enough to give an answer. Do you have some difficulties with the code for opening a popup-window? There are many-many examples in the forum how to open/close a popup.
    Or you do not know how to bind the popup opening with clicking a check box? Just put the code in the onSelect event handler of the check box.
    BR, Siarhei
    Edited by: Siarhei Pisarenka on Mar 11, 2010 10:55 AM

  • How can we prevent back button  using java script

    how can we prevent back button using java script

    Would be quicker for you to google for javaScript
    javascript:window.history.forward(-1);

  • How to display all the surveys using content query web part

    Can you please tell me how to display all the surveys using content query web part in more details? I also created a subsite and multiple surveys in that site. Then, I inserted a Content Query Web Part and select the List Type to be "Survey",
    however, it returned nothing. Did I miss anything?

    Hi,
    OOTB Survey List does not contain any
    Content Types and it has the following structure:
    Response entry is represented by
    List Item
    Response entry consist of questions and answers, where Question correspond to
    Field and Answer to Item value respectively.
    For querying Survey List via CQWP  the following properties could be used
    BaseType 
    <Lists BaseType="4">
    ServerTemplate
    <Lists ServerTemplate="102">
    Example
    To retrieve all the responses from Survey lists, specify List Type property as shown on picture
    Reference:
    http://stackoverflow.com/questions/17280778/display-all-surveys-using-content-query-web-part
    Best Regards,
    Eric
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • How to display smartforms table lines useing different background colour

    Hi all:
    How to display smartforms table lines useing different background colour .
    for example:
    line1:green
    line2:red
    line3:green
    line4:red
    line5:green
    line6:red
    line7:green
    line8:red
    Any help is highly appreciated!!
    启明星

    Hi,
    Create a two lines one for header and second for data in the table.
    1)In table painter we can find the pencil mark.
    2)select the pencil mark
    3)now select the line which you need to shade
    4) now select the shading colour in the table painter and the provide the resolution up to 100% and select table pattrn for that line.
    5) Now you can use this for the header now only the header gets shaded and the remaining gets unshaded.
    reward points if useful
    Thanks and Regards,
    Nishant

  • How to display items from database using catagorylookupdroplet

    Hi everyone,
    i want to know how to display items from database using catagorylookup droplet. if anybody have any code snippet please share it.
    Thanks in advance,

    <dsp:droplet name=".................../CategoryLookup">
         <dsp:param name="id" param="itemId"/>
         <dsp:oparam name="output">
              <dsp:valueof param="element.displayName"/>
                   <%-- This is show the Child Category --%>
                   <dsp:droplet name="......................./ForEach">
                   <dsp:param name="array" param="element.childCategories"/>
                   <dsp:oparam name="outputStart">Child Categories</dsp:oparam>
                   <dsp:oparam name="output">
                        <dsp:a href="">//bydefault it will take its own file's name
                             <dsp:param name="itemId" param="element.repositoryId"/>                                                                                          <dsp:valueof param="element.displayName"/>
                        </dsp:a>
                   </dsp:oparam>                                             
                   </dsp:droplet>
                   <%-- This is show the Child Product --%>          
                   <dsp:droplet name=".............../ForEach">
                        <dsp:param name="array" param="element.childProducts"/>
                        <dsp:oparam name="outputStart">Child Products</dsp:oparam>
                                  <dsp:oparam name="output">
                                       <dsp:droplet name="................/ProductLookup">
                                            <dsp:param name="id" param="itemId"/>
                                            <dsp:param name="elementName" value="Prod"/>
                                            <dsp:oparam name="output">
                                                 <dsp:getvalueof id="img102" param="Prod.smallImage.url" idtype="java.lang.String">
                                                      <dsp:img height="250" width="250" src="<%=img102%>"/>
                                                 </dsp:getvalueof>
                                            </dsp:oparam>
                                       </dsp:droplet>
                                       <dsp:a href="productView.jsp">
                                            <dsp:param name="itemId" param="element.repositoryId"/>
                                            <dsp:valueof param="element.displayName"/>
                                       </dsp:a>
    Hope this helps.
    -RMishra

  • How to display the transport button in the screen of stms

    Hi expert,
                  I can not see the transport button in my PRD system, but I can see it in my QAS system.
          PRD System:
    QAS System:
    How can I adjust to display the transport button in my PRD system. Thanks a lot,

    Hi ,
    Select all transport request in the STMS and assign to the target client.
    Rg,
    Karthik

  • How to display PDF in JSP using Iframe

    Hi All,
    I am using Struts 2. I am building my file in ActionClass with seperate Method like getGeneratedPDF() in which, I am setting header of response and writing into PDF.
    This method will be called from JSP by this way
    s:property value="getGeneratedPDF()" />
    But It displayed Junk Characters , and this PDF is not static (already Generated). It is generated and build on Fly.
    I have 2 questions 1 -- How to display PDF in JSP in proper way without Junk Character in it?
    questions 2 -- How to display it in Iframe?
    Please help me , If you know the solution.
    Thanks in Advance,
    Jimmy

    jamy_26 wrote:
    But It displayed Junk Characters , and this PDF is not static (already Generated). It is generated and build on Fly.A PDF file is a binary file, not a text file, and you're trying to display it as String. Of course you would get "junk characters". Have you ever tried opening a binary file (pdf, doc, jpg, xls, etc) using a text editor like Notepad?
    I have 2 questions 1 -- How to display PDF in JSP in proper way without Junk Character in it?Display it as binary stream, not as text stream. You can display it standalone, just let the link/form/addressbar URL point to some Servlet which writes the InputStream of the PDF file to the OutputStream of the response, along with a correct set of response headers (at least content-type, content-disposition and content-length), so that the browser can open it in the correct application (which is usually Acrobat Reader). If you want to embed the PDF file in a JSP, then one of the ways is indeed using the HTML <iframe> tag.
    questions 2 -- How to display it in Iframe? Just let the iframe URL point to the aforementioned Servlet.
    You can find here an example of a generic file servlet, you may find it useful to get the idea how to do it: [http://balusc.blogspot.com/2007/07/fileservlet.html].

  • How do i trigger a button using keyboardstrokes

    hello,
    im trying to trigger my button using keyboard strokes. For example pressing ALT + S would trigger my addbutton.
    and like A would trigger my exit. I tried using some keylisteners to my Jbuttons but cant seem to get it to work.
    Am i heading in the right direction using keylisteners to try to activate my buttons or should i be using some else?
    Any tips on how to use keyboardstrikes to trigger my buttons would be much appreciated.
    this is some of my code. i excluded some parts such as my JLIST
    if you would rather see the whole code let me know
    public class Class
             public static void main(String[] args)
                 JFrame frame = new FutureValueFrame();
                 frame.setVisible(true);
         class FutureValueFrame extends JFrame
             public FutureValueFrame()
                 setTitle("Task assignment");
                 setResizable(false);
                 setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                 JPanel panel = new FutureValuePanel();
                 this.add(panel);
                 this.pack();
                 centerWindow(this);
             private void centerWindow(Window w)
                 Toolkit tk = Toolkit.getDefaultToolkit();
                 Dimension d = tk.getScreenSize();
                 setLocation((d.width-w.getWidth())/2, (d.height-w.getHeight())/2);
    class FutureValuePanel extends JPanel implements ActionListener,KeyListener
             private JButton   
                                 addButton,
                                 exitButton,
                                 assignButton,
                                 reportButton,
                                 deleteButton;
             public FutureValuePanel()
       JPanel comboBoxButtonPanel = new JPanel();
                 comboBoxButtonPanel.setLayout(new GridBagLayout());
    assignButton = new JButton("Assign");
                 addButton=new JButton("Add");
                 addButton.addActionListener(this);
                 addButton.addKeyListener(this);
                 comboBoxButtonPanel.add(addButton, getConstraints(0,4,1,1, GridBagConstraints.WEST));
                 exitButton=new JButton("Exit");
                 exitButton.addActionListener(this);
                 exitButton.addKeyListener(this);
                 comboBoxButtonPanel.add( exitButton, getConstraints(0,6,1,1, GridBagConstraints.WEST));
                 add(comboBoxButtonPanel,getConstraints(2,0,1,1, GridBagConstraints.WEST));
    private GridBagConstraints getConstraints(int gridx, int gridy,
             int gridwidth, int gridheight, int anchor)
                 GridBagConstraints c = new GridBagConstraints();
                 c.insets = new Insets(5, 5, 5, 5);
                 c.ipadx = 5;
                 c.gridx = gridx;
                 c.gridy = gridy;
                 c.gridwidth = gridwidth;
                 c.gridheight = gridheight;
                 c.anchor = anchor;
                 return c;
      public void actionPerformed(ActionEvent e)
                 Object source = e.getSource();
                 if (source == exitButton)
                     System.exit(0);
                 else if (source == addButton)
                      Object[] options = {"Employee",
                    "Project"};
                      int n = JOptionPane.showOptionDialog(null,
                                "Add a new Employee Project?",
                                "Add Record",
                                     JOptionPane.YES_NO_OPTION,
                                     JOptionPane.QUESTION_MESSAGE,
                                     null,    
                                     options, 
                                     options[0]);
                      if (n == JOptionPane.YES_OPTION)
                           String k;
                           k=  JOptionPane.showInputDialog("Enter the name of the employee(name cant be duplicated).");
                           JOptionPane.showMessageDialog(null,k+" has been sucessfully added");
                           employeeListModel.addElement(k);
                       if (n==JOptionPane.NO_OPTION)
                             String j;
                            j=  JOptionPane.showInputDialog("Enter the name of the project(name cant be duplicated).");
                            JOptionPane.showMessageDialog(null,j+" has been sucessfully added");
                            projectListModel.addElement(j);

    thank u so much. I put Mnemonics on nearly all my Jbuttons but when i press a key. It does not trigger the actionPerformed event.
    i changed my code to this
    i still have issues when pressing e the gui does not close.
    any tips on how to fix this?
    exitButton=new JButton("Exit");
                exitButton.setMnemonic(KeyEvent.VK_E);
                 exitButton.addActionListener(this);
             public void actionPerformed(ActionEvent e)
                 Object source = e.getSource();
                 if (source == exitButton)
                     System.exit(0);
                

  • How to display image in database using php

    i've try search all hope that you all can give me some guidance how to display data that is in image or BLOB using PHP. just a query and php code that will make display of the image. hope that you all show me the example or give me reference that i need to solve my problem.

    Hi,
    Have a check on these Google results, you might find something there...
    http://www.google.com/search?sourceid=navclient-ff&ie=UTF-8&q=%22display%20image%22%2Boracle%20%2Bphp

  • How can display svg file by using applet

    Hi ,
    my problem is ..
    1. I have one servlet which is generating svg file by using batik package.
    2.There is one Applet which receives SVG file from Servlet ..
    From here i dont have dont doubts.. then my doubt is
    3. How can display that svg file on the browser..
    please help me if u know any ,
    thanks regards,
    Balu

    Maybe this page can help you?
    http://www.w3c.org/Graphics/SVG/

  • How to Create a Radio Buttons using Personlization

    Hi friends ,
    We have  requierment like , Wanted to havev two radio buttons  Employee Relative  : YES or NO values.
    These radio buttons I wanted to add on Oracle Provided page using personlization. But the Values for the radio buttons should be YES and another button is No.
    After addin it , we shall have this selected value handled in Custom Controller. How can I the radio Buttons with the above YES/No Values. Any guidelines would be greatly helpful.
    Thanks Guys
    Regards
    Raghu

    Hi,
    Using personalization you can create radio button s, the item style as: Message Radio Button
    and then extend the controller and use the below code in processrequest of the extended or custom controller:
    OAMessageRadioButtonBean appleButton = 
    (OAMessageRadioButtonBean)webBean.findChildRecursive("GroupButtonOne"); //First Radio Button 
    appleButton.setName("Yes"); 
    appleButton.setValue("Yes"); 
    OAMessageRadioButtonBean orangeButton = 
    (OAMessageRadioButtonBean)webBean.findChildRecursive("GroupButtonTwo"); //Second Radio Button 
    orangeButton.setName("No"); 
    orangeButton.setValue("No"); 
    May be it will help you.
    Regards
    Mahesh

  • How to display top Position Level using conditions / Exception Aggregation

    Hello,
    I have the following problem where I need to list out the row with the highest POSITION LEVEL (with reference to BUSINESS PARTNER). I have tried out all possibilities including Conditions and Exception Aggregation (MAX) but nothing seems to work. Conditions work to an extent i.e. it shows the top position level but unfortunately for the entire query result i.e. only one row is displayed in the result (the first row to satisfy the condition) instead of all the rows for each Business Partner. POSITION LEVEL is a KEY FIGURE value. It also exists as a CHARACTERISTIC under a diferent name in the cube. How can I solve this? Pls help.
    This is how the report looks at present...
    First Name     Last Name     Business Partner Nr.     Date of Birth     Postalcode     City     Position Level
    Testfallini     Enzweiler     3000000020     21.10.1990     63674     New York     1
    Tamara     Dimmer     3000179274     10.09.1987     54689     Chicago     2
    Tamara     Dimmer     3000179274     10.09.1987     54689     Chicago     1
    Tamara     Dimmer     3000179274     10.09.1987     54689     Chicago     1
    Thu-Ha     Tran     3000069951     25.12.1988     93047     Atlanta     2
    Thu-Ha     Tran     3000069951     25.12.1988     93047     Atlanta     1
    This is how the report looks when I use conditions...
    First Name     Last Name     Business Partner Nr.     Date of Birth     Postalcode     City     Position Level
    Tamara     Dimmer     3000179274     10.09.1987     54689     Chicago     2
    This is how the report should look...
    First Name     Last Name     Business Partner Nr.     Date of Birth     Postalcode     City     Position Level
    Testfallini     Enzweiler     3000000020     21.10.1990     63674     New York     1
    Tamara     Dimmer     3000179274     10.09.1987     54689     Chicago     2
    Thu-Ha     Tran     3000069951     25.12.1988     93047     Atlanta     2
    Thanks in advance,
    SD

    Hi Sebastian,
    I thought you need to display all the records with the highest position level at top. But now I realize your requirement.
    It should only display only the maximum position level for each level.
    You can try using the Condition for the position level KF, with Top N operator and value = '1'
    And then go to char assignement tab in the exception and select Most Detail Chars along Rows/Individual Chars. and combinations for the required combination of Chars.
    [List Condition for All Characteristics in Drilldown Independent|http://help.sap.com/saphelp_nw04/helpdata/en/86/dfc405ab60524ea0d3e89db15fb2e7/content.htm]
    [Defining Conditions |http://help.sap.com/saphelp_nw04/helpdata/en/73/702e39074dc93de10000000a114084/frameset.htm]
    Hope this helps....
    Rgs,
    Ravikanth.

  • How to display Contribution Folder Name using Idoc Script

    Hi, could ypu please tell me how can we display Contribution Folder name using Idoc script by passing dCollectionID. Appreciate your help on this. Thank you
    Regards,
    Ashok

    You should be able to get it directly as dCollectionName, but might have to execute a query to fill in the result set first: select dCollectionName from COLLECTIONS where DCOLLECTIONID = ?

  • How to display xml to html using xsl?

    hi all...may i know how to display xml to html page?
    i ve included <xsl:output method="html" indent="yes" /> inside my xsl file. i clicked on output.xml file and everything is displayed correctly but the format is xml instead of html. is there anyway to transform it to html?
    below are my xsl and xml codes:
    // xsl file
    <?xml version='1.0'?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="html" indent="yes" />
    <xsl:template match="/">
    <html>
    <body>
    <h2>Document Contents</h2>
    <table border="1">
    <tr bgcolor="#9acd32">
         <th align="center">Document Name</th>     
         <th align="center">Document ID</th>          
         <th align="center">Owner</th>               
    </tr>
    <xsl:for-each select="Document/Contents">
    <tr>
    <td><xsl:value-of select="DocumentName"/></td>
    <td><xsl:value-of select="DocumentID"/></td>
    <td><xsl:value-of select="Originator"/></td>
    </tr>
    </xsl:for-each>
    </table>
    </body>
    </html>
    // xml file
    <?xml version="1.0"?>
    <?xml-stylesheet type="text/xsl" href="xsltStyleSheet.xsl"?>
    <Document>
         <Contents>
              <DocumentName>register</DocumentName>
              <DocumentID>1</DocumentID>
              <Originator>hhh</Originator>
         </Contents>
    </Document>
    </xsl:template></xsl:stylesheet>

    your XSL transforms to HTML (in fact XHTML): what more do you expect? did you expected anything different from the following output? if yes: what and why?
    <html>
         <body>
              <h2>Document Contents</h2>
              <table border="1">
                   <tr bgcolor="#9acd32">
                        <th align="center">Document Name</th>
                        <th align="center">Document ID</th>
                        <th align="center">Owner</th>
                   </tr>
                   <tr>
                        <td>register</td>
                        <td>1</td>
                        <td>hhh</td>
                   </tr>
              </table>
         </body>
    </html>

Maybe you are looking for