Re: Wicket database access

2008-02-21 Thread wjser

I'm frustrated, because i didn't any answer to my question. I searched the
wicket documentation and the web, but found no information.

Nowadays no serios web application can be developed without database access
and a no developer should be forced to use an object-relational mapper.

I wann describe a requirement to be more precisely. 
Howto edit a dataset in a database in a form? The form looks like this:





  
Any examples?



dtoffe wrote:
> 
> Take a look at JPersist (http://www.jpersist.org/). You can do plain
> JDBC and/or POJO oriented data access, and it's more code oriented that
> framework oriented, if this makes sense. I think it's easier to understand
> for people coming from years of desktop database development and when you
> have to access legacy databases with heavy usage of complex stored
> procedures.
> Disclaimer, I don't know nor use Spring or Hibernate, just didn't
> liked them.
> 
> Daniel
> 
> 
> wjser wrote:
>> 
>> Hi all,
>> 
>> i have a simple question.
>> How can i access a database from wicket?
>> I don't want to use any object-relational mapper like hibernate or
>> ibatis.
>> I wanna use plain old sql/jdbc.
>> 
>> thanks in advance.
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Wicket-database-access-tp15613515p15628962.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How to make a Form work both Ajax and no Ajax?

2008-02-21 Thread MYoung

I have the Ajax stuff working in my form.  I want to use the same form
(placed on a WebPage) to handle when JS is off, I override the onSubmit()
for when JS is off.  But this must be wrong because the
AjaxFormSubmitBehavior no longer gets call, only the onSubmit is called.

Form f = new Form("f", new CompoundPropertyModel(this)) {
@Override
public void onSubmit() {
handleRatingChanged(null);   // good when JS if off, 
but how to
make the Ajax stuff work
   // when JS is
back on?
}
};
f.setOutputMarkupId(true);
f.add(new TextField("rating", Integer.class));
add(f);
  
//
// Ajax stuff, after the onSubmit is overridden in the form, this is
no longer work!
//
f.add(new AjaxFormSubmitBehavior("onsubmit") {
@Override
protected void onSubmit(AjaxRequestTarget target) {
handleRatingChanged(target);
}
@Override
protected void onError(AjaxRequestTarget target) {

}
@Override
protected IAjaxCallDecorator getAjaxCallDecorator() {
return new AjaxCallDecorator() {
public CharSequence decorateScript(CharSequence 
script) {
return script + " return false;";   
}
};
}
});



-- 
View this message in context: 
http://www.nabble.com/How-to-make-a-Form-work-both-Ajax-and-no-Ajax--tp15628207p15628207.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Accessing prototype scoped panel beans using @SpringBean annotation

2008-02-21 Thread Tom John

Hi,

First of all let me apologise for the length of this post, I thought I
should include too much info rather than too little.

I'm using wicket-1.3.1, Spring 2.5.1 on JDK1.5 and Jetty6.1.6.  My goal is
to define 1..n Panels in my Spring application context then access them from
within a test page using @SpringBean annotations.

applicationContext.xml contains:





TestPage class is as follows:

public class TestPage extends WebPage {

@SpringBean(name="testPanel1")
private TestPanel testPanel1;

public TestPage() {
add(testPanel1);
}
}

And TestPanel class is as follows:

public class TestPanel extends Panel implements ITestPanel {

private TestForm form;

public TestPanel(String id) {
super(id);

form = new TestForm("testForm");
form.setTestFormField("oranges");
add(form);
}

private class TestForm extends Form {
private String testFormField;

public TestForm(String id) {
super(id);
add(new TextField("testFormField", new PropertyModel(this,
"testFormField")));
}

protected void onSubmit() {
PageParameters params = new PageParameters();
params.add("testFormField", testFormField);
}

public void setTestFormField(String testFormField) {
this.testFormField = testFormField;
}
}
}

So, the problem is that when I hit http://localhost:8080/ the
"add(testPanel1);" line in the constructor for TestPage causes the following
exception to be thrown:

---
WicketMessage: Error attaching this container for rendering: [Page class =
com.fastsearch.admomentum.server.TestPage, id = 0, version = 0]

Root cause:

java.lang.IllegalArgumentException: Protected method: onBeforeRender()V
at net.sf.cglib.proxy.MethodProxy$1.invoke(MethodProxy.java:55)
at
org.apache.wicket.proxy.LazyInitProxyFactory$CGLibInterceptor.intercept(LazyInitProxyFactory.java:318)
at
WICKET_com.fastsearch.admomentum.server.TestPanel$$EnhancerByCGLIB$$504480a9.onBeforeRender()
at org.apache.wicket.Component.internalBeforeRender(Component.java:995)
at org.apache.wicket.Component.beforeRender(Component.java:1027)
at
org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1513)
at org.apache.wicket.Component.onBeforeRender(Component.java:3657)
at org.apache.wicket.Page.onBeforeRender(Page.java:1402)
at org.apache.wicket.Component.internalBeforeRender(Component.java:995)
at org.apache.wicket.Component.beforeRender(Component.java:1027)
at org.apache.wicket.Component.prepareForRender(Component.java:2139)
at org.apache.wicket.Page.renderPage(Page.java:870)
at
org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:231)
at
org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:103)
at
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1172)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1241)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1316)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:354)
at
org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:121)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:367)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
at org.mortbay.jetty.Server.handle(Server.java:295)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:503)
at
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:827)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:511)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:210)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:379)
at
org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:226)
at
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)

Complete stack:

org.apache.wicket.WicketRuntimeException: Error attaching this container for
rendering: [Page class = com.fastsearch.admomentum.server.TestPage, id = 0,
version = 0]
at
org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1525)
at org.apache.wicket.Component.onBeforeRender(Component.java:3657)
at org.apache.wicket.Page.onBeforeRender(Page.java:1402)
at org.apache.wicket.Component.internalBeforeRender(Component.java:995)
at org.apache.wicket.Component.beforeRender(Component.java:1027)
at org.apac

Re: Wicket database access

2008-02-21 Thread dtoffe

Take a look at JPersist (http://www.jpersist.org/). You can do plain JDBC
and/or POJO oriented data access, and it's more code oriented that framework
oriented, if this makes sense. I think it's easier to understand for people
coming from years of desktop database development and when you have to
access legacy databases with heavy usage of complex stored procedures.
Disclaimer, I don't know nor use Spring or Hibernate, just didn't liked
them.

Daniel


wjser wrote:
> 
> Hi all,
> 
> i have a simple question.
> How can i access a database from wicket?
> I don't want to use any object-relational mapper like hibernate or ibatis.
> I wanna use plain old sql/jdbc.
> 
> thanks in advance.
> 

-- 
View this message in context: 
http://www.nabble.com/Wicket-database-access-tp15613515p15627491.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat Problem

2008-02-21 Thread Soniya

yes I am running it development mode.
-- 
View this message in context: 
http://www.nabble.com/Tomcat-Problem-tp15607207p15627355.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: fileUploadField uploads even when it shouldn't

2008-02-21 Thread Igor Vaynberg
its happening because you are using input type="submit" for the cancel
button, which of course submits the form. you should instead use a
link for cancel buttons.  you can attach a link to a input
type="button" if you want cancel to still be a button btw...

-igor

On Thu, Feb 21, 2008 at 5:56 PM, Dan Kaplan <[EMAIL PROTECTED]> wrote:
> Hello,
>
>
>
>  I've made an upload form and wanted to add a cancel button to it.  The
>  cancel button is clicked if the user decides he doesn't want to upload
>  (before he uploads) and should redirect back to another page.  This works
>  pretty well except I noticed that if the user chooses a file then clicks the
>  cancel button, the file starts uploading anyway!  Here's the code that does
>  this.  I can't see why it's happening:
>
>
>
>
>
>  import org.apache.wicket.authorization.strategies.role.Roles;
>
>  import
>  org.apache.wicket.authorization.strategies.role.annotations.AuthorizeInstant
>  iation;
>
>  import
>  org.apache.wicket.extensions.ajax.markup.html.form.upload.UploadProgressBar;
>
>  import org.apache.wicket.extensions.wizard.CancelButton;
>
>  import org.apache.wicket.markup.html.WebPage;
>
>  import org.apache.wicket.markup.html.form.Form;
>
>  import org.apache.wicket.markup.html.form.TextField;
>
>  import org.apache.wicket.markup.html.form.Button;
>
>  import org.apache.wicket.markup.html.form.upload.FileUpload;
>
>  import org.apache.wicket.markup.html.form.upload.FileUploadField;
>
>  import org.apache.wicket.markup.html.panel.FeedbackPanel;
>
>  import org.apache.wicket.model.PropertyModel;
>
>  import org.apache.wicket.util.file.Files;
>
>  import org.apache.wicket.util.file.Folder;
>
>
>
>  import java.io.File;
>
>
>
>  @AuthorizeInstantiation(Roles.USER)
>
>  public class CreateAReport extends WebPage {
>
>
>
> private String reportName;
>
>
>
> public CreateAReport() {
>
> final FileUploadForm form = new FileUploadForm("form");
>
> final UploadProgressBar progressBar = new
>  UploadProgressBar("progress", form);
>
>
>
> form.add(progressBar);
>
> form.add(new TextField("name", new PropertyModel(this,
>  "reportName")).setRequired(true));
>
>
>
> Button submit = new Button("submitbutton") {
>
> public void onSubmit() {
>
> form.upload();
>
> setResponsePage(CustomReport.class);
>
> }
>
> };
>
> form.add(submit);
>
>
>
> Button cancel = new Button("cancelbutton") {
>
> public void onSubmit() {
>
> setResponsePage(ReportList.class);
>
> }
>
> };
>
> cancel.setDefaultFormProcessing(false);
>
> form.add(cancel);
>
>
>
> add(form);
>
>
>
> add(new FeedbackPanel("feedback"));
>
> }
>
>
>
> public String getReportName() {
>
> return reportName;
>
> }
>
>
>
> public void setReportName(String reportName) {
>
> this.reportName = reportName;
>
> }
>
>
>
> private class FileUploadForm extends Form {
>
> protected FileUploadField fileUploadField;
>
> protected File newFile;
>
>
>
> /**
>
>  * Construct.
>
>  *
>
>  * @param name Component name
>
>  */
>
> public FileUploadForm(String name) {
>
> super(name);
>
>
>
> // set this form to multipart mode (allways needed for uploads!)
>
> setMultiPart(true);
>
>
>
> // Add one file input field
>
> add(fileUploadField = new FileUploadField("fileInput"));
>
> fileUploadField.setRequired(true);
>
>
>
> // Set maximum size to 100K for demo purposes
>
>  //setMaxSize(Bytes.kilobytes(100));
>
> }
>
>
>
> public void upload() {
>
> final FileUpload upload = fileUploadField.getFileUpload();
>
> if (upload != null) {
>
> // Create a new file
>
> newFile = new File(getUploadFolder(),
>  upload.getClientFileName());
>
>
>
> // Check new file, delete if it allready existed
>
> checkFileExists(newFile);
>
> try {
>
> // Save to new file
>
> newFile.createNewFile();
>
> upload.writeTo(newFile);
>
> } catch (Exception e) {
>
> throw new IllegalStateException("Unable to write file: "
>  + newFile.getAbsolutePath());
>
> }
>
> }
>
> }
>
>
>
> public File getFile() {
>
> return newFile;
>
> }
>
> }
>
>
>
> private void checkFileExists(File newFile) {
>
> if (newFile.exists()) {
>
> // Try to delete the file
>
> if (!Files.remove(newFile)) {
>
> throw new IllegalStateException("Unable to overwrite " +
>  newFile.getAbsolutePath());
>
> }
>
> }
>
> }
>
>
>
> private Folder

fileUploadField uploads even when it shouldn't

2008-02-21 Thread Dan Kaplan
Hello,

 

I've made an upload form and wanted to add a cancel button to it.  The
cancel button is clicked if the user decides he doesn't want to upload
(before he uploads) and should redirect back to another page.  This works
pretty well except I noticed that if the user chooses a file then clicks the
cancel button, the file starts uploading anyway!  Here's the code that does
this.  I can't see why it's happening:

 

 

import org.apache.wicket.authorization.strategies.role.Roles;

import
org.apache.wicket.authorization.strategies.role.annotations.AuthorizeInstant
iation;

import
org.apache.wicket.extensions.ajax.markup.html.form.upload.UploadProgressBar;

import org.apache.wicket.extensions.wizard.CancelButton;

import org.apache.wicket.markup.html.WebPage;

import org.apache.wicket.markup.html.form.Form;

import org.apache.wicket.markup.html.form.TextField;

import org.apache.wicket.markup.html.form.Button;

import org.apache.wicket.markup.html.form.upload.FileUpload;

import org.apache.wicket.markup.html.form.upload.FileUploadField;

import org.apache.wicket.markup.html.panel.FeedbackPanel;

import org.apache.wicket.model.PropertyModel;

import org.apache.wicket.util.file.Files;

import org.apache.wicket.util.file.Folder;

 

import java.io.File;

 

@AuthorizeInstantiation(Roles.USER)

public class CreateAReport extends WebPage {

 

private String reportName;

 

public CreateAReport() {

final FileUploadForm form = new FileUploadForm("form");

final UploadProgressBar progressBar = new
UploadProgressBar("progress", form);

 

form.add(progressBar);

form.add(new TextField("name", new PropertyModel(this,
"reportName")).setRequired(true));

 

Button submit = new Button("submitbutton") {

public void onSubmit() {

form.upload();

setResponsePage(CustomReport.class);

}

};

form.add(submit);

 

Button cancel = new Button("cancelbutton") {

public void onSubmit() {

setResponsePage(ReportList.class);

}

};

cancel.setDefaultFormProcessing(false);

form.add(cancel);



add(form);

 

add(new FeedbackPanel("feedback"));

}

 

public String getReportName() {

return reportName;

}

 

public void setReportName(String reportName) {

this.reportName = reportName;

}

 

private class FileUploadForm extends Form {

protected FileUploadField fileUploadField;

protected File newFile;

 

/**

 * Construct.

 *

 * @param name Component name

 */

public FileUploadForm(String name) {

super(name);

 

// set this form to multipart mode (allways needed for uploads!)

setMultiPart(true);

 

// Add one file input field

add(fileUploadField = new FileUploadField("fileInput"));

fileUploadField.setRequired(true);

 

// Set maximum size to 100K for demo purposes

//setMaxSize(Bytes.kilobytes(100));

}

 

public void upload() {

final FileUpload upload = fileUploadField.getFileUpload();

if (upload != null) {

// Create a new file

newFile = new File(getUploadFolder(),
upload.getClientFileName());

 

// Check new file, delete if it allready existed

checkFileExists(newFile);

try {

// Save to new file

newFile.createNewFile();

upload.writeTo(newFile);

} catch (Exception e) {

throw new IllegalStateException("Unable to write file: "
+ newFile.getAbsolutePath());

}

}

}

 

public File getFile() {

return newFile;

}

}

 

private void checkFileExists(File newFile) {

if (newFile.exists()) {

// Try to delete the file

if (!Files.remove(newFile)) {

throw new IllegalStateException("Unable to overwrite " +
newFile.getAbsolutePath());

}

}

}

 

private Folder getUploadFolder() {

Folder uploadFolder = new
Folder(System.getProperty("java.io.tmpdir"), "wicket-uploads");

// Ensure folder exists

uploadFolder.mkdirs();

return uploadFolder;

}

 

}



Re: InstanceAlreadyExistsException when Redeploying in Websphere

2008-02-21 Thread Igor Vaynberg
thats pretty weird, please open a jira issue for it

-igor

On Thu, Feb 21, 2008 at 3:28 PM, nmarchalleck <[EMAIL PROTECTED]> wrote:
>
>  Workaround...
>
>  If I remove wicket-jmx-1.3.1.jar from the classpath I no longer get the
>  exception and the app works normally.
>
>
>
>
>  nmarchalleck wrote:
>  >
>  > Some additional info:
>  >
>  > During redeploy when the web app is being shutdown, I'm seeing this
>  > exception in the Websphere FFDC log...
>  >
>  > Exception = com.ibm.websphere.management.exception.AdminException
>  > Source = com.ibm.ws.management.PlatformMBeanServer.unregisterMbean
>  > probeid = 562
>  > Stack Dump = com.ibm.websphere.management.exception.AdminException:
>  > javax.management.InstanceNotFoundException:
>  > org.apache.wicket.app.HelloWorldApplication:type=Application
>  >   at
>  > 
> com.ibm.ws.management.MBeanFactoryImpl.deactivateMBean(MBeanFactoryImpl.java:1040)
>  >   at
>  > 
> com.ibm.ws.management.PlatformMBeanServer.unregisterMBean(PlatformMBeanServer.java:560)
>  >   at org.apache.wicket.jmx.Initializer.destroy(Initializer.java:75)
>  >   at org.apache.wicket.Application.callDestroyers(Application.java:773)
>  >   at 
> org.apache.wicket.Application.internalDestroy(Application.java:890)
>  >   at
>  > 
> org.apache.wicket.protocol.http.WebApplication.internalDestroy(WebApplication.java:447)
>  >   at
>  > org.apache.wicket.protocol.http.WicketFilter.destroy(WicketFilter.java:143)
>  >   at
>  > 
> org.apache.wicket.protocol.http.WicketServlet.destroy(WicketServlet.java:201)
>  >   at
>  > 
> com.ibm.ws.webcontainer.servlet.ServletWrapper.doDestroy(ServletWrapper.java:778)
>  >   at
>  > 
> com.ibm.ws.wswebcontainer.servlet.ServletWrapper.doDestroy(ServletWrapper.java:676)
>  >   at
>  > 
> com.ibm.ws.webcontainer.servlet.ServletWrapper.destroy(ServletWrapper.java:857)
>  >   at com.ibm.ws.webcontainer.webapp.WebApp.destroy(WebApp.java:2507)
>  >   at com.ibm.ws.wswebcontainer.webapp.WebApp.destroy(WebApp.java:1023)
>  >   at
>  > 
> com.ibm.ws.webcontainer.webapp.WebGroup.removeWebApplication(WebGroup.java:208)
>  >   at
>  > 
> com.ibm.ws.webcontainer.VirtualHost.removeWebApplication(VirtualHost.java:267)
>  >   at
>  > 
> com.ibm.ws.wswebcontainer.VirtualHost.removeWebApplication(VirtualHost.java:181)
>  >   at
>  > 
> com.ibm.ws.wswebcontainer.WebContainer.removeWebApplication(WebContainer.java:725)
>  >   at
>  > 
> com.ibm.ws.webcontainer.component.WebContainerImpl.uninstall(WebContainerImpl.java:357)
>  >   at
>  > 
> com.ibm.ws.webcontainer.component.WebContainerImpl.stop(WebContainerImpl.java:560)
>  >   at
>  > 
> com.ibm.ws.runtime.component.ApplicationMgrImpl.stop(ApplicationMgrImpl.java:1318)
>  >   at
>  > 
> com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStop(DeployedApplicationImpl.java:1134)
>  >   at
>  > 
> com.ibm.ws.runtime.component.DeployedModuleImpl.stop(DeployedModuleImpl.java:600)
>  >   at
>  > 
> com.ibm.ws.runtime.component.ApplicationMgrImpl._stopModule(ApplicationMgrImpl.java:1847)
>  >   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>  >   at
>  > 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
>  >   at
>  > 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>  >   at java.lang.reflect.Method.invoke(Method.java:615)
>  >   at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:62)
>  >   at sun.reflect.GeneratedMethodAccessor26.invoke(Unknown Source)
>  >   at
>  > 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>  >   at java.lang.reflect.Method.invoke(Method.java:615)
>  >   at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:265)
>  >   at
>  > 
> javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1089)
>  >   at
>  > 
> javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:971)
>  >   at
>  > 
> com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:231)
>  >   at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:238)
>  >   at
>  > 
> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:833)
>  >   at 
> com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:802)
>  >   at
>  > com.ibm.ws.management.AdminServiceImpl$1.run(AdminServiceImpl.java:1057)
>  >   at
>  > 
> com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
>  >   at
>  > com.ibm.ws.management.AdminServiceImpl.invoke(AdminServiceImpl.java:950)
>  >   at
>  > 
> com.ibm.ws.management.application.sync.StopDeploymentTask.stopDeployment(StopDeploymentTask.java:182)
>  >   at
>  > 
> com.ibm.ws.management.application.sync.StopDeploymentTask.fineGrainUpdate(StopDeploymentTask.java:10

Re: InstanceAlreadyExistsException when Redeploying in Websphere

2008-02-21 Thread nmarchalleck

Workaround...

If I remove wicket-jmx-1.3.1.jar from the classpath I no longer get the
exception and the app works normally.


nmarchalleck wrote:
> 
> Some additional info:
> 
> During redeploy when the web app is being shutdown, I'm seeing this
> exception in the Websphere FFDC log...
> 
> Exception = com.ibm.websphere.management.exception.AdminException
> Source = com.ibm.ws.management.PlatformMBeanServer.unregisterMbean
> probeid = 562
> Stack Dump = com.ibm.websphere.management.exception.AdminException:
> javax.management.InstanceNotFoundException:
> org.apache.wicket.app.HelloWorldApplication:type=Application
>   at
> com.ibm.ws.management.MBeanFactoryImpl.deactivateMBean(MBeanFactoryImpl.java:1040)
>   at
> com.ibm.ws.management.PlatformMBeanServer.unregisterMBean(PlatformMBeanServer.java:560)
>   at org.apache.wicket.jmx.Initializer.destroy(Initializer.java:75)
>   at org.apache.wicket.Application.callDestroyers(Application.java:773)
>   at org.apache.wicket.Application.internalDestroy(Application.java:890)
>   at
> org.apache.wicket.protocol.http.WebApplication.internalDestroy(WebApplication.java:447)
>   at
> org.apache.wicket.protocol.http.WicketFilter.destroy(WicketFilter.java:143)
>   at
> org.apache.wicket.protocol.http.WicketServlet.destroy(WicketServlet.java:201)
>   at
> com.ibm.ws.webcontainer.servlet.ServletWrapper.doDestroy(ServletWrapper.java:778)
>   at
> com.ibm.ws.wswebcontainer.servlet.ServletWrapper.doDestroy(ServletWrapper.java:676)
>   at
> com.ibm.ws.webcontainer.servlet.ServletWrapper.destroy(ServletWrapper.java:857)
>   at com.ibm.ws.webcontainer.webapp.WebApp.destroy(WebApp.java:2507)
>   at com.ibm.ws.wswebcontainer.webapp.WebApp.destroy(WebApp.java:1023)
>   at
> com.ibm.ws.webcontainer.webapp.WebGroup.removeWebApplication(WebGroup.java:208)
>   at
> com.ibm.ws.webcontainer.VirtualHost.removeWebApplication(VirtualHost.java:267)
>   at
> com.ibm.ws.wswebcontainer.VirtualHost.removeWebApplication(VirtualHost.java:181)
>   at
> com.ibm.ws.wswebcontainer.WebContainer.removeWebApplication(WebContainer.java:725)
>   at
> com.ibm.ws.webcontainer.component.WebContainerImpl.uninstall(WebContainerImpl.java:357)
>   at
> com.ibm.ws.webcontainer.component.WebContainerImpl.stop(WebContainerImpl.java:560)
>   at
> com.ibm.ws.runtime.component.ApplicationMgrImpl.stop(ApplicationMgrImpl.java:1318)
>   at
> com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStop(DeployedApplicationImpl.java:1134)
>   at
> com.ibm.ws.runtime.component.DeployedModuleImpl.stop(DeployedModuleImpl.java:600)
>   at
> com.ibm.ws.runtime.component.ApplicationMgrImpl._stopModule(ApplicationMgrImpl.java:1847)
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
>   at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at java.lang.reflect.Method.invoke(Method.java:615)
>   at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:62)
>   at sun.reflect.GeneratedMethodAccessor26.invoke(Unknown Source)
>   at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at java.lang.reflect.Method.invoke(Method.java:615)
>   at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:265)
>   at
> javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1089)
>   at
> javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:971)
>   at
> com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:231)
>   at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:238)
>   at
> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:833)
>   at 
> com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:802)
>   at
> com.ibm.ws.management.AdminServiceImpl$1.run(AdminServiceImpl.java:1057)
>   at
> com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
>   at
> com.ibm.ws.management.AdminServiceImpl.invoke(AdminServiceImpl.java:950)
>   at
> com.ibm.ws.management.application.sync.StopDeploymentTask.stopDeployment(StopDeploymentTask.java:182)
>   at
> com.ibm.ws.management.application.sync.StopDeploymentTask.fineGrainUpdate(StopDeploymentTask.java:109)
>   at
> com.ibm.ws.management.application.sync.StopDeploymentTask.performTask(StopDeploymentTask.java:69)
>   at
> com.ibm.ws.management.application.sync.AppBinaryProcessor$AppBinThread.run(AppBinaryProcessor.java:820)
>   at
> com.ibm.ws.management.application.sync.AppBinaryProcessor.postProcess(AppBinaryProcessor.java:590)
>   at
> com.ibm.ws.management.application.sync.AppBinaryProcessor._onChangeCompletion(AppBinaryProcessor.java:400)
>   at
> com.ibm.ws.ma

