Re: WicketRuntimeException: component not found on page

2010-12-13 Thread Takeo Hosomi
Hello,

The problem was solved by the advice I got from a wiquery developer.

He said it was a common problem which happens when double ajax
requests are issued where the first ajax request rewrite a component,
and the next one refer to it.

I solved the problem by preventing it by using the technique
introduced at the following link, and it works.
http://wicketinaction.com/2008/12/preventing-double-ajax-requests-in-3-lines-of-code/

Thanks,
Takeo Hosomi

On Thu, Dec 9, 2010 at 4:56 PM, Takeo Hosomi  wrote:
> I attached it to a JIRA.
> https://issues.apache.org/jira/browse/WICKET-3248
>
> Thanks,
> Takeo Hosomi
>
> On Thu, Dec 9, 2010 at 4:12 PM, Jeremy Thomerson
>  wrote:
>> Attach the zip of the quickstart to a JIRA.
>>
>> Jeremy Thomerson
>> http://wickettraining.com
>> -- sent from my "smart" phone, so please excuse spelling, formatting, or
>> compiler errors
>>
>> On Dec 9, 2010 4:15 PM, "Takeo Hosomi"  wrote:
>>
>> Hello,
>>
>> I have the same issue which is discussed in the following link:
>> http://apache-wicket.1842946.n4.nabble.com/WicketRuntimeException-component-not-found-on-page-td3055902.html
>>
>> I made a quickstart to reproduce it. Any idea on how to workaround
>> this behavior?
>> I'm using wicket 1.4.12, wiquery 1.1.2, and wiquery-plugin for tooltip
>> (other-plugins-1.1.jar).
>>
>> Thanks,
>> Takeo Hosomi
>>
>> Step1.
>> Use following source code to reproduce the problem.
>>
>> Java:
>>
>> import java.io.Serializable;
>> import java.util.ArrayList;
>> import java.util.List;
>>
>> import org.apache.wicket.Component;
>> import org.apache.wicket.ajax.AjaxRequestTarget;
>> import
>> org.apache.wicket.ajax.markup.html.navigation.paging.AjaxPagingNavigator;
>> import org.apache.wicket.behavior.SimpleAttributeModifier;
>> import org.apache.wicket.markup.html.CSSPackageResource;
>> import org.apache.wicket.markup.html.WebMarkupContainer;
>> import org.apache.wicket.markup.html.basic.Label;
>> import org.apache.wicket.markup.html.list.ListItem;
>> import org.apache.wicket.markup.html.list.PageableListView;
>> import org.apache.wicket.markup.html.panel.Panel;
>> import org.odlabs.wiquery.ui.themes.ThemeUiHelper;
>> import org.odlabs.wiquery.ui.themes.UiIcon;
>> import org.wiquery.plugin.jquertytools.tooltip.TooltipAjaxBehaviour;
>> import org.wiquery.plugin.jquertytools.tooltip.TooltipBehavior;
>> import
>> org.wiquery.plugin.jquertytools.tooltip.TooltipAjaxBehaviour.IToolTipOnBeforeShowUIEventHandler;
>> import org.wiquery.plugin.jquertytools.tooltip.TooltipBehavior.Offset;
>> import org.wiquery.plugin.jquertytools.tooltip.TooltipBehavior.Position;
>>
>> public class TestPanel extends Panel {
>>       private static final long serialVersionUID = 1L;
>>
>>       private static int rowHeight = 40;
>>
>>       public TestPanel(String id) {
>>               super(id);
>>               setOutputMarkupId(true);
>>
>>
>>  add(CSSPackageResource.getHeaderContribution(TooltipBehavior.CSS));
>>
>>       // Tooltip Indicator
>>       final WebMarkupContainer indiIcon = new
>> WebMarkupContainer("indiIcon");
>>       ThemeUiHelper.iconComponent(indiIcon, UiIcon.CARAT_1_EAST);
>>       final WebMarkupContainer tooltipIndicator = new
>> WebMarkupContainer("indi");
>>       tooltipIndicator.add(indiIcon);
>>       tooltipIndicator.add(new SimpleAttributeModifier("style",
>>
>>  "display:none;background-color:#C4C4C4;" +
>>                                       "height:"+20+"px;" +
>>
>>  "padding-top:"+((rowHeight-20)/2-1)+"px;padding-bottom:"+((rowHeight-20)/2-1)+"px;"));
>>       tooltipIndicator.setOutputMarkupId(true);
>>       add(tooltipIndicator);
>>
>>           // Container
>>       WebMarkupContainer container = new WebMarkupContainer("container");
>>       container.setOutputMarkupId(true);
>>       add(container);
>>
>>               PageableListView users = new
>> PageableListView("user", dummyUsers(), 3){
>>               /***/
>>                       private static final long serialVersionUID = 1L;
>>
>>                       @Override
>>                       protected void populateItem(ListItem item)
>> {
>>                               item.add(new
>> SimpleAttributeModifier("style","height:"+rowHeight+"px;"));
>>                       

Re: WicketRuntimeException: component not found on page

2010-12-09 Thread Takeo Hosomi
I attached it to a JIRA.
https://issues.apache.org/jira/browse/WICKET-3248

Thanks,
Takeo Hosomi

On Thu, Dec 9, 2010 at 4:12 PM, Jeremy Thomerson
 wrote:
> Attach the zip of the quickstart to a JIRA.
>
> Jeremy Thomerson
> http://wickettraining.com
> -- sent from my "smart" phone, so please excuse spelling, formatting, or
> compiler errors
>
> On Dec 9, 2010 4:15 PM, "Takeo Hosomi"  wrote:
>
> Hello,
>
> I have the same issue which is discussed in the following link:
> http://apache-wicket.1842946.n4.nabble.com/WicketRuntimeException-component-not-found-on-page-td3055902.html
>
> I made a quickstart to reproduce it. Any idea on how to workaround
> this behavior?
> I'm using wicket 1.4.12, wiquery 1.1.2, and wiquery-plugin for tooltip
> (other-plugins-1.1.jar).
>
> Thanks,
> Takeo Hosomi
>
> Step1.
> Use following source code to reproduce the problem.
>
> Java:
>
> import java.io.Serializable;
> import java.util.ArrayList;
> import java.util.List;
>
> import org.apache.wicket.Component;
> import org.apache.wicket.ajax.AjaxRequestTarget;
> import
> org.apache.wicket.ajax.markup.html.navigation.paging.AjaxPagingNavigator;
> import org.apache.wicket.behavior.SimpleAttributeModifier;
> import org.apache.wicket.markup.html.CSSPackageResource;
> import org.apache.wicket.markup.html.WebMarkupContainer;
> import org.apache.wicket.markup.html.basic.Label;
> import org.apache.wicket.markup.html.list.ListItem;
> import org.apache.wicket.markup.html.list.PageableListView;
> import org.apache.wicket.markup.html.panel.Panel;
> import org.odlabs.wiquery.ui.themes.ThemeUiHelper;
> import org.odlabs.wiquery.ui.themes.UiIcon;
> import org.wiquery.plugin.jquertytools.tooltip.TooltipAjaxBehaviour;
> import org.wiquery.plugin.jquertytools.tooltip.TooltipBehavior;
> import
> org.wiquery.plugin.jquertytools.tooltip.TooltipAjaxBehaviour.IToolTipOnBeforeShowUIEventHandler;
> import org.wiquery.plugin.jquertytools.tooltip.TooltipBehavior.Offset;
> import org.wiquery.plugin.jquertytools.tooltip.TooltipBehavior.Position;
>
> public class TestPanel extends Panel {
>       private static final long serialVersionUID = 1L;
>
>       private static int rowHeight = 40;
>
>       public TestPanel(String id) {
>               super(id);
>               setOutputMarkupId(true);
>
>
>  add(CSSPackageResource.getHeaderContribution(TooltipBehavior.CSS));
>
>       // Tooltip Indicator
>       final WebMarkupContainer indiIcon = new
> WebMarkupContainer("indiIcon");
>       ThemeUiHelper.iconComponent(indiIcon, UiIcon.CARAT_1_EAST);
>       final WebMarkupContainer tooltipIndicator = new
> WebMarkupContainer("indi");
>       tooltipIndicator.add(indiIcon);
>       tooltipIndicator.add(new SimpleAttributeModifier("style",
>
>  "display:none;background-color:#C4C4C4;" +
>                                       "height:"+20+"px;" +
>
>  "padding-top:"+((rowHeight-20)/2-1)+"px;padding-bottom:"+((rowHeight-20)/2-1)+"px;"));
>       tooltipIndicator.setOutputMarkupId(true);
>       add(tooltipIndicator);
>
>           // Container
>       WebMarkupContainer container = new WebMarkupContainer("container");
>       container.setOutputMarkupId(true);
>       add(container);
>
>               PageableListView users = new
> PageableListView("user", dummyUsers(), 3){
>               /***/
>                       private static final long serialVersionUID = 1L;
>
>                       @Override
>                       protected void populateItem(ListItem item)
> {
>                               item.add(new
> SimpleAttributeModifier("style","height:"+rowHeight+"px;"));
>                               item.add(new Label("name",
> item.getModelObject().getName()));
>                               item.add(new Label("first",
> item.getModelObject().getFirst()));
>                               item.add(new Label("last",
> item.getModelObject().getLast()));
>                       item.add(new TooltipAjaxBehaviour()
>                               .setDelay(0) // TODO magic number 400ms
>                               .setPredelay(0)
>                               .setPosition(Position.bottom_right)
>                               .setOffset(new Offset(-(rowHeight-1),-15)) //
> y,x
>                               .setTip(tooltipIndicator)
>                               .setOnBeforeShow(new
> IToolTipOnBeforeShowUIEventHandler() {
>                                       private static final long
> serialVersionUID = 1L;
>
>   

WicketRuntimeException: component not found on page

2010-12-09 Thread Takeo Hosomi
Hello,

I have the same issue which is discussed in the following link:
http://apache-wicket.1842946.n4.nabble.com/WicketRuntimeException-component-not-found-on-page-td3055902.html

I made a quickstart to reproduce it. Any idea on how to workaround
this behavior?
I'm using wicket 1.4.12, wiquery 1.1.2, and wiquery-plugin for tooltip
(other-plugins-1.1.jar).

Thanks,
Takeo Hosomi

Step1.
Use following source code to reproduce the problem.

Java:

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import org.apache.wicket.Component;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.markup.html.navigation.paging.AjaxPagingNavigator;
import org.apache.wicket.behavior.SimpleAttributeModifier;
import org.apache.wicket.markup.html.CSSPackageResource;
import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.list.ListItem;
import org.apache.wicket.markup.html.list.PageableListView;
import org.apache.wicket.markup.html.panel.Panel;
import org.odlabs.wiquery.ui.themes.ThemeUiHelper;
import org.odlabs.wiquery.ui.themes.UiIcon;
import org.wiquery.plugin.jquertytools.tooltip.TooltipAjaxBehaviour;
import org.wiquery.plugin.jquertytools.tooltip.TooltipBehavior;
import 
org.wiquery.plugin.jquertytools.tooltip.TooltipAjaxBehaviour.IToolTipOnBeforeShowUIEventHandler;
import org.wiquery.plugin.jquertytools.tooltip.TooltipBehavior.Offset;
import org.wiquery.plugin.jquertytools.tooltip.TooltipBehavior.Position;

public class TestPanel extends Panel {
private static final long serialVersionUID = 1L;

private static int rowHeight = 40;

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

add(CSSPackageResource.getHeaderContribution(TooltipBehavior.CSS));

// Tooltip Indicator
final WebMarkupContainer indiIcon = new WebMarkupContainer("indiIcon");
ThemeUiHelper.iconComponent(indiIcon, UiIcon.CARAT_1_EAST);
final WebMarkupContainer tooltipIndicator = new 
WebMarkupContainer("indi");
tooltipIndicator.add(indiIcon);
tooltipIndicator.add(new SimpleAttributeModifier("style",

"display:none;background-color:#C4C4C4;" +
"height:"+20+"px;" +

"padding-top:"+((rowHeight-20)/2-1)+"px;padding-bottom:"+((rowHeight-20)/2-1)+"px;"));
tooltipIndicator.setOutputMarkupId(true);
add(tooltipIndicator);

// Container
WebMarkupContainer container = new WebMarkupContainer("container");
container.setOutputMarkupId(true);
add(container);

PageableListView users = new
PageableListView("user", dummyUsers(), 3){
/***/
private static final long serialVersionUID = 1L;

@Override
protected void populateItem(ListItem item) {
item.add(new 
SimpleAttributeModifier("style","height:"+rowHeight+"px;"));
item.add(new Label("name", 
item.getModelObject().getName()));
item.add(new Label("first", 
item.getModelObject().getFirst()));
item.add(new Label("last", 
item.getModelObject().getLast()));
item.add(new TooltipAjaxBehaviour()
.setDelay(0) // TODO magic number 400ms
.setPredelay(0)
.setPosition(Position.bottom_right) 

.setOffset(new Offset(-(rowHeight-1),-15)) // 
y,x
.setTip(tooltipIndicator)
.setOnBeforeShow(new 
IToolTipOnBeforeShowUIEventHandler() {
private static final long 
serialVersionUID = 1L;

public void onEvent(AjaxRequestTarget 
target, Component
component, int top, int left) {
// do something...
}
})
);
}
};
container.add(users);
container.add(new AjaxPagingNavigator("navigator", users));
}

private List dummyUsers() {
List ret = new ArrayList();
for (int i=0; i<10 ; i++){
ret.add(new DummyUser("name"+i,"firs

wicketstuff-push

2010-07-31 Thread Takeo Hosomi
I'm interested in implementing an authentication feature with
wicketstuff-push (1.4.9.2), and it works with slight modifications. I
share what I did.

I basically implements written at
http://cometd.org/documentation/howtos/authentication.

What I change is two methods.

(1) CometdAbstractBehavior#getInitCometdScript()

I added the client side javascript code to send some extension
parameters to the server:
return "dojox.cometd.init('" + cometdServletPath +
  "', {ext: {auth: { some parametes you want to add }}})\n";

(2) CometdService#initBayeux()

I added

BayeuxAuthenticator authenticator = new BayeuxAuthenticator();
bayeux.setSecurityPolicy(authenticator);
bayeux.addExtension(authenticator);

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org