seam

Hibernate native query - char(3) column

自作多情 提交于 2019-11-27 11:58:35
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 ? axtavt It looks like Hibernate reads value of type CHAR(n) as Character . Try to cast it to VARCHAR(n) : Query q2 = em.createNativeQuery( "select cast(sc_cur_code as VARCHAR2(3)), sc_amount

CRUD: To Roo or not to Roo? [closed]

时光怂恿深爱的人放手 提交于 2019-11-27 10:10:07
问题 I have been using Groovy on Rails for CRUD applications. I am starting a new project where we are not allowed to use Grails anymore (we have a list of allowed jars and grails is not there). I am considering using Spring ROO or JBoss Seam. How do they compare? What are their major strengths and weaknesses? 回答1: Note that Spring Roo and JBoss Seam aren't directly comparable, as JBoss Seam in itself doesn't provide the CRUD application generation mentioned in the question. JBoss Seam however

Dynamic Id's in JSF/Seam

不羁岁月 提交于 2019-11-27 06:16:05
问题 Got a little problem with a Seam application I'm working on and I was wondering if anyone knows a way round it. I've got a form in my application that uses AJAX to show certain input boxes depending on an item in a dropdown box. The code works fine except for setting the ID's in my input boxes. It looks like JSF doesn't let me set an ID via a variable. Other attributes like "for" in labels are fine. Here's some code explaining what I mean: <ui:repeat value="#{serviceHome.instance

CDI missing @ViewScoped and @FlashScoped

a 夏天 提交于 2019-11-27 04:42:41
问题 Why is Java EE 6 CDI missing the @ViewScoped and @FlashScoped annotations? (especially the former makes me wonder, because CDI stems from the Seam world, which already knew the very similar ScopeType.PAGE...) What are the recommended workarounds when using CDI? Use Seam 3? Thanks 回答1: The @ViewScoped is specific to the MVC framework JSF, not to the dependency injection framework CDI. The view scope lives as long as you're interacting with the same JSF view. CDI has not really a notion of

Force refresh of collection JPA entityManager

有些话、适合烂在心里 提交于 2019-11-27 04:05:10
问题 I am using SEAM with JPA (implemented as a Seam Managed Persistance Context), in my backing bean I load a collection of entities (ArrayList) into the backing bean. If a different user modifies one of the entities in a different session I want these changes to be propagated to the collection in my session, I have a method refreshList() and have tried the following... @Override public List<ItemStatus> refreshList(){ itemList = itemStatusDAO.getCurrentStatus(); } With the following query

What is the best method to GZIP a JSF-Seam web app pages

走远了吗. 提交于 2019-11-26 21:04:10
问题 I'm developing an JSF web app on Tomcat, planning to use Seam in the near future, and I want to add compression of our web pages and resources (i.e. Javascript & CSS files). I'm aware of three methods to GZIP responses in a Java web : Use Ehcache GZIP filter: it's used in Appfuse, so it's probably solid and it checks if the user agent supports GZIP before applying it, but it seems to have problems with Seam, which we will be using http://seamframework.org/Community

Jboss Seam: Enabling Debug page on WebLogic 10.3.2 (11g)

送分小仙女□ 提交于 2019-11-26 17:15:46
问题 SKIP TO UPDATE 3 I want to enable the Seam debug page on Weblogic 10.3.2 (11g). So, I have done the following: I have the jboss-seam and jboss-seam-debug jars as dependency in both my ejb and web maven projects (both are modules of my superproject) I put this context parameter in my web.xml: <context-param> <param-name>org.jboss.seam.core.init.debug</param-name> <param-value>true</param-value> </context-param> Now, when I hit the URL of my application, I get the debug page with this exception

Mixing JSF EL in a JavaScript file

会有一股神秘感。 提交于 2019-11-26 11:44:35
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. 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.messages}" var="message"> messages['#{message.key}'] = '#{message.value}'; </ui:repeat> </script> Or, if it's in