Are you getting the error at compile time or runtime? 1.3.6 and 1.4-rc6 are not necessarily compatible at compile-time. You might have to refactor.
** Martin 2009/7/8 Joshua Martin <[email protected]>: > This page worked in Wicket 1.3.6, but for some reason it's not working > in 1.4RC6 - I'm getting a NoSuchMethodError with the following output: > > java.lang.NoSuchMethodError: > org.liberatio.pages.FileTransferPage.add([Lorg/apache/wicket/Component;)Lorg/apache/wicket/MarkupContainer; > at org.liberatio.pages.FileTransferPage.<init>(FileTransferPage.java:103) > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) > at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > > > > package org.liberatio.pages; > > import org.liberatio.objects.SortableWorkstationProvider; > import org.liberatio.objects.Workstation; > import > org.apache.wicket.extensions.markup.html.repeater.data.table.AbstractColumn; > import > org.apache.wicket.extensions.markup.html.repeater.data.table.DefaultDataTable; > import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn; > import > org.apache.wicket.extensions.markup.html.repeater.data.table.PropertyColumn; > import org.apache.wicket.markup.*; > import org.apache.wicket.markup.repeater.Item; > import org.apache.wicket.model.IModel; > import org.apache.wicket.model.Model; > import org.apache.wicket.ajax.AjaxRequestTarget; > import org.apache.wicket.ajax.markup.html.AjaxFallbackLink; > import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow; > > import java.util.ArrayList; > import java.util.HashMap; > import java.util.List; > > /** > * This class is used for the View All Assets page. A datatable > * is filled with the org.liberatio.objects.SortableWorkstationProvider > * > * An AjaxFallbackLink in an AbstractColumn allows the user to view > * details about a particular item in the table. > */ > public class AssetsPage extends BasePage { > > public AssetsPage () { > > > // ModalWindow functions as a pop up window with the item's > details > final ModalWindow modalWindowDetail; > add(modalWindowDetail = new ModalWindow("modalWindowDetail")); > > // Action for close button callback > modalWindowDetail.setCloseButtonCallback(new > ModalWindow.CloseButtonCallback() > { > public boolean onCloseButtonClicked(AjaxRequestTarget target) > { > return true; > } > }); > > // Action for window close > modalWindowDetail.setWindowClosedCallback(new > ModalWindow.WindowClosedCallback() > { > public void onClose(AjaxRequestTarget target) > { > // Do Nothing > } > }); > > // List for columns > List<IColumn> columns = new ArrayList<IColumn>(); > > // Abstract column for showing a pop up window with details > columns.add(new AbstractColumn(new Model("")) { > > public void populateItem(Item cellItem, String componentId, > IModel rowModel) { > > final Workstation item = > (Workstation)rowModel.getObject(); > > // HashMap for all the item's values - will be sent to > window > final HashMap<String, String> map = new > HashMap<String, String>(); > map.put("AGENTIDENTIFIER", item.getAgentIdentifier()); > map.put("HOSTNAME", item.getHostname()); > map.put("DOMAIN", item.getDomainname()); > map.put("FQDN", item.getFqdn()); > map.put("IP","The IP Address"); > map.put("NETMASK", "The Netmask"); > map.put("GATEWAY", item.getGateway()); > map.put("DNS1", item.getDns1()); > map.put("DNS2", item.getDns2()); > > // AjaxFallbackLink to display some text ("View Details") > and to show the detail window > AjaxFallbackLink link = new AjaxFallbackLink(componentId) { > > �...@override > public void onClick(AjaxRequestTarget > target) { > System.out.println("Viewed > Details for " + item.getAgentIdentifier()); > modalWindowDetail.setTitle("Detail: " + > item.getHostname()); > > modalWindowDetail.setCookieName("modal-window-detail"); > > modalWindowDetail.setContent(new > ModalPanel1(modalWindowDetail.getContentId(), map)); > modalWindowDetail.show(target); > } > > public void onComponentTagBody(MarkupStream > markupStream, > ComponentTag openTag) { > String linkText = "<a href=\"#\">View > Details</a>"; > replaceComponentTagBody(markupStream, > openTag, linkText); > } > }; > > cellItem.add(link); > } > > }); > > // Property columns > columns.add(new PropertyColumn(new Model("Agent Identifier"), > "agentIdentifier", "agentIdentifier")); > columns.add(new PropertyColumn(new Model("Hostname"), > "hostname", > "hostname")); > columns.add(new PropertyColumn(new Model("FQDN"), "fqdn", > "fqdn")); > > // Add the datatable to the page > add(new DefaultDataTable("datatable", columns, new > SortableWorkstationProvider(), 8)); > } > } > > > -- > _________________________________ > > Joshua S. Martin > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