Re: Where to find the Wicket DTD file?

2008-02-21 Thread MYoung


...place the following in your HTML template...
> 
> http://wicket.sourceforge.net/";
> xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">
> 
That doesn't seem to make it stop the warnings.  Seems Amsteras actually
validates and it wants to have the DTD. Is there a Wicket DTD File
somewhere?  Here is its Eclipse Preference to the real DTDs:

http://www.nabble.com/file/p15620940/amsteras.png 



robert.mcguinness wrote:
> 
> 
> MYoung wrote:
>> 
>> Is it available somewhere?  I need it for validation in the Eclipse
>> Amsteras HTML editor and to get rid of all its warning about wicket tags
>> in html file.
>> 
> 
> ...place the following in your HTML template...
> 
> http://wicket.sourceforge.net/";
> xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">
> 
> ...this should remove the warnings in Eclipse.  
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Where-to-find-the-Wicket-DTD-file--tp15618525p15620940.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: InstanceAlreadyExistsException when Redeploying in Websphere

2008-02-21 Thread nmarchallleck

Some additional info:

During redeploy when the web app is being shutdown, I'm seeing this
exception in the Websphere FFDC log...

Exception = com.ibm.websphere.management.exception.AdminException
Source = com.ibm.ws.management.PlatformMBeanServer.unregisterMbean
probeid = 562
Stack Dump = com.ibm.websphere.management.exception.AdminException:
javax.management.InstanceNotFoundException:
org.apache.wicket.app.HelloWorldApplication:type=Application
at
com.ibm.ws.management.MBeanFactoryImpl.deactivateMBean(MBeanFactoryImpl.java:1040)
at
com.ibm.ws.management.PlatformMBeanServer.unregisterMBean(PlatformMBeanServer.java:560)
at org.apache.wicket.jmx.Initializer.destroy(Initializer.java:75)
at org.apache.wicket.Application.callDestroyers(Application.java:773)
at org.apache.wicket.Application.internalDestroy(Application.java:890)
at
org.apache.wicket.protocol.http.WebApplication.internalDestroy(WebApplication.java:447)
at
org.apache.wicket.protocol.http.WicketFilter.destroy(WicketFilter.java:143)
at
org.apache.wicket.protocol.http.WicketServlet.destroy(WicketServlet.java:201)
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.doDestroy(ServletWrapper.java:778)
at
com.ibm.ws.wswebcontainer.servlet.ServletWrapper.doDestroy(ServletWrapper.java:676)
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.destroy(ServletWrapper.java:857)
at com.ibm.ws.webcontainer.webapp.WebApp.destroy(WebApp.java:2507)
at com.ibm.ws.wswebcontainer.webapp.WebApp.destroy(WebApp.java:1023)
at
com.ibm.ws.webcontainer.webapp.WebGroup.removeWebApplication(WebGroup.java:208)
at
com.ibm.ws.webcontainer.VirtualHost.removeWebApplication(VirtualHost.java:267)
at
com.ibm.ws.wswebcontainer.VirtualHost.removeWebApplication(VirtualHost.java:181)
at
com.ibm.ws.wswebcontainer.WebContainer.removeWebApplication(WebContainer.java:725)
at
com.ibm.ws.webcontainer.component.WebContainerImpl.uninstall(WebContainerImpl.java:357)
at
com.ibm.ws.webcontainer.component.WebContainerImpl.stop(WebContainerImpl.java:560)
at
com.ibm.ws.runtime.component.ApplicationMgrImpl.stop(ApplicationMgrImpl.java:1318)
at
com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStop(DeployedApplicationImpl.java:1134)
at
com.ibm.ws.runtime.component.DeployedModuleImpl.stop(DeployedModuleImpl.java:600)
at
com.ibm.ws.runtime.component.ApplicationMgrImpl._stopModule(ApplicationMgrImpl.java:1847)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:615)
at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:62)
at sun.reflect.GeneratedMethodAccessor26.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:615)
at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:265)
at
javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1089)
at
javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:971)
at
com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:231)
at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:238)
at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:833)
at 
com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:802)
at 
com.ibm.ws.management.AdminServiceImpl$1.run(AdminServiceImpl.java:1057)
at
com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
at 
com.ibm.ws.management.AdminServiceImpl.invoke(AdminServiceImpl.java:950)
at
com.ibm.ws.management.application.sync.StopDeploymentTask.stopDeployment(StopDeploymentTask.java:182)
at
com.ibm.ws.management.application.sync.StopDeploymentTask.fineGrainUpdate(StopDeploymentTask.java:109)
at
com.ibm.ws.management.application.sync.StopDeploymentTask.performTask(StopDeploymentTask.java:69)
at
com.ibm.ws.management.application.sync.AppBinaryProcessor$AppBinThread.run(AppBinaryProcessor.java:820)
at
com.ibm.ws.management.application.sync.AppBinaryProcessor.postProcess(AppBinaryProcessor.java:590)
at
com.ibm.ws.management.application.sync.AppBinaryProcessor._onChangeCompletion(AppBinaryProcessor.java:400)
at
com.ibm.ws.management.application.sync.AppBinaryProcessor$2.run(AppBinaryProcessor.java:372)
at
com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
at
com.ibm.ws.management.application.sync.AppBinaryProcessor.

Re: Where to find the Wicket DTD file?

2008-02-21 Thread Nino Saturnino Martinez Vazquez Wael
I think it should be wicket.apache.org instead, does not seem to matter 
in myEclipse, WTP etc...


http://www.w3.org/1999/xhtml"; 
xmlns:wicket="http://wicket.apache.org/"; xml:lang="da" lang="da">



But for the jira on this look here:

https://issues.apache.org/jira/browse/WICKET-693?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel 



robert.mcguinness wrote:

MYoung wrote:
  

Is it available somewhere?  I need it for validation in the Eclipse
Amsteras HTML editor and to get rid of all its warning about wicket tags
in html file.




...place the following in your HTML template...

http://wicket.sourceforge.net/";
xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">

...this should remove the warnings in Eclipse.  

  


--
Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Where to find the Wicket DTD file?

2008-02-21 Thread robert.mcguinness


MYoung wrote:
> 
> Is it available somewhere?  I need it for validation in the Eclipse
> Amsteras HTML editor and to get rid of all its warning about wicket tags
> in html file.
> 

...place the following in your HTML template...

http://wicket.sourceforge.net/";
xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">

...this should remove the warnings in Eclipse.  

-- 
View this message in context: 
http://www.nabble.com/Where-to-find-the-Wicket-DTD-file--tp15618525p15619562.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wicket for beginners?

2008-02-21 Thread MYoung

try this:
http://www.theserverside.com/tt/articles/article.tss?l=IntroducingApacheWicket

It explains the basic very well.


tdope21 wrote:
> 
> 
> I am a fairly new developer and I'm going to be using Wicket on and
> upcoming project. Are there any materials for beginners out there covering
> Wicket? 
> 
> 
> Tony
> 

-- 
View this message in context: 
http://www.nabble.com/Wicket-for-beginners--tp15618724p15619063.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: What's the difference...

2008-02-21 Thread Martijn Lindhout
ok, thanx

2008/2/21, Igor Vaynberg <[EMAIL PROTECTED]>:
>
> SpringWebApplication only helps if you are on jdk1.4 or cannot use
> @SpringBean annotation.
>
> -igor
>
>
>
> On Thu, Feb 21, 2008 at 1:17 PM, Martijn Lindhout
> <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> >  I read about Wicket-spring integration at
> >  http://cwiki.apache.org/WICKET/spring.html and now I wonder what's the
> >  difference between
> >
> >
> >- extending SpringWebApplication combined with doing
> >addComponentInstantiationListener(new SpringComponentInjector(this))
> >in init(), and
> >- just doing
> addComponentInstantiationListener(newSpringComponentInjector(
> >this)) in init()
> >
> >  In both cases I injected the dependencies with @SpringBean. The JavaDoc
> of
> >  the former states that the SpringWebApplication contains helper methods
> to
> >  create lazyinitproxies, will the lattern do that also?
> >
> >  thanx.
> >
> >  --
> >  Martijn Lindhout
> >  JointEffort IT Services
> >  http://www.jointeffort.nl
> >  [EMAIL PROTECTED]
> >  +31 (0)6 18 47 25 29
> >
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Martijn Lindhout
JointEffort IT Services
http://www.jointeffort.nl
[EMAIL PROTECTED]
+31 (0)6 18 47 25 29


Re: What's the difference...

2008-02-21 Thread Igor Vaynberg
SpringWebApplication only helps if you are on jdk1.4 or cannot use
@SpringBean annotation.

-igor


On Thu, Feb 21, 2008 at 1:17 PM, Martijn Lindhout
<[EMAIL PROTECTED]> wrote:
> Hi,
>
>  I read about Wicket-spring integration at
>  http://cwiki.apache.org/WICKET/spring.html and now I wonder what's the
>  difference between
>
>
>- extending SpringWebApplication combined with doing
>addComponentInstantiationListener(new SpringComponentInjector(this))
>in init(), and
>- just doing addComponentInstantiationListener(newSpringComponentInjector(
>this)) in init()
>
>  In both cases I injected the dependencies with @SpringBean. The JavaDoc of
>  the former states that the SpringWebApplication contains helper methods to
>  create lazyinitproxies, will the lattern do that also?
>
>  thanx.
>
>  --
>  Martijn Lindhout
>  JointEffort IT Services
>  http://www.jointeffort.nl
>  [EMAIL PROTECTED]
>  +31 (0)6 18 47 25 29
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



