Báze pro UI. Přidaná podpora validace. Podpora filtrování pře LambdaJ.

This commit is contained in:
2014-04-23 21:33:34 +02:00
parent 2ca878f52d
commit c5c8aacd31
28 changed files with 650 additions and 17 deletions
@@ -38,7 +38,7 @@
<props>
<prop key="hibernate.dialect">${jdbc.dialect}</prop>
<prop key="hibernate.show_sql">true</prop>
<prop key="hibernate.hbm2ddl.auto">create</prop>
<prop key="hibernate.hbm2ddl.auto">update</prop>
</props>
</property>
</bean>
@@ -50,10 +50,13 @@
</bean>
<!-- Security -->
<security:global-method-security secured-annotations="enabled" />
<security:http auto-config="true">
<security:intercept-url pattern="/app/**" access="ROLE_USER"/>
<security:intercept-url pattern="/api/remote/**" access="ROLE_USER"/>
<security:form-login login-page="/login.zhtml"/>
<security:intercept-url pattern="/admin/**" access="ROLE_ADMIN"/>
<security:form-login login-page="/login.zhtml"
authentication-failure-handler-ref="loginFail"/>
<security:http-basic/>
<security:logout invalidate-session="true"/>
</security:http>
@@ -73,6 +76,8 @@
</bean>
<bean id="passwordEncoder" class="org.springframework.security.authentication.encoding.ShaPasswordEncoder"/>
<bean id="loginFail" class="info.bukova.isspst.LoginFailHandler"/>
<!-- DAO -->
<bean id="userDao" class="info.bukova.isspst.dao.jpa.UserDaoJPA">
@@ -86,6 +91,11 @@
<!-- Business logic -->
<bean id="userService" class="info.bukova.isspst.services.UserServiceImpl">
<property name="dao" ref="userDao"/>
<property name="encoder" ref="passwordEncoder"/>
</bean>
<bean id="roleService" class="info.bukova.isspst.services.RoleServiceImpl">
<property name="dao" ref="roleDao"/>
</bean>
</beans>
+5 -1
View File
@@ -18,6 +18,10 @@
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<listener>
<listener-class>info.bukova.isspst.DbInitListener</listener-class>
</listener>
<!-- ZK -->
<listener>
<description>ZK listener for session cleanup</description>
@@ -109,7 +113,7 @@
<servlet-mapping>
<servlet-name>appServlet</servlet-name>
<url-pattern>/</url-pattern>
<url-pattern>/api/</url-pattern>
</servlet-mapping>
<mime-mapping>
+11
View File
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Objednávky</title>
</head>
<body>
administrace
</body>
</html>
+10
View File
@@ -0,0 +1,10 @@
<?page title="Okno" contentType="text/html;charset=UTF-8"?>
<zk>
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
<window title="Okno" border="normal" apply="org.zkoss.bind.BindComposer"
viewModel="@id('vm') @init('info.bukova.isspst.ui.TestVM')">
<label value="Pokus pokus"/>
<button label="metoda" onClick="@command('test')"/>
</window>
<include src="../app/testApp.zul"/>
</zk>
+11
View File
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Objednávky</title>
</head>
<body>
aplikace
</body>
</html>
+6
View File
@@ -0,0 +1,6 @@
<?page title="Test" contentType="text/html;charset=UTF-8"?>
<zk>
<window title="Test" border="normal">
New Content Here!
</window>
</zk>
+15
View File
@@ -0,0 +1,15 @@
<html xmlns="native" xmlns:u="zul" xmlns:zk="zk">
<head>
<title>Objednávky</title>
</head>
<body style="height: 100%; padding: 0 5px;">
<div style="height: 15%"/>
<div align="center">
<u:include src="login.zul"/>
</div>
</body>
</html>
+33
View File
@@ -0,0 +1,33 @@
<?page title="Přihlášení" contentType="text/html;charset=UTF-8"?>
<zk>
<window title="Přihlášení" border="normal" width="300px">
<html style="font-family:arial,sans-serif;font-size:12px;">
<![CDATA[
<form name='loginForm' action="j_spring_security_check"
method='POST'>
<table>
<tr>
<td>Uživatel:</td>
<td><input type='text' name='j_username' value=''/>
</td>
</tr>
<tr>
<td>Heslo:</td>
<td><input type='password' name='j_password' />
</td>
</tr>
<tr>
<td colspan='2'><input name="submit" type="submit"
value="Přihlásit" />
</td>
</tr>
</table>
</form>
]]>
</html>
</window>
</zk>