[jboss-user] [JBoss Seam] - A4J - Can I refresh a components value without applying the
loopingrage
do-not-reply at jboss.com
Wed May 9 15:16:56 EDT 2007
I'm knee deep in some Seam/A4J fun and have hit a road block. Is it possible to have A4J refresh the value of a component without going through Apply Request Values?
The attached code demonstrates what I'm trying to accomplish. I'd like to see changes (made outside this form in a different browser) to a person's Manager ID by clicking the the refresh button (cmdRefresh). In a typical web application, I would just have my users refresh the page to view changes but since it's AJAX, I'm essentially looking for is a way to mark a component as read-only for a given AJAX request.
Does this even make sense?
|
|
| <h:form id="DummyForm">
| <h:selectOneMenu id="lstDestination" value="#{BackingBean.managerId}" >
| <f:selectItems value="#{Util.selectItems}" />
| </h:selectOneMenu>
| <a4j:commandButton id="cmdRefresh" value="Refresh" reRender="lstDestination" />
| <a4j:commandButton id="cmdSave" value="Refresh" actionListener="#{BackingBean.save}" />
| </h:form>
|
|
| public class Person {
|
| private String name;
| private String phone;
| private Long managerId;
|
| public Long getManagerId() {
| return managerId;
| }
|
| public void setManagerId(Long managerId) {
| this.managerId = managerId;
| }
|
| }
|
| public class BackingBean {
|
| Person person;
|
| public void setManagerId(Long managerId) {
| this.person.setManagerId(managerId);
| }
|
| public Long getManagerId() {
| return this.person.getManagerId();
| }
|
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4044456#4044456
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4044456
More information about the jboss-user
mailing list