haven't looked at your problem yet below but have you tested it with the
latest code?
there are a lot of improvements in the stateless with mounts.
I still do need to check the index url strategy i think.
johan
On 12/28/06, Korbinian Bachl <[EMAIL PROTECTED]> wrote:
Hi,
i just wanted to create a small JUNIT (regarding the BUG in case of a
StatelessForm breaking IndexedURLStrategy) test Johan asked me for 2 weeks
ago and come into a problem i dont understand:
I got following code:
HTML A:
<html>
<head>
<title></title>
</head>
<body>
Form: <span wicket:id="value">ausgabe</span>
<form wicket:id="suchForm" action="suchen.htm" method="post">
<input wicket:id="suchFeld" type="text" size="20">
<input name="suchen" type="submit" id="suchen"
value="Suchen">
</form>
<br>
</body>
</html>
HTML B:
<html>
<head>
<title></title>
</head>
<body>
<form wicket:id="suchForm" action="suchen.htm" method="post">
<input wicket:id="suchFeld" type="text" size="20">
<input name="suchen" type="submit" id="suchen"
value="Suchen">
</form>
<br>
Form: <span wicket:id="value">ausgabe</span>
</body>
</html>
JAVACODE:
public class TestClass extends WebPage{
private TextField suchTextField;
public TestClass() {
this(new PageParameters());
}
/** Creates a new instance of TestClass */
public TestClass(PageParameters paramsIn) {
super(paramsIn);
//print out the result
new
Label(this,"value",paramsIn.getString(Integer.toString(paramsIn.size
()-1),""
));
// create the form
Form form = new SuchForm(this,"suchForm");
suchTextField = new TextField(form, "suchFeld", new Model(""));
}
protected String getSuchfeld()
{
return suchTextField.getModelObjectAsString();
}
class SuchForm extends StatelessForm{
public SuchForm(MarkupContainer parent, String id) {
super(parent,id);
}
@Override
public void onSubmit()
{
String suchFeld = getSuchfeld();
if(suchFeld.length()>0)
{
PageParameters params = new PageParameters();
params.add(Integer.toString(params.size()),suchFeld);
setResponsePage(TestClass.class,params);
}
}
}
}
So, in case of HTML A, everything works fine, in case of HTML B, i get
following error:
WicketMessage:
file:/C:/JEE5/SJAS901/AppServer/domains/domain1/applications/j2ee-apps/TestA
pp/TestApp-war_war/WEB-INF/classes/de/wicket/test/TestClass.html: Markup
with path 'value' not found in fragment: null
Root cause:
wicket.markup.MarkupException:
file:/C:/JEE5/SJAS901/AppServer/domains/domain1/applications/j2ee-apps/TestA
pp/TestApp-war_war/WEB-INF/classes/de/wicket/test/TestClass.html: Markup
with path 'value' not found in fragment: null
at wicket.markup.MarkupFragment.getChildFragment(MarkupFragment.java:264)
at wicket.markup.MarkupFragment.getChildFragment(MarkupFragment.java:181)
at wicket.Page.getMarkupFragment(Page.java:1276)
at wicket.Component.getMarkupFragment(Component.java:743)
at wicket.Component.<init>(Component.java:634)
at wicket.markup.html.WebComponent.<init>(WebComponent.java:55)
at wicket.markup.html.basic.Label.<init>(Label.java:111)
at wicket.markup.html.basic.Label.<init>(Label.java:102)
at de.wicket.test.TestClass.<init>(TestClass.java:37)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at
wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:153)
at
wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:95)
at
wicket.request.target.component.BookmarkablePageRequestTarget.newPage
(Bookma
rkablePageRequestTarget.java:275)
at
wicket.request.target.component.BookmarkablePageRequestTarget.getPage
(Bookma
rkablePageRequestTarget.java:290)
at
wicket.request.target.component.BookmarkablePageRequestTarget.processEvents
(
BookmarkablePageRequestTarget.java:208)
at
wicket.request.compound.DefaultEventProcessorStrategy.processEvents
(DefaultE
ventProcessorStrategy.java:68)
at
wicket.request.compound.AbstractCompoundRequestCycleProcessor.processEvents
(
AbstractCompoundRequestCycleProcessor.java:56)
at wicket.RequestCycle.doProcessEventsAndRespond(RequestCycle.java
:938)
at wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:973)
at wicket.RequestCycle.step(RequestCycle.java:1054)
at wicket.RequestCycle.steps(RequestCycle.java:1125)
at wicket.RequestCycle.request(RequestCycle.java:470)
at wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:232)
at wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:122)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(Application
FilterChain.java:216)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterCh
ain.java:184)
at
org.apache.catalina.core.StandardWrapperValve.invoke(
StandardWrapperValve.ja
va:276)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java
:566
)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java
:536)
at
org.apache.catalina.core.StandardContextValve.invokeInternal
(StandardContext
Valve.java:240)
at
org.apache.catalina.core.StandardContextValve.invoke(
StandardContextValve.ja
va:179)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java
:566
)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:182
)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java
:566
)
at
com.sun.enterprise.web.VirtualServerPipeline.invoke(
VirtualServerPipeline.ja
va:120)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
at
org.apache.catalina.core.StandardEngineValve.invoke(
StandardEngineValve.java
:137)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java
:566
)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java
:536)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:239)
at
com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter
(Process
orTask.java:667)
at
com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked
(Pro
cessorTask.java:574)
at
com.sun.enterprise.web.connector.grizzly.ProcessorTask.process
(ProcessorTask
.java:844)
at
com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask
(ReadT
ask.java:287)
at
com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java
:212)
at
com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
at
com.sun.enterprise.web.connector.grizzly.WorkerThread.run(
WorkerThread.java:
75)
What can this be???
Regards
Korbinian