What's the difference...

2008-02-21 Thread Martijn Lindhout
Hi,

I read about Wicket-spring integration at
http://cwiki.apache.org/WICKET/spring.html and now I wonder what's the
difference between


   - extending SpringWebApplication combined with doing
   addComponentInstantiationListener(new SpringComponentInjector(this))
   in init(), and
   - just doing addComponentInstantiationListener(newSpringComponentInjector(
   this)) in init()

In both cases I injected the dependencies with @SpringBean. The JavaDoc of
the former states that the SpringWebApplication contains helper methods to
create lazyinitproxies, will the lattern do that also?

thanx.

-- 
Martijn Lindhout
JointEffort IT Services
http://www.jointeffort.nl
[EMAIL PROTECTED]
+31 (0)6 18 47 25 29


Re: Wicket for beginners?

2008-02-21 Thread tdope21

Thanks for the info!

Tony



robert.mcguinness wrote:
> 
> 
> tdope21 wrote:
>> 
>> 
>> I am a fairly new developer and I'm going to be using Wicket on and
>> upcoming project. Are there any materials for beginners out there
>> covering Wicket? 
>> 
>> 
>> Tony
>> 
> 
>  http://www.manning.com/dashorst/ Wicket in Action  - Excellent Book. 
> Also, download the examples of the Apache site and you can get will get a
> good feel for the framework.
> 

-- 
View this message in context: 
http://www.nabble.com/Wicket-for-beginners--tp15618724p15618953.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wicket for beginners?

2008-02-21 Thread robert.mcguinness


tdope21 wrote:
> 
> 
> I am a fairly new developer and I'm going to be using Wicket on and
> upcoming project. Are there any materials for beginners out there covering
> Wicket? 
> 
> 
> Tony
> 

http://www.manning.com/dashorst/ Wicket in Action  - Excellent Book.  Also,
download the examples of the Apache site and you can get will get a good
feel for the framework.
-- 
View this message in context: 
http://www.nabble.com/Wicket-for-beginners--tp15618724p15618951.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Redirect to HTTPS?

2008-02-21 Thread Claudio Miranda


Resurrecting this thread from the dead :D

disclaimer: I am very new to wicket and its philosophy, so I am making
some points related to secure pages.
I read about securing pages though ssl and made a comment there

http://cwiki.apache.org/confluence/display/WICKET/How+to+switch+to+SSL+mode

But I saw it too much unneeded coding, as servlet spec allows us to
declare at web.xml the URLs to secure.

At my application I can configure secure mount points, like "/admin"

mountBookmarkablePage("/cad", Inicial.class);
mountBookmarkablePage("/res", Resultado.class);
mountBookmarkablePage("/admin/results", AdminResults.class);
mountBookmarkablePage("/admin/users", AdminUsers.class);

And declare the "/admin" as to be secured through SSL


ssl-test

resultado

