Matej Knopp-2 wrote:
> 
> AjaxRequestTarget target;
> target.addComponent(item);
> 
> where item is a repeater Item.
> 
> This doesn't work for you? What wicket version are you using?
> 
> -Matej
> 

1.3.0-SNAPSHOT

Here's how the Column is created...  basically it is adding a custom
Fragment to the cellItem.  That Fragment represents a TextField onto which I
put the Ajax event.
====================================================
columns.add(new AbstractColumn(new Model("Added")) {
        public void populateItem(final Item cellItem, final String componentId,
final IModel rowModel) {
                cellItem.add(new NumericTextFieldFragment(componentId, rowModel,
"slocAdded", "6", 0) {
                        @Override
                        protected void decorateTextField(TextField tf) {
                                super.decorateTextField(tf);

                                tf.add(new 
AjaxFormComponentUpdatingBehavior("onkeyup") {
                                        @Override
                                        protected void 
onUpdate(AjaxRequestTarget target) {
                                                MarkupContainer row = 
cellItem.findParent(Item.class);
                                                target.addComponent(row);
                                        }
                                });
                        }
                });
        }
});


which throws this exception....
====================================================
13:56:20,494 ERROR RequestCycle:1255 - Unable to find the markup for the
component. That may be due to transparent containers or components
implementing IComponentResolver: [MarkupContainer [Component id = id1, page
= com.csc.aims.specchange.wicket.SpecChangePage, path =
0:contentPanel:dataForm:romEvents:currentEvent:collapsibleBody:sections:current:nonemptyLanguage:subsections:romSlocData:collapsibleBody:sections:slocData:slocData:rows:id1.OddEvenItem,
isVisible = true, isVersioned = true]]
org.apache.wicket.WicketRuntimeException: Unable to find the markup for the
component. That may be due to transparent containers or components
implementing IComponentResolver: [MarkupContainer [Component id = id1, page
= com.csc.aims.specchange.wicket.SpecChangePage, path =
0:contentPanel:dataForm:romEvents:currentEvent:collapsibleBody:sections:current:nonemptyLanguage:subsections:romSlocData:collapsibleBody:sections:slocData:slocData:rows:id1.OddEvenItem,
isVisible = true, isVersioned = true]]
        at
org.apache.wicket.MarkupFragmentFinder.find(MarkupFragmentFinder.java:111)
        at org.apache.wicket.Component.renderComponent(Component.java:2024)
        at
org.apache.wicket.ajax.AjaxRequestTarget.respondComponent(AjaxRequestTarget.java:762)
        at
org.apache.wicket.ajax.AjaxRequestTarget.respondComponents(AjaxRequestTarget.java:662)
        at
org.apache.wicket.ajax.AjaxRequestTarget.respond(AjaxRequestTarget.java:520)
        at
org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:103)
        at
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1038)
        at org.apache.wicket.RequestCycle.step(RequestCycle.java:1108)
        at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1177)
        at org.apache.wicket.RequestCycle.request(RequestCycle.java:500)
        at
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:257)
        at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:127)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
        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.valves.FastCommonAccessLogValve.invoke(FastCommonAccessLogValve.java:495)
        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:869)
        at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
        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(Thread.java:595)


during renderComponent(), a new MarkupFragmentFinder is created.  In the
find() method, (lines 63-88) the markupIndex is != -1 and the ComponentTag
is found, but the ids don't match because the ComponentTag id is "rows"
whereas MY component's (the row Item) id equals "id1".  It'll never match
for a repeater, will it?

Chuck
-- 
View this message in context: 
http://www.nabble.com/Repaint-single-row-of-a-DataTable-tf4111859.html#a11694421
Sent from the Wicket - User mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to