[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1228) Add sort option to <s:selectItems>
by Stephan Bublava (JIRA)
Add sort option to <s:selectItems>
----------------------------------
Key: JBSEAM-1228
URL: http://jira.jboss.com/jira/browse/JBSEAM-1228
Project: JBoss Seam
Issue Type: Patch
Components: JSF
Affects Versions: 1.2.1.GA
Reporter: Stephan Bublava
Attachments: sort-selectitems-patch.txt
The attached patch adds a sort option to <s:selectItems>, that allows the entries to be sorted by their label.
Example:
<h:selectOneMenu value="#{person.honorific}">
<s:selectItems value="#{honorifics}" var="honorific" label="#{honorific.label}" noSelectionLabel="Please select" sort="ascending" />
<s:convertEnum />
</h:selectOneMenu>
This version has not been tested in depth (especially interactions with "noSelectionLabel"), but I've been using similar code in our project (based upon Seam SelectItems 1.1.1beta1) for some time now and not encountered any problems.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 8 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1387) Support for overriding .cfg.xml properties in HibernateFactory (patch included)
by Przemyslaw Jaskierski (JIRA)
Support for overriding .cfg.xml properties in HibernateFactory (patch included)
--------------------------------------------------------------------------------
Key: JBSEAM-1387
URL: http://jira.jboss.com/jira/browse/JBSEAM-1387
Project: JBoss Seam
Issue Type: Feature Request
Environment: Microcontainer
Reporter: Przemyslaw Jaskierski
Fix For: 1.3.0.ALPHA
Attachments: HibernateFactory-patch.diff.zip
Currently HibernateFactory supports only one type of configuration at a time: .cfg.xml file or "programmatic" one passed by the cfgProperties property.
It would be great to have the ability to override individual properties from the specified .cfg.xml file using cfgProperties property. For example, when you want to have special value for hibernate.hbm2ddl.auto in case of tests only, and normal one in case of production environment.
Applying my patch makes the following thing possible (instead of maintaing two almost identicall hibernate.cfg.xml files):
<bean name="pecpHibernateSessionFactoryFactory" class="pecp.core.seam.HibernateFactory">
<property name="cfgResourceName">
<inject bean="pecpHibernateConfigurationLocation"/>
</property>
<property name="namingStrategy">
<inject bean="underscoreAwareNamingStrategy"/>
</property>
<property name="cfgProperties">
<map class="java.util.Hashtable" keyClass="java.lang.String" valueClass="java.lang.String">
<entry>
<key>hibernate.hbm2ddl.auto</key>
<value>create-drop</value>
</entry>
</map>
</property>
</bean>
I've kept original logical code flow intact, so when there is no cfgResourceName and no cfgProperties set, Seam (as in original case) tries to call configuration.configure() and try to configure from hibernate.cfg.xml file. To make override functionality work you need to specify cfgResourceName property.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 8 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1678) @Begin(flushMode=MANUAL) takes effect AFTER method call instead of before it.
by Frits Jalvingh (JIRA)
@Begin(flushMode=MANUAL) takes effect AFTER method call instead of before it.
-----------------------------------------------------------------------------
Key: JBSEAM-1678
URL: http://jira.jboss.com/jira/browse/JBSEAM-1678
Project: JBoss Seam
Issue Type: Bug
Components: Core
Affects Versions: 2.0.0.BETA1
Environment: J2SE 1.5, Tomcat 6.0.10, Hibernate 3.2.3, HibEM 3.3.1
Reporter: Frits Jalvingh
(See also the end of thead at http://jboss.com/index.html?module=bb&op=viewtopic&p=4064502#4064502)
I have a method marked:
@Begin(flushMode=FlushModeType.MANUAL)
public String createNewTarget()
This method is meant as the start of a 2-screen conversation. This conversation should be rolled back if a user presses cancel so flushmode=MANUAL is used to prevent the persistence context from flushing db changes.
The method starts by creating a new entity and persist()s it. The problem is that this causes an immediate "insert" by Hibernate regardless of the flushmode.
I debugged the code and found that the flushmode gets set AFTER Seam calls the method, not before (ConversationInterceptor). This seems to be wrong, so I placed an extra call to set the mode in aroundInvoke():
setFlushMode(method); // JAL FlushMode should be set BEFORE we call the method!?
Object result = invocation.proceed();
beginConversationIfNecessary(method, result);
endConversationIfNecessary(method, result);
return result;
(flushMode in the original code is set in beginConversation()).
This at least fixes part of the problem; the other part of the problem is a bug in Hibernate where it always forces an insert even if it is not needed. I fixed that too which fixes the entire problem.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 8 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1457) ui example doesnt work in tomcat 5.5.23
by Bieth Bruno (JIRA)
ui example doesnt work in tomcat 5.5.23
---------------------------------------
Key: JBSEAM-1457
URL: http://jira.jboss.com/jira/browse/JBSEAM-1457
Project: JBoss Seam
Issue Type: Bug
Affects Versions: 1.2.1.GA
Environment: Tomcat 5.5.23
Reporter: Bieth Bruno
Can't run the ui example with tomcat 5.5.23 :
After clicking one of the link on the main page I get :
15:10:49,124 ERROR [ExceptionFilter] could not roll back transaction
javax.naming.NamingException: Local server is not initialized
at org.jnp.interfaces.LocalOnlyContextFactory.getInitialContext(LocalOnlyContextFactory.java:45)
...
15:10:50,265 ERROR [SeamPhaseListener] uncaught exception
javax.faces.el.EvaluationException: Cannot set value for expression '#{personHome.id}' to a new valu
e of type java.lang.Integer
at org.apache.myfaces.el.ValueBindingImpl.setValue(ValueBindingImpl.java:310)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 8 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1000) Propagation of conversations with pageflow in testing environment.
by Denis Karpov (JIRA)
Propagation of conversations with pageflow in testing environment.
------------------------------------------------------------------
Key: JBSEAM-1000
URL: http://jira.jboss.com/jira/browse/JBSEAM-1000
Project: JBoss Seam
Issue Type: Bug
Components: Core
Affects Versions: 1.2.0.GA
Environment: windows 2000 jboss-4.0.5.GA
Reporter: Denis Karpov
I think there is bug in testing environment (propagation of conversations with pageflow does not work)
In this test there is 2 requests .
In the first I start conversation and pageflow
In the second conversation is lost.
If I do not start pageflow then conversation propagates.
Code:
public class TOrdTest extends SeamTest{
private static final Log log = LogFactory.getLog( TOrdTest.class );
@Test
public void Test1() throws Exception
{
String id = new FacesRequest(){
@Override
protected void invokeApplication() throws Exception {
Conversation.instance().begin();
Pageflow.instance().begin("val_buy"); // uses start-state
setOutcome("browse");
log.info("##### 1 Conversation_ID "+ Conversation.instance().getId());
assert isLongRunningConversation();
}
@Override
protected void renderResponse() throws Exception {
}
}.run();
id = new FacesRequest("/exchange/buy_readonly.xhtml",id){
@Override
protected void beforeRequest()
{
log.info("#####beforeRequest Conversation_ID "+ getConversationId());
}
@Override
protected void applyRequestValues() throws Exception {
log.info("##### 2 Conversation_ID "+ Conversation.instance().getId()+" "+getConversationId());
}
@Override
protected void invokeApplication() throws Exception {
//Conversation.instance().beginNested();
log.info("##### 3 Conversation_ID "+ Conversation.instance().getId()+" "+getConversationId());
assert isLongRunningConversation();
}
}.run();
}
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 8 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1173) HibernateSessionProxy ClassCastException
by dazhu tang (JIRA)
HibernateSessionProxy ClassCastException
----------------------------------------
Key: JBSEAM-1173
URL: http://jira.jboss.com/jira/browse/JBSEAM-1173
Project: JBoss Seam
Issue Type: Bug
Components: Framework
Affects Versions: 1.2.0.GA
Reporter: dazhu tang
Priority: Critical
1. i want to inject the hibernate session in seam,so i config the component.xml as follows:
<core:hibernate-session-factory name="hibernateSessionFactory" />
<core:managed-hibernate-session name="session" auto-create="true"
session-factory-jndi-name="java:/HibernateSessionFactory" />
2. Inside managed Bean , i use @in to inject the Hibernate Session,
but when i am using DetachedCriteria in my application
DetachedCriteria criteria =
DetachedCriteria.forClass(Smartform.class);
criteria.getExecutableCriteria(session)
i got the HibernateSessionProxy ClassCastException,i debug the application and found that seam injected HibernateSessionProxy not the real HibernateSession object . So DetachedCriteria can't work.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 8 months