|dynamic ui:include with ui:fragment: component with rendered false still make inside component tree|
The <ui:include> doesn't extend from UIComponent. It's a tag handler.
It does thus not support the rendered attribute at all. It's also nowhere
listed in the tag documentation.
<ui:fragment> is indeed an UIComponent. So basically you end up with
all those 3 include files being included during view build time and thus
all 3 physically end up in JSF component tree. It's only the HTML output
which is conditionally rendered via <ui:fragment rendered>. You still
end up with duplicate component IDs from those includes because they all
end up in JSF component tree.
You should be using a taghandler like <c:if> instead of
<ui:fragment> to conditionally build the JSF component tree.
So, theoretically, this should do for each of them:
The easiest but also hackiest way would be to set a property which
represents the content of a <h:outputScript> and ajax-update it by
adding its client ID to PartialViewContext#getRenderIds().
So, given a
you can ajax-update it with
script = "alert('peek-a-boo')";
|Execute a server side program asynchronously with an asp.net mvc4 app|
Asp.Net MVC has the concept of an Async Controller that is suited to
perform long-running tasks. It will help you by not locking a thread while
you wait for out program to execute.
But to do what you are after I think you need to create you own Http
Handler (probaby by implementing the IHttpHandler interface) that wraps the
process and returns the results incrementally. This will not be trivial to
do, but it should be possible.
A third viable alternative might be to use SignalR. That would be a fun
project, but would still require much work I think.
Althought it's not really your question, you could do it if you were using
|Execute contents inside |