Dear Wiki user, You have subscribed to a wiki page or wiki category on "Tapestry Wiki" for change notification.
The following page has been changed by DanielJue: http://wiki.apache.org/tapestry/OnSubmit ------------------------------------------------------------------------------ When ever we click on the login button data will be inserted on the Table VECHILE_MASTER Project Structure: - + {{{ src | _ com.btp.vms @@ -42, +42 @@ _web.xml _springContext.xml - + }}} we will start with AddVehicle.html form(Simple Html form with TextFeild,TextArea Tags) - + {{{ <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd"> <h1>Create New Vehicle</h1> <style> @@ -65, +65 @@ </div> </t:form> </html> - + }}} AddVehicle.Java - + {{{ package com.btp.vms.pages; import java.sql.Date; @@ -157, +157 @@ } - + }}} Hear we are Using FMGDataBase is the Interface and FMGservice is the service which extends HibernateDaoSupport implements FMGDatabase - + {{{ // Copyright 2007 The Apache Software Foundation // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -190, +190 @@ void add(Vehicle item); } - + }}} FMGService.java - + {{{ package com.btp.vms.dao; import org.hibernate.Session; @@ -249, +249 @@ } } - + }}} SpringContext.xml SpringContext.xml tells about datasource specification,configLocation,Bean services - + {{{ <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"> @@ -291, +291 @@ </bean> </beans> - + }}} Hear hibernate.cfg.xml tells about mapping resources - + {{{ <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" @@ -305, +305 @@ <mapping resource="/com/btp/vms/data/Vehicle.hbm.xml"/> </session-factory> </hibernate-configuration> - + }}} web.Xml which tells about SpringContext Integration - + {{{ <?xml version="1.0" encoding="UTF-8"?> <!-- Copyright 2007 The Apache Software Foundation @@ -357, +357 @@ </listener> </web-app> - + }}} Vehicle.java(BO) here Iam using Xdoclate mappings in BO - + {{{ package com.btp.vms.data; import java.io.Serializable; @@ -410, +410 @@ } - + }}} If u want you can write ant build script to hbm.build.xml - + {{{ <?xml version="1.0"?> <project name="fmg" default="build-mappings"> @@ -462, +462 @@ </target> </project> - + }}} You can write your own project.build.xml --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
