wicket 2 « wicket « Java Enterprise Q&A





1. wicket (1.5) - Load different JS for development/deployment    stackoverflow.com

I want to have something like the following.

<head>
   <% if deployment == true %>
   <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
   <% else %>
   <script src="js/lib/ref/jquery-1.6.2.js"></script>
   ...

2. Java web application gets slower if running a day    stackoverflow.com

I am developing a java web application using the apache wicket framework and Eclipselink with PostgreSQL for OR mapping. If i run the application (on localhost or on a remote server) ...

3. Wicket Palette and choices    stackoverflow.com

I have a palette associated to a list of choices, the problem is that after that i select 2 values from this list, the choices list (left side) disappear! Please have ...

4. Simple ImageButton    stackoverflow.com

I want to make a simple ImageButton from an existing HTML markup:

<input type="image" wicket:id="enter" src="images/enter.jpg" />
images dir is in the root of the webapp. Java code is:
add(new ImageButton("enter"));
But image isn't displayed. What's the ...

5. ComponentFeedbackPanel with Firefox 3.6.x    stackoverflow.com

The following code seems to work fine on all of the browsers I have tried, except for Firefox 3.6.x. What happens is that on each key up of invalid email address I ...

6. Wicket countdown timer will not self-update    stackoverflow.com

I would like to implement a countdown timer in Wicket. I have a clock class:

