Yes, I it is also hard for me to imagine how exactly this part would
work. I even have a difficulty with listing possible "insertion
points" or whatever you call those... I will take a look at JSF,
Tapestry and the specs. Implementation is always the easiest part. I
will let you know what I got in a few days. If anybody has any ideas,
please let me know.
Cheers,
Kamil
On Mon, 07 Feb 2005 09:11:29 -0800, Jonathan Locke <[EMAIL PROTECTED]> wrote:
>
> actually, right now its more a matter of deciding what to do and how. i
> think you're
> right that ideally components should be able to seamlessly contribute to
> the header
> area like you suggest. but the question is... how many sticky points
> are there in figuring
> out how to do that programmatically and in a way that doesn't violate
> any specs.
>
> if you want to help, we could use a summary of (a) what the HTML spec
> says about
> how javascript exists in the header along with your own assessment of
> how we might
> add to javascript without making it invalid somehow (b) HTML spec rules
> about CSS
> declarations and how we might deal with any ordering issues and (c) what
> tapestry
> did for javascript/css support and how well that worked out.
>
> i suspect that we're going to need javascript and css components as well
> as automatic
> contributions because users will need to control the order of css
> inclusions. i don't know
> enough about javascript, but the order may matter there as well. so
> basically, we need
> components AND automation. that's my best guess. where the problems
> are, i have
> no idea yet. maybe you can help us figure that out. the implementation
> is probably the
> easy part. figuring out exactly where it might go wrong is the hard part...
>
> jon
>
> Kamil Rembalski wrote:
>
> >This is pretty nice :).
> >
> >What would be the target solution (1.1)? I understand that wicket
> >parser would automatically detect insertion points (like head, css
> >definitions, javascript, body, etc.) , so that the user would not have
> >to add any extra components. Is that correct?
> >
> >Why don't you want to include that in 1.0? If it is the question of
> >team's bandwidth, I can try to help you with this. This would be a
> >great feature...
> >
> >Kamil
> >
> >
> >On Mon, 07 Feb 2005 15:45:53 +0100, Eelco Hillenius
> ><[EMAIL PROTECTED]> wrote:
> >
> >
> >>To give you an idea, this is a simple trick we use in our current
> >>project. We have a default set of stylesheets, but we also have
> >>components that use additional stylesheets. These components can
> >>implement 'HeaderContributor' and provide additional stylesheets. The
> >>stylesheets are set in the page using a simple ListView component.
> >>
> >>See code, hope it gives you an idea ;)
> >>
> >><head>
> >><link id="wicket-styles" rel="stylesheet" type="text/css"
> >>href="wehkamp.css" ></link>
> >>...
> >>
> >>public class MainPage extends HtmlPage
> >>{
> >> /** default styles. */
> >> private static final List DEFAULT_STYLES = new ArrayList(1);
> >> static {
> >> DEFAULT_STYLES.add("wehkamp.css");
> >> }
> >>
> >> public MainPage()
> >> {
> >> add(new StylesListView("styles", new StylesModel()));
> >> ...
> >>
> >> private static final class StylesListView extends ListView
> >> {
> >> public StylesListView(String name, IModel model)
> >> {
> >> super(name, model);
> >> }
> >>
> >> protected void populateItem(ListItem listItem)
> >> {
> >> String style = (String)listItem.getModelObject();
> >> listItem.add(new AttributeModifier("href", new Model(style)));
> >> }
> >>
> >> protected void handleRender()
> >> {
> >> removeAll();
> >> super.handleRender();
> >> }
> >> }
> >>
> >> private final class StylesModel extends Model
> >> {
> >> public Object getObject()
> >> {
> >> final List styles = new ArrayList();
> >> styles.addAll(DEFAULT_STYLES);
> >> MainPage.this.visitChildren(HeaderContributor.class, new
> >>IVisitor()
> >> {
> >> public Object component(final Component component)
> >> {
> >>
> >>styles.addAll(((HeaderContributor)component).getCSSStyleHrefs());
> >> return CONTINUE_TRAVERSAL;
> >> }
> >> });
> >> return styles;
> >> }
> >> }
> >>
> >>public interface HeaderContributor
> >>{
> >> List getCSSStyleHrefs();
> >>}
> >>
> >>Eelco
> >>
> >>
> >>Juergen Donnerstag wrote:
> >>
> >>
> >>
> >>>Kamil,
> >>>
> >>>yes there has been a discussion around it and we decided not to put it
> >>>into 1.0. The workarounds I can think of:
> >>>
> >>>a) simply put the reference to *.js into the header section of your
> >>>page markup or inline it. You're component than doesn't know anything
> >>>about it, but would rely on it. I know that this approach is not super
> >>>elegant (javascript and component disconnected), but it is easy and it
> >>>works.
> >>>
> >>>b) your component may have a <div id="wicket-myscript"> region
> >>>(actually a HtmlContainer), which you yourself
> >>>setVisible(true/false).The region may contain the inline javascript.
> >>>
> >>>c) Eelco has designed some components in order to tests his ideas.
> >>>Sorry, but I forgot how exactly they work (please scan the mail
> >>>archiv). May be he provides an example to you
> >>>
> >>>Juergen
> >>>
> >>>On Mon, 7 Feb 2005 13:56:16 +0100, Kamil Rembalski <[EMAIL PROTECTED]>
> >>>wrote:
> >>>
> >>>
> >>>
> >>>
> >>>>Hi guys,
> >>>>
> >>>>I am trying to create a popup calendar component, which involves
> >>>>massive javascript. I remember a discussion about special markup
> >>>>elements that would allow the components to render some parts of their
> >>>>markup only once per page and in the given section. Was there any
> >>>>progress on this since then? I can't think of any elegant workaround
> >>>>and I can't do without it... This may quite an issue for some
> >>>>components...
> >>>>
> >>>>Cheers,
> >>>>Kamil
> >>>>
> >>>>-------------------------------------------------------
> >>>>This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
> >>>>Tool for open source databases. Create drag-&-drop reports. Save time
> >>>>by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
> >>>>Download a FREE copy at http://www.intelliview.com/go/osdn_nl
> >>>>_______________________________________________
> >>>>Wicket-develop mailing list
> >>>>[email protected]
> >>>>https://lists.sourceforge.net/lists/listinfo/wicket-develop
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>-------------------------------------------------------
> >>>This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
> >>>Tool for open source databases. Create drag-&-drop reports. Save time
> >>>by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
> >>>Download a FREE copy at http://www.intelliview.com/go/osdn_nl
> >>>_______________________________________________
> >>>Wicket-develop mailing list
> >>>[email protected]
> >>>https://lists.sourceforge.net/lists/listinfo/wicket-develop
> >>>
> >>>
> >>>
> >>>
> >>-------------------------------------------------------
> >>This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
> >>Tool for open source databases. Create drag-&-drop reports. Save time
> >>by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
> >>Download a FREE copy at http://www.intelliview.com/go/osdn_nl
> >>_______________________________________________
> >>Wicket-develop mailing list
> >>[email protected]
> >>https://lists.sourceforge.net/lists/listinfo/wicket-develop
> >>
> >>
> >>
> >
> >
> >-------------------------------------------------------
> >This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
> >Tool for open source databases. Create drag-&-drop reports. Save time
> >by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
> >Download a FREE copy at http://www.intelliview.com/go/osdn_nl
> >_______________________________________________
> >Wicket-develop mailing list
> >[email protected]
> >https://lists.sourceforge.net/lists/listinfo/wicket-develop
> >
> >
> >
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
> Tool for open source databases. Create drag-&-drop reports. Save time
> by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
> Download a FREE copy at http://www.intelliview.com/go/osdn_nl
> _______________________________________________
> Wicket-develop mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wicket-develop
>
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Wicket-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-develop