/admin/*
GET
POST
HEAD
PUT
OPTIONS
TRACE
DELETE


ssl mode
CONFIDENTIAL



I think its easier than doing all the code displayed before. And dismiss the
application developer to know about server infrastructure (port and
hostname)



Eelco Hillenius wrote:
> 
>> All the other encode methods get the proper wicket URL but doesn't
>> prepend
>> the webapp URI which this final encode method does.  Beyond filing a RFE
>> to
>> either make this method non-final or provide a postEncode(RequestCycle,
>> IRequestTarget) method before URL encoding, we will have to copy the
>> entire
>> class and provide this behavior.
>>
>> Thoughts?
> 
> I stand by my suggestion that you could just try to redirect to a
> secure page. After that, the relative URLs stay secure no?
> 
> If I'm missing something, please tell.
> 

-
Claudio Miranda
http://weblogs.java.net/blog/claudio
http://www.claudius.com.br/blog
-- 
View this message in context: 
http://www.nabble.com/Redirect-to-HTTPS--tp12861028p15618826.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wicket for beginners?

2008-02-21 Thread Scott Swank
1. http://www.manning.com/dashorst/
2. http://cwiki.apache.org/WICKET/newuserguide.html
3. http://cwiki.apache.org/WICKET/documentation-index.html --
particularly the tutorials
4. http://cwiki.apache.org/WICKET/reference-library.html --
particularly "Working with Wicket models"

And along the way, some very good small examples:
http://wicketstuff.org/wicket13/



On Thu, Feb 21, 2008 at 11:59 AM, tdope21 <[EMAIL PROTECTED]> wrote:
>
>
>  I am a fairly new developer and I'm going to be using Wicket on and upcoming
>  project. Are there any materials for beginners out there covering Wicket?
>
>
>  Tony
>  --
>  View this message in context: 
> http://www.nabble.com/Wicket-for-beginners--tp15618724p15618724.html
>  Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
Scott Swank
reformed mathematician

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Wicket for beginners?

2008-02-21 Thread tdope21


I am a fairly new developer and I'm going to be using Wicket on and upcoming
project. Are there any materials for beginners out there covering Wicket? 


Tony
-- 
View this message in context: 
http://www.nabble.com/Wicket-for-beginners--tp15618724p15618724.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Combining Ajax and non Ajax pages

2008-02-21 Thread Michael O'Cleirigh

Hello,

This error happens because the intermediary panel between the form and 
the drop down choice does not have a model.


Changing the PanelSearch constructor to call super (id, new Model()) 
should fix the problem.


You might also want your form panel to extend FormComponentPanel instead 
to get better validation support.


Mike

Or you did not set the model on the dropdown.

Maurice

On Thu, Feb 21, 2008 at 8:44 PM, Maurice Marrink <[EMAIL PROTECTED]> wrote:
  

Looks like at least one of the models in the session is not properly
 initialized.
 You have to do something like
 private IModel model=new WhateverModel(null);
 in your session.

 Maurice



 On Thu, Feb 21, 2008 at 8:41 PM, steviezz <[EMAIL PROTECTED]> wrote:
 >
 >  Now getting
 >
 >  RequestCycle.logRuntimeException(1399) | Attempt to set model object on null
 >  model of component: panelSearch:form:parentAreas
 >  java.lang.IllegalStateException: Attempt to set model object on null model
 >  of component: panelSearch:form:parentAreas
 > at org.apache.wicket.Component.setModelObject(Component.java:2850)
 >
 >
 >
 >
 >
 >
 >  Mr Mean wrote:
 >  >
 >  > Don't add wicket components to the session, use models.
 >  > for example
 >  > class MySession extends WebSession
 >  > {
 >  >  private IModel dropdown1=new WhateverModel(null); //etc for the others
 >  >  // add getters() for models
 >  > }
 >  >
 >  > class PanelSearch extends Panel
 >  > {
 >  >  public PanelSearch(String id)
 >  > {
 >  >  super(id);
 >  >  add(new
 >  > 
DropDownChoice("dropdown1",((MySession)Session.get()).getDropdown1(),myChoices)
 >  > }
 >  > }
 >  >
 >  > class SomePage extends WebPage
 >  > {
 >  >  public SomePage()
 >  > {
 >  >  super();
 >  >  add(new PanelSearch("search"));
 >  > }
 >  > }
 >  >
 >  > The trick is always using the shared models in your session, that is
 >  > why you don't need setters for them and you have to initialize them
 >  > properly with some default.
 >  > That way the form automatically writes the new values to your session
 >  > and you don't have to do that manually.
 >  >
 >  > How much less code can you have?
 >  >
 >  > Maurice
 >  >
 >  > On Thu, Feb 21, 2008 at 1:44 PM, steviezz <[EMAIL PROTECTED]>
 >  > wrote:
 >  >>
 >  >>  Thanks.
 >  >>
 >  >>  I have already moved to using the session for storage.  I've tried just
 >  >>  adding the complete search panel object to the session in the search
 >  >>  onsubmit() and fetching it again to add to the results page - this works
 >  >> and
 >  >>  avoids some of my page reload and history issues (but adds a few
 >  >> others),
 >  >>  but I presume its not really a good idea to store large object graphs in
 >  >> the
 >  >>  session - maybe better to just store the selected values and rebuild the
 >  >>  selection dropdowns as required.  Plus, this will probably help me iron
 >  >> out
 >  >>  my inconsistent dropdown state problems.
 >  >>
 >  >>  But I'm still searching for a magic solution that does not involve
 >  >> writing
 >  >>  too much code :-}
 >  >>
 >  >>
 >  >>
 >  >>
 >  >>
 >  >>  Mr Mean wrote:
 >  >>  >
 >  >>  > I would not recommend what you are doing here.
 >  >>  > What happens is that wicket removes the panel from the original page
 >  >>  > and attaches it to the new page, making it impossible to use the
 >  >>  > backbutton (because wicket will complain about a missing component).
 >  >>  > Also this only works if the html of the new page uses the same
 >  >>  > component id.
 >  >>  >
 >  >>  > It is better to store the selection for your dropdowns in the session
 >  >>  > (as suggested before).
 >  >>  > Then in the constructor of your PanelSearch you can check if the
 >  >>  > session contains a value for the dropdowns and if that is the case set
 >  >>  > it as the model for the dropdown. That way you don't have to pass the
 >  >>  > state to every page.
 >  >>  >
 >  >>  > Maurice
 >  >>  >
 >  >>  > On Thu, Feb 21, 2008 at 11:35 AM, steviezz <[EMAIL PROTECTED]>
 >  >>  > wrote:
 >  >>  >>
 >  >>  >>  Answering my own questions.
 >  >>  >>
 >  >>  >>  I can also pass the search panel to the results page from my form
 >  >>  >> onSubmit:
 >  >>  >>
 >  >>  >> setResponsePage(new
 >  >>  >> SearchResults(((PanelSearch)this.getParent()),
 >  >>  >>  search));
 >  >>  >>
 >  >>  >>  Then, in the results page:
 >  >>  >>
 >  >>  >>public SearchResults(PanelSearch searchPanel, Search search) {
 >  >>  >> add(searchPanel);
 >  >>  >> }
 >  >>  >>
 >  >>  >>  Mostly seems to work OK - panel on results page retains state from
 >  >>  >> search
 >  >>  >>  page.
 >  >>  >>
 >  >>  >>  Still getting some weird behaviour with the Ajax dropdowns on page
 >  >>  >> refreshes
 >  >>  >>  - can get crazy state of North America, Canada, Kansas if I refresh
 >  >> the
 >  >>  >> page
 >  >>  >>  between selection changes (old state gets mixed in with partial new
 >  >>  >> state)
 >  >>  >>
 >  >>  >>  Other thing to so

Re: Where to find documentation for Wicket tags?

2008-02-21 Thread Claudio Miranda

http://cwiki.apache.org/WICKET/wickets-xhtml-tags.html


MYoung wrote:
> 
> Are they documented?
> 


-
Claudio Miranda
http://weblogs.java.net/blog/claudio
http://www.claudius.com.br/blog
-- 
View this message in context: 
http://www.nabble.com/Where-to-find-documentation-for-Wicket-tags--tp15618680p15618719.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Combining Ajax and non Ajax pages

2008-02-21 Thread Maurice Marrink
Or you did not set the model on the dropdown.

Maurice

On Thu, Feb 21, 2008 at 8:44 PM, Maurice Marrink <[EMAIL PROTECTED]> wrote:
> Looks like at least one of the models in the session is not properly
>  initialized.
>  You have to do something like
>  private IModel model=new WhateverModel(null);
>  in your session.
>
>  Maurice
>
>
>
>  On Thu, Feb 21, 2008 at 8:41 PM, steviezz <[EMAIL PROTECTED]> wrote:
>  >
>  >  Now getting
>  >
>  >  RequestCycle.logRuntimeException(1399) | Attempt to set model object on 
> null
>  >  model of component: panelSearch:form:parentAreas
>  >  java.lang.IllegalStateException: Attempt to set model object on null model
>  >  of component: panelSearch:form:parentAreas
>  > at org.apache.wicket.Component.setModelObject(Component.java:2850)
>  >
>  >
>  >
>  >
>  >
>  >
>  >  Mr Mean wrote:
>  >  >
>  >  > Don't add wicket components to the session, use models.
>  >  > for example
>  >  > class MySession extends WebSession
>  >  > {
>  >  >  private IModel dropdown1=new WhateverModel(null); //etc for the others
>  >  >  // add getters() for models
>  >  > }
>  >  >
>  >  > class PanelSearch extends Panel
>  >  > {
>  >  >  public PanelSearch(String id)
>  >  > {
>  >  >  super(id);
>  >  >  add(new
>  >  > 
> DropDownChoice("dropdown1",((MySession)Session.get()).getDropdown1(),myChoices)
>  >  > }
>  >  > }
>  >  >
>  >  > class SomePage extends WebPage
>  >  > {
>  >  >  public SomePage()
>  >  > {
>  >  >  super();
>  >  >  add(new PanelSearch("search"));
>  >  > }
>  >  > }
>  >  >
>  >  > The trick is always using the shared models in your session, that is
>  >  > why you don't need setters for them and you have to initialize them
>  >  > properly with some default.
>  >  > That way the form automatically writes the new values to your session
>  >  > and you don't have to do that manually.
>  >  >
>  >  > How much less code can you have?
>  >  >
>  >  > Maurice
>  >  >
>  >  > On Thu, Feb 21, 2008 at 1:44 PM, steviezz <[EMAIL PROTECTED]>
>  >  > wrote:
>  >  >>
>  >  >>  Thanks.
>  >  >>
>  >  >>  I have already moved to using the session for storage.  I've tried 
> just
>  >  >>  adding the complete search panel object to the session in the search
>  >  >>  onsubmit() and fetching it again to add to the results page - this 
> works
>  >  >> and
>  >  >>  avoids some of my page reload and history issues (but adds a few
>  >  >> others),
>  >  >>  but I presume its not really a good idea to store large object graphs 
> in
>  >  >> the
>  >  >>  session - maybe better to just store the selected values and rebuild 
> the
>  >  >>  selection dropdowns as required.  Plus, this will probably help me 
> iron
>  >  >> out
>  >  >>  my inconsistent dropdown state problems.
>  >  >>
>  >  >>  But I'm still searching for a magic solution that does not involve
>  >  >> writing
>  >  >>  too much code :-}
>  >  >>
>  >  >>
>  >  >>
>  >  >>
>  >  >>
>  >  >>  Mr Mean wrote:
>  >  >>  >
>  >  >>  > I would not recommend what you are doing here.
>  >  >>  > What happens is that wicket removes the panel from the original page
>  >  >>  > and attaches it to the new page, making it impossible to use the
>  >  >>  > backbutton (because wicket will complain about a missing component).
>  >  >>  > Also this only works if the html of the new page uses the same
>  >  >>  > component id.
>  >  >>  >
>  >  >>  > It is better to store the selection for your dropdowns in the 
> session
>  >  >>  > (as suggested before).
>  >  >>  > Then in the constructor of your PanelSearch you can check if the
>  >  >>  > session contains a value for the dropdowns and if that is the case 
> set
>  >  >>  > it as the model for the dropdown. That way you don't have to pass 
> the
>  >  >>  > state to every page.
>  >  >>  >
>  >  >>  > Maurice
>  >  >>  >
>  >  >>  > On Thu, Feb 21, 2008 at 11:35 AM, steviezz <[EMAIL PROTECTED]>
>  >  >>  > wrote:
>  >  >>  >>
>  >  >>  >>  Answering my own questions.
>  >  >>  >>
>  >  >>  >>  I can also pass the search panel to the results page from my form
>  >  >>  >> onSubmit:
>  >  >>  >>
>  >  >>  >> setResponsePage(new
>  >  >>  >> SearchResults(((PanelSearch)this.getParent()),
>  >  >>  >>  search));
>  >  >>  >>
>  >  >>  >>  Then, in the results page:
>  >  >>  >>
>  >  >>  >>public SearchResults(PanelSearch searchPanel, Search 
> search) {
>  >  >>  >> add(searchPanel);
>  >  >>  >> }
>  >  >>  >>
>  >  >>  >>  Mostly seems to work OK - panel on results page retains state from
>  >  >>  >> search
>  >  >>  >>  page.
>  >  >>  >>
>  >  >>  >>  Still getting some weird behaviour with the Ajax dropdowns on page
>  >  >>  >> refreshes
>  >  >>  >>  - can get crazy state of North America, Canada, Kansas if I 
> refresh
>  >  >> the
>  >  >>  >> page
>  >  >>  >>  between selection changes (old state gets mixed in with partial 
> new
>  >  >>  >> state)
>  >  >>  >>
>  >  >>  >>  Other thing to sort is how to reload panel state

Re: Combining Ajax and non Ajax pages

2008-02-21 Thread Maurice Marrink
Looks like at least one of the models in the session is not properly
initialized.
You have to do something like
private IModel model=new WhateverModel(null);
in your session.

Maurice

On Thu, Feb 21, 2008 at 8:41 PM, steviezz <[EMAIL PROTECTED]> wrote:
>
>  Now getting
>
>  RequestCycle.logRuntimeException(1399) | Attempt to set model object on null
>  model of component: panelSearch:form:parentAreas
>  java.lang.IllegalStateException: Attempt to set model object on null model
>  of component: panelSearch:form:parentAreas
> at org.apache.wicket.Component.setModelObject(Component.java:2850)
>
>
>
>
>
>
>  Mr Mean wrote:
>  >
>  > Don't add wicket components to the session, use models.
>  > for example
>  > class MySession extends WebSession
>  > {
>  >  private IModel dropdown1=new WhateverModel(null); //etc for the others
>  >  // add getters() for models
>  > }
>  >
>  > class PanelSearch extends Panel
>  > {
>  >  public PanelSearch(String id)
>  > {
>  >  super(id);
>  >  add(new
>  > 
> DropDownChoice("dropdown1",((MySession)Session.get()).getDropdown1(),myChoices)
>  > }
>  > }
>  >
>  > class SomePage extends WebPage
>  > {
>  >  public SomePage()
>  > {
>  >  super();
>  >  add(new PanelSearch("search"));
>  > }
>  > }
>  >
>  > The trick is always using the shared models in your session, that is
>  > why you don't need setters for them and you have to initialize them
>  > properly with some default.
>  > That way the form automatically writes the new values to your session
>  > and you don't have to do that manually.
>  >
>  > How much less code can you have?
>  >
>  > Maurice
>  >
>  > On Thu, Feb 21, 2008 at 1:44 PM, steviezz <[EMAIL PROTECTED]>
>  > wrote:
>  >>
>  >>  Thanks.
>  >>
>  >>  I have already moved to using the session for storage.  I've tried just
>  >>  adding the complete search panel object to the session in the search
>  >>  onsubmit() and fetching it again to add to the results page - this works
>  >> and
>  >>  avoids some of my page reload and history issues (but adds a few
>  >> others),
>  >>  but I presume its not really a good idea to store large object graphs in
>  >> the
>  >>  session - maybe better to just store the selected values and rebuild the
>  >>  selection dropdowns as required.  Plus, this will probably help me iron
>  >> out
>  >>  my inconsistent dropdown state problems.
>  >>
>  >>  But I'm still searching for a magic solution that does not involve
>  >> writing
>  >>  too much code :-}
>  >>
>  >>
>  >>
>  >>
>  >>
>  >>  Mr Mean wrote:
>  >>  >
>  >>  > I would not recommend what you are doing here.
>  >>  > What happens is that wicket removes the panel from the original page
>  >>  > and attaches it to the new page, making it impossible to use the
>  >>  > backbutton (because wicket will complain about a missing component).
>  >>  > Also this only works if the html of the new page uses the same
>  >>  > component id.
>  >>  >
>  >>  > It is better to store the selection for your dropdowns in the session
>  >>  > (as suggested before).
>  >>  > Then in the constructor of your PanelSearch you can check if the
>  >>  > session contains a value for the dropdowns and if that is the case set
>  >>  > it as the model for the dropdown. That way you don't have to pass the
>  >>  > state to every page.
>  >>  >
>  >>  > Maurice
>  >>  >
>  >>  > On Thu, Feb 21, 2008 at 11:35 AM, steviezz <[EMAIL PROTECTED]>
>  >>  > wrote:
>  >>  >>
>  >>  >>  Answering my own questions.
>  >>  >>
>  >>  >>  I can also pass the search panel to the results page from my form
>  >>  >> onSubmit:
>  >>  >>
>  >>  >> setResponsePage(new
>  >>  >> SearchResults(((PanelSearch)this.getParent()),
>  >>  >>  search));
>  >>  >>
>  >>  >>  Then, in the results page:
>  >>  >>
>  >>  >>public SearchResults(PanelSearch searchPanel, Search search) {
>  >>  >> add(searchPanel);
>  >>  >> }
>  >>  >>
>  >>  >>  Mostly seems to work OK - panel on results page retains state from
>  >>  >> search
>  >>  >>  page.
>  >>  >>
>  >>  >>  Still getting some weird behaviour with the Ajax dropdowns on page
>  >>  >> refreshes
>  >>  >>  - can get crazy state of North America, Canada, Kansas if I refresh
>  >> the
>  >>  >> page
>  >>  >>  between selection changes (old state gets mixed in with partial new
>  >>  >> state)
>  >>  >>
>  >>  >>  Other thing to sort is how to reload panel state if user goes back
>  >> to
>  >>  >> the
>  >>  >>  home page (containing search panel) via a basic external navigation
>  >> link
>  >>  >> -
>  >>  >>  panel will be in its initial blank state.  Perhaps I do need to look
>  >>  >> into
>  >>  >>  loading from the session for this.
>  >>  >>
>  >>  >>  But I'm starting to like Wicket - this kind of stuff takes much more
>  >>  >> code in
>  >>  >>  other frameworks.
>  >>  >>
>  >>  >>
>  >>  >>
>  >>  >>
>  >>  >>  steviezz wrote:
>  >>  >>  >
>  >>  >>  > I am now passing the search form model to the new page in the
>

Re: Combining Ajax and non Ajax pages

2008-02-21 Thread steviezz

Now getting 

RequestCycle.logRuntimeException(1399) | Attempt to set model object on null
model of component: panelSearch:form:parentAreas
java.lang.IllegalStateException: Attempt to set model object on null model
of component: panelSearch:form:parentAreas
at org.apache.wicket.Component.setModelObject(Component.java:2850)




Mr Mean wrote:
> 
> Don't add wicket components to the session, use models.
> for example
> class MySession extends WebSession
> {
>  private IModel dropdown1=new WhateverModel(null); //etc for the others
>  // add getters() for models
> }
> 
> class PanelSearch extends Panel
> {
>  public PanelSearch(String id)
> {
>  super(id);
>  add(new
> DropDownChoice("dropdown1",((MySession)Session.get()).getDropdown1(),myChoices)
> }
> }
> 
> class SomePage extends WebPage
> {
>  public SomePage()
> {
>  super();
>  add(new PanelSearch("search"));
> }
> }
> 
> The trick is always using the shared models in your session, that is
> why you don't need setters for them and you have to initialize them
> properly with some default.
> That way the form automatically writes the new values to your session
> and you don't have to do that manually.
> 
> How much less code can you have?
> 
> Maurice
> 
> On Thu, Feb 21, 2008 at 1:44 PM, steviezz <[EMAIL PROTECTED]>
> wrote:
>>
>>  Thanks.
>>
>>  I have already moved to using the session for storage.  I've tried just
>>  adding the complete search panel object to the session in the search
>>  onsubmit() and fetching it again to add to the results page - this works
>> and
>>  avoids some of my page reload and history issues (but adds a few
>> others),
>>  but I presume its not really a good idea to store large object graphs in
>> the
>>  session - maybe better to just store the selected values and rebuild the
>>  selection dropdowns as required.  Plus, this will probably help me iron
>> out
>>  my inconsistent dropdown state problems.
>>
>>  But I'm still searching for a magic solution that does not involve
>> writing
>>  too much code :-}
>>
>>
>>
>>
>>
>>  Mr Mean wrote:
>>  >
>>  > I would not recommend what you are doing here.
>>  > What happens is that wicket removes the panel from the original page
>>  > and attaches it to the new page, making it impossible to use the
>>  > backbutton (because wicket will complain about a missing component).
>>  > Also this only works if the html of the new page uses the same
>>  > component id.
>>  >
>>  > It is better to store the selection for your dropdowns in the session
>>  > (as suggested before).
>>  > Then in the constructor of your PanelSearch you can check if the
>>  > session contains a value for the dropdowns and if that is the case set
>>  > it as the model for the dropdown. That way you don't have to pass the
>>  > state to every page.
>>  >
>>  > Maurice
>>  >
>>  > On Thu, Feb 21, 2008 at 11:35 AM, steviezz <[EMAIL PROTECTED]>
>>  > wrote:
>>  >>
>>  >>  Answering my own questions.
>>  >>
>>  >>  I can also pass the search panel to the results page from my form
>>  >> onSubmit:
>>  >>
>>  >> setResponsePage(new
>>  >> SearchResults(((PanelSearch)this.getParent()),
>>  >>  search));
>>  >>
>>  >>  Then, in the results page:
>>  >>
>>  >>public SearchResults(PanelSearch searchPanel, Search search) {
>>  >> add(searchPanel);
>>  >> }
>>  >>
>>  >>  Mostly seems to work OK - panel on results page retains state from
>>  >> search
>>  >>  page.
>>  >>
>>  >>  Still getting some weird behaviour with the Ajax dropdowns on page
>>  >> refreshes
>>  >>  - can get crazy state of North America, Canada, Kansas if I refresh
>> the
>>  >> page
>>  >>  between selection changes (old state gets mixed in with partial new
>>  >> state)
>>  >>
>>  >>  Other thing to sort is how to reload panel state if user goes back
>> to
>>  >> the
>>  >>  home page (containing search panel) via a basic external navigation
>> link
>>  >> -
>>  >>  panel will be in its initial blank state.  Perhaps I do need to look
>>  >> into
>>  >>  loading from the session for this.
>>  >>
>>  >>  But I'm starting to like Wicket - this kind of stuff takes much more
>>  >> code in
>>  >>  other frameworks.
>>  >>
>>  >>
>>  >>
>>  >>
>>  >>  steviezz wrote:
>>  >>  >
>>  >>  > I am now passing the search form model to the new page in the
>>  >> constructor,
>>  >>  >
>>  >>  >   setResponsePage(new SearchResults(search));
>>  >>  >
>>  >>  > Works OK - I assume this is better than going through the session.
>>  >>  >
>>  >>  > But I have no idea (yet) how to reinitialise the search panel Ajax
>>  >>  > widgets.
>>  >>  >
>>  >>  >
>>  >>  >
>>  >>  >
>>  >>  > wicket user-2 wrote:
>>  >>  >>
>>  >>  >> store the backing model in the session and get it from the
>> session,
>>  >> this
>>  >>  >> will help you retain the state in all the cases
>>  >>  >>
>>  >>  >> Cheers
>>  >>  >> Dipu
>>  >>  >>
>>  >>  >>
>>  >>  >>
>>  >>  >
>>  >>  >
>>  >>
>>  >>  --
>>  >>  View this message in context:
>>  >>
>

Re: Where to find documentation for Wicket tags?

2008-02-21 Thread Igor Vaynberg
there is a wiki page that lists them...

-igor

On Thu, Feb 21, 2008 at 11:09 AM, MYoung <[EMAIL PROTECTED]> wrote:
>
>  Are they documented?
>  --
>  View this message in context: 
> http://www.nabble.com/Where-to-find-documentation-for-Wicket-tags--tp15618680p15618680.html
>  Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
>  -
>  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]



Re: Where to find documentation for Wicket tags?

2008-02-21 Thread Scott Swank
On the wiki

http://cwiki.apache.org/WICKET/wickets-xhtml-tags.html


On Thu, Feb 21, 2008 at 11:09 AM, MYoung <[EMAIL PROTECTED]> wrote:
>
>  Are they documented?
>  --
>  View this message in context: 
> http://www.nabble.com/Where-to-find-documentation-for-Wicket-tags--tp15618680p15618680.html
>  Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
Scott Swank
reformed mathematician

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Where to find documentation for Wicket tags?

2008-02-21 Thread MYoung

Are they documented?
-- 
View this message in context: 
http://www.nabble.com/Where-to-find-documentation-for-Wicket-tags--tp15618680p15618680.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Where to find the Wicket DTD file?

2008-02-21 Thread MYoung

Is it available somewhere?  I need it for validation in the Eclipse Amsteras
HTML editor and to get rid of all its warning about wicket tags in html
file.
-- 
View this message in context: 
http://www.nabble.com/Where-to-find-the-Wicket-DTD-file--tp15618525p15618525.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: RestartResponseAtInterceptPageException with Ajax

2008-02-21 Thread Stefan Fußenegger

I was just waiting for green lights ;)

https://issues.apache.org/jira/browse/WICKET-1363


igor.vaynberg wrote:
> 
> feel free to add a jira request for this
> 
> -igor
> 
> 
> On Thu, Feb 21, 2008 at 4:44 AM, Stefan Fußenegger
> <[EMAIL PROTECTED]> wrote:
>>
>>  Maurice,
>>
>>  Thanks for your suggestions. However, these suggestions are yet 2 other
>>  workarounds for this problem.
>>
>>  imho, using RestartResponseAtInterceptPageException and
>>  continueToOriginalDestination() should work out of the box, regardless
>> of
>>  the type of request (Ajax and non-Ajax). Therefore I suggest adding
>> support
>>  to the framework - and your suggestions did not convince me not to do
>> so,
>>  sorry ;)
>>
>>  However, the strategy to choose a page for
>> continueToOriginalDestination()
>>  is open for discussion. The simplest approach would be to go back to the
>>  source of the Ajax request, while allowing to complete the request and
>>  render the entire page afterwards would be best.
>>
>>  -- Stefan
>>
>>
>>
>>
>>
>>  Mr Mean wrote:
>>  >
>>  > Hmm, i'm not sure this will work at all with the restartresponse but i
>>  > have 2 alternatives that do not require changes to wicket
>>  >
>>  > -append some javascript to the ajaxrequesttarget that will trigger the
>>  > browser to request your login page (you can get the wicket url for the
>>  > loginpage using urlFor)
>>  >  if your login page accepts pageparams you can use those to decide
>>  > what the response for a successful login should be.
>>  >
>>  > -open you login page in a ModalWindow on the same page and close it
>>  > after a successful login (you might need to refresh the origin page
>>  > after this)
>>  >
>>  > Maurice
>>  >
>>  > On Thu, Feb 21, 2008 at 10:30 AM, Stefan Fußenegger
>>  > <[EMAIL PROTECTED]> wrote:
>>  >>
>>  >>  Hi,
>>  >>
>>  >>  I'm currently trying to use RestartResponseAtInterceptPageException
>> with
>>  >>  Ajax. More precisely, I show a component that refreshes itself after
>>  >>  executing an authorized action. It the user is not authorized to
>> execute
>>  >>  this action, I'd like to redirect him to the Login-Page. After
>> proper
>>  >> login,
>>  >>  the user should be redirected to the original page. However, using
>>  >>  continueToOriginalDestination() does not work (out of the box), as
>> the
>>  >> User
>>  >>  is redirected to the URL of the Ajax request.
>>  >>
>>  >>
>>  >>  Workaround/Possible changes to simplify workaround:
>>  >>
>>  >>  A custom workaround would be to do a custom PageMap implementation.
>>  >> However,
>>  >>  as the method setUpRedirect(RequestCycle) is private, deriving from
>> the
>>  >>  default PageMap will require some ugly copy-paste in order to do so.
>>  >> This
>>  >>  could be avoided by a) making setUpRedirect(RequestCycle) protected
>>  >> and/or
>>  >>  b) introduce a protected method that constructs the
>>  >> interceptContinuationURL
>>  >>  inside setUpRedirect(RequestCycle).
>>  >>
>>  >>
>>  >>  Changing default behaviour:
>>  >>
>>  >>  The workaround version is not trivial, as in requires quite a bit of
>>  >>  knowledge of Wicket's inner workings ("What the hell is a
>> PageMap?").
>>  >>  Therefore, it might be a good idea to change the default behaviour
>>  >> there, as
>>  >>  no user wants to see Ajax responses at all (well, at least no normal
>>  >> user -
>>  >>  I really enjoy their unrivalled beauty ;) ). Shouldn't the behaviour
>> be
>>  >>  somewhat more intelligent by default (without hacking a custom
>> PageMap)?
>>  >>  That is to redirect to the page the Ajax request belonged to? Or
>> even
>>  >>  better: redirect to the Ajax call and render the complete page
>> (well,
>>  >> don't
>>  >>  know how tricky that would be).
>>  >>
>>  >>  Or do I miss something completely? Any other possible workarounds or
>>  >>  suggestions?
>>  >>
>>  >>  Cheers, Stefan
>>  >>
>>  >>  -
>>  >>  ---
>>  >>  Stefan Fußenegger
>>  >>  http://talk-on-tech.blogspot.com // looking for a nicer domain ;)
>>  >>  --
>>  >>  View this message in context:
>>  >>
>> http://www.nabble.com/RestartResponseAtInterceptPageException-with-Ajax-tp15607225p15607225.html
>>  >>  Sent from the Wicket - User mailing list archive at Nabble.com.
>>  >>
>>  >>
>>  >> 
>> -
>>  >>  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]
>>  >
>>  >
>>  >
>>
>>
>>  -
>>  ---
>>  Stefan Fußenegger
>>  http://talk-on-tech.blogspot.com // looking for a nicer domain ;)
>>  --
>>  View this message in context:
>> http://www.nabble.com/RestartResponseAtInterceptPageException-with-Ajax-tp15607225p15610291.html
>>
>>
>> Sent from the Wicket - User mailing list archive at Nabble.

Re: Panels and feedback messages

2008-02-21 Thread Igor Vaynberg
textfield1.setlabel(new model("name1"));

-igor


On Thu, Feb 21, 2008 at 8:21 AM, taygolf <[EMAIL PROTECTED]> wrote:
>
>  ok I am wanting to have a custom feedback message for a testfield that is
>  created in a panel. I know how to do this for a simple textfield in a form
>  but I am createing these textfields on the fly using nested panels so I
>  wanted to know how to do this. Right now I am only adding one panel but I
>  plan on adding several. here is some code:
>
>  template.java
>  Form form = new Form("myform", new CompoundPropertyModel(request)) {
> protected void onSubmit() {
> setResponsePage(post.class);
> };
> };
> form.setMarkupId("myform");
> form.setOutputMarkupId(true);
> form.add(new FeedbackPanel("feedback"));
> RepeatingView sections=new RepeatingView("Sections");
> sections.add(new generalPanel(sections.newChildId()));
> //add other sections here
>
>  generalPanel.java
>  //basically this is a section on my template page. I am going to do a query
>  and get all the info and create //the panel as needed weither I need
>  textfields or whatever. again only doing on row right now but I will //soon
>  add many more.
>  public class generalPanel extends Panel {
> public generalPanel(String id) {
>   super(id);
>   RepeatingView generalRows=new RepeatingView("generalRows");
>   generalRows.add(new textFieldPanel(generalRows.newChildId(), "Test 
> 1",
>  "Test 2"));
>   //add more rows to the general Panel here
>   add(generalRows);
> }
>  }
>
>  textFieldPanel.java
>  public class textFieldPanel extends Panel {
>
> public textFieldPanel(String id, String name1, String name2) {
>   super(id);
>
>   TextField t1 = new TextField("textField1");
>   t1.setRequired(true);
>   TextField t2 = new TextField("textField2");
>   t2.setRequired(true);
>
>  Now I want a custom message that says something like: name1 is required
>  instead of textField1 is required because I can have several of these panels
>  and the user will not know what textField1 is.
>
>  I tried setting the properties file for template.properties to:
>  myform.Sections.generalRows.textField1.Required=Name is required
>
>  but that did not work. once I get this simple change working I will look
>  into setting the label of textField1 and getting the message to print with
>  that so I can pass name1 to the message but first I would like to get it
>  working with a simple generic message.
>
>  Do I need to set the properties for the panels as well? do I not need to use
>  .newChildId() for the panel ids so I can know what the id is? Can I get the
>  id some how?
>
>  please help me and I am sorry this is so long but I felt looking at the code
>  you would understand what I want more.
>
>  Thanks
>
>  T
>  --
>  View this message in context: 
> http://www.nabble.com/Panels-and-feedback-messages-tp15613738p15613738.html
>  Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
>  -
>  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]



Can i add multiple lines to a node-link in tree?

2008-02-21 Thread Per Newgro
Hi *,

i would like to present a bit longer text in a tree node. One condition is 
that the tree can't have the vertical scrollbar. Thus if i a my text FF and 
IE are presenting empty notes, because text doesnt fit into visible area. My 
i add a break or something so that the link will be presented with 2 lines as 
one node?

I hope i explained my problem well.

Thanks for helping me out here
Per

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Need to redirect to the current page upon a page expire - how??

2008-02-21 Thread Igor Vaynberg
once a page has expired there is really no way to know what it
was..thats kinda the point of stateful components

eg if you have created your page like this:

setresponsepage(new userdetailspage(user, org));

and you get a page expired error, even if you somehow kept track of
the fact that it was a userdetailspage you still wouldnt know what the
user and org params it was created with...

a compromise is a bookmarkable page mounted with a hybrid url coding strategy

-igor


On Thu, Feb 21, 2008 at 7:39 AM, Chris Lintz
<[EMAIL PROTECTED]> wrote:
>
>  That would work, except the search results do contain some AJAX
>  functionality, which of course result in a stateful page.
>
>
>
>
>  Mr Mean wrote:
>  >
>  > how about using a stateless searchpage?
>  > that way you should not get a page expired.
>  >
>  > Maurice
>  >
>  > On Thu, Feb 21, 2008 at 1:14 AM, Chris Lintz
>  > <[EMAIL PROTECTED]> wrote:
>  >>
>  >>  Hi,
>  >>  So i have searched the forums regarding overriding
>  >>  RequestCycle#onRuntimeException(Page page,RuntimeException e) .  It
>  >> seems we
>  >>  are completely stuck because there is no way to determine what page
>  >> threw a
>  >>  PageExpiredException .
>  >>
>  >>  What I want to do is this:
>  >>
>  >>  When my SearchPage expires, and the user again clicks a button search,
>  >> they
>  >>  are immediately returned to the SearchPage potentially with any request
>  >>  parameters the user searched on. It seems the only way to get a custom
>  >> Page
>  >>  when an PageExpiredException is thrown is to override onRuntimeException
>  >> and
>  >>  return the custom page.  Unfortunately the page is null when passed into
>  >>  onRuntimeException (which makes sense because there is no longer a valid
>  >>  session).
>  >>
>  >>  How can i accomplish this within the framework?  I hope we can avoid a
>  >> hack
>  >>  like setting a cookie that represents the current page upon every page
>  >>  request. (atleast it seems to me there should be a framework solution
>  >> for
>  >>  this).
>  >>
>  >>  thanks for any ideas
>  >>
>  >>
>  >>  chris
>  >>
>  >>
>  >>  --
>  >>  View this message in context:
>  >> 
> http://www.nabble.com/Need-to-redirect-to-the-current-page-upon-a-page-expire---how---tp15602103p15602103.html
>  >>  Sent from the Wicket - User mailing list archive at Nabble.com.
>  >>
>  >>
>  >>  -
>  >>  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]
>  >
>  >
>  >
>
>  --
>  View this message in context: 
> http://www.nabble.com/Need-to-redirect-to-the-current-page-upon-a-page-expire---how---tp15602103p15613198.html
>
>
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
>  -
>  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]



Re: BaseWicketTester.isVisible() doesn't check Component.isRenderAllowed()

2008-02-21 Thread Igor Vaynberg
yes, add to jira please

-igor


On Thu, Feb 21, 2008 at 5:57 AM, Wang, Yuesong <[EMAIL PROTECTED]> wrote:
> BaseWicketTester.isVisible() only checks Component.isVisible(), not
>  Component.isRenderAllowed(). So for a component whose RENDER action is
>  disabled through role based authorization strategy,
>  BaseWicketTester.isVisible() still returns true.
>  BaseWicketTester.isInvisible() works correctly by using
>  BaseWicketTester.getComponentFromLastRenderedPage() which checks both
>  Component.isVisible() and isRenderAllowed().
>
>  Should I add this to JIRA?
>
>  Yuesong
>
>  -
>  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]



Re: How can I refresh a "parent" Page after using PopupCloseLink in a popup window?

2008-02-21 Thread Igor Vaynberg
class mypopupcloselink extends popupcloselink {
  oncomponenttag(tag) {
 super.oncomponenttag(tag);
 tag.put("onclick","window.parent.refresh();");
  }
}

-igor


On Tue, Feb 19, 2008 at 11:24 AM, Edvin Syse <[EMAIL PROTECTED]> wrote:
> Hi,
>
>  I have a Link with PopupSettings to open another window, and then there is a 
> PopupCloseLink on the new page which closes the popupwindow
>  again. Is there a way to make the "parent" browserwindow refresh when I 
> close the popupwindow also?
>
>  Using ModalWindow makes this easy but I cannot have a ModalWindow in this 
> usecase.
>
>  -- Edvin
>
>  -
>  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]



Re: Wicket.Tree has no properties

2008-02-21 Thread Igor Vaynberg
afaik  is not valid html...

-igor

On Thu, Feb 21, 2008 at 5:04 AM, Juan Gabriel Arias
<[EMAIL PROTECTED]> wrote:
> I found the problem.
>
>  My HTML head had
>
>
>  
>
>  And the problem is the way i close the tag. If i put
>
>
>type="text/javascript">
>
>  It works ok.
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: AjaxFormSubmitBehavior and setDefaultFormProcessing(false)?

2008-02-21 Thread Igor Vaynberg
if you are opening everything via ajax why do you need to submit the
entire form? the values are all still there in the browser window...
so dont use ajaxformsubmitbehavor but a regular ajax behavior

-igor


On Thu, Feb 21, 2008 at 3:57 AM, Juha Alatalo
<[EMAIL PROTECTED]> wrote:
> Hi,
>
>  I have created a dropDownChoice component where the last option is
>  "browse"  == opens new page where user can make queries. (Similar to
>  "look in" field in search panel of Windows XP, where user can select
>  some default folders or can choose browse to give an exact folder)
>
>  Because there is also other fields, form hast to be posted when opening
>  new page from browse ==> AjaxFromSubmitBehavior("onchange"). Only
>  problem is that I can't call setDefaultFormProcessing(false) in
>  ajaxFormSubmitBehavior like I can do with Buttons. I would like to do
>  validation only when user presses save button, not when he chooses to
>  browse information for one field.
>
>  Is there some way to solve this problem?
>
>  - Juha
>
>
>  -
>  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]



Re: RestartResponseAtInterceptPageException with Ajax

2008-02-21 Thread Igor Vaynberg
feel free to add a jira request for this

-igor


On Thu, Feb 21, 2008 at 4:44 AM, Stefan Fußenegger
<[EMAIL PROTECTED]> wrote:
>
>  Maurice,
>
>  Thanks for your suggestions. However, these suggestions are yet 2 other
>  workarounds for this problem.
>
>  imho, using RestartResponseAtInterceptPageException and
>  continueToOriginalDestination() should work out of the box, regardless of
>  the type of request (Ajax and non-Ajax). Therefore I suggest adding support
>  to the framework - and your suggestions did not convince me not to do so,
>  sorry ;)
>
>  However, the strategy to choose a page for continueToOriginalDestination()
>  is open for discussion. The simplest approach would be to go back to the
>  source of the Ajax request, while allowing to complete the request and
>  render the entire page afterwards would be best.
>
>  -- Stefan
>
>
>
>
>
>  Mr Mean wrote:
>  >
>  > Hmm, i'm not sure this will work at all with the restartresponse but i
>  > have 2 alternatives that do not require changes to wicket
>  >
>  > -append some javascript to the ajaxrequesttarget that will trigger the
>  > browser to request your login page (you can get the wicket url for the
>  > loginpage using urlFor)
>  >  if your login page accepts pageparams you can use those to decide
>  > what the response for a successful login should be.
>  >
>  > -open you login page in a ModalWindow on the same page and close it
>  > after a successful login (you might need to refresh the origin page
>  > after this)
>  >
>  > Maurice
>  >
>  > On Thu, Feb 21, 2008 at 10:30 AM, Stefan Fußenegger
>  > <[EMAIL PROTECTED]> wrote:
>  >>
>  >>  Hi,
>  >>
>  >>  I'm currently trying to use RestartResponseAtInterceptPageException with
>  >>  Ajax. More precisely, I show a component that refreshes itself after
>  >>  executing an authorized action. It the user is not authorized to execute
>  >>  this action, I'd like to redirect him to the Login-Page. After proper
>  >> login,
>  >>  the user should be redirected to the original page. However, using
>  >>  continueToOriginalDestination() does not work (out of the box), as the
>  >> User
>  >>  is redirected to the URL of the Ajax request.
>  >>
>  >>
>  >>  Workaround/Possible changes to simplify workaround:
>  >>
>  >>  A custom workaround would be to do a custom PageMap implementation.
>  >> However,
>  >>  as the method setUpRedirect(RequestCycle) is private, deriving from the
>  >>  default PageMap will require some ugly copy-paste in order to do so.
>  >> This
>  >>  could be avoided by a) making setUpRedirect(RequestCycle) protected
>  >> and/or
>  >>  b) introduce a protected method that constructs the
>  >> interceptContinuationURL
>  >>  inside setUpRedirect(RequestCycle).
>  >>
>  >>
>  >>  Changing default behaviour:
>  >>
>  >>  The workaround version is not trivial, as in requires quite a bit of
>  >>  knowledge of Wicket's inner workings ("What the hell is a PageMap?").
>  >>  Therefore, it might be a good idea to change the default behaviour
>  >> there, as
>  >>  no user wants to see Ajax responses at all (well, at least no normal
>  >> user -
>  >>  I really enjoy their unrivalled beauty ;) ). Shouldn't the behaviour be
>  >>  somewhat more intelligent by default (without hacking a custom PageMap)?
>  >>  That is to redirect to the page the Ajax request belonged to? Or even
>  >>  better: redirect to the Ajax call and render the complete page (well,
>  >> don't
>  >>  know how tricky that would be).
>  >>
>  >>  Or do I miss something completely? Any other possible workarounds or
>  >>  suggestions?
>  >>
>  >>  Cheers, Stefan
>  >>
>  >>  -
>  >>  ---
>  >>  Stefan Fußenegger
>  >>  http://talk-on-tech.blogspot.com // looking for a nicer domain ;)
>  >>  --
>  >>  View this message in context:
>  >> 
> http://www.nabble.com/RestartResponseAtInterceptPageException-with-Ajax-tp15607225p15607225.html
>  >>  Sent from the Wicket - User mailing list archive at Nabble.com.
>  >>
>  >>
>  >>  -
>  >>  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]
>  >
>  >
>  >
>
>
>  -
>  ---
>  Stefan Fußenegger
>  http://talk-on-tech.blogspot.com // looking for a nicer domain ;)
>  --
>  View this message in context: 
> http://www.nabble.com/RestartResponseAtInterceptPageException-with-Ajax-tp15607225p15610291.html
>
>
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
F

InstanceAlreadyExistsException when Redeploying in Websphere

2008-02-21 Thread nmarchallleck

Hello,

I 'm getting an InstanceAlreadyExistsException (exception trace below) when
redeploying a Wicket app (1.3.1) in Websphere test environment. I didn't
have this problem when running Wicket 1.2-rc1. When doing a regular stopping
and starting of the App server the application starts up fine. 

I'm using the WicketServlet (not the Filter) and I'm integrating with Spring
using the annotation method.

Any ideas? Something I'm doing wrong, or a work around maybe?

I will provide more information if required.

Thanks,
Nick

[2/21/08 12:23:55:529 EST] 0028 WebExtensionP E   Error occured while
preparing the servlet for initialization. 
javax.servlet.ServletException: SRVE0207E: Uncaught initialization exception
thrown by servlet
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:237)
at
com.ibm.ws.wswebcontainer.servlet.ServletWrapper.init(ServletWrapper.java:316)
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.initialize(ServletWrapper.java:1119)
at
com.ibm.ws.wswebcontainer.servlet.ServletWrapper.initialize(ServletWrapper.java:149)
at
com.ibm.wsspi.webcontainer.extension.WebExtensionProcessor.createServletWrapper(WebExtensionProcessor.java:99)
at 
com.ibm.ws.webcontainer.webapp.WebApp.getServletWrapper(WebApp.java:742)
at
com.ibm.ws.webcontainer.webapp.WebApp.initializeTargetMappings(WebApp.java:422)
at
com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinish(WebApp.java:275)
at com.ibm.ws.wswebcontainer.webapp.WebApp.initialize(WebApp.java:272)
at
com.ibm.ws.wswebcontainer.webapp.WebGroup.addWebApplication(WebGroup.java:88)
at
com.ibm.ws.wswebcontainer.VirtualHost.addWebApplication(VirtualHost.java:157)
at 
com.ibm.ws.wswebcontainer.WebContainer.addWebApp(WebContainer.java:655)
at
com.ibm.ws.wswebcontainer.WebContainer.addWebApplication(WebContainer.java:608)
at
com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:333)
at
com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:549)
at
com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1295)
at
com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1129)
at
com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:567)
at
com.ibm.ws.runtime.component.ApplicationMgrImpl.startModule(ApplicationMgrImpl.java:1762)
at
com.ibm.ws.runtime.component.ApplicationMgrImpl._startModule(ApplicationMgrImpl.java:1710)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:615)
at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:62)
at sun.reflect.GeneratedMethodAccessor26.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:615)
at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:265)
at
javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1089)
at
javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:971)
at
com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:231)
at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:238)
at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:833)
at 
com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:802)
at 
com.ibm.ws.management.AdminServiceImpl$1.run(AdminServiceImpl.java:1057)
at
com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
at 
com.ibm.ws.management.AdminServiceImpl.invoke(AdminServiceImpl.java:950)
at
com.ibm.ws.management.application.sync.StartDeploymentTask.startDeployment(StartDeploymentTask.java:196)
at
com.ibm.ws.management.application.sync.StartDeploymentTask.fineGrainUpdate(StartDeploymentTask.java:149)
at
com.ibm.ws.management.application.sync.StartDeploymentTask.performTask(StartDeploymentTask.java:79)
at
com.ibm.ws.management.application.sync.AppBinaryProcessor$AppBinThread.run(AppBinaryProcessor.java:820)
at
com.ibm.ws.management.application.sync.AppBinaryProcessor.postProcess(AppBinaryProcessor.java:590)
at
com.ibm.ws.management.application.sync.AppBinaryProcessor._onChangeCompletion(AppBinaryProcessor.java:400)
at
com.ibm.ws.management.application.sync.AppBinaryProcessor$2.run(AppBinaryProcessor.java:372)
at
com.ibm.ws.security.util.AccessController.doPrivileged(

Panels and feedback messages

2008-02-21 Thread taygolf

ok I am wanting to have a custom feedback message for a testfield that is
created in a panel. I know how to do this for a simple textfield in a form
but I am createing these textfields on the fly using nested panels so I
wanted to know how to do this. Right now I am only adding one panel but I
plan on adding several. here is some code:

template.java
Form form = new Form("myform", new CompoundPropertyModel(request)) {
protected void onSubmit() {
setResponsePage(post.class);
};
};
form.setMarkupId("myform");
form.setOutputMarkupId(true);
form.add(new FeedbackPanel("feedback"));
RepeatingView sections=new RepeatingView("Sections");
sections.add(new generalPanel(sections.newChildId()));
//add other sections here

generalPanel.java
//basically this is a section on my template page. I am going to do a query
and get all the info and create //the panel as needed weither I need
textfields or whatever. again only doing on row right now but I will //soon
add many more.
public class generalPanel extends Panel {
public generalPanel(String id) {
  super(id);
  RepeatingView generalRows=new RepeatingView("generalRows");
  generalRows.add(new textFieldPanel(generalRows.newChildId(), "Test 1",
"Test 2"));
  //add more rows to the general Panel here
  add(generalRows);
}
}

textFieldPanel.java
public class textFieldPanel extends Panel {

public textFieldPanel(String id, String name1, String name2) {
  super(id);

  TextField t1 = new TextField("textField1");
  t1.setRequired(true);
  TextField t2 = new TextField("textField2");
  t2.setRequired(true);

Now I want a custom message that says something like: name1 is required
instead of textField1 is required because I can have several of these panels
and the user will not know what textField1 is.

I tried setting the properties file for template.properties to:
myform.Sections.generalRows.textField1.Required=Name is required

but that did not work. once I get this simple change working I will look
into setting the label of textField1 and getting the message to print with
that so I can pass name1 to the message but first I would like to get it
working with a simple generic message.

Do I need to set the properties for the panels as well? do I not need to use
.newChildId() for the panel ids so I can know what the id is? Can I get the
id some how?

please help me and I am sorry this is so long but I felt looking at the code
you would understand what I want more.

Thanks

T 
-- 
View this message in context: 
http://www.nabble.com/Panels-and-feedback-messages-tp15613738p15613738.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wicket database access

2008-02-21 Thread rmattler

I'm new to this whole thing and I've just done this using the book "Enjoying
development with Wicket".  It is $20 and worth the money to get your feet
wet.  It has a good example of JDBC only access and what you gain by using
Spring and then Hibernate.

Hope this helps.  Considering I only have 3 weeks experience with Wicket.


http://agileskills2.org/EWDW/


wjser wrote:
> 
> Hi all,
> 
> 
> i have a simple question.
> How can i access a database from wicket?
> I don't want to use any object-relational mapper like hibernate or ibatis.
> I wanna use plain old sql/jdbc.
> 
> thanks in advance.
> 

-- 
View this message in context: 
http://www.nabble.com/Wicket-database-access-tp15613515p15613574.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wicket database access

2008-02-21 Thread James Carman
You would access it like you would it any other web application.  I
would suggest using the Spring JDBC support stuff, though.

On 2/21/08, wjser <[EMAIL PROTECTED]> wrote:
>
>  Hi all,
>
>
>  i have a simple question.
>  How can i access a database from wicket?
>  I don't want to use any object-relational mapper like hibernate or ibatis.
>  I wanna use plain old sql/jdbc.
>
>  thanks in advance.
>
> --
>  View this message in context: 
> http://www.nabble.com/Wicket-database-access-tp15613515p15613515.html
>  Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
>  -
>  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]



Wicket database access

2008-02-21 Thread wjser

Hi all,


i have a simple question.
How can i access a database from wicket?
I don't want to use any object-relational mapper like hibernate or ibatis.
I wanna use plain old sql/jdbc.

thanks in advance.
-- 
View this message in context: 
http://www.nabble.com/Wicket-database-access-tp15613515p15613515.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Need to redirect to the current page upon a page expire - how??

2008-02-21 Thread Chris Lintz

That would work, except the search results do contain some AJAX
functionality, which of course result in a stateful page.


Mr Mean wrote:
> 
> how about using a stateless searchpage?
> that way you should not get a page expired.
> 
> Maurice
> 
> On Thu, Feb 21, 2008 at 1:14 AM, Chris Lintz
> <[EMAIL PROTECTED]> wrote:
>>
>>  Hi,
>>  So i have searched the forums regarding overriding
>>  RequestCycle#onRuntimeException(Page page,RuntimeException e) .  It
>> seems we
>>  are completely stuck because there is no way to determine what page
>> threw a
>>  PageExpiredException .
>>
>>  What I want to do is this:
>>
>>  When my SearchPage expires, and the user again clicks a button search,
>> they
>>  are immediately returned to the SearchPage potentially with any request
>>  parameters the user searched on. It seems the only way to get a custom
>> Page
>>  when an PageExpiredException is thrown is to override onRuntimeException
>> and
>>  return the custom page.  Unfortunately the page is null when passed into
>>  onRuntimeException (which makes sense because there is no longer a valid
>>  session).
>>
>>  How can i accomplish this within the framework?  I hope we can avoid a
>> hack
>>  like setting a cookie that represents the current page upon every page
>>  request. (atleast it seems to me there should be a framework solution
>> for
>>  this).
>>
>>  thanks for any ideas
>>
>>
>>  chris
>>
>>
>>  --
>>  View this message in context:
>> http://www.nabble.com/Need-to-redirect-to-the-current-page-upon-a-page-expire---how---tp15602103p15602103.html
>>  Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>>  -
>>  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]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Need-to-redirect-to-the-current-page-upon-a-page-expire---how---tp15602103p15613198.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Opening DynamicWebResource from Button/AjaxButton?

2008-02-21 Thread UPBrandon

It's not that I necessary want to see the page refreshed with updated form
values.  In fact, I would prefer that the user not leave the page at all. 
All the form contains is a checkgroup of "things" to include in the PDF. 
All I want to do when the button is pressed is view/download the PDF but the
form with the checkgroup needs to be submitted first so I can see what was
checked when I generate the PDF.

I suppose taking the ResourceReference's and using it in the onload would
work but it seems like such a hack, not to mention that it might cause
problems if the user uses the back button.  While working on my
DynamicWebResource, I was able to download a PDF and continue using my
application using a link (assigned to either a link or button in HTML.)  The
only problem is that it doesn't do a submit.  Accessing the
DynamicWebResource from a button works but makes my app non-responsive. 
What I would like to do is either make the ResourceLink somehow submit my
form or, even better, make a button component that handles the request in a
way that doens't break Wicket.  Ideas/suggestions?

-Brandon


igor.vaynberg wrote:
> 
> so you want to see the page with updated form values _and_ stream the pdf?
> 
> 
> why dont you take that url you generated for your resourceref and
> append it to a window.onload javascript that does window.location=url;
> 
> -gior
> 
> 
> On Wed, Feb 20, 2008 at 2:33 PM, UPBrandon <[EMAIL PROTECTED]> wrote:
>>
>>  As I mentioned in my previous response, I couldn't use
>>  getRequestCycle().setRequestTarget() directly because of the way the API
>>  works (you can use a ResourceReference but not a Resource.)  Instead, I
>>  ended up with something like this:
>>
>>  new AjaxButton(buttonId, form) {
>> protected void onSubmit(AjaxRequestTarget target, Form form) {
>> ResourceReference pdfReference = new
>> ResourceReference("") {
>> protected Resource newResource() {
>> return new BillPdfWebResource(...);
>> }
>> };
>> String url =
>> getRequestCycle().get().urlFor(pdfReference).toString();
>> getRequestCycle().setRequestTarget(new
>> RedirectRequestTarget(url) );
>> }
>>  }
>>
>>  It works... but only once.  When I click on the button, everything
>> works, my
>>  PDF gets generated and downloaded but then my app becomes unresponsive. 
>> I
>>  can't interact with the site at all until I "start over."  Is there a
>> better
>>  way to go about this that wouldn't cause that side effect?  Whatever
>>  approach I take, I need to be able to submit a form when the PDF is
>>  generated.  My example doesn't show it but my BillPdfWebResource class
>>  generates a PDF based on the user's selection and my Form's Model needs
>> to
>>  be updated.  Any suggestions?
>>
>>  -Brandon
>>
>>
>>
>>
>>  igor.vaynberg wrote:
>>  >
>>  > onsubmit() {
>>  >   getrequestcycle().setrequesttarget(new
>>  > redirectrequesttarget(urlfor(resourceref)));
>>  > }
>>  >
>>  > -igor
>>  >
>>  >
>>  > On Feb 13, 2008 8:18 AM, UPBrandon <[EMAIL PROTECTED]> wrote:
>>  >>
>>  >> In a project I am working on, I wrote a DynamicWebResource that
>> generates
>>  >> a
>>  >> PDF file and, by setting the Content-Disposition in the header, got
>> it so
>>  >> that the user is prompted to download the PDF when they click on a
>>  >> ResourceLink to my PDF-generating resource.
>>  >>
>>  >> That all works fine but now I need to open the PDF from a button.  I
>> want
>>  >> to
>>  >> allow the user to select a value in a form and press a button to view
>>  >> somewhat of a report for the item they selected.  However, there
>> doesn't
>>  >> appear to be any type of button that would lead a user to my
>>  >> DynamicWebResource.  Is there any way to have a button do a submit
>>  >> (update
>>  >> the model) and then lead the user to a resource?
>>  >>
>>  >> -Brandon
>>  >> --
>>  >> View this message in context:
>>  >>
>> http://www.nabble.com/Opening-DynamicWebResource-from-Button-AjaxButton--tp15459841p15459841.html
>>  >> Sent from the Wicket - User mailing list archive at Nabble.com.
>>  >>
>>  >>
>>  >> -
>>  >> 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]
>>  >
>>  >
>>  >
>>
>>  --
>>  View this message in context:
>> http://www.nabble.com/Opening-DynamicWebResource-from-Button-AjaxButton--tp15459841p15600541.html
>>
>>
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>>  -
>>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>>  For additional commands, e-mail: [EMAIL PRO

Re: OutOfMemoryError

2008-02-21 Thread Nino Saturnino Martinez Vazquez Wael
You can try to see if its any page in particular that causes this. Or of 
its something general... Also you need to watch out for objects that 
just keep growing in number..


It's a little abstract to use a profiler as it will not give you a clear 
idea as everything originates in class[] int[] etc...


regards Nino

Thomas Singer wrote:

Be sure to checkout the wiki for gotchas and tips:

http://cwiki.apache.org/WICKET/wicket-and-jmeter.html

http://cwiki.apache.org/WICKET/wicket-and-jmeter-with-regular-expressions.html 



Already done, but what we can get? An OOME in our application with the 
heapdump. Well, we already have one and the most used objects appear 
to come from Wicket (char[], byte[], String, [], HashMap$Entry, 
XMLTag, ValueMap, ComponentTag, RawMarkup, HashMap$EntrySet, int[], 
short[] just to name the largest).


--
Best regards,
Thomas Singer
_
SyntEvo GmbH
www.syntevo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: OutOfMemoryError

2008-02-21 Thread Maeder Thomas
Thomas, 

the memory footprint per class usually doesn't really allow to pinpoint
the reference that causes a memory leak (usually the top entries are
char[], String, etc.). For that, you need to trace back to the reference
that should not be there. We use YourKit to great benefit (do I get
goodies now, comrades?). Yourkit can show the "retained size" of an
object. If one of your Objects shows up near the top of the list, that
is a good candidate.

alternatively, the hprof dump would be more helpful than HTML.

(some other) Thomas



...
> 
> As already written a couple of weeks ago, we regularly get 
> OutOfMemoryErrors with our Wicket-based website. I've finally 
> got a heapdump.hprof and no entry above 3kByte size is from 
> our code. If someone from the Wicket team is interested, I 
> can send the html-instance information sorted by size or 
> instance count.
> 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Spring injecting beans into non-component classes

2008-02-21 Thread Bart Molenkamp
You are missing some asm libraries as well. You should indeed rely
on Maven for your dependencies. But we've had the same problem, and
we excluded cglib, and included cglib-nodep.


org.hibernate
hibernate
3.2.1.ga


cglib
cglib




...


cglib
cglib
2.1_3-USE-CGLIB-NODEP


cglib
cglib-nodep
2.1_3


But I think that if you only rely on spring, then Maven will include
the correct libraries for you.

Bart.

> -Oorspronkelijk bericht-
> Van: Igor Vaynberg [mailto:[EMAIL PROTECTED]
> Verzonden: woensdag 20 februari 2008 23:02
> Aan: users@wicket.apache.org
> Onderwerp: Re: Spring injecting beans into non-component classes
>
> why dont you use maven to manage your dependencies? from cursory look
> you are missing asm which cglib depends on and wicket-ioc.jar
>
> -igor
>
>
> On Wed, Feb 20, 2008 at 7:51 AM, Warren
> <[EMAIL PROTECTED]> wrote:
> > I am getting an NoClassDefFoundError Exception when I try to use
> >  InjectorHolder.getInjector().inject(this);. I think I am
> missing a library
> >  or two of some sort.
> >
> >  java.lang.NoClassDefFoundError: net/sf/cglib/proxy/Callback
> >
> >  I placed cglib, which has net.sf.cglib.proxy.Callback in
> it, in my classpath
> >  and then I started getting another NoClassDefFoundError Exception.
> >
> >  java.lang.NoClassDefFoundError: org/objectweb/asm/Type
> >
> >  I thought I had everything I needed.
> >
> >  wicket-1.3.0.jar
> >  wicket-spring-1.3.0.jar
> >  wicket-spring-annot-1.3.0.jar
> >  spring.jar
> >
> >  What other dependencies am I missing?
> >
> >
> >  > -Original Message-
> >  > From: Bart Molenkamp [mailto:[EMAIL PROTECTED]
> >
> >
> > > Sent: Tuesday, February 19, 2008 10:52 PM
> >  > To: users@wicket.apache.org
> >  > Subject: RE: Spring injecting beans into non-component classes
> >  >
> >  >
> >  > public abstract class AbstractInjectableModel implements IModel {
> >  >
> >  >  /**
> >  >   * Applies injection to this model instance.
> >  >   */
> >  >  public AbstractInjectableModel() {
> >  >ConfigurableInjector injector = InjectorHolder.getInjector();
> >  >injector.inject(this);
> >  >  }
> >  >
> >  >  ...
> >  > }
> >  >
> >  > It is indeed just InjectorHolder.getInjector().inject(this);
> >  > Nothing more.
> >  >
> >  > Bart.
> >  >
> >  > > -Oorspronkelijk bericht-
> >  > > Van: Warren [mailto:[EMAIL PROTECTED]
> >  > > Verzonden: dinsdag 19 februari 2008 18:16
> >  > > Aan: users@wicket.apache.org
> >  > > Onderwerp: RE: Spring injecting beans into
> non-component classes
> >  > >
> >  > > Thanks Igor, the InjectorHolder.getInjector().inject(this);
> >  > > is what I was
> >  > > looking for.
> >  > >
> >  > > Bart, Could you show me an example of your
> AbstractInjectableModel?
> >  > >
> >  > > Warren
> >  > >
> >  > > > -Original Message-
> >  > > > From: Bart Molenkamp [mailto:[EMAIL PROTECTED]
> >  > > > Sent: Tuesday, February 19, 2008 1:50 AM
> >  > > > To: users@wicket.apache.org
> >  > > > Subject: RE: Spring injecting beans into
> non-component classes
> >  > > >
> >  > > >
> >  > > > I created an AbstractInjectableModel for this. It
> does dependency
> >  > > > injection for models, the same way as in components.
> >  > > >
> >  > > > Would this be something for in the
> wicket-spring-annot project?
> >  > > >
> >  > > > Bart.
> >  > > >
> >  > > > > -Oorspronkelijk bericht-
> >  > > > > Van: Igor Vaynberg [mailto:[EMAIL PROTECTED]
> >  > > > > Verzonden: dinsdag 19 februari 2008 4:41
> >  > > > > Aan: users@wicket.apache.org
> >  > > > > Onderwerp: Re: Spring injecting beans into
> non-component classes
> >  > > > >
> >  > > > > add this to the constructor of the class you want injected:
> >  > > > > InjectorHolder.getInjector().inject(this);
> >  > > > >
> >  > > > > -igor
> >  > > > >
> >  > > > >
> >  > > > > On Feb 18, 2008 7:37 PM, Warren
> >  > > <[EMAIL PROTECTED]> wrote:
> >  > > > > > I am using Spring to manage my Services and
> DAOs. Is there
> >  > > > > a special Wicket
> >  > > > > > way of injecting my beans into non component
> classes? I've
> >  > > > > seen the example
> >  > > > > > in Kent Ka Iok Tong's book of extending
> SpringWebApplication:
> >  > > > > >
> >  > > > > > public class MyApp extends SpringWebApplication {
> >  > > > > > ...
> >  > > > > > @Override
> >  > > > > > protected void init() {
> >  > > > > > addComponentInstantiationListener(new
> >  > > > > SpringComponentInjector(this));
> >  > > > > > }
> >  > > > > > ...
> >  > > > > >
> >  > > > > > and then in my components:
> >  > > > > >
> >  > > > > > @SpringBean
> >  > > > > > private MyService myService;
> >  > > > > >
> >  > > > > > I am assuming that this will only work for
> components. I am
> >  > > > > currently
> >  > > > > > injecting my beans the following way thru the constructor
> >  > > > > of my classes:
> >  >

Re: Combining Ajax and non Ajax pages

2008-02-21 Thread steviezz

Ahah - I think I'm starting to see the light...

Thanks for the hints.



Mr Mean wrote:
> 
> Don't add wicket components to the session, use models.
> for example
> class MySession extends WebSession
> {
>  private IModel dropdown1=new WhateverModel(null); //etc for the others
>  // add getters() for models
> }
> 
> class PanelSearch extends Panel
> {
>  public PanelSearch(String id)
> {
>  super(id);
>  add(new
> DropDownChoice("dropdown1",((MySession)Session.get()).getDropdown1(),myChoices)
> }
> }
> 
> class SomePage extends WebPage
> {
>  public SomePage()
> {
>  super();
>  add(new PanelSearch("search"));
> }
> }
> 
> The trick is always using the shared models in your session, that is
> why you don't need setters for them and you have to initialize them
> properly with some default.
> That way the form automatically writes the new values to your session
> and you don't have to do that manually.
> 
> How much less code can you have?
> 
> Maurice
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Combining-Ajax-and-non-Ajax-pages-tp15587166p15611982.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



BaseWicketTester.isVisible() doesn't check Component.isRenderAllowed()

2008-02-21 Thread Wang, Yuesong
BaseWicketTester.isVisible() only checks Component.isVisible(), not
Component.isRenderAllowed(). So for a component whose RENDER action is
disabled through role based authorization strategy,
BaseWicketTester.isVisible() still returns true.
BaseWicketTester.isInvisible() works correctly by using
BaseWicketTester.getComponentFromLastRenderedPage() which checks both
Component.isVisible() and isRenderAllowed().

Should I add this to JIRA?

Yuesong

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How can I refresh a "parent" Page after using PopupCloseLink in a popup window?

2008-02-21 Thread JohnSmith333

Thanks ! But the modalwindow can't be used in this case. Could anyone know
how to use Popup window rather than modal window ? Thanks~

 modal window?

Mr Mean wrote:
> 
> Use a windowclosedcallback.
> Something like this should do the trick
> modalwindow.setWindowClosedCallback(new WindowClosedCallback()
>   {
>   private static final long serialVersionUID = 1L;
> 
>   @Override
>   public void onClose(AjaxRequestTarget target)
>   {
>   target.addComponent(parentPage);
>   }
>   });
> 
> Maurice
> 
> On Thu, Feb 21, 2008 at 1:17 PM, JohnSmith333
> <[EMAIL PROTECTED]> wrote:
>>
>>  My wicket program also have the same question. Could anyone kindly help
>> us?
>>  Thanks
>>
>>
>>
>>
>>  Edvin Syse wrote:
>>  >
>>  > Hi,
>>  >
>>  > I have a Link with PopupSettings to open another window, and then
>> there is
>>  > a PopupCloseLink on the new page which closes the popupwindow
>>  > again. Is there a way to make the "parent" browserwindow refresh when
>> I
>>  > close the popupwindow also?
>>  >
>>  > Using ModalWindow makes this easy but I cannot have a ModalWindow in
>> this
>>  > usecase.
>>  >
>>  > -- Edvin
>>  >
>>  > -
>>  > To unsubscribe, e-mail: [EMAIL PROTECTED]
>>  > For additional commands, e-mail: [EMAIL PROTECTED]
>>  >
>>  >
>>  >
>>
>>  --
>>  View this message in context:
>> http://www.nabble.com/How-can-I-refresh-a-%22parent%22-Page-after-using-PopupCloseLink-in-a-popup-window--tp15574066p15608933.html
>>  Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>>
>>
>>  -
>>  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]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-can-I-refresh-a-%22parent%22-Page-after-using-PopupCloseLink-in-a-popup-window--tp15574066p15611509.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: need to sanitize uploaded file names before saving?

2008-02-21 Thread Alex Jacoby
Thanks!  That was the first thing I did, before I saw  
Files.filename().  I figured the latter would save me unnecessary  
object creation, though admittedly the java.io.File solution is  
probably more robust (I haven't looked at the source for File yet to  
compare the two).


On Feb 20, 2008, at 5:36 PM, Peter Ertl wrote:


Why not simply use

 new java.io.File(client_file_name).getName() ?

> Returns the name of the file or directory denoted by this abstract  
pathname.

> This is just the last name in the pathname's name sequence.
> If the pathname's name sequence is empty, then the empty string is  
returned.





Am 20.02.2008 um 22:03 schrieb Alex Jacoby:

Good points -- I was munging the filename a bit, but basically  
leaving it unchanged so that it would be simpler to debug.


I'm still curious about the directory traversal thing... I've tried  
using tamper data to change the filename, but I get a  
MalformedStreamException each time I try [1].


Side note: I think spaces are allowed in filenames in unix file  
systems.  Just quoted or escaped.  (Regardless, your point is still  
taken.)


Alex



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: OutOfMemoryError

2008-02-21 Thread Thomas Singer

Be sure to checkout the wiki for gotchas and tips:

http://cwiki.apache.org/WICKET/wicket-and-jmeter.html

http://cwiki.apache.org/WICKET/wicket-and-jmeter-with-regular-expressions.html 


Already done, but what we can get? An OOME in our application with the 
heapdump. Well, we already have one and the most used objects appear to come 
from Wicket (char[], byte[], String, [], HashMap$Entry, XMLTag, 
ValueMap, ComponentTag, RawMarkup, HashMap$EntrySet, int[], short[] just to 
name the largest).


--
Best regards,
Thomas Singer
_
SyntEvo GmbH
www.syntevo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Combining Ajax and non Ajax pages

2008-02-21 Thread Maurice Marrink
Don't add wicket components to the session, use models.
for example
class MySession extends WebSession
{
 private IModel dropdown1=new WhateverModel(null); //etc for the others
 // add getters() for models
}

class PanelSearch extends Panel
{
 public PanelSearch(String id)
{
 super(id);
 add(new 
DropDownChoice("dropdown1",((MySession)Session.get()).getDropdown1(),myChoices)
}
}

class SomePage extends WebPage
{
 public SomePage()
{
 super();
 add(new PanelSearch("search"));
}
}

The trick is always using the shared models in your session, that is
why you don't need setters for them and you have to initialize them
properly with some default.
That way the form automatically writes the new values to your session
and you don't have to do that manually.

How much less code can you have?

Maurice

On Thu, Feb 21, 2008 at 1:44 PM, steviezz <[EMAIL PROTECTED]> wrote:
>
>  Thanks.
>
>  I have already moved to using the session for storage.  I've tried just
>  adding the complete search panel object to the session in the search
>  onsubmit() and fetching it again to add to the results page - this works and
>  avoids some of my page reload and history issues (but adds a few others),
>  but I presume its not really a good idea to store large object graphs in the
>  session - maybe better to just store the selected values and rebuild the
>  selection dropdowns as required.  Plus, this will probably help me iron out
>  my inconsistent dropdown state problems.
>
>  But I'm still searching for a magic solution that does not involve writing
>  too much code :-}
>
>
>
>
>
>  Mr Mean wrote:
>  >
>  > I would not recommend what you are doing here.
>  > What happens is that wicket removes the panel from the original page
>  > and attaches it to the new page, making it impossible to use the
>  > backbutton (because wicket will complain about a missing component).
>  > Also this only works if the html of the new page uses the same
>  > component id.
>  >
>  > It is better to store the selection for your dropdowns in the session
>  > (as suggested before).
>  > Then in the constructor of your PanelSearch you can check if the
>  > session contains a value for the dropdowns and if that is the case set
>  > it as the model for the dropdown. That way you don't have to pass the
>  > state to every page.
>  >
>  > Maurice
>  >
>  > On Thu, Feb 21, 2008 at 11:35 AM, steviezz <[EMAIL PROTECTED]>
>  > wrote:
>  >>
>  >>  Answering my own questions.
>  >>
>  >>  I can also pass the search panel to the results page from my form
>  >> onSubmit:
>  >>
>  >> setResponsePage(new
>  >> SearchResults(((PanelSearch)this.getParent()),
>  >>  search));
>  >>
>  >>  Then, in the results page:
>  >>
>  >>public SearchResults(PanelSearch searchPanel, Search search) {
>  >> add(searchPanel);
>  >> }
>  >>
>  >>  Mostly seems to work OK - panel on results page retains state from
>  >> search
>  >>  page.
>  >>
>  >>  Still getting some weird behaviour with the Ajax dropdowns on page
>  >> refreshes
>  >>  - can get crazy state of North America, Canada, Kansas if I refresh the
>  >> page
>  >>  between selection changes (old state gets mixed in with partial new
>  >> state)
>  >>
>  >>  Other thing to sort is how to reload panel state if user goes back to
>  >> the
>  >>  home page (containing search panel) via a basic external navigation link
>  >> -
>  >>  panel will be in its initial blank state.  Perhaps I do need to look
>  >> into
>  >>  loading from the session for this.
>  >>
>  >>  But I'm starting to like Wicket - this kind of stuff takes much more
>  >> code in
>  >>  other frameworks.
>  >>
>  >>
>  >>
>  >>
>  >>  steviezz wrote:
>  >>  >
>  >>  > I am now passing the search form model to the new page in the
>  >> constructor,
>  >>  >
>  >>  >   setResponsePage(new SearchResults(search));
>  >>  >
>  >>  > Works OK - I assume this is better than going through the session.
>  >>  >
>  >>  > But I have no idea (yet) how to reinitialise the search panel Ajax
>  >>  > widgets.
>  >>  >
>  >>  >
>  >>  >
>  >>  >
>  >>  > wicket user-2 wrote:
>  >>  >>
>  >>  >> store the backing model in the session and get it from the session,
>  >> this
>  >>  >> will help you retain the state in all the cases
>  >>  >>
>  >>  >> Cheers
>  >>  >> Dipu
>  >>  >>
>  >>  >>
>  >>  >>
>  >>  >
>  >>  >
>  >>
>  >>  --
>  >>  View this message in context:
>  >> 
> http://www.nabble.com/Combining-Ajax-and-non-Ajax-pages-tp15587166p15607263.html
>  >>
>  >>
>  >> Sent from the Wicket - User mailing list archive at Nabble.com.
>  >>
>  >>
>  >>  -
>  >>  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]
>  >
>  >
>  >
>

Re: textarea problem

2008-02-21 Thread okrohne

ups, sorry... never had a problem using textarea without closing tag



Thomas Gier-2 wrote:
> 
> okrohne schrieb:
>> Hi,
>>
>> if I use a textarea like this:
>>
>> > class="input_text" title="test" />
>>
>> all subsequent html markup is shown in the textarea.
>>
>> If I use the textarea in this way everything is okay.
>>  
>> > class="input_text" title="test">
>> 
>>
>> Is this a known issue?
>>
>> Thanks,
>> Oliver
>>
>>   
> 
> Hi Oliver,
> 
> the closing tag for  is required.
> 
> See http://www.w3.org/TR/html4/interact/forms.html#h-17.7 for details.
> 
> HTH
> Tom
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/textarea-problem-tp15606212p15611009.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wicket.Tree has no properties

2008-02-21 Thread Juan Gabriel Arias
I found the problem.

My HTML head had



And the problem is the way i close the tag. If i put



It works ok.


Re: AjaxFormSubmitBehavior and setDefaultFormProcessing(false)?

2008-02-21 Thread Maurice Marrink
Can't you use an AjaxSubmitLink?

Maurice

On Thu, Feb 21, 2008 at 12:57 PM, Juha Alatalo
<[EMAIL PROTECTED]> wrote:
> Hi,
>
>  I have created a dropDownChoice component where the last option is
>  "browse"  == opens new page where user can make queries. (Similar to
>  "look in" field in search panel of Windows XP, where user can select
>  some default folders or can choose browse to give an exact folder)
>
>  Because there is also other fields, form hast to be posted when opening
>  new page from browse ==> AjaxFromSubmitBehavior("onchange"). Only
>  problem is that I can't call setDefaultFormProcessing(false) in
>  ajaxFormSubmitBehavior like I can do with Buttons. I would like to do
>  validation only when user presses save button, not when he chooses to
>  browse information for one field.
>
>  Is there some way to solve this problem?
>
>  - Juha
>
>
>  -
>  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]



Re: Combining Ajax and non Ajax pages

2008-02-21 Thread steviezz

Thanks. 

I have already moved to using the session for storage.  I've tried just
adding the complete search panel object to the session in the search
onsubmit() and fetching it again to add to the results page - this works and
avoids some of my page reload and history issues (but adds a few others),
but I presume its not really a good idea to store large object graphs in the
session - maybe better to just store the selected values and rebuild the
selection dropdowns as required.  Plus, this will probably help me iron out
my inconsistent dropdown state problems.  

But I'm still searching for a magic solution that does not involve writing
too much code :-} 



Mr Mean wrote:
> 
> I would not recommend what you are doing here.
> What happens is that wicket removes the panel from the original page
> and attaches it to the new page, making it impossible to use the
> backbutton (because wicket will complain about a missing component).
> Also this only works if the html of the new page uses the same
> component id.
> 
> It is better to store the selection for your dropdowns in the session
> (as suggested before).
> Then in the constructor of your PanelSearch you can check if the
> session contains a value for the dropdowns and if that is the case set
> it as the model for the dropdown. That way you don't have to pass the
> state to every page.
> 
> Maurice
> 
> On Thu, Feb 21, 2008 at 11:35 AM, steviezz <[EMAIL PROTECTED]>
> wrote:
>>
>>  Answering my own questions.
>>
>>  I can also pass the search panel to the results page from my form
>> onSubmit:
>>
>> setResponsePage(new
>> SearchResults(((PanelSearch)this.getParent()),
>>  search));
>>
>>  Then, in the results page:
>>
>>public SearchResults(PanelSearch searchPanel, Search search) {
>> add(searchPanel);
>> }
>>
>>  Mostly seems to work OK - panel on results page retains state from
>> search
>>  page.
>>
>>  Still getting some weird behaviour with the Ajax dropdowns on page
>> refreshes
>>  - can get crazy state of North America, Canada, Kansas if I refresh the
>> page
>>  between selection changes (old state gets mixed in with partial new
>> state)
>>
>>  Other thing to sort is how to reload panel state if user goes back to
>> the
>>  home page (containing search panel) via a basic external navigation link
>> -
>>  panel will be in its initial blank state.  Perhaps I do need to look
>> into
>>  loading from the session for this.
>>
>>  But I'm starting to like Wicket - this kind of stuff takes much more
>> code in
>>  other frameworks.
>>
>>
>>
>>
>>  steviezz wrote:
>>  >
>>  > I am now passing the search form model to the new page in the
>> constructor,
>>  >
>>  >   setResponsePage(new SearchResults(search));
>>  >
>>  > Works OK - I assume this is better than going through the session.
>>  >
>>  > But I have no idea (yet) how to reinitialise the search panel Ajax
>>  > widgets.
>>  >
>>  >
>>  >
>>  >
>>  > wicket user-2 wrote:
>>  >>
>>  >> store the backing model in the session and get it from the session,
>> this
>>  >> will help you retain the state in all the cases
>>  >>
>>  >> Cheers
>>  >> Dipu
>>  >>
>>  >>
>>  >>
>>  >
>>  >
>>
>>  --
>>  View this message in context:
>> http://www.nabble.com/Combining-Ajax-and-non-Ajax-pages-tp15587166p15607263.html
>>
>>
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>>  -
>>  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]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Combining-Ajax-and-non-Ajax-pages-tp15587166p15610292.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: RestartResponseAtInterceptPageException with Ajax

