if String is the markup itself, you don't have enough parameters.
locale, style and extension all matter... as in IResourceStreamLocator.

in addition the class is a markupContainer class, not a page class.
panels and other markup containers can have markup.  thus the
name markupcontainer...
i think to really abstract markup location, this would make more sense:

public interface IMarkupLocator
{
   public String getMarkup(MarkupContainer markupContainer)
}

makes a hell of a lot of sense doesn't it?

and default implementations of this could wrap around the various
IResourceStreamLocator implementers...

     jon

Phil Kulak wrote:

Why not something like this:

interface MarkupLocationStrategy {
  public String locate(Class page);
}

On 8/13/05, Jonathan Locke <[EMAIL PROTECTED]> wrote:
btw, seth, that's a nice wiki page.  if we added a parameter to the
class you made
allowing a flexible root for the html tree, it seems like it would be a
nice addition
to wicket... ?

Phil Kulak wrote:

I really like the idea of a markup location strategy.

On 8/13/05, Seth Ladd <[EMAIL PROTECTED]> wrote:


Hello,

I needed to not only change where HTML files are loaded from, but
change how they are named.  The fully qualified class name -> HTML
file name doesn't quite match our designers layouts.

In any case, I came up with a working solution, but hoping there is a
better way.

I detailed the solution at
http://wicket.sourceforge.net/wiki/index.php/Control_where_HTML_files_are_loaded_from

Any suggestions on how to streamline this?

I suggest, in the article, that the concern of mapping the Page class
name to an HTML file name should be factored out to a Strategy that
can be swapped out.

There already is a fairly straightforward way to add extra locations
to search in, but I didn't see a way to change the way
com/example/wicket/app/Page.class -> com/example/wicket/app/Page.html
is created.

If you agree that factoring the Strategy out is a good idea, I'd be
happy to provide the patch.

Thanks for an interesting and exciting framework!
Seth


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to