[JBoss Seam] - JSF and updating hidden field
by whafrog
Hi, this is probably more of a JSF question, but maybe Seam has a workaround:
I have a simple table where each row is a component. If the user has this component in the database, the hidden field has a value and the box is checked. If they do not, they can always check the box and that component will be added to the database. The problem is that the value of "lenderBenefitId" is handled on the server side. If they check the box and click Save, the row is persisted to the database and the lenderBenefitId is populated. If they uncheck the box that has a lenderBenefitId that is not null, that record will be deleted from the database and lenderBenefitId set to null. But these changes are not propagated back to the view. How can I get this propagation to happen?
<h:panelGrid columns="2">
| <h:selectBooleanCheckbox value="#{benefitMap.getBenefit('ORIGINATION_FEE').selected}"/>
| <h:panelGroup>
| <h:inputHidden value="#{benefitMap.getBenefit('ORIGINATION_FEE').lenderBenefitId}"/>
| <h:outputLabel for="originationFee">Origination Fee:</h:outputLabel>
| <h:inputText value="#{benefitMap.getBenefit('ORIGINATION_FEE').percentReduction}" size="5"/>%
| </h:panelGroup>
| <h:selectBooleanCheckbox value="#{benefitMap.getBenefit('FEDERAL_DEFAULT_FEE').selected}"/>
| <h:panelGroup>
| <h:inputHidden value="#{benefitMap.getBenefit('FEDERAL_DEFAULT_FEE').lenderBenefitId}"/>
| <h:outputLabel for="federalDefaultFee">Federal Default Fee:</h:outputLabel>
| <h:inputText value="#{benefitMap.getBenefit('FEDERAL_DEFAULT_FEE').percentReduction}" size="5"/>%
| </h:panelGroup>
| </h:panelGrid>
|
| <div class="actionButtons">
| <h:commandButton type="submit" value="Save" action="#{lenderbenefits.processLenderBenefits}"/>
| </div>
Many thanks in advance!
Jon
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4107192#4107192
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4107192
18 years, 8 months
[JBoss Seam] - seam test of navigation
by arussel
Hi,
We manage to integration test our application with a succession of new FacesRequest().run();
We would like to add some navigation test to it.
If we have:
| <pages login-view-id="/login.xhtml">
| <page view-id="/*" login-required="true">
| <navigation>
| <render view-id="foo.xhtml"/>
| </navigation>
| </page>
| </pages>
|
We would expect this to pass:
| new NonFacesRequest("/foo.xhtml") {
| @Override
| protected void renderResponse() throws Exception {
| assert "login.xhtml".equals(getRenderedViewId());
| }
|
| }.run();
|
We try few different way around it but couldn't manage to get it to work.
Is there a way using seam 1.2.1?
alex
Note: when we test inside container entering foo.xhtml inside the browser it sends us to the login page, our configuration is ok. We just want to know if we can test redirection using the SeamTest.* framework.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4107190#4107190
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4107190
18 years, 8 months
[Persistence, JBoss/CMP, Hibernate, Database] - SELECT FOR UPDATE, PostgreSQL vs DB2
by paoletto
Hi
I have a method which REQUIRES_NEW transaction, which perform
a SELECT ... FOR UPDATE on one row.
On PostgreSQL everything is fine and the query locks correctly, while if i use DB2 as datasource, it seems
that my select for update doesnt actually lock anything, and if i perform another invocation to this method, or some other selects for update from other consoles, they can succeed...
What's wrong?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4107183#4107183
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4107183
18 years, 8 months