2008-02-21 Thread Stefan Fußenegger

Maurice, 

Thanks for your suggestions. However, these suggestions are yet 2 other
workarounds for this problem.

imho, using RestartResponseAtInterceptPageException and
continueToOriginalDestination() should work out of the box, regardless of
the type of request (Ajax and non-Ajax). Therefore I suggest adding support
to the framework - and your suggestions did not convince me not to do so,
sorry ;)

However, the strategy to choose a page for continueToOriginalDestination()
is open for discussion. The simplest approach would be to go back to the
source of the Ajax request, while allowing to complete the request and
render the entire page afterwards would be best.

-- Stefan



Mr Mean wrote:
> 
> Hmm, i'm not sure this will work at all with the restartresponse but i
> have 2 alternatives that do not require changes to wicket
> 
> -append some javascript to the ajaxrequesttarget that will trigger the
> browser to request your login page (you can get the wicket url for the
> loginpage using urlFor)
>  if your login page accepts pageparams you can use those to decide
> what the response for a successful login should be.
> 
> -open you login page in a ModalWindow on the same page and close it
> after a successful login (you might need to refresh the origin page
> after this)
> 
> Maurice
> 
> On Thu, Feb 21, 2008 at 10:30 AM, Stefan Fußenegger
> <[EMAIL PROTECTED]> wrote:
>>
>>  Hi,
>>
>>  I'm currently trying to use RestartResponseAtInterceptPageException with
>>  Ajax. More precisely, I show a component that refreshes itself after
>>  executing an authorized action. It the user is not authorized to execute
>>  this action, I'd like to redirect him to the Login-Page. After proper
>> login,
>>  the user should be redirected to the original page. However, using
>>  continueToOriginalDestination() does not work (out of the box), as the
>> User
>>  is redirected to the URL of the Ajax request.
>>
>>
>>  Workaround/Possible changes to simplify workaround:
>>
>>  A custom workaround would be to do a custom PageMap implementation.
>> However,
>>  as the method setUpRedirect(RequestCycle) is private, deriving from the
>>  default PageMap will require some ugly copy-paste in order to do so.
>> This
>>  could be avoided by a) making setUpRedirect(RequestCycle) protected
>> and/or
>>  b) introduce a protected method that constructs the
>> interceptContinuationURL
>>  inside setUpRedirect(RequestCycle).
>>
>>
>>  Changing default behaviour:
>>
>>  The workaround version is not trivial, as in requires quite a bit of
>>  knowledge of Wicket's inner workings ("What the hell is a PageMap?").
>>  Therefore, it might be a good idea to change the default behaviour
>> there, as
>>  no user wants to see Ajax responses at all (well, at least no normal
>> user -
>>  I really enjoy their unrivalled beauty ;) ). Shouldn't the behaviour be
>>  somewhat more intelligent by default (without hacking a custom PageMap)?
>>  That is to redirect to the page the Ajax request belonged to? Or even
>>  better: redirect to the Ajax call and render the complete page (well,
>> don't
>>  know how tricky that would be).
>>
>>  Or do I miss something completely? Any other possible workarounds or
>>  suggestions?
>>
>>  Cheers, Stefan
>>
>>  -
>>  ---
>>  Stefan Fußenegger
>>  http://talk-on-tech.blogspot.com // looking for a nicer domain ;)
>>  --
>>  View this message in context:
>> http://www.nabble.com/RestartResponseAtInterceptPageException-with-Ajax-tp15607225p15607225.html
>>  Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>>  -
>>  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]
> 
> 
> 


