seam

Understanding the necessity of type Safety in CDI

旧城冷巷雨未停 提交于 2019-12-29 03:34:06
问题 First I should clarify that this post is not intended to criticize CDI, but to discover the thinking and assumptions behind the design of CDI and that will have obvious influence on designing any web app, which uses CDI. One of the most distinguished feature of CDI (of Java EE 6) is type safety . Jboss Seam was not safe in type. It uses name to qualify any instance to inject. Like bellow: @Name("myBean") public class MyBean implements Bean { ... } @Name("yourBean") public class YourBean

Error deploying Seam 2.2 app on JBoss 7.1

好久不见. 提交于 2019-12-25 17:39:23
问题 I've been trying to deploy my JBoss Seam 2.2 application on JBoss 7.1. I've received some great advice and resources from my previous post, but now I'm encountering some errors. My application is using Hibernate/JPA 1.0 for persistence, along with Hibernate Search. When it gets to deploying the JAR in the EAR that contains my JPA entities, I see the following exception: ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC00001: Failed to start service jboss.persistenceunit."MyApp

java.lang.RuntimeException: error while reading /WEB-INF/components.xml

拈花ヽ惹草 提交于 2019-12-25 11:53:17
问题 I'm trying to deploy my Seam application on Jboss 5.1.0.GA but I'm getting a pretty strange error: Caused by: org.dom4j.DocumentException: org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory Nested exception: org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory I'm migrating from Jboss 4.3.0, maybe I have missed some steps? Stacktrace below: 16:48:58,964 ERROR [[/]] Exception sending context initialized event to listener instance of class org.jboss.seam

How can I to order an EntityQuery query in a seam app?

爱⌒轻易说出口 提交于 2019-12-24 22:20:02
问题 My project was originally generated by seam-gen and the action "List" bean, OfficeViewList looks pretty much like it did when first generated. The bean extends EntityQuery. Now I want to order the results. What is the best way to do this? Do I want to add some kind of "order by" class to my EJBQL? Or do I want to set the select order via Here is the code that seam-gen generated (I have changed the RESTRICTIONS, but otherwise it's the same): private static final String EJBQL = "select

Assign a unique client ID to each <rich:dataTable /> row?

社会主义新天地 提交于 2019-12-24 19:22:22
问题 I'm relatively new to working with the UI in Seam, so I'm hoping there is something simple I can replace the three instances of UNIQUE_ID with in the following example. The goal is to have a <rich:dataTable /> wherein each row has the ability to show/hide a <rich:modalPanel /> with more details about the particular object instance. <rich:dataTable var="object" value="#{bean.myObject}"> <rich:column> <h:outputText value="#{object.summary}" /> </rich:column> <rich:column> <a onclick="Richfaces

Dependency injection does not work in Arquillian Test

杀马特。学长 韩版系。学妹 提交于 2019-12-24 15:22:59
问题 This is test class: I try to inject a Paper object then perform the action to test whether the injection is failed or not. @RunWith(Arquillian.class) public class ExcelProcessorTest { // Not work. Because Paper and ExcelProcessorTest are in different modules? @Inject private Paper paper; @Deployment public static JavaArchive createDeployment() { JavaArchive jar = ShrinkWrap.create(JavaArchive.class, "test.jar") .addClasses(Paper.class) .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");

a4j:repeat - Dynamically appending a new element

自闭症网瘾萝莉.ら 提交于 2019-12-24 13:52:17
问题 I'm trying to implement (as part of a larger system) a feature where a user is able to post a message. When the user clicks the post button, I'm using RichFaces and a4j to retrieve the generated post using ajax. I'd rather not have the post show up automatically as soon as the response is returned. Rather, I'd like to add an output panel inside a hidden div. When the user clicks on the post button, that output panel will be populated but obviously hidden from the user. What I would like to do

Seam: login using external SSO application

最后都变了- 提交于 2019-12-24 12:24:03
问题 I have a Seam application that have to use an external one to login. The logic is as follows: My app sends user to external SSO URL User does what it takes to authenticate there On success, the external app redirects user back to my app with a random token My code should contact the external app via HTTP with the passed token and get complete user information in return Pretty straightforward. But I'm stuck. The redirect is coming to /seam/resources/token. I intended to get Identity from the

Unable to select a particular radio button choice by clicking on the choice text

谁说胖子不能爱 提交于 2019-12-24 09:57:10
问题 <s:decorate template="/layout/display-text.xhtml"> <h:selectOneRadio layout="pageDirection" value="#{_userHome.pref}"> <f:selectItems value="#{_userHome.getPreferences()}" /> </h:selectOneRadio> </s:decorate> I am able to select user preferences by directly clicking on the text next to the radio button choice in all browsers except Firefox. How should I fix this? 回答1: You need to add a <label> element for the radio button so that your markup looks as follows: <label for="radio-button">Radio

Seam Equivalent of Spring PersistenceUnitPostProcessor

流过昼夜 提交于 2019-12-24 06:19:13
问题 We have a very comfortable setup using JPA through Spring/Hibernate, where we attach a PersistenceUnitPostProcessor to our entity manager factory, and this post processor takes a list of project names, scans the classpath for jars that contain that name, and adds those jar files for scanning for entities to the persistence unit, this is much more convenient than specifying in persistence.xml since it can take partial names and we added facilities for detecting the different classpath