0

I try to create a <h:commandButton> dynamically, from a bean. It must look like:

<h:commandButton actionListener="#{bean.okUpdate("1234")}" title="ok" value="ok" id="ok_1234" update:"otherComponent"/>

So far, the code in the bean to create this button:

    HtmlCommandButton okUpdate = new HtmlCommandButton();
    okUpdate.setLabel("ok");
    okUpdate.setValue("ok");
    okUpdate.setId("okUpdate_" + uuid);
    okUpdate.setActionExpression(createMethodExpression(String.format("#{bean.okUpdate('" + uuid + "')}", "ok"), null, String.class));

-> which code should I add so that the commandButton includes update:"otherComponent" as well?

1
  • 1
    The attribute "update" doesn't exist for this tag. Commented Jan 27, 2014 at 21:26

1 Answer 1

1

Use Primefaces CommandButton class Reference here

org.primefaces.component.CommandButton. 

It has an "update" value expression.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.