I am Using Apache Wicket and I have a multiuploadfield
component to upload files. When the files are uploaded they are rendered as a list of files on the webpage. The files are rendered by the filelist
object. I use this filelist item as a link.
This is the HTML code for that:
<strong>hello</strong>
<div class="menu_simple">
<ul id="nav" wicket:id="fileList">
<li width="200"><a href="#"wicket:id="file">(file)</a>
<ul>
<li><a href="";>TREE NODE</a></li>
<li><a href="#">Service2</a></li>
<li><a href="#">Service3</a></li>
</ul>
</li>
</ul>
</div>
<div class="menu_simple">
<ul id="nav" wicket:id="fileList">
<li width="200">
<a href="#"wicket:id="file">(file)</a>
<p>Name of file uploaded. When you hover on this you see three services</p>
<ul>
<li><a href="#">service1</a></li>
<li><a href="#">Service2</a></li>
<li><a href="#">Service3</a></li>
</ul>
</li>
</ul>
</div>
I want each filelist
item to have different url and when click on this it should take me to that page.
For instance: The first filelist
item should be a link to Google, second should be a link to Yahoo, third should be link to Youtube and so on. Is there any way I can do it?
You can control each link in
Wicket
.There are several
Link
types. See here: http://wicket.apache.org/guide/guide/urls.htmlYou will need
ExternalPageLink
.Java code: