[JBoss Seam] - Re: <s:validateAll> and
by vladimir.kovalyuk
I fixed some lines in that class got NPE.
I realized that validate() takes script component tag parameters instead of evaluated expression. I debugged a lot JSF RI 1.2 and EL and realized that EL defers evaluation. Thus by calling valueBinding.getExpressionString() in ModelValidator.validate() Seam obtains just expression as it looks like but not as it should be evaluated.
I don't see a workaround. I commented <s:validateAll> and now all works fine except hibernate validators. But I love this feature in Seam and will count on it in the future.
Some excerpts from my code:
source tag:<ui:composition>
|
| <c:if test="#{empty id}">
| <c:set var="id" value="#{name}"/>
| </c:if>
|
| <c:if test="#{empty readonly}">
| <c:set var="readonly" value="#{details.readonly}"/>
| </c:if>
|
| <!-- detect type of editor -->
| <c:if test="#{empty editor}">
| <c:set var="editor" value="#{my:detectEditor(object, name)}"/>
| </c:if>
|
| <!-- insert controls -->
|
| <c:if test="#{editor == 'text'}">
| <h:inputText id="#{id}" value="${object[name]}" readonly="#{readonly}">
| <ui:insert/>
| </h:inputText>
| </c:if>
|
| <c:if test="#{editor == 'textarea'}">
| <h:inputTextarea id="#{id}" value="#{object[name]}" readonly="#{readonly}">
| <ui:insert/>
| </h:inputTextarea>
| </c:if>
|
| <c:if test="#{editor == 'selectBooleanCheckbox'}">
| <h:selectBooleanCheckbox id="#{id}" value="#{object.name}" readonly="#{readonly}">
| <ui:insert/>
| </h:selectBooleanCheckbox>
| </c:if>
|
| </ui:composition>
how tag is used:
<s:decorate>
| <my:property object="#{details.object}" name="name"/>
| </s:decorate>
|
As the result expression string is "object[name]". But facelets calculates it as #{details.object.name}
NPE is due to the fact that there is no "object" in searchable contexts.
Please give me an advice how to work around this problem.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4003803#4003803
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4003803
19 years, 3 months
[Installation, Configuration & Deployment] - Jboss 4.0.5 vs 4.0.1sp1
by viniciuscarvalho
Hello there! We've just upgraded from 4.0.1 -> 4.0.5 and we are getting an unusual errors here. It seems that 4.0.5 consider that everything is a XA tx, altough we do not use XA. We do have 2 different datasources, and yes we have places where some commit happens on both. We have a mix of entity + iBatis environment. One of the errors that appeared is : SET CHAINED command not allowed within multi-statement transaction." exception accessing Sybase. After a few google search I found out that this is because of XA transactions.
Also warnings like " WARN [org.jboss.resource.connectionmanager.TxConnectionManager] Prepare called on a local tx. Use of local transactions on a jta transaction with more than one branch may result in inconsistent data in some cases of failure." are being logged.
My question is, did Jboss changed the way it deals with transactions? by simply removing jboss-xa-jdbc.rar will it fix this issue?
Best regards
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4003800#4003800
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4003800
19 years, 3 months