You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Igor Vaynberg (JIRA)" <ji...@apache.org> on 2009/04/26 07:51:30 UTC
[jira] Updated: (WICKET-2238) Keep auto-components after rendering
[ https://issues.apache.org/jira/browse/WICKET-2238?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Igor Vaynberg updated WICKET-2238:
----------------------------------
Fix Version/s: 1.5-M1
right, i thought that restriction might have been lifted under certain conditions, but i guess not.
i dont think we can easily do this because you can try to add a component to a parent that has already been rendered, what happens then? there is no guarantee about the render order, thus the restriction - because resolvers are used "just-in-time" during the rendering process.
this is something that was easily accommodated in the now dead 2.0 version, because there we had access to markup prior to render. we might try and implement something like that in 1.5 if we find a way.
some thoughts:
we can perform a cascading "attached" call to components as they are being added and we can resolve the markup. so container.add() can look something like this:
container.add(component child) {
// do whatever it does currently
if (getpage()!=null) {
// if we already have the page we can figure out this component's markup
IMarkupFragment fragment=findMarkupFragmentForChild(child);
child.attachToMarkup(fragment);
}
child.attachToMarkup() will have to cascade the call to all its children, this way all components will eventually receive the "attached" callback no matter what stage of the game they are being added to the page - during construction or even during render.
once this is in place the textfields can be added automatically, even rewriting the markup if needed (such as adding wicket:ids dynamically) once the attached callback is received.
> Keep auto-components after rendering
> ------------------------------------
>
> Key: WICKET-2238
> URL: https://issues.apache.org/jira/browse/WICKET-2238
> Project: Wicket
> Issue Type: Improvement
> Components: wicket
> Reporter: Ricardo Mayerhofer
> Priority: Minor
> Fix For: 1.5-M1
>
>
> Auto-components are removed after rendering, so components added through component resolvers that take user input don't work.
> The code is located in MarkupContainer.java:
> if (component.isAuto()) { children_remove(i); }
> Thanks for considering.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.