Merge branch 'master' of ssh://git.indexdata.com/home/git/private/mkjsf.git into...
[mkjsf-moved-to-github.git] / src / META-INF / resources / pz2widgets / login.xhtml
diff --git a/src/META-INF/resources/pz2widgets/login.xhtml b/src/META-INF/resources/pz2widgets/login.xhtml
new file mode 100644 (file)
index 0000000..a4838c9
--- /dev/null
@@ -0,0 +1,32 @@
+<html xmlns="http://www.w3.org/1999/xhtml"\r
+    xmlns:h="http://java.sun.com/jsf/html"\r
+    xmlns:ui="http://java.sun.com/jsf/facelets"\r
+    xmlns:composite="http://java.sun.com/jsf/composite">\r
+\r
+    <composite:interface>\r
+       <composite:attribute name="user"/>\r
+\r
+       <composite:attribute name="namePrompt"/>\r
+       <composite:attribute name="passwordPrompt"/>\r
+\r
+       <composite:attribute name="loginButtonText"/>\r
+       <composite:attribute name="loginAction"\r
+          method-signature="java.lang.String action()"/>\r
+    </composite:interface>\r
+\r
+    <composite:implementation>\r
+       <h:form id="form">\r
+          <h:panelGrid columns="2">\r
+             #{cc.attrs.namePrompt}\r
+             <h:inputText id="name" value="#{cc.attrs.user.name}"/>\r
+\r
+             #{cc.attrs.passwordPrompt}\r
+             <h:inputSecret id="password" value="#{cc.attrs.user.password}"/>\r
+          </h:panelGrid>\r
+          <p>\r
+             <h:commandButton id="loginButton" value="#{cc.attrs.loginButtonText}"\r
+                action="#{cc.attrs.loginAction}"/>\r
+          </p>\r
+      </h:form>\r
+   </composite:implementation>\r
+</html>
\ No newline at end of file