-
---
Stefan Fußenegger
http://talk-on-tech.blogspot.com // looking for a nicer domain ;)
-- 
View this message in context: 
http://www.nabble.com/RestartResponseAtInterceptPageException-with-Ajax-tp15607225p15610291.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How can I refresh a "parent" Page after using PopupCloseLink in a popup window?

2008-02-21 Thread Maurice Marrink
Use a windowclosedcallback.
Something like this should do the trick
modalwindow.setWindowClosedCallback(new WindowClosedCallback()
{
private static final long serialVersionUID = 1L;

@Override
public void onClose(AjaxRequestTarget target)
{
target.addComponent(parentPage);
}
});

Maurice

On Thu, Feb 21, 2008 at 1:17 PM, JohnSmith333
<[EMAIL PROTECTED]> wrote:
>
>  My wicket program also have the same question. Could anyone kindly help us?
>  Thanks
>
>
>
>
>  Edvin Syse wrote:
>  >
>  > Hi,
>  >
>  > I have a Link with PopupSettings to open another window, and then there is
>  > a PopupCloseLink on the new page which closes the popupwindow
>  > again. Is there a way to make the "parent" browserwindow refresh when I
>  > close the popupwindow also?
>  >
>  > Using ModalWindow makes this easy but I cannot have a ModalWindow in this
>  > usecase.
>  >
>  > -- Edvin
>  >
>  > -
>  > To unsubscribe, e-mail: [EMAIL PROTECTED]
>  > For additional commands, e-mail: [EMAIL PROTECTED]
>  >
>  >
>  >
>
>  --
>  View this message in context: 
> http://www.nabble.com/How-can-I-refresh-a-%22parent%22-Page-after-using-PopupCloseLink-in-a-popup-window--tp15574066p15608933.html
>  Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
>
>
>  -
>  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]



