seam

a different object with the same identifier value was already associated with the session when trying to persist entity

↘锁芯ラ 提交于 2020-01-13 10:21:20
问题 I have a slight problem that I don't know how to solve. Could you help me please? When I am trying to persist entity I get next exception: 12:47:39,398 ERROR [org.black.dmitriy.entityHome.ScheduleHome] (http--127.0.0.1-8080-1) javax.persistence.EntityExistsException: a different object with the same identifier value was already associated with the session: [org.black.dmitriy.entity.Schedule#1] at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1333)

Can't “render/not render” a4joutputpanel rendered=“” “true/false” parameter by managed bean at JBoss Seam and Richfaces

你离开我真会死。 提交于 2020-01-07 07:15:10
问题 I'm new on seam and richfaces. I want to hide/show a4joutputpanel by rendered="" "true/false" parameter by giving Managed Bean.But ı'm taking this exception: com.sun.facelets.tag.TagAttributeException: /testscreen.xhtml action="#{testBean.renderActive(true)}" Not a Valid Method Expression: #{testBean.renderActive(true) } Can anyone help me about that? Here's my xhtml and managedbean codes: <a4j:commandButton action="#{testBean.renderActive(true)}" reRender="MyPanel" value="Start" /> <a4j

Seam GWT pageflow transition

北城余情 提交于 2020-01-05 05:11:07
问题 I am trying to integrate, Seam and GWT. I was wondering if can specify html pages in Seam page flow. Is it possible ? If yes what will the name in the tranisition stand for ? 回答1: We also use a combination of Seam page flow and GWT. Explicitly, we divide the login page from the main page to enable login via https. But, we do not use normal html pages, we still use xhtml pages. You can include a GWT html page within a Seam xhtml page by wrapping the <html></html> pair with a <f:view></f:view>

How do I listen to all Seam contextual events with parameterized names?

那年仲夏 提交于 2020-01-04 05:23:06
问题 Seam will fire different kinds of events that relate to particular scopes, tasks, or processes and appends the name of the scope, task or process to the end of the event. How do I listen to all the events of a type? E.g. for any <name> I'd like to listen to events such as these: org.jboss.seam.createProcess.<name> — called when the process is created org.jboss.seam.endProcess.<name> — called when the process ends org.jboss.seam.initProcess.<name> — called when the process is associated with

How does scope type affect the way an EntityQuery object is re-used

别来无恙 提交于 2020-01-04 02:34:11
问题 for (...) { UserList userList = (UserList) Component.getInstance(UserList.class, ScopeType.METHOD); userList.getUserByEmailAddress(emailId); } There are different ScopeTypes which are supported by Seam (e.g. METHOD, PAGE, EVENT, APPLICATION). We currently use the METHOD scope to retrieve User object by email id. The above code is present in a for loop (i.e. for a collection of user email addresses we retrieve the user object). Is this the right ScopeType or would it be preferable to move the

h:selectOneRadio containing images

心已入冬 提交于 2020-01-02 08:38:10
问题 I have a h:selectOneRadio tag for displaying a number of radiobuttons: <h:selectOneRadio value="#{myBean.radioButtonSelection}"> <s:selectItems value="#{myBean.getPossibleRadioButtonSelections()}" var="rs" label="#{rs.toString}"/> </h:selectOneRadio> Now, instead of radiobuttons with string values (labels), I would like to have radio buttons with (clickable) images next to it. Is this possible? If so, how? Update: Actually, there should be both text, and an image with a question mark which

What is the 'official' SEAM way of listening to JSF-SEAM phases?

烈酒焚心 提交于 2020-01-01 16:26:37
问题 A simple question on the title. My case is that I want to listen to "before RENDER_RESPONSE" phase, and alter some components internal state. Is PhaseListener the "right way" to do this in SEAM applications? 回答1: If you want alter JSF component internal state, rely on JSF phase listener. Seam way of declaring JSF phase listener is shown bellow @Name("applicationPhaseListener") @Scope(ScopeType.APPLICATION) public class ApplicationPhaseListener { /** * Called TRANSPARENTLY by Seam */ @Observer

JBoss AS 7 migration - java.lang.ClassNotFoundException: org.hibernate.validator.ClassValidator

房东的猫 提交于 2020-01-01 09:29:10
问题 I have an application running on JBoss AS 4.2.3 and am trying to migrate this to JBoss AS 7.0.2. I am also upgrading seam from 2.1.1 to 2.2.2. I have resolved a few of the class not found exceptions, but I am stuck on java.lang.ClassNotFoundException: org.hibernate.validator.ClassValidator My full stack trace is below. I'm not very clear on the new class loader in AS 7. Does Hibernate 4 work with seam 2.2.2? I have tried specifying the exports in jboss-deployment-structure.xml to use org

JSF ReRender support with selectBooleanCheckbox

隐身守侯 提交于 2020-01-01 06:18:06
问题 I have a JSF page on which I want to have a checkbox that, when clicked, will add/remove certain other form fields from the page. Here is the (simplified) code I currently have for the checkbox: <h:selectBooleanCheckbox title="showComponentToReRender" value="#{backingBean.showComponentToReRender}"> <a4j:support event="onsubmit" reRender="componentToReRender" /> </h:selectBooleanCheckbox> Here is the code for the component I want to hide: <h:selectOneMenu id="componentToReRender" value="#

How to map IceFaces <ice:selectInputDate> component on a java.util.Calendar field?

邮差的信 提交于 2019-12-31 02:50:07
问题 Does anybody knows how can component <ice:selectInputDate> be mapped on a java.util.Calendar field, not java.util.Date ? I am using from IceFaces version 1.8.2, the component <ice:selectInputDate> . This component requires to be bound with a java.util.Date proeprty. For example, value="#{bean.myDate}" , the myDate field must be of type java.util.Date . But I need my date field to be of type java.util.Calendar . My trials: I have tried to use standard converter or a custom one: Standard one: