Hi, 

in my app i have a RefreshingView that gets a label an a TextField 
subclass MyAjaxTextField.

<form wicket:id="form">
        <table cellspacing="0" class="dataview">
    <tr>
        <th>Beschreibung</th>
        <th>2004</th>
    </tr>
    <tr wicket:id="simple">
        <td><span wicket:id="description">[description]</span></td>
        <td><input type="text" wicket:id="value"></input> </td>
    </tr>
        </table>
</form>

##################################################################################
public class MyRefrechingView extends RefreshingView{
[...]
protected void populateItem(Item item) {
                 // populate the row of the repeater
                MyForm form = (MyForm)this.getParent();
        IModel position = item.getModel();
 
        final Label description = new Label("description", new 
PropertyModel(position, "description"));
        item.add(description);
 
        final MyAjaxTextField valueField = new MyAjaxTextField("value", 
new PropertyModel(position,"output"));
        valueField.add(new MyAjaxFormSubmitBehavior(form,"onchange"));
        valueField.setOutputMarkupId(true);
        item.add(valueField);
        }

}
 

##############################################################################

public class MyAjaxTextField extends TextField{

        MyOnChangeAjaxBehavior ajaxBehavior = new 
MyOnChangeAjaxBehavior();
 
        public MyAjaxTextField(String arg0) {
                super(arg0);
 
        }
        public MyAjaxTextField(String arg0, IModel model) {
                super(arg0,model);
                //this.add(ajaxBehavior);
                PropertyModel pm = (PropertyModel)model;
                Position position = (Position)pm.getTarget();

                if(position.hasFormula()){
                        this.add(new MyAjaxOnClickEvent("onclick"));
                        this.add(new MyAjaxOnBlurEvent("onblur"));
                }
        }
}

The Value of the TextField depends on some data stored at Position. It 
could be a normal double value or a formula.
If i run the app, everything seems fine and all calculations and ajax 
updateing seems to work but i got this exception:

58023 [http-8080-Processor25] ERROR org.apache.wicket.RequestCycle - there 
was an error cleaning up target [EMAIL PROTECTED] 
markupIdToComponent [{value6=[MarkupContainer [Component id = value, page 
= <No Page>, path = 1:value.MyAjaxTextField]], form5=[MarkupContainer 
[Component id = form, page = pages.ConfirmPage, path = 
1:tabs:panel:form.MyForm, isVisible = true, isVersioned = false]]}], 
prependJavascript [[]], appendJavascript [[]].
java.lang.IllegalStateException: No Page found for component 
[MarkupContainer [Component id = value, page = <No Page>, path = 
1:value.MyAjaxTextField]]
        at org.apache.wicket.Component.getPage(Component.java:1343)
        at org.apache.wicket.ajax.AjaxRequestTarget.detach(
AjaxRequestTarget.java:436)
        at org.apache.wicket.RequestCycle.detach(RequestCycle.java:911)
        at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1194)
        at org.apache.wicket.RequestCycle.request(RequestCycle.java:499)
        at org.apache.wicket.protocol.http.WicketFilter.doGet(
WicketFilter.java:257)
        at org.apache.wicket.protocol.http.WicketServlet.doPost(
WicketServlet.java:144)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
ApplicationFilterChain.java:252)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(
ApplicationFilterChain.java:173)
        at org.apache.catalina.core.StandardWrapperValve.invoke(
StandardWrapperValve.java:213)
        at org.apache.catalina.core.StandardContextValve.invoke(
StandardContextValve.java:178)
        at org.apache.catalina.core.StandardHostValve.invoke(
StandardHostValve.java:126)
        at org.apache.catalina.valves.ErrorReportValve.invoke(
ErrorReportValve.java:105)
        at org.apache.catalina.core.StandardEngineValve.invoke(
StandardEngineValve.java:107)
        at org.apache.catalina.connector.CoyoteAdapter.service(
CoyoteAdapter.java:148)
        at org.apache.coyote.http11.Http11Processor.process(
Http11Processor.java:868)
        at 
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(
Http11BaseProtocol.java:663)
        at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(
PoolTcpEndpoint.java:527)
        at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(
LeaderFollowerWorkerThread.java:80)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
ThreadPool.java:684)
        at java.lang.Thread.run(Unknown Source)



What do i have to change to avoid these exception. I don't have a clue 
where it comes from. Even the debugger doesn't help.

Hope one of you could?

Fabian

Reply via email to