[JBoss Seam] - s:selectItems and convertEnum and order of enum retention
by tony.herstell@gmail.com
Given
| <h:selectOneRadio id="booking_duration_selection" value="#{bookingController.duration}" layout="pageDirection">
| <s:selectItems value="#{bookingController.getBookingDurationsKind()}" var="bookingDurationKind" label="#{messages[bookingDurationKind.inlLabel]}"/>
| <s:convertEnum />
| <a4j:support event="onclick" reRender="bookingCourseType, resourceAddButtons, resourceAddedTable" />
| </h:selectOneRadio>
|
Backed by
| public enum BookingDurationsKind {
| ONE_HOUR_PRIVATE ("booking_1hrprivate"),
| ONE_HOUR_OPEN ("booking_1hropen"),
| COURSE ("booking_course");
| private final String inlLabel;
| BookingDurationsKind(String inlLabel) {
| this.inlLabel = inlLabel;
| }
| public String getInlLabel() { return inlLabel; }
| }
|
Can I somehow retain the order of the enum when its displayed as checkboxes? There is no attribute etc...
On the screen I get:
| Open 1 Hour Booking (anyone may book the same slot within system limit of 6 people!)
| Private 1 Hour Booking
| Course Booking
|
Where private booking should be topmost.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4118526#4118526
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4118526
18 years, 3 months
[JBoss Seam] - Seam Mail loads libraries every time I send a mail
by MSchmidke
Hello all,
today I am trying out Seam's mail facilities.
The first thing I notice:
Every time I send a mail, a whole bunch of "Added Library from" lines is logged. I know those lines appear when I first access a Seam page after server restart, but when mailing, they appear everytime.
I fear that there is something wrong. Do you have any hint what I have to keep in mind when using mail?
Perhaps the reason lies in the way I call Seam mail. It is not directly from a JSF action method, but it is from a jBPM Mail Action class. Of course, some JSF action will be somewhere some thousand stack levels above as the root cause of the mail being send.
| 09:20:26,981 ERROR [STDERR] 10.01.2008 09:20:26 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
| INFO: Added Library from: jar:file:/D:/apps/JBoss-4.2.1-argos/server/default/deploy/Argos3Ear.ear/Argos3Web.war/WEB-INF/lib/jboss-seam-ui.jar!/META-INF/s.taglib.xml
| 09:20:26,997 ERROR [STDERR] 10.01.2008 09:20:26 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
| INFO: Added Library from: jar:file:/D:/apps/JBoss-4.2.1-argos/server/default/deploy/Argos3Ear.ear/Argos3Web.war/WEB-INF/lib/jsf-facelets_patch.jar!/META-INF/jsf-core.taglib.xml
| 09:20:26,997 ERROR [STDERR] 10.01.2008 09:20:26 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
| INFO: Added Library from: jar:file:/D:/apps/JBoss-4.2.1-argos/server/default/deploy/Argos3Ear.ear/Argos3Web.war/WEB-INF/lib/jsf-facelets_patch.jar!/META-INF/jstl-fn.taglib.xml
| 09:20:27,044 ERROR [STDERR] 10.01.2008 09:20:27 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
| INFO: Added Library from: jar:file:/D:/apps/JBoss-4.2.1-argos/server/default/deploy/Argos3Ear.ear/Argos3Web.war/WEB-INF/lib/jboss-seam-mail.jar!/META-INF/seam-mail.taglib.xml
| 09:20:27,075 ERROR [STDERR] 10.01.2008 09:20:27 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
| INFO: Added Library from: jar:file:/D:/apps/JBoss-4.2.1-argos/server/default/deploy/Argos3Ear.ear/Argos3Web.war/WEB-INF/lib/richfaces-ui-3.1.2.GA.jar!/META-INF/richfaces.taglib.xml
| 09:20:27,090 ERROR [STDERR] 10.01.2008 09:20:27 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
| INFO: Added Library from: jar:file:/D:/apps/JBoss-4.2.1-argos/server/default/deploy/Argos3Ear.ear/Argos3Web.war/WEB-INF/lib/richfaces-ui-3.1.2.GA.jar!/META-INF/rich.taglib.xml
| 09:20:27,137 ERROR [STDERR] 10.01.2008 09:20:27 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
| INFO: Added Library from: jar:file:/D:/apps/JBoss-4.2.1-argos/server/default/deploy/Argos3Ear.ear/Argos3Web.war/WEB-INF/lib/richfaces-ui-3.1.2.GA.jar!/META-INF/a4j.taglib.xml
| 09:20:27,153 ERROR [STDERR] 10.01.2008 09:20:27 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
| INFO: Added Library from: jar:file:/D:/apps/JBoss-4.2.1-argos/server/default/deploy/Argos3Ear.ear/Argos3Web.war/WEB-INF/lib/jsf-facelets_patch.jar!/META-INF/jsf-html.taglib.xml
| 09:20:27,153 ERROR [STDERR] 10.01.2008 09:20:27 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
| INFO: Added Library from: jar:file:/D:/apps/JBoss-4.2.1-argos/server/default/deploy/Argos3Ear.ear/Argos3Web.war/WEB-INF/lib/jsf-facelets_patch.jar!/META-INF/jsf-ui.taglib.xml
| 09:20:27,169 ERROR [STDERR] 10.01.2008 09:20:27 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
| INFO: Added Library from: jar:file:/D:/apps/JBoss-4.2.1-argos/server/default/deploy/Argos3Ear.ear/Argos3Web.war/WEB-INF/lib/richfaces-ui-3.1.2.GA.jar!/META-INF/ajax4jsf.taglib.xml
| 09:20:27,184 ERROR [STDERR] 10.01.2008 09:20:27 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
| INFO: Added Library from: jar:file:/D:/apps/JBoss-4.2.1-argos/server/default/deploy/Argos3Ear.ear/Argos3Web.war/WEB-INF/lib/jsf-facelets_patch.jar!/META-INF/jstl-core.taglib.xml
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4118523#4118523
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4118523
18 years, 3 months
[JBoss Seam] - Injecting/Outjecting Primitive Types
by toni
Hi,
how do I access the value of a check box contained inside a jsf view from a SFSB without creating explicitetly a Java Bean for the boolean value?
This does not seem to work
|
| ---- simple page --------
|
| <f:view>
| <h:form>
|
| <h:outputText value="List All"/>
| <h:selectBooleanCheckbox value="#{showallentries}"/>
|
| <h:commandButton type="submit" value="Save" action="#{StatefullTestBean.save}"/>
|
| </h:form>
| </f:view>
|
| ----- simple sfsb ---------
|
|
| Name("linkSectionAction")
| @Stateful
|
| public class StatefullTestBean implements StatefullTtestBeanInterface
| {
|
| @In(create=true)
| @Out
| boolean showallentries;
|
| public String save()
| {
| // IWould like to access the boolean value, but I can't inject/outject it.
| }
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4118521#4118521
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4118521
18 years, 3 months
[Beginners Corner] - hsqldb-ds not in memory persistence
by Mussie
hello forum,
I'm trying to build a database aplication with jboss and could not make my
data persistent. I allready changed the persistence from create-drop to update in the seam booking example.
So here is my question:
is it correct that I have to change the hsqldb into server mode to make the
data persistent?
I tried to do so by changing the hsqldb-ds.xml in my deploy directory. But when I start my hsql database manager it is still in in-memory type only the URL changed to jdbc:hsqldb:hsql://127.0.0.1:1701.
Does anyone know why my database engine doesn't convert to server based persistence?
This is how my hsqldb-ds looks like.
<?xml version="1.0" encoding="UTF-8"?>
|
| <!-- The Hypersonic embedded database JCA connection factory config -->
|
| <!-- $Id: hsqldb-ds.xml 63175 2007-05-21 16:26:06Z rrajesh $ -->
|
| <datasources>
| <local-tx-datasource>
|
| <!-- The jndi name of the DataSource, it is prefixed with java:/ -->
| <!-- Datasources are not available outside the virtual machine -->
| <jndi-name>DefaultDS</jndi-name>
|
| <!-- For server mode db, allowing other processes to use hsqldb over tcp.
| This requires the org.jboss.jdbc.HypersonicDatabase mbean.-->
| <connection-url>jdbc:hsqldb:hsql://${jboss.bind.address}:1701</connection-url>
|
| <!-- For totally in-memory db, not saved when jboss stops.
| The org.jboss.jdbc.HypersonicDatabase mbean is required for proper db shutdown
| <connection-url>jdbc:hsqldb:.</connection-url>
| -->
| <!-- For in-process persistent db, saved when jboss stops.
| The org.jboss.jdbc.HypersonicDatabase mbean is required for proper db shutdown
|
| <connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}localDB</connection-url>
| -->
| <!-- The driver class -->
| <driver-class>org.hsqldb.jdbcDriver</driver-class>
|
| <!-- The login and password -->
| <user-name>sa</user-name>
| <password></password>
|
| <!--example of how to specify class that determines if exception means connection should be destroyed
| -->
| <!--exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.DummyExceptionSorter</exception-sorter-class-name-->
|
| <!-- this will be run before a managed connection is removed from the pool for use by a client-->
| <!--<check-valid-connection-sql>select * from something</check-valid-connection-sql> -->
|
| <!-- The minimum connections in a pool/sub-pool. Pools are lazily constructed on first use -->
| <min-pool-size>5</min-pool-size>
|
| <!-- The maximum connections in a pool/sub-pool -->
| <max-pool-size>20</max-pool-size>
|
| <!-- The time before an unused connection is destroyed -->
| <!-- NOTE: This is the check period. It will be destroyed somewhere between 1x and 2x this timeout af
| ter last use -->
| <!-- TEMPORARY FIX! - Disable idle connection removal, HSQLDB has a problem with not reaping threads
| on closed connections -->
| <idle-timeout-minutes>0</idle-timeout-minutes>
|
| <!-- sql to call when connection is created
| <new-connection-sql>some arbitrary sql</new-connection-sql>
| -->
|
| <!-- sql to call on an existing pooled connection when it is obtained from pool
| <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
| -->
|
| <!-- example of how to specify a class that determines a connection is valid before it is handed out
| from the pool
| <valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.DummyValidConnectionChecker</valid-connection-checker-class-name>
| -->
|
| <!-- Whether to check all statements are closed when the connection is returned to the pool,
| this is a debugging feature that should be turned off in production -->
| <track-statements/>
|
| <!-- Use the getConnection(user, pw) for logins
| <application-managed-security/>
| -->
|
| <!-- Use the security domain defined in conf/login-config.xml -->
| <security-domain>HsqlDbRealm</security-domain>
|
| <!-- Use the security domain defined in conf/login-config.xml or the
| getConnection(user, pw) for logins. The security domain takes precedence.
| <security-domain-and-application>HsqlDbRealm</security-domain-and-application>
| -->
|
| <!-- HSQL DB benefits from prepared statement caching -->
| <prepared-statement-cache-size>32</prepared-statement-cache-size>
|
| <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml -->
| <metadata>
| <type-mapping>Hypersonic SQL</type-mapping>
| </metadata>
|
| <!-- When using in-process (standalone) mode
| <depends>jboss:service=Hypersonic,database=localDB</depends>-->
| <!-- Uncomment when using hsqldb in server mode-->
| <depends>jboss:service=Hypersonic</depends>
|
| </local-tx-datasource>
|
| <!-- Uncomment if you want hsqldb accessed over tcp (server mode)-->
| <mbean code="org.jboss.jdbc.HypersonicDatabase"
| name="jboss:service=Hypersonic">
| <attribute name="Port">1701</attribute>
| <attribute name="BindAddress">${jboss.bind.address}</attribute>
| <attribute name="Silent">true</attribute>
| <attribute name="Database">default</attribute>
| <attribute name="Trace">false</attribute>
| <attribute name="No_system_exit">true</attribute>
| </mbean>
|
|
| <!-- For hsqldb accessed from jboss only, in-process (standalone) mode
| <mbean code="org.jboss.jdbc.HypersonicDatabase"
| name="jboss:service=Hypersonic,database=localDB">
| <attribute name="Database">localDB</attribute>
| <attribute name="InProcessMode">true</attribute>
| </mbean>
| -->
| </datasources>
|
Anyway if someone knows what is wrong with my hsqldb-ds I'd appreciate it or
is there a tutorial or example with Jboss Java5 and HSQL persistence (not in memory).
Because this is all I need an example of an application where I can store user acounts
in a hsqldb not only as long as the server runs. I want to find those acounts in the db
even if I restart my server (PC)!
Can anyone help me out?
thanks and best regards,
Mussie
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4118516#4118516
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4118516
18 years, 3 months