Werner Punz wrote:

Richard Wallace wrote:

Ok, but how should I "tinker" with the element tree? I'm guessing AJAX will need to come into play. But how do I get access to the element tree? And exactly how should I manipulate it? I'm guessing there's no ready to go methods already in the JSF APIs to accomplish this, are there?

I think you have a small misunderstanding here what JSF is and what you can do.

I completely understand that.

You cannot alter the backend element tree without any refresh, so you have to force a refresh to do that in the backend.

That's why I was wondering if AJAX could be used when a new form element is being created to modify the backend element tree without having to refresh the whole page.

If you want to alter the displayed form controls without refresh you only can do it with javascript (and ajax if it is dependend on data)

JSF is a plain and pure server side UI api, while javascript a pure client side one is. Thus you cannot really change the form rendering from pure JSF without any refresh or going the javascript route.

Here's an example of the sort of thing that I want to do: http://tacos.mine.nu:8080/tacos-demo/app?service=page/PartialForms.

If it's impossible to accomplish something like this in JSF right now, that's fine. I'll just use Tapestry and hope that JSF will be able to support this idea of "partial forms" in the future. Then again, it's just a component in Tapestry so I don't see why it can't be a component in JSF. Unless there really is no way to modify that component tree without having to resubmit the whole form.

Reply via email to