myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leonardo Uribe (JIRA)" <>
Subject [jira] Commented: (MYFACES-2483) Find a way to allow c:if work with partial state saving enabled
Date Sat, 30 Jan 2010 01:13:34 GMT


Leonardo Uribe commented on MYFACES-2483:

Attached another patch ( fixPSSIf2009JAN-11.patch ) It has solved the two previous goals:

1. how to remove PostBuildComponentTreeOnRestoreViewEvent (Disabling register listener)
2. how to deal with c:if inside UIViewRoot directly (Save the view fully)

It was notice before save an added/removed branch it is necessary to call clearInitialState
on all children. After multiple attempts, it was clear the only way to ensure this condition
is before save view.

Thinking about this stuff, it could be good to have this states for org.apache.myfaces.PARAM_REFRESH_TRANSIENT_BUILD_ON_PSS

- true: Refresh transient view on partial state saving enabled for all views
- auto: If in a view the user uses c:if, c:forEach, c:choose, or ui:include with src using
ValueExpression (maybe this is a good moment to think other conditions), the view is marked
to be refreshed later, to prevent the call to setFilledView in buildView later and force refreshView
on render response phase.
- false: No view is refreshed.

I have to check other conditions that could trigger component addition/removal and makes pss
fail before commit, but I hope do it soon.

> Find a way to allow c:if work with partial state saving enabled
> ---------------------------------------------------------------
>                 Key: MYFACES-2483
>                 URL:
>             Project: MyFaces Core
>          Issue Type: Task
>          Components: JSR-314
>            Reporter: Leonardo Uribe
>            Assignee: Leonardo Uribe
>         Attachments: fixPSSIf2009JAN-10.patch, fixPSSIf2009JAN-11.patch, fixPSSIf2009JAN-7.patch
> This one is difficult to solve but I still think it is possible.
> It was explored trying to solve MYFACES-2428, and it seems ri is trying to do something
about it too on:
> and
> One strategy to solve this one is this:
> 1. Mark the parent component containing c:if to not save it partially.
> 2. Do not execute c:if on postback and partial state saving enabled.
> In theory, the parent component should be restored fully from saved state.
> Note that things like:
> <c:if>....
>    <p>Some markup</p>
> <c:if>
> is just invalid. It is expected that c:if only contains components with state.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message