Bug WICKET-1265

2008-02-21 Thread Pierre G

Hi all,

The solution for the bug WICKET-1265 (Close ModalWindow in IE with
scrollbars scrolls to bottom) is not added in last version 1.3.1.

I try to make the change in my jars without success. With the original, on
close of the  ModalWindow, the page scrolls to bottom . With the recommended
patch, the page scrolls to top !!!
Please help me to keep this page not moving 

Thanks in advance


Pierre 

-- 
View this message in context: 
http://www.nabble.com/Bug-WICKET-1265-tp15609571p15609571.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat Problem

2008-02-21 Thread Juan Gabriel Arias
Are you running in development mode?


Re: How can I refresh a "parent" Page after using PopupCloseLink in a popup window?

2008-02-21 Thread JohnSmith333

My wicket program also have the same question. Could anyone kindly help us?
Thanks


Edvin Syse wrote:
> 
> Hi,
> 
> I have a Link with PopupSettings to open another window, and then there is
> a PopupCloseLink on the new page which closes the popupwindow 
> again. Is there a way to make the "parent" browserwindow refresh when I
> close the popupwindow also?
> 
> Using ModalWindow makes this easy but I cannot have a ModalWindow in this
> usecase.
> 
> -- Edvin
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-can-I-refresh-a-%22parent%22-Page-after-using-PopupCloseLink-in-a-popup-window--tp15574066p15608933.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



