[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-538) Add the ability to regenerate the datasource
by gregorypierce (JIRA)
Add the ability to regenerate the datasource
--------------------------------------------
Key: JBSEAM-538
URL: http://jira.jboss.com/jira/browse/JBSEAM-538
Project: JBoss Seam
Issue Type: Feature Request
Components: Tools
Affects Versions: 1.1.0.CR1
Reporter: gregorypierce
Allows you to swap datasources from the current datasource to a new datasource. Why? Because many times I will develop using HSQL and then later want to move to another datasource. Note: You will also have to add overwrite="true" to the various copy tasks or else they won't overwrite the existing datasource files.
<target name="new-datasource">
<!-- define the datasource -->
<condition property="database.type.default" value="${database.type}">
<isset property="database.type"/>
</condition>
<property name="database.type.default" value="hsql"/>
<input addproperty="database.type.new"
message="What kind of database are you using? [${database.type.default}] "
validargs="hsql,mysql,oracle,postgres,mssql,db2,sybase,enterprisedb"
defaultvalue="${database.type.default}"/>
<!-- if the database type did not change, default to the previous values -->
<condition property="hibernate.dialect.default" value="${hibernate.dialect}">
<equals arg1="${database.type}" arg2="${database.type.new}"/>
</condition>
<condition property="hibernate.connection.url.default" value="${hibernate.connection.url}">
<equals arg1="${database.type}" arg2="${database.type.new}"/>
</condition>
<condition property="hibernate.connection.driver_class.default" value="${hibernate.connection.driver_class}">
<equals arg1="${database.type}" arg2="${database.type.new}"/>
</condition>
<!-- otherwise default to the defaults for the database type -->
<condition property="hibernate.dialect.default" value="org.hibernate.dialect.HSQLDialect">
<equals arg1="${database.type.new}" arg2="hsql"/>
</condition>
<condition property="hibernate.dialect.default" value="org.hibernate.dialect.MySQLDialect">
<equals arg1="${database.type.new}" arg2="mysql"/>
</condition>
<condition property="hibernate.dialect.default" value="org.hibernate.dialect.OracleDialect">
<equals arg1="${database.type.new}" arg2="oracle"/>
</condition>
<condition property="hibernate.dialect.default" value="org.hibernate.dialect.PostgreSQLDialect">
<equals arg1="${database.type.new}" arg2="postgres"/>
</condition>
<condition property="hibernate.dialect.default" value="org.hibernate.dialect.PostgreSQLDialect">
<equals arg1="${database.type.new}" arg2="enterprisedb"/>
</condition>
<condition property="hibernate.dialect.default" value="org.hibernate.dialect.SQLServerDialect">
<equals arg1="${database.type.new}" arg2="mssql"/>
</condition>
<condition property="hibernate.dialect.default" value="org.hibernate.dialect.DB2Dialect">
<equals arg1="${database.type.new}" arg2="db2"/>
</condition>
<condition property="hibernate.dialect.default" value="org.hibernate.dialect.SybaseDialect">
<equals arg1="${database.type.new}" arg2="sybase"/>
</condition>
<condition property="hibernate.connection.driver_class.default" value="org.hsqldb.jdbcDriver">
<equals arg1="${database.type.new}" arg2="hsql"/>
</condition>
<condition property="hibernate.connection.driver_class.default" value="com.mysql.jdbc.Driver">
<equals arg1="${database.type.new}" arg2="mysql"/>
</condition>
<condition property="hibernate.connection.driver_class.default" value="oracle.jdbc.driver.OracleDriver">
<equals arg1="${database.type.new}" arg2="oracle"/>
</condition>
<condition property="hibernate.connection.driver_class.default" value="org.postgresql.Driver">
<equals arg1="${database.type.new}" arg2="postgres"/>
</condition>
<condition property="hibernate.connection.driver_class.default" value="com.edb.Driver">
<equals arg1="${database.type.new}" arg2="enterprisedb"/>
</condition>
<condition property="hibernate.connection.driver_class.default" value="com.microsoft.sqlserver.jdbc.SQLServerDriver">
<equals arg1="${database.type.new}" arg2="mssql"/>
</condition>
<condition property="hibernate.connection.driver_class.default" value="COM.ibm.db2.jdbc.app.DB2Driver">
<equals arg1="${database.type.new}" arg2="db2"/>
</condition>
<condition property="hibernate.connection.driver_class.default" value="com.sybase.jdbc2.jdbc.SybDriver">
<equals arg1="${database.type.new}" arg2="sybase"/>
</condition>
<condition property="hibernate.connection.url.default" value="jdbc:hsqldb:.">
<equals arg1="${database.type.new}" arg2="hsql"/>
</condition>
<condition property="hibernate.connection.url.default" value="jdbc:mysql:///test">
<equals arg1="${database.type.new}" arg2="mysql"/>
</condition>
<condition property="hibernate.connection.url.default" value="jdbc:oracle:thin:@localhost:1521:test">
<equals arg1="${database.type.new}" arg2="oracle"/>
</condition>
<condition property="hibernate.connection.url.default" value="jdbc:postgresql:template1">
<equals arg1="${database.type.new}" arg2="postgres"/>
</condition>
<condition property="hibernate.connection.url.default" value="jdbc:edb://localhost:5444/edb">
<equals arg1="${database.type.new}" arg2="enterprisedb"/>
</condition>
<condition property="hibernate.connection.url.default" value="jdbc:sqlserver://localhost">
<equals arg1="${database.type.new}" arg2="mssql"/>
</condition>
<condition property="hibernate.connection.url.default" value="jdbc:db2:test">
<equals arg1="${database.type.new}" arg2="db2"/>
</condition>
<condition property="hibernate.connection.url.default" value="jdbc:sybase:Tds:localhost:5000/test">
<equals arg1="${database.type.new}" arg2="sybase"/>
</condition>
<!-- finally, default them to HSQL -->
<property name="hibernate.dialect.default" value="org.hibernate.dialect.HSQLDialect"/>
<property name="hibernate.connection.driver_class.default" value="org.hsqldb.jdbcDriver"/>
<property name="hibernate.connection.url.default" value="jdbc:hsqldb:."/>
<input addproperty="hibernate.dialect.new"
message="Enter the Hibernate dialect for your database [${hibernate.dialect.default}]"
defaultvalue="${hibernate.dialect.default}"/>
<property name="driver.jar" value="hsqldb.jar"/>
<input addproperty="driver.jar.new"
message="Enter the filesystem path to the JDBC driver jar [${driver.jar}]"
defaultvalue="${seamgen.home}/lib/${driver.jar}"/>
<input addproperty="hibernate.connection.driver_class.new"
message="Enter JDBC driver class for your database [${hibernate.connection.driver_class.default}]"
defaultvalue="${hibernate.connection.driver_class.default}"/>
<input addproperty="hibernate.connection.url.new"
message="Enter the JDBC URL for your database [${hibernate.connection.url.default}]"
defaultvalue="${hibernate.connection.url.default}"/>
<property name="hibernate.connection.username" value="sa"/>
<input addproperty="hibernate.connection.username.new"
message="Enter database username [${hibernate.connection.username}]"
defaultvalue="${hibernate.connection.username}"/>
<property name="hibernate.connection.password" value=""/>
<input addproperty="hibernate.connection.password.new"
message="Enter database password [${hibernate.connection.password}]"
defaultvalue="${hibernate.connection.password}"/>
<property name="database.exists" value="n"/>
<input addproperty="database.exists.new"
message="Are you working with tables that already exist in the database? [${database.exists}] "
validargs="y,n,"
defaultvalue="${database.exists}"/>
<propertyfile file="${user.dir}/project.properties">
<entry key="basepackage.name" value="${basepackage.name}" />
<entry key="project.name" value="${project.name}"/>
<entry key="project.home" value="${project.home}" />
<!-- package names -->
<entry key="action.package" value="${action.package}"/>
<entry key="model.package" value="${model.package}"/>
<entry key="test.package" value="${test.package}"/>
<!-- project database information -->
<entry key="database.type" value="${database.type.new}"/>
<entry key="database.exists" value="${database.exists.new}"/>
<entry key="hibernate.dialect" value="${hibernate.dialect.new}"/>
<entry key="hibernate.connection.driver_class" value="${hibernate.connection.driver_class.new}"/>
<entry key="hibernate.connection.url" value="${hibernate.connection.url.new}"/>
<entry key="hibernate.connection.username" value="${hibernate.connection.username.new}"/>
<entry key="hibernate.connection.password" value="${hibernate.connection.password.new}"/>
<entry key="driver.jar" value="${driver.jar.new}"/>
<entry key="eclipse.wtp" value="${eclipse.wtp.new}"/>
</propertyfile>
<property file="${user.dir}/project.properties" />
<property file="${seam.home}/seam.properties" />
<property file="${user.dir}/${project.name}/project.properties" />
<condition property="wtp">
<equals arg1="${eclipse.wtp}" arg2="y"/>
</condition>
<antcall target="file-copy" />
<echo message="Your project has been created." />
<echo message="Add the project from inside Eclipse (or type 'seam explode') and go to http://localhost:8080/${project.name}"/>
</target>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 10 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-494) Exception resolving EL expression containing a function
by Richard Leherpeur (JIRA)
Exception resolving EL expression containing a function
-------------------------------------------------------
Key: JBSEAM-494
URL: http://jira.jboss.com/jira/browse/JBSEAM-494
Project: JBoss Seam
Issue Type: Bug
Affects Versions: 1.1.0.BETA2
Environment: jboss-4.0.5.GA on Windows XP, jboss-seam-1.1.0.BETA2
Reporter: Richard Leherpeur
The following code throws an expection:
<h:outputText value="#{messages[pc:getKey(context, bean.name)]}" />
where pc is the tag library where the getKey is defined.
This was used to work in Beta 1 but is broken in Beta 2.
The exception is:
Code:
SEVERE: Error Rendering View[/public/test/test.xhtml]
com.sun.facelets.tag.TagAttributeException: /public/test/test.xhtml @17,98 value="#{messages[pc:getKey(context, bean.name)]}" Error Parsing: #{messages.pc:getKey}
at com.sun.facelets.tag.TagAttribute.getValueExpression(TagAttribute.java:259)
at com.sun.facelets.tag.jsf.ValueHolderRule$DynamicValueBindingMetadata.applyMetadata(ValueHolderRu
le.java:115)
at com.sun.facelets.tag.MetadataImpl.applyMetadata(MetadataImpl.java:36)
at com.sun.facelets.tag.MetaTagHandler.setAttributes(MetaTagHandler.java:62)
at com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:140)
at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
at com.sun.facelets.tag.jsf.ComponentHandler.applyNextHandler(ComponentHandler.java:295)
at com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:165)
at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
at com.sun.facelets.tag.ui.DefineHandler.apply(DefineHandler.java:58)
at com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:128)
at com.sun.facelets.impl.DefaultFaceletContext$TemplateManager.apply(DefaultFaceletContext.java:306
)
at com.sun.facelets.impl.DefaultFaceletContext.includeDefinition(DefaultFaceletContext.java:279)
at com.sun.facelets.tag.ui.InsertHandler.apply(InsertHandler.java:68)
at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
at com.sun.facelets.tag.jsf.ComponentHandler.applyNextHandler(ComponentHandler.java:295)
at com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:165)
at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
at com.sun.facelets.tag.ui.DefineHandler.apply(DefineHandler.java:58)
at com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:128)
at com.sun.facelets.impl.DefaultFaceletContext$TemplateManager.apply(DefaultFaceletContext.java:306
)
at com.sun.facelets.impl.DefaultFaceletContext.includeDefinition(DefaultFaceletContext.java:279)
at com.sun.facelets.tag.ui.InsertHandler.apply(InsertHandler.java:68)
at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
at com.sun.facelets.tag.jsf.core.ViewHandler.apply(ViewHandler.java:109)
at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
at com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)
at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
at com.sun.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:25)
at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:248)
at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:294)
at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:273)
at com.sun.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:143)
at com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:113)
at com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)
at com.sun.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:25)
at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:248)
at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:294)
at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:273)
at com.sun.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:143)
at com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:113)
at com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)
at com.sun.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:25)
at com.sun.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:95)
at com.sun.facelets.FaceletViewHandler.buildView(FaceletViewHandler.java:510)
at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:553)
at org.ajax4jsf.framework.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:101)
at org.ajax4jsf.framework.ajax.AjaxViewHandler.renderView(AjaxViewHandler.java:197)
at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252
)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202
)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:46)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202
)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:32)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202
)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:67)
at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:223)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202
)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202
)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11Base
Protocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:595)
Caused by: javax.el.ELException: Error Parsing: #{messages.pc:concat}
at com.sun.el.lang.ExpressionBuilder.createNodeInternal(ExpressionBuilder.java:140)
at com.sun.el.lang.ExpressionBuilder.build(ExpressionBuilder.java:157)
at com.sun.el.lang.ExpressionBuilder.createValueExpression(ExpressionBuilder.java:201)
at com.sun.el.ExpressionFactoryImpl.createValueExpression(ExpressionFactoryImpl.java:74)
at org.jboss.seam.ui.facelet.ParamValueExpression.<init>(ParamValueExpression.java:50)
at org.jboss.seam.ui.facelet.SeamExpressionFactory.createValueExpression(SeamExpressionFactory.java
:108)
at com.sun.facelets.tag.TagAttribute.getValueExpression(TagAttribute.java:256)
... 81 more
Caused by: com.sun.el.parser.ParseEx
15:02:36,046 ERROR [STDERR] ception: Encountered ":concat" at line 1, column 14.
Was expecting one of:
"}" ...
"." ...
"[" ...
">" ...
"gt" ...
"<" ...
"lt" ...
">=" ...
"ge" ...
"<=" ...
"le" ...
"==" ...
"eq" ...
"!=" ...
"ne" ...
"&&" ...
"and" ...
"||" ...
"or" ...
"*" ...
"+" ...
"-" ...
"?" ...
"/" ...
"div" ...
"%" ...
"mod" ...
at com.sun.el.parser.ELParser.generateParseException(ELParser.java:1651)
at com.sun.el.parser.ELParser.jj_consume_token(ELParser.java:1531)
at com.sun.el.parser.ELParser.DeferredExpression(ELParser.java:134)
at com.sun.el.parser.ELParser.CompositeExpression(ELParser.java:61)
at com.sun.el.lang.ExpressionBuilder.createNodeInternal(ExpressionBuilder.java:103)
... 87 more
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 10 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-623) <s:selectDate> localization
by Stephan Bublava (JIRA)
<s:selectDate> localization
---------------------------
Key: JBSEAM-623
URL: http://jira.jboss.com/jira/browse/JBSEAM-623
Project: JBoss Seam
Issue Type: Patch
Components: JSF
Affects Versions: 1.1.0.GA
Reporter: Stephan Bublava
Priority: Minor
Currently <s:selectDate> is not locale-aware. This affects day names, month names, buttons as well as the date string written to the text field via JavaScript.
selectdate-localization-patch.txt is a first step to improve this.
Changes include:
- Weekends use a distinct CSS style and can be highlighted if desired. (I've changed the booking example to demonstrate this).
- The first day of the week is no longer harcoded to Sunday, but calculated according to the current locale settings (e.g. Monday for German).
- Day and month names are localised as well.
Open issues:
- Weekends are hardcoded to Saturday and Sunday. I have no idea how determine this info using Calendar, &c. APIs.
- Date formats are not kept in sync between JSF and JavaScript, which always uses MM/DD/YYYY, regardless of the locale.
- Button names ("close", "this month") are still hardcoded.
- It might be more flexible, to translate day / month names with the application ResourceBundle instead of using DateFormatSymbols.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 10 months