Skip to main content

JSF CreditCard component

Posted by mriem on September 3, 2007 at 8:00 PM PDT

Working in JSF is always nice, but a lot of people complain there are not enough components. This entry describes you a creditcard component that I am developing. You can freely use it anywhere you want, visit http://www.manorrock.com/products/jsf/index.html for more details. If you have any questions feel free to comment or to send me an email.




<%@page contentType="text/html" pageEncoding="UTF-8"%>

<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<%@taglib prefix="creditcard" uri="http://www.manorrock.com/tld/jsf/creditcard"%>

<!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">
        <title></title>
    </head>
    <body>
        <f:view>
            <h:messages/>
            <h:form>
               <creditcard:creditcard value="#{creditcardDemo.creditCard}"/>
                <br/>
                <h:commandButton action="#{creditcardDemo.doSubmit1}" value="Submit"/>
            </h:form>
        </f:view>   
    </body>
</html>

And this renders like this.




jsf-creditcard.JPG

Related Topics >>

Comments

Finally got it working, huh?

Finally got it working, huh? Nice! :)