[JBoss Seam] - problem with validation on selectitems
by henderson_mk
Hiya,
Having some diffs getting validation working on a select item list.
| <s:validateAll>
| <tr>
| <td class="cntForm"><h:outputText value="#{msgs.newCustomerRegion} "/></td>
| <td class="cntForm">
| <h:selectOneListbox id="region" required="true" size="3" value="#{customer.region}" converter="GeographicalRegionConverter">
| <f:selectItems value="#{selectItems.regions}" />
| </h:selectOneListbox> *
| </td>
| <td><h:message for="region" styleClass="cntError" /></td>
| </tr>
| </s:validateAll>
|
backing bean:
| @OneToOne
| @NotNull(message="Please select a region")
| public GeographicalRegion getRegion() {return region;}
| public void setRegion(GeographicalRegion region) {this.region = region;}
|
but when I click through without setting a value... it just doesn't fire the validation.
I think I may be missing something silly...?
Perhaps someone can point me in the right direction?
thanks
marty
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4031589#4031589
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4031589
19Â years
[JBoss jBPM] - Re: jBPM : Couldn't be that complicated... Getting there
by viniciuscarvalho
Alright! Almost there: So far those have been the steps taken:
I'm using jbpm-jpdl-3.2.GA ok, on jboss 4.0.5:
1st: Create a db named jbpmdb on you mysql (please google it for instruction , I'll post a full explanation as soon as I finish this)
2nd: Download the jbpm-starters-kit 3.1.3
3rd: Use the scripts under starters-kit/jbpm-db/build/mysql/scripts/mysql.create.sql, for that log on the myslq 'mysql -u root -p'
>use jbpmdb;
>source mysql.create.sql
(Remember that you must be on the scripts directory when you started the mysql in order to use the exact sentence above)
4th: Fill in some tables...
You need to create a user: JBPM_ID_USER (fill in as you need, just use 'U' for the class [do not ask me why, I dunno know yet ;P])
Now setup three groups for the user:
| insert into JBPM_ID_GROUP (ID_,
| CLASS_,
| NAME_,
| TYPE_,
| PARENT_) values (1, 'G', 'manager', 'security-role', null), (2, 'G', 'participant', 'security-role', null), (3,'G','administrator', 'security-role', null)
|
5th: now you have to map roles<->users
| insert into JBPM_ID_MEMBERSHIP (ID_,
| CLASS_,
| NAME_,
| ROLE_,
| USER_,
| GROUP_) values (1,'M','','',1,1),(1,'M','','',1,2),(1,'M','','',1,3)
|
Once again , don't know why class should be M (internal use of jbpm???).
6th: Ok, you have the db-setup, next step, create a jbpm-ds.xml file on your deploy dir:
| <datasources>
| <local-tx-datasource>
| <jndi-name>JbpmDS</jndi-name>
| <connection-url>jdbc:mysql://localhost:3306/jbpmdb</connection-url>
| <driver-class>com.mysql.jdbc.Driver</driver-class>
| <user-name>root</user-name>
| <password></password>
| <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exception-sorter-class-name>
| <!-- should only be used on drivers after 3.22.1 with "ping" support
| <valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLValidConnectionChecker</valid-connection-checker-class-name>
| -->
| <!-- 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 - MySQLValidConnectionChecker is preferred for newer drivers
| <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
| -->
|
| <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
| <metadata>
| <type-mapping>mySQL</type-mapping>
| </metadata>
| </local-tx-datasource>
| </datasources>
|
7th: Append this to your login-config.xml under conf dir:
| <application-policy name = "jbpm">
| <authentication>
| <login-module code="org.jboss.security.auth.spi.DatabaseServerLoginModule"
| flag="required">
| <module-option name="dsJndiName">java:/JbpmDS</module-option>
| <module-option name="principalsQuery">
| SELECT PASSWORD_ FROM JBPM_ID_USER WHERE NAME_=?
| </module-option>
| <module-option name="rolesQuery">
| SELECT g.NAME_ ,'Roles'
| FROM JBPM_ID_USER u,
| JBPM_ID_MEMBERSHIP m,
| JBPM_ID_GROUP g
| WHERE g.TYPE_='security-role'
| AND m.GROUP_ = g.ID_
| AND m.USER_ = u.ID_
| AND u.NAME_=?
| </module-option>
| </login-module>
| </authentication>
| </application-policy>
|
8th: Create some queues, append the following under the deploy/jms/jbossmq-destinations-service.xml:
| <mbean code="org.jboss.mq.server.jmx.Queue"
| name="jboss.mq.destination:service=Queue,name=JbpmCommandQueue">
| <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
| </mbean>
|
| <mbean code="org.jboss.mq.server.jmx.Queue"
| name="jboss.mq.destination:service=Queue,name=JbpmJobQueue">
| <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
| </mbean>
|
And last but not least, copy the jbpm-enterprise.ear to your deploy dir
Ok you are now setup. You can log on your new jbpm deployed into you jboss as standalone and try to access the console.
You try to log in and ... BAAAM! Error. /common/searchheader.xhtml @27,7 disabled="#{search.firstPage}": org.hibernate.exception.SQLGrammarException: could not execute query
I'm still figuring out this one, please come back later :)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4031586#4031586
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4031586
19Â years
[Testimonials] - Re: Migration from Weblogic to JBoss 4.0.5
by dward
First off, your ClassCastException was at your second narrow, according to the stack trace you provided, and indeed a second narrow should not be done. Good move cleaning up classes from your web tier, though. Classes that exist in the ejb tier should not be duplicated in your web tier. As long as both tiers are bundled in the same enterprise app (ear), the spec says the ejb tier classes will be visible by the web tier.
Anyway, per your more current problem, again, I need to see the relevant sections of your ejb-jar.xml, jboss.xml and the code that is doing the lookup. Also, are you making use of ejb-local-ref's? You should be. Also, are you using any code generation tools, like XDoclet? Just trying to understand how your app is glued together...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4031584#4031584
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4031584
19Â years