public class Clock extends Label{
    private static int time;
    public Clock(int ...

7. Java Wicket AjaxFallbackLink needing double click after becoming visible    stackoverflow.com

I have two containers, BEFORE and AFTER. When the page loads up, BEFORE is visible and AFTER is not. BEFORE contains an AjaxFallbackLink that redraws BEFORE and AFTER but makes BEFORE invisible ...

8. How to use apache wicket extensions?    stackoverflow.com

I want to use the AjaxFallbackDefaultDataTable in wicket to view my data but these imports are showing error in eclipse :

import org.apache.wicket.extensions.ajax.markup.html.repeater.data.table.AjaxFallbackDefaultDataTable;   import org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator;
import org.apache.wicket.extensions.markup.html.repeater.data.table.AbstractColumn;
import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn;
import org.apache.wicket.extensions.markup.html.repeater.data.table.PropertyColumn;
I guess I ...

9. Wicket: How to post a Feedback Message from within the FeedbackPanel    stackoverflow.com

I have a form with ComponentFeedbackPanels. I have implemented a Filter, that removes the FeedbackMessage shown in the ComponentFeedbackPanels (I have adapted this solution) from the top-of-the-page ...





10. Which version of Wicket runs on J2SE 1.4?    stackoverflow.com

I would like to use Wicket on my new project but my client is still stuck to J2SE 1.4. Which version of Wicket runs on J2SE 1.4?

11. Localization of SignInPage in apache wicket    stackoverflow.com

I know that to localize I need to add a .properties file that has each key and its value so I checked the signinpage.html in org.apache.wicket.authroles.authentication.pages and I found out that ...

12. Wicket is changing the requestURL    stackoverflow.com

I have a wicket application which can be deployed in different environments. One of this environments is a server (lets call it S) behind a https proxy (lets call it P) ...

13. Wicket pageparameter    stackoverflow.com

I am trying to add and fetch with a key as String and value as List in Wicket PageParameters. While am fetching the value with key, I got classcastException:String cant be converted ...

14. Serving dynamic content with Wicket 1.5    stackoverflow.com

I have my Wicket 1.4 code to have a link to download a file which is generated programatically:

protected class MyWebResource extends WebResource {
    public IResourceStream getResourceStream() {
  ...

15. How to use Wicket's DownloadLink with a file generated on the fly?    stackoverflow.com

DownloadLink is nice and handy for creating a button/link for downloading a file, along these lines:

add(new DownloadLink("downloadButton", getReportFile(), "report.pdf"));
and
<input type="button" wicket:id="downloadButton" value="Download" />
However, I would like to trigger the ...

16. How can I right-align a cell in a Wicket table column?    stackoverflow.com

I'd like to have a PropertyColumn of a DataTable right-aligned. But if I try to add a new SimpleAttributeModifier("align", "right") to the cell item, it is added to a span within ...





17. How can I change the content of a combo box based on the content of the previous one?    stackoverflow.com

I have a page containing two combo boxes. I want to make them in a way that when I change the first combo box the content of the second combo box, ...

18. Apache Wicket Repeaters: an overview    stackoverflow.com

Wicket has many implementations of AbstractRepeaters: ListView, DataView, GridView, Loop, PropertyListView, ... . Personally, I find it hard to determine which view would be ideal for which scenario. I usually stick ...

19. WICKET: how to get client's ip/address    stackoverflow.com

I'm using wicket 1.5.1, couldn't figure this out.

public class MyPage extends WebPage {

public MyPage() {

    String clientAddress = ...?

20. How to convert Wicket application into Wicket Portlet application?    stackoverflow.com

I have a complicated Apache Wicket application.I want to convert that application as a Wicket Portlet application. I got some information from https://cwiki.apache.org/WICKET/portal-howto.html. But doesnt so clear . So ...

21. YouTube embedding and wicket fancy box    stackoverflow.com

I'm using visural-wicket's fancy box (http://wicket.visural.net/examples/app/fancybox) to display some YouTube videos on my site. Basicly the HTML looks like this:

<a href="#" class="playButtonClass" id="playButton" wicket:id="iframe"></a>
...(some other divs)
<a href="#" wicket:id="iframe2"><img class="imgClass" src="img.png" /></a>
As you ...

22. Download a zip file through wicket    stackoverflow.com

I am using wicket framework, and I have made a zip file by Java code, I want to have a link to download it, I don't know if it is possible ...

23. Getting a map from PageParameters in Wicket 1.5    stackoverflow.com

I'm trying to migrate an application using OpenId4Java to Wicket 1.5. Using the migration notes I've gotten everything to work. Except one thing: Before Wicket 1.5 PageParameters was a map ...

24. How to display the stack trace in Wicket's InternalErrorPage    stackoverflow.com

I have a custom InternalErrorPage, which I put into ApplicationSettings as follows:

getApplicationSettings().setInternalErrorPage(InternalErrorPage.class);
getExceptionSettings().setUnexpectedExceptionDisplay(
  IExceptionSettings.SHOW_INTERNAL_ERROR_PAGE);
getRequestCycleSettings().setUnexpectedExceptionDisplay(
  IExceptionSettings.SHOW_INTERNAL_ERROR_PAGE);
I want to display stack traces on this page (if I'm in development mode, of course). ...

25. How to remove default value('0') in WicketTextField    stackoverflow.com

Here iam using a wicketText Textfield component to which an Integer type is mapped, Now on load of page iam getting the '0' as default value in that textfield. How to ...

26. Presenting file (pdf / tiff / png) content in wicket 1.5    stackoverflow.com

So I've run in to a problem that I can't seem to solve on my own. I want to present a file in an iFrame. The file can either be pdf, png ...

27. Global registration of field formats in Wicket    stackoverflow.com

I've carefully studied Jonik's entry about customizing BigDecimal formatting in Wicket. Thanks for this excellent piece of code. Unfortunately I can't get it to work for my use case. I want ...

28. How to change grid row color in wicket?    stackoverflow.com


I want to change grid row color when I click a row in Wicket.

Do you have any suggestion?

29. How can I get the responsePage from a RequestCycle in Wicket 1.5?    stackoverflow.com

In Wicket 1.4 I used my own WebRequestCycle to store the page in the session when it was detached - in order to implement a 'back' link.

getRequestCycleListeners().add(new AbstractRequestCycleListener() {
   ...

30. Wicket - can you specify markups IDs for elements inside repeaters?    stackoverflow.com

I'm having a hard time testing our Wicket application using Selenium because of the random markup ids. For individual elements, I can use abc.setOutputMarkupId(true).setMarkupId("myId") to set their markup id explicitly.
But what if the ...

31. WebResponse.getOutputStream() in Wicket 1.5?    stackoverflow.com

This code was working for me in 1.4:

WebResponse response = (org.apache.wicket.request.http.WebResponse) getResponse();
response.setAttachmentHeader("List.xls");
response.setContentType("application/ms-excel");
OutputStream out = response.getOutputStream();
WritableWorkbook workbook = Workbook.createWorkbook(out);
.....
.....
workbook.write();
workbook.close();
I see in 1.5 that there is no WebResponse.getOutputStream() - but it was not ...

32. Where does IModel Apache Wicket retrieve an object?    stackoverflow.com

First of all, please take a look at how IModel is used in this example:

@SuppressWarnings("serial")
public static List<IColumn> getTableColumns(
        final ReportParams reportParams, final boolean columnsSortable
 ...

33. How does Wicket's AjaxFallbackOrderByBorder work?    stackoverflow.com

I'm using Wicket's OrderByBorder for sorting. It's working fine, but it refreshes my page. I want to use AjaxFallbackOrderByBorder instead; how can I do this? Here's my current code:

datacontainer.add(new OrderByBorder("orderByKeywordName", "keywordName",
 ...

34. AjaxLink stopped working in Wicket 1.5    stackoverflow.com

Java:

item.add(new AjaxLink("edit"){
   @Override
   public void onClick(AjaxRequestTarget target) {
      setResponsePage(new UnitPage(unit));
   }
 });
HTML:
<td><button wicket:id="edit">Edit</button></td>
This worked fine in 1.4 - clicking the ...

35. Wicket for the number of copies selection    stackoverflow.com

enter image description here Where I can find a class from Apache Wicket to implement the selection list above? I need the same functionality as in the printer dialog.

36. Writing script src dynamically via wicket    stackoverflow.com

I want my page to load javascript dynamically to my body:

<script type= "text/javascript" src="this path should be decided from wicket dynamically"/>
I am using wicket version 1.4 therefore JavaScriptResourceReference does not exist ...

37. Wicket: DataProvider returns old data    stackoverflow.com

I have a class that has a DataView and a WiQuery Dialog. The DataView renders data with a specific status. Clicking on data inside the DataView a Dialog where the user ...

38. wicket DefaultDataTable    coderanch.com

I created a wicket DefaultDataTable showing my data. Now i need to edit every rows. How can i do this ?? Thank you very much. Here my code : .... ListSortableDataProvider provider = new ListSortableDataProvider(){ public void refresh(List list) { list.clear(); list.addAll(storeService.loadControparti()); } }; List columns = Arrays.asList( new LinkPropertyColumn(new Model("Codice"), null, "tpCode"), new LinkPropertyColumn(new Model("Descrizione"), null, "tpName"), new LinkPropertyColumn(new Model("Codice ...

39. Wicket PackageResource/Java Properties combo testcase: file may not be accessed    coderanch.com

Hello JavaRanchers, actually, I work on a working ranch (no kidding). OK here is a good Rant-and-Raver: I am running a testcase against a simple JDBC oriented class I created in a Java web app. The JDBC class' constructor attempts to use: org.apache.wicket.markup.html.PackageResource to access a Java Properties file. But before actual test completes it bails on the following exception. The ...