sorry, I was mislead. Your code is right. The issue is the Ajax stuff
is not yet supported if the Ajax component is part of a bordered page.
Please use markup inheritance instead.
Juergen
On 3/29/06, Juergen Donnerstag <[EMAIL PROTECTED]> wrote:
> Wicket shouldn't get into an infinite loop, that for sure. But there
> is a bug in your code:
>
> myBorder = new PageLayout("pageLayout", "Ajax Test");
> myBorder.setTransparentResolver(true);
> add(myBorder);
>
> add(ajaxLabel = new Label("ajaxLabel", "AAAAAAA" ));
>
> ajaxLabel.setOutputMarkupId(true);
>
> add(new AjaxLink("ajaxLink") {
>
> You must add the components to the *border* and not the page
> myBorder = new PageLayout("pageLayout", "Ajax Test");
> myBorder.setTransparentResolver(true);
> add(myBorder);
>
> myBorder.add(ajaxLabel = new Label("ajaxLabel", "AAAAAAA" ));
>
> ajaxLabel.setOutputMarkupId(true);
>
> myBorder.add(new AjaxLink("ajaxLink") {
>
> Juergen
>
> On 3/29/06, Juergen Donnerstag <[EMAIL PROTECTED]> wrote:
> > There is already a bug for this in sourceforge.
> >
> > Juergen
> >
> > On 3/29/06, Andre Matheus <[EMAIL PROTECTED]> wrote:
> > > I am having trouble using Ajax links in pages with a border with
> > > setTransparentResolver(true);
> > >
> > > The message in the Wicket Ajax Debugger is the following:
> > >
> > > INFO:
> > > INFO: initiating ajax GET request with...
> > > INFO: url:
> > > /QuickStart/app?wicket:interface=:2:ajaxLink:-1:IUnversionedBehaviorListener&wicket:behaviorId=0
> > > INFO: successHandler:undefined
> > >
> > > The strange thing is that it not only does nothing, but worst, it
> > > makes my CPU utilization goes to 100%.
> > >
> > > The onClick method finishes without exceptions, as I see the system
> > > outputs as expected.
> > >
> > > Does anybody has an Idea of what can be the problem?
> > >
> > > Thank you very much.
> > >
> > > Code:
> > > //---------------------------------------------------------------------
> > > public class AjaxTest extends WebPage {
> > > Label ajaxLabel;
> > > private PageLayout myBorder;
> > > // TODO Add any page properties or variables here
> > > public AjaxTest(){
> > > super();
> > >
> > > myBorder = new PageLayout("pageLayout", "Ajax Test");
> > > myBorder.setTransparentResolver(true);
> > > add(myBorder);
> > >
> > > add(ajaxLabel = new Label("ajaxLabel", "AAAAAAA" ));
> > >
> > > ajaxLabel.setOutputMarkupId(true);
> > >
> > > add(new AjaxLink("ajaxLink") {
> > > public void onClick(AjaxRequestTarget target) {
> > > System.out.println("AjaxLink.onClick - START");
> > > Label ajaxLabel2 = new Label("ajaxLabel", "BBBBBBB");
> > > ajaxLabel2.setOutputMarkupId(true);
> > > System.out.println("AjaxLink.onClick - MID");
> > > ajaxLabel.getParent().replace(ajaxLabel2);
> > > if(target!=null) target.addComponent(ajaxLabel2,
> > > "ajaxLabel");
> > > System.out.println("AjaxLink.onClick - END");
> > > }
> > > });
> > >
> > > }
> > >
> > > }
> > >
> > > //------------------------------------------------------------------------------------
> > >
> > > PS.: In the output I see the following before the CPU gets crazy:
> > >
> > > AjaxLink.onClick - START
> > > AjaxLink.onClick - MID
> > > AjaxLink.onClick - END
> > >
> > >
> > > --
> > > __
> > > André Matheus
> > >
> > >
> > > -------------------------------------------------------
> > > This SF.Net email is sponsored by xPML, a groundbreaking scripting
> > > language
> > > that extends applications into web and mobile media. Attend the live
> > > webcast
> > > and join the prime developer group breaking into this new coding
> > > territory!
> > > http://sel.as-us.falkag.net/sel?cmdlnk&kid0944&bid$1720&dat1642
> > > _______________________________________________
> > > Wicket-user mailing list
> > > [email protected]
> > > https://lists.sourceforge.net/lists/listinfo/wicket-user
> > >
> >
>
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user