AjaxFormSubmitBehavior and setDefaultFormProcessing(false)?

2008-02-21 Thread Juha Alatalo

Hi,

I have created a dropDownChoice component where the last option is 
"browse"  == opens new page where user can make queries. (Similar to 
"look in" field in search panel of Windows XP, where user can select 
some default folders or can choose browse to give an exact folder)


Because there is also other fields, form hast to be posted when opening 
new page from browse ==> AjaxFromSubmitBehavior("onchange"). Only 
problem is that I can't call setDefaultFormProcessing(false) in 
ajaxFormSubmitBehavior like I can do with Buttons. I would like to do 
validation only when user presses save button, not when he chooses to 
browse information for one field.


Is there some way to solve this problem?

- Juha


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Bug WICKET-1265

2008-02-21 Thread Pierre Gilquin

Hi all,

The solution for the bug WICKET-1265 (Close ModalWindow in IE with scrollbars scrolls to bottom) is not added in last 
version 1.3.1.


I try to make the change in my jars without success. With the original, on close of the  ModalWindow, the page scrolls 
to bottom . With the recommended patch, the page scrolls to top !!!

Please help me to keep this page not moving 

Thanks in advance


Pierre 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: OutOfMemoryError

2008-02-21 Thread Nino Saturnino Martinez Vazquez Wael

Be sure to checkout the wiki for gotchas and tips:

http://cwiki.apache.org/WICKET/wicket-and-jmeter.html

http://cwiki.apache.org/WICKET/wicket-and-jmeter-with-regular-expressions.html

Eelco Hillenius wrote:

Another option is to use a profiler in your dev environment, or a
production-similar environment and run a jmeter script that simulates users.
You can then create memory dumps and analyze them for leaks.



Definitively a very good idea to use jmeter and a profiler. Might be a
bit of a pain to get started, but well worth your time when that lets
you find memory leaks.

When defining a test in jmeter (using a proxy to record generally
works well), be sure you start with a fresh session, and close the
session when you end the test. So start a fresh browser instance when
you commence testing, and make sure your last action results in a
session.invalidate/ session.invalidateNow (typically your logoff
functionality, but if you don't have that functionality, simply build
a bookmarkable page that does this, just for the test). Also be sure
you understand how Wicket's page versioning works before you attempt
to build in loops within a session.

Good luck,

Eelco

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  


--
Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Combining Ajax and non Ajax pages

2008-02-21 Thread Maurice Marrink
I would not recommend what you are doing here.
What happens is that wicket removes the panel from the original page
and attaches it to the new page, making it impossible to use the
backbutton (because wicket will complain about a missing component).
Also this only works if the html of the new page uses the same
component id.

It is better to store the selection for your dropdowns in the session
(as suggested before).
Then in the constructor of your PanelSearch you can check if the
session contains a value for the dropdowns and if that is the case set
it as the model for the dropdown. That way you don't have to pass the
state to every page.

Maurice

On Thu, Feb 21, 2008 at 11:35 AM, steviezz <[EMAIL PROTECTED]> wrote:
>
>  Answering my own questions.
>
>  I can also pass the search panel to the results page from my form onSubmit:
>
> setResponsePage(new SearchResults(((PanelSearch)this.getParent()),
>  search));
>
>  Then, in the results page:
>
>public SearchResults(PanelSearch searchPanel, Search search) {
> add(searchPanel);
> }
>
>  Mostly seems to work OK - panel on results page retains state from search
>  page.
>
>  Still getting some weird behaviour with the Ajax dropdowns on page refreshes
>  - can get crazy state of North America, Canada, Kansas if I refresh the page
>  between selection changes (old state gets mixed in with partial new state)
>
>  Other thing to sort is how to reload panel state if user goes back to the
>  home page (containing search panel) via a basic external navigation link -
>  panel will be in its initial blank state.  Perhaps I do need to look into
>  loading from the session for this.
>
>  But I'm starting to like Wicket - this kind of stuff takes much more code in
>  other frameworks.
>
>
>
>
>  steviezz wrote:
>  >
>  > I am now passing the search form model to the new page in the constructor,
>  >
>  >   setResponsePage(new SearchResults(search));
>  >
>  > Works OK - I assume this is better than going through the session.
>  >
>  > But I have no idea (yet) how to reinitialise the search panel Ajax
>  > widgets.
>  >
>  >
>  >
>  >
>  > wicket user-2 wrote:
>  >>
>  >> store the backing model in the session and get it from the session, this
>  >> will help you retain the state in all the cases
>  >>
>  >> Cheers
>  >> Dipu
>  >>
>  >>
>  >>
>  >
>  >
>
>  --
>  View this message in context: 
> http://www.nabble.com/Combining-Ajax-and-non-Ajax-pages-tp15587166p15607263.html
>
>
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
>  -
>  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]



Re: Combining Ajax and non Ajax pages

2008-02-21 Thread steviezz

Answering my own questions.

I can also pass the search panel to the results page from my form onSubmit: 

setResponsePage(new SearchResults(((PanelSearch)this.getParent()),
search));

Then, in the results page: 

   public SearchResults(PanelSearch searchPanel, Search search) {
add(searchPanel);
}

Mostly seems to work OK - panel on results page retains state from search
page.

Still getting some weird behaviour with the Ajax dropdowns on page refreshes
- can get crazy state of North America, Canada, Kansas if I refresh the page
between selection changes (old state gets mixed in with partial new state)

Other thing to sort is how to reload panel state if user goes back to the
home page (containing search panel) via a basic external navigation link -
panel will be in its initial blank state.  Perhaps I do need to look into
loading from the session for this.  

But I'm starting to like Wicket - this kind of stuff takes much more code in
other frameworks.  



steviezz wrote:
> 
> I am now passing the search form model to the new page in the constructor, 
> 
>   setResponsePage(new SearchResults(search));
> 
> Works OK - I assume this is better than going through the session. 
> 
> But I have no idea (yet) how to reinitialise the search panel Ajax
> widgets. 
> 
> 
> 
> 
> wicket user-2 wrote:
>> 
>> store the backing model in the session and get it from the session, this
>> will help you retain the state in all the cases
>> 
>> Cheers
>> Dipu
>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Combining-Ajax-and-non-Ajax-pages-tp15587166p15607263.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



OutOfMemoryError

2008-02-21 Thread Thomas Singer
As already written a couple of weeks ago, we regularly get OutOfMemoryErrors 
with our Wicket-based website. I've finally got a heapdump.hprof and no 
entry above 3kByte size is from our code. If someone from the Wicket team is 
interested, I can send the html-instance information sorted by size or 
instance count.


--
Best regards,
Thomas Singer
_
SyntEvo GmbH
www.syntevo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: textarea problem

2008-02-21 Thread Thomas Gier

okrohne schrieb:

Hi,

if I use a textarea like this:



all subsequent html markup is shown in the textarea.

If I use the textarea in this way everything is okay.
 

class="input_text" title="test">


Is this a known issue?

Thanks,
Oliver

  


Hi Oliver,

the closing tag for  is required.

See http://www.w3.org/TR/html4/interact/forms.html#h-17.7 for details.

HTH
Tom


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Combining Ajax and non Ajax pages

2008-02-21 Thread steviezz

I am now passing the search form model to the new page in the constructor, 

  setResponsePage(new SearchResults(search));

Works OK - I assume this is better than going through the session. 

But I have no idea (yet) how to reinitialise the search panel Ajax widgets. 




wicket user-2 wrote:
> 
> store the backing model in the session and get it from the session, this
> will help you retain the state in all the cases
> 
> Cheers
> Dipu
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Combining-Ajax-and-non-Ajax-pages-tp15587166p15607248.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat Problem

2008-02-21 Thread Maurice Marrink
Are you using this plugin http://www.eclipsetotale.com/tomcatPlugin.html ?
It allows tomcat to load the application directly from your eclipse
project, thus any change to a resource file is automatically detected.
also changes to java files are automatically picked up (sometimes the
new class is not compatible but that is a jvm limitation)

Maurice

On Thu, Feb 21, 2008 at 10:04 AM, Soniya <[EMAIL PROTECTED]> wrote:
>
>  hi,
>
>  I am using wicket1.3 with Tomcat 5.0 and am using IDE tool Eclipse 3.2. I am
>  suffering from a problem that i have to restart the tomcat after every
>  change made in the file.
>  Is their any solution for this please replay.
>
>  Thanks in advance.
>
>  --
>  View this message in context: 
> http://www.nabble.com/Tomcat-Problem-tp15607207p15607207.html
>  Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
>  -
>  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]



Re: RestartResponseAtInterceptPageException with Ajax

2008-02-21 Thread Maurice Marrink
Hmm, i'm not sure this will work at all with the restartresponse but i
have 2 alternatives that do not require changes to wicket

-append some javascript to the ajaxrequesttarget that will trigger the
browser to request your login page (you can get the wicket url for the
loginpage using urlFor)
 if your login page accepts pageparams you can use those to decide
what the response for a successful login should be.

-open you login page in a ModalWindow on the same page and close it
after a successful login (you might need to refresh the origin page
after this)

Maurice

On Thu, Feb 21, 2008 at 10:30 AM, Stefan Fußenegger
<[EMAIL PROTECTED]> wrote:
>
>  Hi,
>
>  I'm currently trying to use RestartResponseAtInterceptPageException with
>  Ajax. More precisely, I show a component that refreshes itself after
>  executing an authorized action. It the user is not authorized to execute
>  this action, I'd like to redirect him to the Login-Page. After proper login,
>  the user should be redirected to the original page. However, using
>  continueToOriginalDestination() does not work (out of the box), as the User
>  is redirected to the URL of the Ajax request.
>
>
>  Workaround/Possible changes to simplify workaround:
>
>  A custom workaround would be to do a custom PageMap implementation. However,
>  as the method setUpRedirect(RequestCycle) is private, deriving from the
>  default PageMap will require some ugly copy-paste in order to do so. This
>  could be avoided by a) making setUpRedirect(RequestCycle) protected and/or
>  b) introduce a protected method that constructs the interceptContinuationURL
>  inside setUpRedirect(RequestCycle).
>
>
>  Changing default behaviour:
>
>  The workaround version is not trivial, as in requires quite a bit of
>  knowledge of Wicket's inner workings ("What the hell is a PageMap?").
>  Therefore, it might be a good idea to change the default behaviour there, as
>  no user wants to see Ajax responses at all (well, at least no normal user -
>  I really enjoy their unrivalled beauty ;) ). Shouldn't the behaviour be
>  somewhat more intelligent by default (without hacking a custom PageMap)?
>  That is to redirect to the page the Ajax request belonged to? Or even
>  better: redirect to the Ajax call and render the complete page (well, don't
>  know how tricky that would be).
>
>  Or do I miss something completely? Any other possible workarounds or
>  suggestions?
>
>  Cheers, Stefan
>
>  -
>  ---
>  Stefan Fußenegger
>  http://talk-on-tech.blogspot.com // looking for a nicer domain ;)
>  --
>  View this message in context: 
> http://www.nabble.com/RestartResponseAtInterceptPageException-with-Ajax-tp15607225p15607225.html
>  Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
>  -
>  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]



RestartResponseAtInterceptPageException with Ajax

2008-02-21 Thread Stefan Fußenegger

Hi,

I'm currently trying to use RestartResponseAtInterceptPageException with
Ajax. More precisely, I show a component that refreshes itself after
executing an authorized action. It the user is not authorized to execute
this action, I'd like to redirect him to the Login-Page. After proper login,
the user should be redirected to the original page. However, using
continueToOriginalDestination() does not work (out of the box), as the User
is redirected to the URL of the Ajax request.


Workaround/Possible changes to simplify workaround:

A custom workaround would be to do a custom PageMap implementation. However,
as the method setUpRedirect(RequestCycle) is private, deriving from the
default PageMap will require some ugly copy-paste in order to do so. This
could be avoided by a) making setUpRedirect(RequestCycle) protected and/or
b) introduce a protected method that constructs the interceptContinuationURL
inside setUpRedirect(RequestCycle).


Changing default behaviour:

The workaround version is not trivial, as in requires quite a bit of
knowledge of Wicket's inner workings ("What the hell is a PageMap?").
Therefore, it might be a good idea to change the default behaviour there, as
no user wants to see Ajax responses at all (well, at least no normal user -
I really enjoy their unrivalled beauty ;) ). Shouldn't the behaviour be
somewhat more intelligent by default (without hacking a custom PageMap)?
That is to redirect to the page the Ajax request belonged to? Or even
better: redirect to the Ajax call and render the complete page (well, don't
know how tricky that would be).

Or do I miss something completely? Any other possible workarounds or
suggestions?

Cheers, Stefan

-
---
Stefan Fußenegger
http://talk-on-tech.blogspot.com // looking for a nicer domain ;)
-- 
View this message in context: 
http://www.nabble.com/RestartResponseAtInterceptPageException-with-Ajax-tp15607225p15607225.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tomcat Problem

2008-02-21 Thread Soniya

hi,

I am using wicket1.3 with Tomcat 5.0 and am using IDE tool Eclipse 3.2. I am
suffering from a problem that i have to restart the tomcat after every
change made in the file.
Is their any solution for this please replay.

Thanks in advance.

-- 
View this message in context: 
http://www.nabble.com/Tomcat-Problem-tp15607207p15607207.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]