seam

Unique Constraint Over Multiple Columns

梦想与她 提交于 2019-12-20 10:17:15
问题 I am using SEAM 2/Hibernate along with PostgreSQL 9 database. I have the following table Active Band =========== active_band_id serial active_band_user text active_band_date timestamp active_band_process integer I would like to add a constraint that ensures each new entry has a unique combination of active_band_user and active_band_date. There could potentially be many attempted inserts per second so I need this to be as efficient as possible, is there a SEAM / hibernate annotation I can use

Which framework should I choose - Seam, Wicket, JSF or GWT? [closed]

馋奶兔 提交于 2019-12-20 08:07:37
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . I'm debating whether to use Seam, Wicket, JSF or GWT as the foundation for my presentation layer in a Java project. I narrowed my

Hibernate Query problem with Informix

独自空忆成欢 提交于 2019-12-20 03:38:07
问题 I have written an application using Seam 2.2.1 & MySQL which is working. I am now trying to connect the application to Informix and when I execute a query from hibernate ( select user from User user ) I am getting the following exceptions: org.hibernate.exception.genericjdbcexception could not execute query when i execute a query as select user.id,user.name from User user it's executed successefuly. The Generated sql is select first 2 user0_.USER_ID as USER1_120_, user0_.dateOfBirth as

java.lang.NoSuchMethodException: org.hibernate.validator.ClassValidator Seam weblogic 10.3

随声附和 提交于 2019-12-18 11:47:34
问题 I have a big problem with Hibernate (use with seam) on weblogic 10.3. When I publish my application, I get this error: java.lang.NoSuchMethodException: org.hibernate.validator.ClassValidator.<init>(java.lang.Class, java.util.ResourceBundle, org.hibernate.validator.MessageInterpolator, java.util.Map, org.hibernate.annotations.common.reflection.ReflectionManager) I read on the web that this error can come from compatibily between hibernate jar. But, I read the matrix and I have the good jar

Binding more than one input field to a backing bean property by using Java Server Faces?

馋奶兔 提交于 2019-12-18 07:23:08
问题 Suppose i have a month, day and year select. One select for each one. And now i need to bind them to a single backing bean property - java.util.Date. How do i get my goal ? 回答1: Three ways: Back or intermediate it by java.util.Calendar with three getters and three setters. Make use of a Converter , this is however going to be a bit hacky. Make use of a 3rd party component like rich:calendar. Edit: as per the comments, here's how option 2 would look like. page.jsp : <h:form> <h:selectOneMenu

How to pass a parameter along with h:commandButton

ε祈祈猫儿з 提交于 2019-12-17 18:56:43
问题 One of the most common approaches to change locale in JSF+Seam - with <h:selectOneMenu> : <h:form action="#{localeSelector.select}" rendered="false"> <h:selectOneMenu value="#{localeSelector.language}" onchange="submit()"> <f:selectItem itemLabel="English" itemValue="en" /> <f:selectItem itemLabel="Francais" itemValue="fr" /> </h:selectOneMenu> </h:form> I want to implement locale changes with buttons. So, the question is - how to pass the parameter (en, fr, etc.) to update the bean with <h

Hibernate native query - char(3) column

我只是一个虾纸丫 提交于 2019-12-17 10:37:20
问题 I have a table in Oracle where column SC_CUR_CODE is CHAR(3) When I do: Query q2 = em.createNativeQuery("select sc_cur_code, sc_amount from sector_costs"); q2.setMaxResults(10); List<Object[]> rs2 = q2.getResultList(); for (Object[] o : rs2) { System.out.println(">>> cur=" + o[0]); } I see cur=E and cur=U instead of cur=EUR and cur=USD o[0] is a java.lang.Character How can I get the full value EUR and USD ? 回答1: It looks like Hibernate reads value of type CHAR(n) as Character . Try to cast it

Mixing JSF EL in a JavaScript file

蓝咒 提交于 2019-12-17 00:57:31
问题 Is there a way to have Expression Language (EL) expressions included JavaScript files be evaluated by JSF? I was hoping that Seam might have a way around this, but no luck so far. All I want is to be able to use localized messages in my JavaScript functions which are shared across pages. 回答1: Five ways: Declare it as global variable in the parent JSF page. <script type="text/javascript" src="script.js"></script> <script type="text/javascript"> var messages = []; <ui:repeat value="#{bean

Mixing JSF EL in a JavaScript file

ⅰ亾dé卋堺 提交于 2019-12-17 00:57:08
问题 Is there a way to have Expression Language (EL) expressions included JavaScript files be evaluated by JSF? I was hoping that Seam might have a way around this, but no luck so far. All I want is to be able to use localized messages in my JavaScript functions which are shared across pages. 回答1: Five ways: Declare it as global variable in the parent JSF page. <script type="text/javascript" src="script.js"></script> <script type="text/javascript"> var messages = []; <ui:repeat value="#{bean

“Target Unreachable, identifier 'authenticator' resolved to null” in SEAM

北战南征 提交于 2019-12-13 20:43:10
问题 I am using jboss-seam-2.2.0.GA, authenticator class to authenticate the login process. When I enter the username and password and submit the page, I am getting following error message in my logs: application E javax.el.PropertyNotFoundException: /login.xhtml @27,76 action="#{authenticator.login()}": Target Unreachable, identifier 'authenticator' resolved to null javax.faces.el.EvaluationException: javax.el.PropertyNotFoundException: /login.xhtml @27,76 action="#{authenticator.login()}":