i know there were once discussions on this that should be in the mailing list archives, but i can't recall precisely what the outcome was.


if you look at Container.java, you can see how wicket finds the markup resource for a class:

               // Locate markup resource, searching up class hierarchy
               Resource markupResource = null;
               Class containerClass = getClass();

while ((markupResource == null) && (containerClass != Container.class))
{
// Look for markup resource for containerClass
markupResource = Resource.locate(getApplicationSettings().getSourcePath(),
containerClass, getStyle(), getLocale(), getMarkupType());
containerClass = containerClass.getSuperclass();
}


the one hook here that might help you is ApplicationSettings.getSourcePath(). this is normally a developer setting for "hot loading" markup that's being changed on the fly. but if you set your own source path in your ApplicationSettings, you can put a copy of your .html files somewhere else (on that path) for designers to work on. however, the files still have to have the same name as the java class and they still have to be in the same relative folder (package). we may add features to enable more advanced markup searching in the future, but i doubt very much if such features would ever allow you to name your markup files something other than the class name (with appropriate skin and resource suffixes). this is a core design feature of wicket and something that is good even if it conflicts with your current naming conventions (which i suspect will change somewhat if you use wicket). it is very easy to tell what markup goes with what class. the names tie them together.

if this doesn't work for you, i suggest writing a Perl script that copies the files from their location in the designer code tree into the java code tree. then just run the script when you update from cvs.

one thing i think we might do in the not-too-distant future is to allow users to plug in their own custom ResourceLocator subclass as a first-place-to-look. this would be a fairly easy change (i think) and might help you solve your naming issues if you decide that's worth it. another thing this might do is enable some alternate naming schemes for internationalization. one can imagine a highly internationalized application where the sheer number of markup files gets in the way of the code. in this case, default markup might be in the package itself, but localized markup files might be in localized/en_US or whatever... this change would also enable database-driven resource localization.

btw, the partitioning of things for security reasons doesn't make a lot of sense in wicket because you would most likely do security checks by extending a base page that does a security check before rendering.

Matthew Watson wrote:

Hi,

I'm interested in using wicket for a possible project. I've looked
through the mailing list archive and I can't seem to see any answers to
a couple of questions I have.

I've noticed that in the examples all the html files and java files are
named similarly ie.

Login.java & Login.html                (Obviously so wicket can resolve
which code to apply).

However we typically can't name files in this manner as we need to
maintain our standard file conventions. Such as:

/login.html. etc
/secure/administration/edit-user.html

Is it possible to associate these files with java code? Either
automatically with some explicit declaration?

Also I've seen mentiion of allowing html files to be stored in a
location other than inside WEB-INF/ is that still the case?


Ideally we'll need to allow our designers access to the pages to make
ad hoc changes but not allow access to WEB-INF/


Thanks in advance,
Matt





********************************************************************************
This email may contain legally privileged information and is intended only for the addressee. It is not necessarily the official view or communication of the New Zealand Qualifications Authority. If you are not the intended recipient you must not use, disclose, copy or distribute this email or information in it. If you have received this email in error, please contact the sender immediately. NZQA does not accept any liability for changes made to this email or attachments after sending by NZQA.


All emails have been scanned for viruses and content by MailMarshal. NZQA reserves the right to monitor all email communications through its network.

********************************************************************************


------------------------------------------------------- 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-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wicket-user





-------------------------------------------------------
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-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to