[ 
https://issues.apache.org/jira/browse/WICKET-2693?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12828013#action_12828013
 ] 

Igor Vaynberg commented on WICKET-2693:
---------------------------------------

i agree that having this in a separated part of code is a great idea; what i do 
not agree with is making it configurable.  wicket should provide a single and 
more importantly consistent runtime behavior for components. this is what 
allows the components to be reusable. once we allow the users to start tweaking 
this behavior we will lose reusability of components across projects.

if you think there should be a consistent way to declare a header contribution 
to always show up last, then we should make that part of functionality we 
offer. maybe <wicket:link priority="100">.... or some other means, but it 
should be a single consistent way of doing it.

the reason i opened this issue is that the current order is backwards. i also 
set this as a fix to 1.5 because changing this order in 1.4 will potentially 
cause havoc on a large percentage of existing code. making this configurable 
will cause the same amount of havoc from project to project.

the reason the current order is backwards is that the container should be able 
to customize the component. this is because the container encapsulates the 
component.

so imagine a simple situation where a component contributes component.css. the 
container wants to customize some of the css the component contributes, so it 
contributes container.css. in order for the customization to work container.css 
has to show up *after* component.css. if we do not provide this functionality 
then the auther of component has to give users a hook into the method that 
contributes component.css so the user of the component can override it, and if 
author does not then the user is SOL.
 

> improve css/js contributions
> ----------------------------
>
>                 Key: WICKET-2693
>                 URL: https://issues.apache.org/jira/browse/WICKET-2693
>             Project: Wicket
>          Issue Type: Improvement
>            Reporter: Igor Vaynberg
>            Assignee: Igor Vaynberg
>             Fix For: 1.5-M1
>
>
> currently the order of css contributions is
> page (1st)->container(2nd)->component(3rd)
> we should inverse this order and allow deepest nested components to 
> contribute first, this way an outer container's contributions will appear 
> below allowing the container to override the css/javascript

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

Reply via email to