[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2658) s:defaultAction only works 1 submit
by Susanne Jarl (JIRA)
s:defaultAction only works 1 submit
-----------------------------------
Key: JBSEAM-2658
URL: http://jira.jboss.com/jira/browse/JBSEAM-2658
Project: JBoss Seam
Issue Type: Bug
Affects Versions: 2.0.1.GA
Environment: JBoss 4.2.2, RichFaces 3.1.4, Firefox 2.0.0.12, Windows XP
Reporter: Susanne Jarl
I use the s:defaultAction and it works the first time i hit enter, but if the inputtextfield is not validated and/or I get an error message, and then hit enter in the inputtextfield again it does not work. But if I click the submitbutton instead the second time it works. So there is a difference between clicking the button and hit enter the second time.
This is my code:
<h:form>
<s:validateAll>
<h:panelGrid columns="2">
<h:outputLabel value="#{messages['programkey.writePin']}:" for="pinCode" title="#{messages['handin.pinCode.title']}" />
<s:decorate for="pinCode">
<h:inputSecret id="pinCode" label="#{messages['programkey.writePin']}" value="#{agentHandler.pinCode}" size="4" required="true" />
<h:message for="pinCode" styleClass="errorMessage" />
</s:decorate>
<a4j:commandButton action="#{handin.handin}" value="#{messages['generic.button.ok']}" reRender="pollForProgrammingResult, pinCodePanel, feedbackPanel">
<s:defaultAction/>
</a4j:commandButton>
<s:button value="#{messages['generic.button.cancel']}" onclick="Richfaces.hideModalPanel('programModalPanel')"/>
</h:panelGrid>
</s:validateAll>
</h:form>
I have this form in a RichFaces modal panel.
--
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, 2 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-633) remoting extension in handling exceptions on client side
by Nico Gau (JIRA)
remoting extension in handling exceptions on client side
--------------------------------------------------------
Key: JBSEAM-633
URL: http://jira.jboss.com/jira/browse/JBSEAM-633
Project: JBoss Seam
Issue Type: Patch
Components: Remoting
Affects Versions: 1.1.0.GA
Reporter: Nico Gau
Priority: Optional
Hi all,
I don't really know what JIRA is by the way, so hopefully nobody is upset by this post. I first mailed Gavin but he told me I should put it in JIRA.
I currently work on a project which uses Seam Remoting directly and I didn't find a neat way in handling errors on the client side as Exceptions are not propagated to it. Therefore I changed Seam to transmit all exceptions which can be handled in the javascript part via another callback. E.g.:
Seam.Component.getInstance('userManager').currentUser(function(user) {
alert("user: " + user);
},
function(ex) {
alert("exception occured: " + ex.getMessage());
});
As the exception handler is optional, the change would not brake any client code. If you are interested in the change, you can reach me at heinzbeinz AT googlemail.com
--
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, 2 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-3851) Seam reflection has lower access than Java reflection
by Gabriel Goïc (JIRA)
Seam reflection has lower access than Java reflection
-----------------------------------------------------
Key: JBSEAM-3851
URL: https://jira.jboss.org/jira/browse/JBSEAM-3851
Project: Seam
Issue Type: Bug
Affects Versions: 2.0.2.SP1
Environment: Jboss Embedded, Java 5
Reporter: Gabriel Goïc
This simple class is to be unit-tested, the SeamTest way:
@Name("hibean")
public class HiSayerBean {
public HiSayerBean () {
}
protected void sayHi(){
System.out.println("hello");
}
}
All tests occur in the SeamTest framework:
new ComponentTest() {
@Override
protected void testComponents() throws Exception {
//test code
}
}.run();
Using Java Reflection - works:
HiSayerBean impl = new HiSayerBean();
Method m = impl.getClass().getDeclaredMethod("sayHi");
m.setAccessible(true);
m.invoke(impl);
Using Java Reflection with Seam - fails:
HiSayerBean impl = (HiSayerBean) getInstance("hibean");
Method m = impl.getClass().getDeclaredMethod("sayHi");
m.setAccessible(true);
m.invoke(impl);
Error log:
java.lang.reflect.InvocationTargetException
(...)
Caused by: java.lang.IllegalAccessException: Class org.jboss.seam.util.Reflections can not access a member of class HiSayerBean with modifiers "protected"
at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:65)
at java.lang.reflect.Method.invoke(Method.java:578)
at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:31)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:46)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:42)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:166)
at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:102)
at HiSayerBean_$$_javassist_0.sayHi(HiSayerBean_$$_javassist_0.java)
... 29 more
So, using Seam gives me a lower capacity to access methods in a reflected class than with raw Java. I'm not sure if it's a bug or a feature request though. But it would be nice to be granted to do this in unit-testing.
Please note that access to a private method in the same way than above works with Java but produces a java.lang.NoSuchMethodException with Seam.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 2 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-3753) SeamResourceBundle.getBundle(String baseName) fails to return correct message based on Locale
by Samuel Mendenhall (JIRA)
SeamResourceBundle.getBundle(String baseName) fails to return correct message based on Locale
---------------------------------------------------------------------------------------------
Key: JBSEAM-3753
URL: https://jira.jboss.org/jira/browse/JBSEAM-3753
Project: Seam
Issue Type: Bug
Components: Core
Affects Versions: 2.1.1.CR1, 2.0.3.CR1, 2.0.2.SP1
Reporter: Samuel Mendenhall
When specifying the Locale directly, everything works as expected, when not, the default locale is used, which is incorrect. Ex.
log.info("SeamResourceBundle.getBundle w/o passing Local: " + SeamResourceBundle.getBundle("ECISConfig").getString("ecis.hello"));
log.info("SeamResourceBundle.getBundle w passing Local: " + SeamResourceBundle.getBundle("ECISConfig", LocaleSelector.instance().getLocale()).getString("ecis.hello"));
Produces:
15:08:45,438 INFO [TestAction] SeamResourceBundle.getBundle w/o passing Local: Hello from ECISConfig_en.properties
15:08:45,439 INFO [TestAction] SeamResourceBundle.getBundle w passing Local: Hello from ECISConfig_en_US_tmwa.properties
When both should be saying "Hello from ECISConfig_en_US_tmwa.properties" because the locale and resource bundle are defined in components.xml as:
<international:locale-selector locale-string="en_US_tmwa" />
<core:resource-loader>
<core:bundle-names>
<value>messages</value>
<value>ECISConfig</value>
</core:bundle-names>
</core:resource-loader>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 2 months