I realise <wicket:link> is very simple and meant just for convenience, but
it's awfully convenient.

Would it make sense to have the concept of a base package? For example:

<wicket:link base="com.mycompany.web">
   HomePage.html This is com.mycompany.web.HomePage 
   login/LoginPage.html This is com.mycompany.web.login.LoginPage 
   some/other/package/IndexPage.html This is
com.mycompany.web.some.other.package.IndexPage 
</wicket:link>

For that matter, I think a 'mount' method that traverses a base package
would be nice, for example:
WebApplication.mountAllSubPackagePages (String baseDir, PackageName
basePackage)

So a call to:
webApplication.mountAllSubPackagePages ("/base", PackageName.forClass
(com.mycompany.web.HomePage.class))

Would mount the following bookmarkable URLs:
contextname/app/base/HomePage
contextname/app/base/login/LoginPage
contextname/app/base/some/other/package/IndexPage







igor.vaynberg wrote:
> 
> <wicket:link> does not work for multi levels. a search is not feasible
> because different packages can contain same class names
> 
> if i were you i would create a panel that is backed by PageLinks and you
> can
> plop that into anywhere you want on any page. or add it to a base page
> once
> and use markup inheritance.
> 
> -Igor
> 
> On 2/21/06, Frank Silbermann <[EMAIL PROTECTED]> wrote:
>>
>> Suppose my page that displays the links is at a deeply nested level, and
>> I want to use <wicket:link> to go to a page closer to the root.  Would
>> it work if I defined a Panel at the top level and put my <wicket:link>
>> in there (to be included by pages that were deeply nested)?
>>
>> If not, what is the easiest way to hardcode a static list of many Wicket
>> links, some of which go up the hierarchy?  If the list is static and no
>> parameters are being passed, it seems like overkill to have to write
>> code for each link.
>>
>> /Frank
>>
>> -----Original Message-----
>> From: [EMAIL PROTECTED]
>> [mailto:[EMAIL PROTECTED] On Behalf Of Juergen
>> Donnerstag
>> Sent: Thursday, February 16, 2006 4:17 PM
>> To: [email protected]
>> Subject: Re: [Wicket-user] <Wicket:link> question
>>
>> wicket:link is realy for convinience only and doesn#t have the full
>> flexibility of Links etc. But they support subpackages like
>> sub/myPage.html. You can not do ../xxx and absolute paths are excluded
>> as well.
>>
>> Juergen
>>
>> On 2/16/06, Frank Silbermann <[EMAIL PROTECTED]> wrote:
>> >
>> >
>> > I've seen that within a <wicket:link> tag we can write ordinary HTML
>> links
>> > and have Wicket lings automatically generated.  The Component
>> Reference
>> > examples use it as follows:
>> >
>> >
>> >
>> >       <wicket:link>
>> >
>> >          <ul>
>> >
>> >              <li>  >
>> href="PanelPage.html">wicket.markup.html.panel.Panel </li>
>> >
>> >              <li>  >
>> href="BorderPage.html">wicket.markup.html.border.Border </li>
>> >
>> >          </ul>
>> >
>> >       </wicket:link>
>> >
>> >
>> >
>> > But in all the examples, the linked pages were in the same package as
>> the
>> > page doing the linking.  Can we use <wicket:link> to link to pages in
>> other
>> > packages of our application?  If so, then how do we indicate the path
>> (so as
>> > to distinguish between page classes with the same name in different
>> > packages)?
>> >
>> >
>> >
>> > Would I use something like Unix relative path notation?
>> >
>> >
>> >
>> > Or is <wicket:link> only useful for linking within a package?
>>
>>
>> -------------------------------------------------------
>> This SF.net email is sponsored by: Splunk Inc. Do you grep through log
>> files
>> for problems?  Stop!  Download the new AJAX search engine that makes
>> searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
>> http://sel.as-us.falkag.net/sel?cmd=k&kid3432&bid#0486&dat1642
>> _______________________________________________
>> Wicket-user mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/wicket-user
>>
>>
>> -------------------------------------------------------
>> This SF.net email is sponsored by: Splunk Inc. Do you grep through log
>> files
>> for problems?  Stop!  Download the new AJAX search engine that makes
>> searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
>> http://sel.as-us.falkag.net/sel?cmdlnk&kid3432&bid#0486&dat1642
>> _______________________________________________
>> Wicket-user mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/wicket-user
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/%3CWicket%3Alink%3E-question-tf1137183.html#a6549996
Sent from the Wicket - User mailing list archive at Nabble.com.


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to