Re: Regression: @Inject'ed objects cannot be passed to Threads

2010-06-04 Thread Douglas Ferguson
That makes sense. I was just surprised to see it stop working.

It is something people should be aware of when upgrading.

Any idea of what changed from 1.4.5 - 1.4.7 that was have exacerbated this?

Also, what every happened to wrap idea that was proposed?

D/


On Jun 3, 2010, at 10:22 AM, Igor Vaynberg wrote:

 this is not a regression in the sense that it is a bug. we have always
 maintained that the objects that get injected should only be used
 within wicket components.
 
 you need to make sure the Application object is bound to the thread
 that is executing the runnable, so you will have to pass the
 application along with the dependencies and call application.set/unset
 around the runnable.
 
 -igor
 
 On Thu, Jun 3, 2010 at 1:07 AM, Douglas Ferguson
 doug...@douglasferguson.us wrote:
 I've posted a similar message the other week, because I was having strange 
 behavior when passing objects that have been injected into my page to child 
 threads.
 
 So, we recently upgrade from 1.4.5 - 1.4.7
 
 Prior to the upgrade we had some runnables that would do some asynchronous 
 work for us and we would just @inject the DAO into the page and pass that 
 into constructor of the runnable.
 This worked fine until the upgrade to 1.4.7. Now when the thread calls 
 methods on the object we get the org.apache.wicket.WicketRuntimeException: 
 There is no application attached to current thread pool-13-thread-16' error
 
 D/
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 


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



Re: Regression: @Inject'ed objects cannot be passed to Threads

2010-06-04 Thread Douglas Ferguson
Also, I'm starting to dig into these and fix them and most of them make sense 
to me. They are obviously asynchronous threads that we start.

But this one has be a bit baffled. Does anybody recognize the classes in the 
stack? 

2010-06-04 00:06:34,623 ERROR [main] session.ManagerBase - Exception loading 
sessions from persistent storage
net.sf.cglib.core.CodeGenerationException: 
org.apache.wicket.WicketRuntimeException--There is no application attached to 
current thread main
at net.sf.cglib.core.ReflectUtils.newInstance(ReflectUtils.java:235)
at net.sf.cglib.core.ReflectUtils.newInstance(ReflectUtils.java:220)
at net.sf.cglib.core.ReflectUtils.newInstance(ReflectUtils.java:216)
at net.sf.cglib.proxy.Enhancer.createUsingReflection(Enhancer.java:643)
at net.sf.cglib.proxy.Enhancer.firstInstance(Enhancer.java:538)
at 
net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:225)
at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:377)
at net.sf.cglib.proxy.Enhancer.create(Enhancer.java:285)
at 
org.apache.wicket.proxy.LazyInitProxyFactory.createProxy(LazyInitProxyFactory.java:174)
at 
org.apache.wicket.proxy.LazyInitProxyFactory$ProxyReplacement.readResolve(LazyInitProxyFactory.java:240)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at java.io.ObjectStreamClass.invokeReadResolve(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
at java.io.ObjectInputStream.readSerialData(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.readObject(Unknown Source)
at 
org.apache.catalina.session.StandardSession.readObject(StandardSession.java:1402)
at 
org.apache.catalina.session.StandardSession.readObjectData(StandardSession.java:931)
at 
org.apache.catalina.session.StandardManager.doLoad(StandardManager.java:394)
at 
org.apache.catalina.session.StandardManager.load(StandardManager.java:321)
at 
org.apache.catalina.session.StandardManager.start(StandardManager.java:637)
at 
org.apache.catalina.core.ContainerBase.setManager(ContainerBase.java:432)
at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:4160)
at 
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
at 
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
at 
org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)
at 
org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)
at 
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
at 
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at 
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at 
org.apache.catalina.core.StandardService.start(StandardService.java:448)
at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at 
org.apache.commons.daemon.support.DaemonLoader.start(DaemonLoader.java:177)
Caused by: org.apache.wicket.WicketRuntimeException: There is no application 
attached to current thread main
at 

Image subclass not getting its model object

2010-06-04 Thread Erwin Bolwidt

Hi,

I'm trying to make an image subclass that shows an icon. Which icon it 
shows depends on its model object, which is a boolean. Problem is,  I'm 
not getting the model object: it's always null. If I use a Label instead 
of InStockIconImage, it works: the label shows a boolean (true/false).


Any idea what could cause this?

Thanks,
  Erwin


Here's the icon:

public class InStockIconImage extends Image {
private static final String PATH_IN_STOCK = in_stock.png;
private static final String PATH_NOT_IN_STOCK = not_in_stock.png;
private static final String PATH_NO_MODEL_OBJECT = empty.png;

public InStockIconImage(String id, IModelBoolean model) {
super(id, model);
}

@Override
protected ResourceReference getImageResourceReference() {
Boolean inStock = (Boolean) getDefaultModelObject();
String path;
if (inStock == null) {
path = PATH_NO_MODEL_OBJECT;
} else if (inStock) {
path = PATH_IN_STOCK;
} else {
path = PATH_NOT_IN_STOCK;
}
return new ResourceReference(Icons.class, path);
}
}

Here's how I use it:

RefreshingListViewProductListing listingRepeater = new 
RefreshingListViewProductListing(
listing, new 
PropertyModelSetProductListing(getModel(), listings)) {

@Override
protected void populateItem(ItemProductListing item) {
item.add(new Label(webShop.name));
item.add(new Label(price));
item.add(new InStockIconImage(inStock));
}
};
add(listingRepeater);

RefreshingListView is a utility class which decorates a normal 
RefreshingView:


public abstract class RefreshingListViewT extends RefreshingViewT {

public RefreshingListView(String id) {
super(id);
}

public RefreshingListView(String id, IModel? extends 
CollectionT model) {

super(id, model);
}

@Override
protected IteratorIModelT getItemModels() {
CollectionT modelObject = getModelObject();
if (modelObject == null) {
modelObject = new ArrayListT();
}
return new ModelIteratorAdapterT(modelObject.iterator()) {
@Override
protected IModelT model(T object) {
return new CompoundPropertyModelT(object);
}
};
}

public CollectionT getModelObject() {
return getModel().getObject();
}

@SuppressWarnings(unchecked)
public IModelListT getModel() {
return (IModelListT) getDefaultModel();
}

}


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



Re: Image subclass not getting its model object

2010-06-04 Thread Erwin Bolwidt

Oops, I went a bit too far in pruning non-essential code.

InStockIconImage has a second constructor:

public InStockIconImage(String id) {
super(id);
}

I think it centers around this. If I pass a PropertyModel(listingModel, 
inStock) explicitly to the constructor, it works, but not if I depend 
on the automatic property resolution that works well if I use a Label.


How can I get it to work if I don't want to pass a PropertyModel explicitly?

Erwin

On 6/4/10 9:15 AM, Erwin Bolwidt wrote:

Hi,

I'm trying to make an image subclass that shows an icon. Which icon it 
shows depends on its model object, which is a boolean. Problem is,  
I'm not getting the model object: it's always null. If I use a Label 
instead of InStockIconImage, it works: the label shows a boolean 
(true/false).


Any idea what could cause this?

Thanks,
  Erwin


Here's the icon:

public class InStockIconImage extends Image {
private static final String PATH_IN_STOCK = in_stock.png;
private static final String PATH_NOT_IN_STOCK = not_in_stock.png;
private static final String PATH_NO_MODEL_OBJECT = empty.png;

public InStockIconImage(String id, IModelBoolean model) {
super(id, model);
}

@Override
protected ResourceReference getImageResourceReference() {
Boolean inStock = (Boolean) getDefaultModelObject();
String path;
if (inStock == null) {
path = PATH_NO_MODEL_OBJECT;
} else if (inStock) {
path = PATH_IN_STOCK;
} else {
path = PATH_NOT_IN_STOCK;
}
return new ResourceReference(Icons.class, path);
}
}

Here's how I use it:

RefreshingListViewProductListing listingRepeater = new 
RefreshingListViewProductListing(
listing, new 
PropertyModelSetProductListing(getModel(), listings)) {

@Override
protected void populateItem(ItemProductListing item) {
item.add(new Label(webShop.name));
item.add(new Label(price));
item.add(new InStockIconImage(inStock));
}
};
add(listingRepeater);

RefreshingListView is a utility class which decorates a normal 
RefreshingView:


public abstract class RefreshingListViewT extends RefreshingViewT {

public RefreshingListView(String id) {
super(id);
}

public RefreshingListView(String id, IModel? extends 
CollectionT model) {

super(id, model);
}

@Override
protected IteratorIModelT getItemModels() {
CollectionT modelObject = getModelObject();
if (modelObject == null) {
modelObject = new ArrayListT();
}
return new ModelIteratorAdapterT(modelObject.iterator()) {
@Override
protected IModelT model(T object) {
return new CompoundPropertyModelT(object);
}
};
}

public CollectionT getModelObject() {
return getModel().getObject();
}

@SuppressWarnings(unchecked)
public IModelListT getModel() {
return (IModelListT) getDefaultModel();
}

}


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




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



Re: Image subclass not getting its model object

2010-06-04 Thread Ernesto Reinaldo Barreiro
Maybe this is related to this override on Image class?

@Override
protected IModel? initModel()
{
// Images don't support Compound models. They either have a 
simple
// model, explicitly set, or they use their tag's src or value
// attribute to determine the image.
return null;
}

Ernesto


On Fri, Jun 4, 2010 at 9:30 AM, Erwin Bolwidt ebolw...@worldturner.nl wrote:
 Oops, I went a bit too far in pruning non-essential code.

 InStockIconImage has a second constructor:

    public InStockIconImage(String id) {
        super(id);
    }

 I think it centers around this. If I pass a PropertyModel(listingModel,
 inStock) explicitly to the constructor, it works, but not if I depend on
 the automatic property resolution that works well if I use a Label.

 How can I get it to work if I don't want to pass a PropertyModel explicitly?

 Erwin

 On 6/4/10 9:15 AM, Erwin Bolwidt wrote:

 Hi,

 I'm trying to make an image subclass that shows an icon. Which icon it
 shows depends on its model object, which is a boolean. Problem is,  I'm not
 getting the model object: it's always null. If I use a Label instead of
 InStockIconImage, it works: the label shows a boolean (true/false).

 Any idea what could cause this?

 Thanks,
  Erwin


 Here's the icon:

 public class InStockIconImage extends Image {
    private static final String PATH_IN_STOCK = in_stock.png;
    private static final String PATH_NOT_IN_STOCK = not_in_stock.png;
    private static final String PATH_NO_MODEL_OBJECT = empty.png;

    public InStockIconImage(String id, IModelBoolean model) {
        super(id, model);
    }

   �...@override
    protected ResourceReference getImageResourceReference() {
        Boolean inStock = (Boolean) getDefaultModelObject();
        String path;
        if (inStock == null) {
            path = PATH_NO_MODEL_OBJECT;
        } else if (inStock) {
            path = PATH_IN_STOCK;
        } else {
            path = PATH_NOT_IN_STOCK;
        }
        return new ResourceReference(Icons.class, path);
    }
 }

 Here's how I use it:

        RefreshingListViewProductListing listingRepeater = new
 RefreshingListViewProductListing(
                listing, new
 PropertyModelSetProductListing(getModel(), listings)) {
           �...@override
            protected void populateItem(ItemProductListing item) {
                item.add(new Label(webShop.name));
                item.add(new Label(price));
                item.add(new InStockIconImage(inStock));
            }
        };
        add(listingRepeater);

 RefreshingListView is a utility class which decorates a normal
 RefreshingView:

 public abstract class RefreshingListViewT extends RefreshingViewT {

    public RefreshingListView(String id) {
        super(id);
    }

    public RefreshingListView(String id, IModel? extends CollectionT
 model) {
        super(id, model);
    }

   �...@override
    protected IteratorIModelT getItemModels() {
        CollectionT modelObject = getModelObject();
        if (modelObject == null) {
            modelObject = new ArrayListT();
        }
        return new ModelIteratorAdapterT(modelObject.iterator()) {
           �...@override
            protected IModelT model(T object) {
                return new CompoundPropertyModelT(object);
            }
        };
    }

    public CollectionT getModelObject() {
        return getModel().getObject();
    }

   �...@suppresswarnings(unchecked)
    public IModelListT getModel() {
        return (IModelListT) getDefaultModel();
    }

 }


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



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



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



Re: SV: Dialog involving multiple pages and a VO: some best practices?

2010-06-04 Thread Joseph Pachod

Wilhelmsen Tor Iver wrote:

I've recently been wondering about the following use case: an instance
of Foo class, used as a detached value object, is edited in a
FooEditPage. For some reasons, let's say this page then needs to launch
dialogs spanning over different pages. Each of these pages could then
change some fields of the VO being passed around.



Sharing between pages is easier done by placing it in the Session which is 
accessible from all of them.

- Tor Iver
  

Thanks for the answer.

However, Mauro put forward some of the issues it raised, the one with 2 
browser windows.


I would add as well that would have to care about the cleanup of this 
stuff, because having it session's scoped would be enough IMHO (if the 
user is editing heavily), it would have to be linked to the action 
completeness.
Then, putting the VO directly in the Session spoils the memory 
consumption, so you would probably, on top of that, want to put it in 
some dedicated datastore.


In the end, I feel it to be quite error prone. Did you try it already ? 
I would welcome some feedback :$


:)

cheers
joseph



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



Re: Dialog involving multiple pages and a VO: some best practices?

2010-06-04 Thread Joseph Pachod

Mauro Ciancio wrote:

Hi,

On Wed, Jun 2, 2010 at 7:43 PM, Joseph Pachod
josephpac...@thomas-daily.de wrote:
  

I've recently been wondering about the following use case: an instance of Foo 
class,
used as a detached value object, is edited in a FooEditPage. For some reasons, 
let's
say this page then needs to launch dialogs spanning over different pages. Each 
of
these pages could then change some fields of the VO being passed around.



  Have you taken a look to wicket-wizards?
http://www.wicket-library.com/wicket-examples/wizard/
  

not yet ;)

I thought this wizard widget wouldn't spread on multiple pages. I'll 
look closer then :)

in fact, I mainly wonder about the pages' serialization... are there some 
pitfalls to avoid ?



  If you have to track the object's state through several pages,
you'll need a serializable
object, because reloading it using a LDM in every request will throw
away all the changes
made before.
  So, your Foo must implement Serializable, or you could create some
proxy object that
tracks the changes and when the user finish the editing process, apply
the changes to
the real model object.
  

yep, for sure the VO is Serializable.

But is there any dragon lurking there, with some return page de 
serialized instance's references pointing to some other reference that 
the one behind the current model being given around ?



thanks a lot !

best
joseph

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



Re: Dialog involving multiple pages and a VO: some best practices?

2010-06-04 Thread Joseph Pachod

Igor Vaynberg wrote:

usually i simply allow pages to take models of whatever it is they
need, just like any other component. in case of a dto being passed
around you can simply use the default model: new ModelDto(new
Dto()); and pass that to any page. that way the page does not need to
worry about where the objects comes from or how to store it.

-igor
As answered to Maruo, is there any dragon lurking there, with some 
return page de serialized instance's references pointing to some other 
reference that the one behind the current model being given around ?


I was somehow under the impression it was kind of risky...

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



Re: drag and drop

2010-06-04 Thread DerBernd

Thank you for your help. 
So I solved it by using repeaters RepeatingView.
On DropEvent I add the droppedComponent to the repeating view and update the
page.
I also had to set wantOnDragStartNotification(false),
wantOnDragStopNotification(false), otherwise the dropped Component was not
found on page - don't know really why




-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/drag-and-drop-tp1881857p2242897.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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



RE: drag and drop

2010-06-04 Thread Stefan Lindner
Could you provide a small testcase? I'm using dd very intensive in a calendar 
app and never had any problems with this.

Stefan

-Ursprüngliche Nachricht-
Von: DerBernd [mailto:beha...@web.de] 
Gesendet: Freitag, 4. Juni 2010 11:06
An: users@wicket.apache.org
Betreff: Re: drag and drop


Thank you for your help. 
So I solved it by using repeaters RepeatingView.
On DropEvent I add the droppedComponent to the repeating view and update the
page.
I also had to set wantOnDragStartNotification(false),
wantOnDragStopNotification(false), otherwise the dropped Component was not
found on page - don't know really why




-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/drag-and-drop-tp1881857p2242897.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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


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



Re: drag and drop

2010-06-04 Thread DerBernd

No I have a absolutely specific question to jwicket-jquery.

I want to set the handle option on a draggable, to define the tag which is
used to drag the panel. 
e.g. handle: 'h2'

Unfortunately theres no setter for the handle option.


Thank you

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/drag-and-drop-tp1881857p2242910.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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



RE: drag and drop

2010-06-04 Thread Stefan Lindner
The default value for both is false! The code:

private boolean onDragStartNotificationWanted = false;
/**
 * If set to {...@code true}, the callback-Method {...@link 
#onDragStart(AjaxRequestTarget,SpecialKeys)} 
 * is called when the drag operation starts.
 * @param value {...@code true} or {...@code false}.
 * @return this object
 */
public DraggableBehavior setWantOnDragStartNotification(final boolean 
value) {
onDragStartNotificationWanted = value;
return this;
}

So I can't see any side effect of calling

wantOnDragStartNotification(false);

There must be some other strange situation.

Stefan

-Ursprüngliche Nachricht-
Von: DerBernd [mailto:beha...@web.de] 
Gesendet: Freitag, 4. Juni 2010 11:06
An: users@wicket.apache.org
Betreff: Re: drag and drop


Thank you for your help. 
So I solved it by using repeaters RepeatingView.
On DropEvent I add the droppedComponent to the repeating view and update the
page.
I also had to set wantOnDragStartNotification(false),
wantOnDragStopNotification(false), otherwise the dropped Component was not
found on page - don't know really why




-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/drag-and-drop-tp1881857p2242897.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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


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



DataTable in DataTable

2010-06-04 Thread midikem

Hi is it possible to add a dataTable in a DataTable and how?
I have a dataTable and when i press on a line in it i want a new dataTable
to popup
below the line i have pressed. How do i do this?
I have a DefaultDataTabletest(dataTable, columns, provider, 10)
where i have added the columns to a arrayList.
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/DataTable-in-DataTable-tp2242922p2242922.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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



Re: Unit Test InMethod DataGrid

2010-06-04 Thread Ronan O'Connell

Thank you very much Nino and Kent,

I've read about Wicketpagetest before and I've been planning to try it 
out. Looks like now is my chance :-)


Ronan

On 04/06/2010 02:16, Kent Tong wrote:

Hi Ronan,

Looking at the output of WicketTester.debugComponentTrees() I can see 
that the grid row is the deepest level with a wicket id:

...
panel:storyGrid:form:bodyContainer:body:row:2:item 
com.inmethod.grid.common.AbstractGridRow


If you use http://wicketpagetest.sourceforge.net, then you can test
it easily like:

   Selenium s = ...;
   assert 
s.getText(wicket=//storyGrid//body//row[2]//item[3]).equals(foo;


In this example you're checking the the 3rd cell in the 2nd row (both
are 0-based).




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



AW: drag and drop

2010-06-04 Thread Stefan Lindner
Look into the original jQuery docs for draggable and set any options that are 
not implementet now with

setRawOptions(handle: 'h2');

This should do the trick. If you have any suggestion for implementing a

setHandle(???)

method that doesn't simple have a String parameter, please let me know.

Stefan

-Ursprüngliche Nachricht-
Von: DerBernd [mailto:beha...@web.de] 
Gesendet: Freitag, 4. Juni 2010 11:14
An: users@wicket.apache.org
Betreff: Re: drag and drop


No I have a absolutely specific question to jwicket-jquery.

I want to set the handle option on a draggable, to define the tag which is
used to drag the panel. 
e.g. handle: 'h2'

Unfortunately theres no setter for the handle option.


Thank you

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/drag-and-drop-tp1881857p2242910.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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


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



RE: drag and drop

2010-06-04 Thread DerBernd

So here is my Example Case
I have several Platzhalter which implement IDroppable and some
FeldKursObjects which implement IDraggable. The FeldKurs Components are 
dragged on Placeholders.

When I define
dragger.setWantOnDragStartNotification(true);
dragger.setWantOnDragStopNotification(true);
there occurs an error like:
WicketMessage: org.apache.wicket.WicketRuntimeException: component
panelInhalt:listPanel:panelWochenplanung:platzhalter_t0r0:listPanel:feldKurs101
not found on page kursa.wochenplanung.WochenplanungPage[id = 3], listener
interface = [RequestListenerInterface name=IBehaviorListener, method=public
abstract void org.apache.wicket.behavior.IBehaviorListener.onRequest()]


When I set them false or don't even set anything (default) the error doesn't
occur

Heres the code

public class Platzhalter extends Panel implements IDroppable{

...
private final RepeatingView listPanel;

public void onDrop(AjaxRequestTarget target, Component draggedComponent,
SpecialKeys specialKeys) {
this.listPanel.add(draggedComponent);
WochenplanungPage wochenplanungPage = 
findParent(WochenplanungPage.class);
  // Parent Page of Platzhalter
target.addComponent(wochenplanungPage);
}
}


public class FeldKurs extends Panel implements IDraggable{
...

public FeldKurs(String id, Kurs kurs) {
super(id);
this.kurs = kurs;
dragger = new DraggableBehavior();
dragger.setRevert(DraggableBehavior.DragRevertMode.INVALID);
dragger.setDistance(20);
dragger.setOpacity(0.99);
  dragger.setName(one);
dragger.setWantOnDragStartNotification(true);
dragger.setWantOnDragStopNotification(true);
dragger.setCursor(CssCursor.MOVE);
add(dragger);

}
...
}




-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/drag-and-drop-tp1881857p2242938.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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



Re: AW: drag and drop

2010-06-04 Thread DerBernd

Thank you setRawOptions(handle: 'h2'); works great, just want I was
searching for!!!

Bernd
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/drag-and-drop-tp1881857p2242954.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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



RE: drag and drop

2010-06-04 Thread Stefan Lindner
This is a general Ajax problem. The ajax calls fired by the jQuery handlers 
dragStart/drag/dragEnd are not sychronized with each other. So it may happen 
that the onDrop event of the droppable is fired BEFORE the dragEnd.
In the onDrop method you replace the dragged component wit a new one (redrawing 
your repeaters).
Then, afterwards, the dragStop event occurs and your component no longer exists.
If you really need to watch teh dragStop in addition to the onDrop, you need to 
synchronize your actions. This means you have to wait for the onDrop response 
BEFORE you redraw you components or in othe rwords: move the onDrop code to the 
onDragEnd.

Sorry, but this is a general problem that can't be fixed in jWicket.

Stefan

-Ursprüngliche Nachricht-
Von: DerBernd [mailto:beha...@web.de] 
Gesendet: Freitag, 4. Juni 2010 11:36
An: users@wicket.apache.org
Betreff: RE: drag and drop


So here is my Example Case
I have several Platzhalter which implement IDroppable and some
FeldKursObjects which implement IDraggable. The FeldKurs Components are 
dragged on Placeholders.

When I define
dragger.setWantOnDragStartNotification(true);
dragger.setWantOnDragStopNotification(true);
there occurs an error like:
WicketMessage: org.apache.wicket.WicketRuntimeException: component
panelInhalt:listPanel:panelWochenplanung:platzhalter_t0r0:listPanel:feldKurs101
not found on page kursa.wochenplanung.WochenplanungPage[id = 3], listener
interface = [RequestListenerInterface name=IBehaviorListener, method=public
abstract void org.apache.wicket.behavior.IBehaviorListener.onRequest()]


When I set them false or don't even set anything (default) the error doesn't
occur

Heres the code

public class Platzhalter extends Panel implements IDroppable{

...
private final RepeatingView listPanel;

public void onDrop(AjaxRequestTarget target, Component draggedComponent,
SpecialKeys specialKeys) {
this.listPanel.add(draggedComponent);
WochenplanungPage wochenplanungPage = 
findParent(WochenplanungPage.class);
  // Parent Page of Platzhalter
target.addComponent(wochenplanungPage);
}
}


public class FeldKurs extends Panel implements IDraggable{
...

public FeldKurs(String id, Kurs kurs) {
super(id);
this.kurs = kurs;
dragger = new DraggableBehavior();
dragger.setRevert(DraggableBehavior.DragRevertMode.INVALID);
dragger.setDistance(20);
dragger.setOpacity(0.99);
  dragger.setName(one);
dragger.setWantOnDragStartNotification(true);
dragger.setWantOnDragStopNotification(true);
dragger.setCursor(CssCursor.MOVE);
add(dragger);

}
...
}




-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/drag-and-drop-tp1881857p2242938.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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


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



Re: How can override calendar formatting at initialization using DatePicker? getAdditionalJavascript not always working...

2010-06-04 Thread rawe

I got the same problem!
Did you solve it already?
If yes, I would be glad to get some help!

I just disabled the weekend days in DatePicker by overriding the method

@Override
protected String getAdditionalJavascript() {

additionalJavascript += ${calendar}.addWeekdayRenderer(1,
${calendar}.renderOutOfBoundsDate);; // disable sundays
additionalJavascript += ${calendar}.addWeekdayRenderer(7,
${calendar}.renderOutOfBoundsDate);; // disable saturdays

return additionalJavascript;
}

It works, but not when displaying the DatePicker first time. Just after I
did some action in it. (e.g. changing the month)

Thank you!

Ralph

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-can-override-calendar-formatting-at-initialization-using-DatePicker-getAdditionalJavascript-not--tp1880352p2243002.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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



Re: Image subclass not getting its model object

2010-06-04 Thread Erwin Bolwidt

Hi Ernesto,

Just got the 1.4.9 source code and I see what you mean.
But why is it like this?
I copied the whole Image source code to a new class, removed this 
initModel method, and then things work fine if I don't supply a model.


Why would the Image component behave different from the other 
components? This isn't documented in the Javadoc so I didn't expect 
this, but even then, what is the need for making Image work differently 
than others like Label?


I can think of some usecases where it is fine to display in image that 
is derived from some property on a domain object that is accessed with a 
CompoundPropertyModel:


- when you have a Boolean (like here) or Enum-type property and you want 
to change the image depending on its value
- when you have want to dynamically generate an image with some text (on 
top of a template image), the image is much like a label then


I can't disable this initModel behavior in a subclass, since you can't 
call super.super.initModel, so to disable this behavior, I have to copy 
the whole source of the Image class and remove this method.


That seems like waste and you're not benefiting from future 
improvements in the Image class then.


Cheers,
  Erwin Bolwidt

On 6/4/10 9:33 AM, Ernesto Reinaldo Barreiro wrote:

Maybe this is related to this override on Image class?

@Override
protected IModel?  initModel()
{
// Images don't support Compound models. They either have a 
simple
// model, explicitly set, or they use their tag's src or value
// attribute to determine the image.
return null;
}

Ernesto


On Fri, Jun 4, 2010 at 9:30 AM, Erwin Bolwidtebolw...@worldturner.nl  wrote:
   

Oops, I went a bit too far in pruning non-essential code.

InStockIconImage has a second constructor:

public InStockIconImage(String id) {
super(id);
}

I think it centers around this. If I pass a PropertyModel(listingModel,
inStock) explicitly to the constructor, it works, but not if I depend on
the automatic property resolution that works well if I use a Label.

How can I get it to work if I don't want to pass a PropertyModel explicitly?

Erwin

On 6/4/10 9:15 AM, Erwin Bolwidt wrote:
 

Hi,

I'm trying to make an image subclass that shows an icon. Which icon it
shows depends on its model object, which is a boolean. Problem is,  I'm not
getting the model object: it's always null. If I use a Label instead of
InStockIconImage, it works: the label shows a boolean (true/false).

Any idea what could cause this?

Thanks,
  Erwin


Here's the icon:

public class InStockIconImage extends Image {
private static final String PATH_IN_STOCK = in_stock.png;
private static final String PATH_NOT_IN_STOCK = not_in_stock.png;
private static final String PATH_NO_MODEL_OBJECT = empty.png;

public InStockIconImage(String id, IModelBoolean  model) {
super(id, model);
}

@Override
protected ResourceReference getImageResourceReference() {
Boolean inStock = (Boolean) getDefaultModelObject();
String path;
if (inStock == null) {
path = PATH_NO_MODEL_OBJECT;
} else if (inStock) {
path = PATH_IN_STOCK;
} else {
path = PATH_NOT_IN_STOCK;
}
return new ResourceReference(Icons.class, path);
}
}

Here's how I use it:

RefreshingListViewProductListing  listingRepeater = new
RefreshingListViewProductListing(
listing, new
PropertyModelSetProductListing(getModel(), listings)) {
@Override
protected void populateItem(ItemProductListing  item) {
item.add(new Label(webShop.name));
item.add(new Label(price));
item.add(new InStockIconImage(inStock));
}
};
add(listingRepeater);

RefreshingListView is a utility class which decorates a normal
RefreshingView:

public abstract class RefreshingListViewT  extends RefreshingViewT  {

public RefreshingListView(String id) {
super(id);
}

public RefreshingListView(String id, IModel? extends CollectionT
model) {
super(id, model);
}

@Override
protected IteratorIModelT  getItemModels() {
CollectionT  modelObject = getModelObject();
if (modelObject == null) {
modelObject = new ArrayListT();
}
return new ModelIteratorAdapterT(modelObject.iterator()) {
@Override
protected IModelT  model(T object) {
return new CompoundPropertyModelT(object);
}
};
}

public CollectionT  getModelObject() {
return getModel().getObject();
}

@SuppressWarnings(unchecked)
public IModelListT  getModel() {
return (IModelListT) getDefaultModel();
}

}

   


-
To unsubscribe, e-mail: 

Re: Image subclass not getting its model object

2010-06-04 Thread James Carman
I would say you need to use your own image resource, not subclass Image itself.

On Fri, Jun 4, 2010 at 7:03 AM, Erwin Bolwidt ebolw...@worldturner.nl wrote:
 Hi Ernesto,

 Just got the 1.4.9 source code and I see what you mean.
 But why is it like this?
 I copied the whole Image source code to a new class, removed this initModel
 method, and then things work fine if I don't supply a model.

 Why would the Image component behave different from the other components?
 This isn't documented in the Javadoc so I didn't expect this, but even then,
 what is the need for making Image work differently than others like Label?

 I can think of some usecases where it is fine to display in image that is
 derived from some property on a domain object that is accessed with a
 CompoundPropertyModel:

 - when you have a Boolean (like here) or Enum-type property and you want to
 change the image depending on its value
 - when you have want to dynamically generate an image with some text (on top
 of a template image), the image is much like a label then

 I can't disable this initModel behavior in a subclass, since you can't call
 super.super.initModel, so to disable this behavior, I have to copy the whole
 source of the Image class and remove this method.

 That seems like waste and you're not benefiting from future improvements
 in the Image class then.

 Cheers,
  Erwin Bolwidt

 On 6/4/10 9:33 AM, Ernesto Reinaldo Barreiro wrote:

 Maybe this is related to this override on Image class?

 @Override
        protected IModel?  initModel()
        {
                // Images don't support Compound models. They either have a
 simple
                // model, explicitly set, or they use their tag's src or
 value
                // attribute to determine the image.
                return null;
        }

 Ernesto


 On Fri, Jun 4, 2010 at 9:30 AM, Erwin Bolwidtebolw...@worldturner.nl
  wrote:


 Oops, I went a bit too far in pruning non-essential code.

 InStockIconImage has a second constructor:

    public InStockIconImage(String id) {
        super(id);
    }

 I think it centers around this. If I pass a PropertyModel(listingModel,
 inStock) explicitly to the constructor, it works, but not if I depend
 on
 the automatic property resolution that works well if I use a Label.

 How can I get it to work if I don't want to pass a PropertyModel
 explicitly?

 Erwin

 On 6/4/10 9:15 AM, Erwin Bolwidt wrote:


 Hi,

 I'm trying to make an image subclass that shows an icon. Which icon it
 shows depends on its model object, which is a boolean. Problem is,  I'm
 not
 getting the model object: it's always null. If I use a Label instead of
 InStockIconImage, it works: the label shows a boolean (true/false).

 Any idea what could cause this?

 Thanks,
  Erwin


 Here's the icon:

 public class InStockIconImage extends Image {
    private static final String PATH_IN_STOCK = in_stock.png;
    private static final String PATH_NOT_IN_STOCK = not_in_stock.png;
    private static final String PATH_NO_MODEL_OBJECT = empty.png;

    public InStockIconImage(String id, IModelBoolean  model) {
        super(id, model);
    }

   �...@override
    protected ResourceReference getImageResourceReference() {
        Boolean inStock = (Boolean) getDefaultModelObject();
        String path;
        if (inStock == null) {
            path = PATH_NO_MODEL_OBJECT;
        } else if (inStock) {
            path = PATH_IN_STOCK;
        } else {
            path = PATH_NOT_IN_STOCK;
        }
        return new ResourceReference(Icons.class, path);
    }
 }

 Here's how I use it:

        RefreshingListViewProductListing  listingRepeater = new
 RefreshingListViewProductListing(
                listing, new
 PropertyModelSetProductListing(getModel(), listings)) {
           �...@override
            protected void populateItem(ItemProductListing  item) {
                item.add(new Label(webShop.name));
                item.add(new Label(price));
                item.add(new InStockIconImage(inStock));
            }
        };
        add(listingRepeater);

 RefreshingListView is a utility class which decorates a normal
 RefreshingView:

 public abstract class RefreshingListViewT  extends RefreshingViewT
  {

    public RefreshingListView(String id) {
        super(id);
    }

    public RefreshingListView(String id, IModel? extends CollectionT
 model) {
        super(id, model);
    }

   �...@override
    protected IteratorIModelT  getItemModels() {
        CollectionT  modelObject = getModelObject();
        if (modelObject == null) {
            modelObject = new ArrayListT();
        }
        return new ModelIteratorAdapterT(modelObject.iterator()) {
           �...@override
            protected IModelT  model(T object) {
                return new CompoundPropertyModelT(object);
            }
        };
    }

    public CollectionT  getModelObject() {
        return getModel().getObject();
    }

   �...@suppresswarnings(unchecked)
    public 

Renderer does not work when datePicker is initially displayed

2010-06-04 Thread rawe

I`m using  a renderer to work with the OutOfBoundsDate,
but it doesn't work when the DatePicker is initially displayed. 
When I do some action in the DatePicker (e.g. change the month) the
OutOfBoundsDate is correctly rendered (here sundays and saturdays are
disabled)

e.g. I disable the weekend days, so I override the method
getAdditionalJavascript():

@Override
protected String getAdditionalJavascript() {
if (additionalJavascript == null)
additionalJavascript = ;

additionalJavascript += ${calendar}.addWeekdayRenderer(1,
${calendar}.renderOutOfBoundsDate);; // disable sundays
additionalJavascript += ${calendar}.addWeekdayRenderer(7,
${calendar}.renderOutOfBoundsDate);; // disable saturdays

return additionalJavascript;
}

Thanks for any help!

rawe
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Renderer-does-not-work-when-datePicker-is-initially-displayed-tp2243041p2243041.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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



Re: Image subclass not getting its model object

2010-06-04 Thread Ernesto Reinaldo Barreiro
Hi Erwin,

On Fri, Jun 4, 2010 at 1:03 PM, Erwin Bolwidt ebolw...@worldturner.nl wrote:
 Hi Ernesto,

 Just got the 1.4.9 source code and I see what you mean.

As a rule I always install the source code of any OpenSouce software I
use: Javadoc could be wrong or outdated but source code will never
mislead you;-)

 But why is it like this?
 I copied the whole Image source code to a new class, removed this initModel
 method, and then things work fine if I don't supply a model.


Sorry Erwin but i don't know why this decision was taken... I just did
the same as you did: look into the source code and figured out this
was the reason. Maybe some of the core developers can comment on this?
Or if you think your  use case is a valid one just file a RFE on
wicket site.

Best,

Ernesto

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



Re: Javascript string formatting problem with DateTextField and DatePicker

2010-06-04 Thread Jimi

Thanks Igor. I was already running 1.4.7, but I just upgraded to 1.4.9 and
that solved the problem. But strange that the bugfix wasn't mentioned on the
http://wicket.apache.org/news.html page.

Regards
/Jimi


Igor Vaynberg-2 wrote:
 
 i think this is fixed in 1.4.7+, you should upgrade
 



-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Javascript-string-formatting-problem-with-DateTextField-and-DatePicker-tp2241433p2243120.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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



RE: drag and drop

2010-06-04 Thread DerBernd

Ok, thank you,
good to know. At the moment I don't need to watch the dragStop or DragStart
Event. So I can leave it as it is.





-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/drag-and-drop-tp1881857p2243182.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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



[wicketstuff-core] planning a 1.4.9.1 point release next week.

2010-06-04 Thread Michael O'Cleirigh

Hello,

For release I'm doing at work I need to generate a wicketstuff-core 
1.4.9.1 release.


I see that there have been some updates to trunk (1.4.10-SNAPSHOT) so if 
you would like these changes to be included in the this point release 
please back port your changes to the 1.4.9 branch.


I've also just turned on snapshot building (through my Hudson instance) 
for the 1.4.9.1-SNAPSHOT and the 1.4.8.1-SNAPSHOT versions and they are 
being deployed into the oss.sonatype.org snapshot repository.  The 
polling is every 15 minutes (at 0:15:30:45) just like with trunk.


The 1.4.9 wicketstuff-core branch is here: 
https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/branches/wicketstuff-core-1.4.9/


Probably I am going to cut the point release on Thursday or Friday next 
week.


Regards,

Mike






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



Frustrating behavior ... same browser, same war, same tomcat version - different behavior!!!

2010-06-04 Thread Bryan Montgomery
Hello,
I've been banging my head against the proverbial brick wall for the last
day. I have a fairly large web application which I've been modifying part
of.

Essentially, part of the process generates dynamic web forms based on xml
configuration files. We noticed that on one of our servers when we deployed
the war file that the fields would not hold their values, and as soon as you
tabbed out, the entry would disappear. Taking the same war file and
deploying it to another server the form acts as expected.

This has been tried on both ie 7 and ie 8 with the same results.

Looking at the html on the browser, it is pretty simple. If I save the file
to the local machine and replace the relative links with absolute links I
can't reproduce the errors - although I do get javascript errors. Comparing
the html between the working server and the problematic server, the only
difference is wicket field references.

Comparing the javascript files and ccs files, they are identical. I'm
guessing it has something to do with the onblur in the html below - but why
would it exhibt a different behavior between the servers? I'm not sure why
we're using ajax there as the page doesn't have any ajax / callback features
to it as far as I know.

Is there some other tomcat setting that could be effecting this? Somewhere
else I should look?

Thanks,
Bryan.

html xmlns='http://www.w3.org/1999/xhtml' lang='en'


  headlink rel=stylesheet type=text/css
href=../../../../resources/com.abc.reports.page.MainPage/style/nrgWeb.css
view-source:http://coned-avl:8080/nrg/app/resources/com.samsix.reports.page.MainPage/style/nrgWeb.css
/

link type='image/x-icon'  rel='icon'
href='../../../../../favicon_oru.ico
view-source:http://coned-avl:8080/nrg/favicon_oru.ico' /

link type='image/x-icon'  rel='shortcut icon'
href='../../../../../favicon_oru.ico
view-source:http://coned-avl:8080/nrg/favicon_oru.ico' /

script type=text/javascript
src=../../../../resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js
view-source:http://coned-avl:8080/nrg/app/resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js/script

script type=text/javascript
src=../../../../resources/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js
view-source:http://coned-avl:8080/nrg/app/resources/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js/script

/headbody topmargin='0'
titleAnalysis/title

span class='pageTitle'Single Analysis/span
span

a href=../../../../startup
view-source:http://coned-avl:8080/nrg/app/startup

span
img 
src=../../../../resources/org.apache.wicket.Application/back_button
view-source:http://coned-avl:8080/nrg/app/resources/org.apache.wicket.Application/back_button
border=0/

/span
/a
/span
br /

h1 class='reportMenu'Analysis/h1
h1 class='reportDescription'Single pass analysis./h1

span

/span
form id=queryForm7 method=post
action=../../../../?wicket:interface=:7:queryForm::IFormSubmitListener::div
style=display:noneinput type=hidden name=queryForm7_hf_0
id=queryForm7_hf_0 //div

  table
tr
  td
span class=labelCircuit/span

  /td

  td
input type=text value= name=circuitField
id=circuitField8 onblur=var
wcall=wicketAjaxPost('../../../../?wicket:interface=:7:queryForm:circuitField::IBehaviorListener:0:4',
wicketSerialize(Wicket.$('circuitField8')),null,null, function()
{return Wicket.$('circuitField8') != null;}.bind(this));/

  /td
/tr
tr
  td
span class=labelSegment/span

  /td

  td
input type=text value= name=segmentField
id=segmentField9 onblur=var
wcall=wicketAjaxPost('../../../../?wicket:interface=:7:queryForm:segmentField::IBehaviorListener:0:4',
wicketSerialize(Wicket.$('segmentField9')),null,null, function()
{return Wicket.$('segmentField9') != null;}.bind(this));/

  /td
/tr
tr
  td/td

  td align='right'
input type='submit' name='submit' value='Execute Query' /

  /td
/tr
  /table
/form

  /body
/html


TextField that renders a link

2010-06-04 Thread Josh Chappelle
Does anyone know of a TextField component or perhaps a Behavior that can be
added to a TextField that will render a link when the user types a URL into
it?

 

Thanks,

 

Josh



Re: Frustrating behavior ... same browser, same war, same tomcat version - different behavior!!!

2010-06-04 Thread James Carman
Have you tried clearing your cache on your browsers?

On Fri, Jun 4, 2010 at 11:57 AM, Bryan Montgomery mo...@english.net wrote:
 Hello,
 I've been banging my head against the proverbial brick wall for the last
 day. I have a fairly large web application which I've been modifying part
 of.

 Essentially, part of the process generates dynamic web forms based on xml
 configuration files. We noticed that on one of our servers when we deployed
 the war file that the fields would not hold their values, and as soon as you
 tabbed out, the entry would disappear. Taking the same war file and
 deploying it to another server the form acts as expected.

 This has been tried on both ie 7 and ie 8 with the same results.

 Looking at the html on the browser, it is pretty simple. If I save the file
 to the local machine and replace the relative links with absolute links I
 can't reproduce the errors - although I do get javascript errors. Comparing
 the html between the working server and the problematic server, the only
 difference is wicket field references.

 Comparing the javascript files and ccs files, they are identical. I'm
 guessing it has something to do with the onblur in the html below - but why
 would it exhibt a different behavior between the servers? I'm not sure why
 we're using ajax there as the page doesn't have any ajax / callback features
 to it as far as I know.

 Is there some other tomcat setting that could be effecting this? Somewhere
 else I should look?

 Thanks,
 Bryan.

 html xmlns='http://www.w3.org/1999/xhtml' lang='en'


  headlink rel=stylesheet type=text/css
 href=../../../../resources/com.abc.reports.page.MainPage/style/nrgWeb.css
 view-source:http://coned-avl:8080/nrg/app/resources/com.samsix.reports.page.MainPage/style/nrgWeb.css
 /

 link type='image/x-icon'  rel='icon'
 href='../../../../../favicon_oru.ico
 view-source:http://coned-avl:8080/nrg/favicon_oru.ico' /

 link type='image/x-icon'  rel='shortcut icon'
 href='../../../../../favicon_oru.ico
 view-source:http://coned-avl:8080/nrg/favicon_oru.ico' /

 script type=text/javascript
 src=../../../../resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js
 view-source:http://coned-avl:8080/nrg/app/resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js/script

 script type=text/javascript
 src=../../../../resources/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js
 view-source:http://coned-avl:8080/nrg/app/resources/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js/script

 /headbody topmargin='0'
    titleAnalysis/title

    span class='pageTitle'Single Analysis/span
    span

    a href=../../../../startup
 view-source:http://coned-avl:8080/nrg/app/startup

        span
        img 
 src=../../../../resources/org.apache.wicket.Application/back_button
 view-source:http://coned-avl:8080/nrg/app/resources/org.apache.wicket.Application/back_button
 border=0/

 /span
    /a
 /span
    br /

    h1 class='reportMenu'Analysis/h1
    h1 class='reportDescription'Single pass analysis./h1

    span

 /span
    form id=queryForm7 method=post
 action=../../../../?wicket:interface=:7:queryForm::IFormSubmitListener::div
 style=display:noneinput type=hidden name=queryForm7_hf_0
 id=queryForm7_hf_0 //div

      table
        tr
          td
            span class=labelCircuit/span

          /td

          td
            input type=text value= name=circuitField
 id=circuitField8 onblur=var
 wcall=wicketAjaxPost('../../../../?wicket:interface=:7:queryForm:circuitField::IBehaviorListener:0:4',
 wicketSerialize(Wicket.$('circuitField8')),null,null, function()
 {return Wicket.$('circuitField8') != null;}.bind(this));/

          /td
        /tr
        tr
          td
            span class=labelSegment/span

          /td

          td
            input type=text value= name=segmentField
 id=segmentField9 onblur=var
 wcall=wicketAjaxPost('../../../../?wicket:interface=:7:queryForm:segmentField::IBehaviorListener:0:4',
 wicketSerialize(Wicket.$('segmentField9')),null,null, function()
 {return Wicket.$('segmentField9') != null;}.bind(this));/

          /td
        /tr
        tr
          td    /td

          td align='right'
            input type='submit' name='submit' value='Execute Query' /

          /td
        /tr
      /table
    /form

  /body
 /html


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



Re: Frustrating behavior ... same browser, same war, same tomcat version - different behavior!!!

2010-06-04 Thread Bryan Montgomery
Yeah, I thought it might be as simple as that - but unfortunately not.

On Fri, Jun 4, 2010 at 12:29 PM, James Carman ja...@carmanconsulting.comwrote:

 Have you tried clearing your cache on your browsers?

 On Fri, Jun 4, 2010 at 11:57 AM, Bryan Montgomery mo...@english.net
 wrote:
  Hello,
  I've been banging my head against the proverbial brick wall for the last
  day. I have a fairly large web application which I've been modifying part
  of.
 
  Essentially, part of the process generates dynamic web forms based on xml
  configuration files. We noticed that on one of our servers when we
 deployed
  the war file that the fields would not hold their values, and as soon as
 you
  tabbed out, the entry would disappear. Taking the same war file and
  deploying it to another server the form acts as expected.
 
  This has been tried on both ie 7 and ie 8 with the same results.
 
  Looking at the html on the browser, it is pretty simple. If I save the
 file
  to the local machine and replace the relative links with absolute links I
  can't reproduce the errors - although I do get javascript errors.
 Comparing
  the html between the working server and the problematic server, the only
  difference is wicket field references.
 
  Comparing the javascript files and ccs files, they are identical. I'm
  guessing it has something to do with the onblur in the html below - but
 why
  would it exhibt a different behavior between the servers? I'm not sure
 why
  we're using ajax there as the page doesn't have any ajax / callback
 features
  to it as far as I know.
 
  Is there some other tomcat setting that could be effecting this?
 Somewhere
  else I should look?
 
  Thanks,
  Bryan.
 
  html xmlns='http://www.w3.org/1999/xhtml' lang='en'
 
 
   headlink rel=stylesheet type=text/css
 
 href=../../../../resources/com.abc.reports.page.MainPage/style/nrgWeb.css
  view-source:
 http://coned-avl:8080/nrg/app/resources/com.samsix.reports.page.MainPage/style/nrgWeb.css
 
  /
 
  link type='image/x-icon'  rel='icon'
  href='../../../../../favicon_oru.ico
  view-source:http://coned-avl:8080/nrg/favicon_oru.ico' /
 
  link type='image/x-icon'  rel='shortcut icon'
  href='../../../../../favicon_oru.ico
  view-source:http://coned-avl:8080/nrg/favicon_oru.ico' /
 
  script type=text/javascript
 
 src=../../../../resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js
  view-source:
 http://coned-avl:8080/nrg/app/resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js
 /script
 
  script type=text/javascript
 
 src=../../../../resources/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js
  view-source:
 http://coned-avl:8080/nrg/app/resources/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js
 /script
 
  /headbody topmargin='0'
 titleAnalysis/title
 
 span class='pageTitle'Single Analysis/span
 span
 
 a href=../../../../startup
  view-source:http://coned-avl:8080/nrg/app/startup
 
 span
 img
 src=../../../../resources/org.apache.wicket.Application/back_button
  view-source:
 http://coned-avl:8080/nrg/app/resources/org.apache.wicket.Application/back_button
 
  border=0/
 
  /span
 /a
  /span
 br /
 
 h1 class='reportMenu'Analysis/h1
 h1 class='reportDescription'Single pass analysis./h1
 
 span
 
  /span
 form id=queryForm7 method=post
 
 action=../../../../?wicket:interface=:7:queryForm::IFormSubmitListener::div
  style=display:noneinput type=hidden name=queryForm7_hf_0
  id=queryForm7_hf_0 //div
 
   table
 tr
   td
 span class=labelCircuit/span
 
   /td
 
   td
 input type=text value= name=circuitField
  id=circuitField8 onblur=var
 
 wcall=wicketAjaxPost('../../../../?wicket:interface=:7:queryForm:circuitField::IBehaviorListener:0:4',
  wicketSerialize(Wicket.$('circuitField8')),null,null, function()
  {return Wicket.$('circuitField8') != null;}.bind(this));/
 
   /td
 /tr
 tr
   td
 span class=labelSegment/span
 
   /td
 
   td
 input type=text value= name=segmentField
  id=segmentField9 onblur=var
 
 wcall=wicketAjaxPost('../../../../?wicket:interface=:7:queryForm:segmentField::IBehaviorListener:0:4',
  wicketSerialize(Wicket.$('segmentField9')),null,null, function()
  {return Wicket.$('segmentField9') != null;}.bind(this));/
 
   /td
 /tr
 tr
   td/td
 
   td align='right'
 input type='submit' name='submit' value='Execute Query' /
 
   /td
 /tr
   /table
 /form
 
   /body
  /html
 

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




Re: Frustrating behavior ... same browser, same war, same tomcat version - different behavior!!!

2010-06-04 Thread gnul

 Essentially, part of the process generates dynamic web forms based on xml
 configuration files. We noticed that on one of our servers when we deployed
 the war file that the fields would not hold their values, and as soon as you
 tabbed out, the entry would disappear. Taking the same war file and
 deploying it to another server the form acts as expected.


If it works on one server, but not the other, and they are configured
the same (meaning same appserver/tomcat version, same jvm, same
user/group/perms, etc.), the first thing I do is clean the appserver
and do a fresh deploy.

For example, say you are deploying to /var/lib/tomcat/webapps/, I
would shutdown both tomcats, remove the exploded directories (e.g.
myapp.war = myapp/ ) and re-deploy the war files to each server.  I
would also clean out tomcat's temp directory (e.g.
/var/cache/tomcat5/temp), then restart them both.

 -gnul

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



Introduction: restauracie.sk (new project based on Wicket)

2010-06-04 Thread David Skuben
Hello Wicket comunity,

let me introduce the new web project based on Wicket from Slovakia.

Project name is RESTAURACIE.SK and you can find it at http://restauracie.sk.

RESTAURACIE.SK is restaurant guide showcasting restaurant across the
Slovakia.
Today we support only slovak locale, but in the future english will be also
supported.

We are two programmers and we have worked on it for last two years.

I would like to thanks the wicket founders and also all wicket comunity for
great work with this
framework.

One more thanks.


Re: Introduction: restauracie.sk (new project based on Wicket)

2010-06-04 Thread Marek Šabo
Nice one. Bookmarking... :)

--
Marek Šabo



On 06/04/2010 08:46 PM, David Skuben wrote:
 Hello Wicket comunity,

 let me introduce the new web project based on Wicket from Slovakia.

 Project name is RESTAURACIE.SK and you can find it at http://restauracie.sk.

 RESTAURACIE.SK is restaurant guide showcasting restaurant across the
 Slovakia.
 Today we support only slovak locale, but in the future english will be also
 supported.

 We are two programmers and we have worked on it for last two years.

 I would like to thanks the wicket founders and also all wicket comunity for
 great work with this
 framework.

 One more thanks.

   


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



TabbedPanel with AjaxSelfUpdatingTimerBehavior

2010-06-04 Thread Decebal Suiu
Hello

I use AjaxSelfUpdatingTimerBehavior on one tab and when switching to
another tab I want to stop it.
The AjaxSelfUpdatingTimerBehavior will be active only if this tab is
selected (start timer behavior when select the tab and stop it when
select other tab).
Any help is welcome.

Thanks,
Decebal

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



Re: Problem with Crypted URL

2010-06-04 Thread kugaprakash

Actually I should say, that it is not force re-directing even on using the
recommended approach. It still stays in the same current page. 

Am I doing something wrong here? I tried to remove the finally block
{Session.get().invalidate(); } and moved that code to detach(), still no
success.

Please let me know if there is some thing wrong being done here.

Thanks in Advance.
Kuga
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Problem-with-Crypted-URL-tp1875435p2243721.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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



Re: Frustrating behavior ... same browser, same war, same tomcat version - different behavior!!!

2010-06-04 Thread Bryan Montgomery
Thanks for the ideas. Still no joy.

The behavior is consistent between three different clients, all running
different versions of IE (6,7 and 8).
I was able to use the debugging feature built in to IE 8 to see that the
wicket ajax javascript was gettting called. At some point in that process it
lost the value of the field and it got set to an empty field.

I have the feeling that there is something different with the environment on
this particular server - but I have no idea what at this point.

On Fri, Jun 4, 2010 at 1:32 PM, gnul nullc...@gmail.com wrote:

 
  Essentially, part of the process generates dynamic web forms based on xml
  configuration files. We noticed that on one of our servers when we
 deployed
  the war file that the fields would not hold their values, and as soon as
 you
  tabbed out, the entry would disappear. Taking the same war file and
  deploying it to another server the form acts as expected.
 

 If it works on one server, but not the other, and they are configured
 the same (meaning same appserver/tomcat version, same jvm, same
 user/group/perms, etc.), the first thing I do is clean the appserver
 and do a fresh deploy.

 For example, say you are deploying to /var/lib/tomcat/webapps/, I
 would shutdown both tomcats, remove the exploded directories (e.g.
 myapp.war = myapp/ ) and re-deploy the war files to each server.  I
 would also clean out tomcat's temp directory (e.g.
 /var/cache/tomcat5/temp), then restart them both.

  -gnul

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




Re: Frustrating behavior ... same browser, same war, same tomcat version - different behavior!!!

2010-06-04 Thread Scott Swank
Do you have apache or a load balancer or anything else in the network?
 Is there maybe a simple difference in your httpd.conf pertaining to
sessions?

On Fri, Jun 4, 2010 at 1:32 PM, Bryan Montgomery mo...@english.net wrote:
 Thanks for the ideas. Still no joy.

 The behavior is consistent between three different clients, all running
 different versions of IE (6,7 and 8).
 I was able to use the debugging feature built in to IE 8 to see that the
 wicket ajax javascript was gettting called. At some point in that process it
 lost the value of the field and it got set to an empty field.

 I have the feeling that there is something different with the environment on
 this particular server - but I have no idea what at this point.

 On Fri, Jun 4, 2010 at 1:32 PM, gnul nullc...@gmail.com wrote:

 
  Essentially, part of the process generates dynamic web forms based on xml
  configuration files. We noticed that on one of our servers when we
 deployed
  the war file that the fields would not hold their values, and as soon as
 you
  tabbed out, the entry would disappear. Taking the same war file and
  deploying it to another server the form acts as expected.
 

 If it works on one server, but not the other, and they are configured
 the same (meaning same appserver/tomcat version, same jvm, same
 user/group/perms, etc.), the first thing I do is clean the appserver
 and do a fresh deploy.

 For example, say you are deploying to /var/lib/tomcat/webapps/, I
 would shutdown both tomcats, remove the exploded directories (e.g.
 myapp.war = myapp/ ) and re-deploy the war files to each server.  I
 would also clean out tomcat's temp directory (e.g.
 /var/cache/tomcat5/temp), then restart them both.

  -gnul

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




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



Re: Can I develop without recompiling/restarting after every change?

2010-06-04 Thread bht
Hi,

My suggestions were meant to be general, and with best I actually
meant in all environments including certified J2EE servers.

Any number of environments (Igor suggested Jetty) may work with or
without these suggestions.

That is because deployment environments may or may not make decisions
on which way to deploy different file types, or depending on
directories they are loaded from. Files in the web directory are quite
obviously candidates for the fastest deployment method.

If the environment thinks that HTML files need to be deployed in the
same way as Java files, which is quite likely if they are stored in
Java packages, then deploy-on-save setups may slow down the
development process of complex applications due to heavy CPU use.

Therefore, fetching markup from the web directory not from the
classpath is clearly superior under some of these conditions.

This would not break the ability of packaging markup of some
components in the classpath because Wicket can handle that at the same
time.

There is no need to squeeze my comments into the frame of your
community consensus. I am perfectly happy if my comments are correct
only for the other 100% of the community that I am targeting.

OT:

If Wicket adds the trivial feature of resolving HTML resource links
differently then finally there will be separation of concerns.
It will be possible to resolve links to resources e.g. css files,
images when loading HTML files from the local file system in the
package structure in the web directory.

And finally one would be able to use markup refactoring that is
available in today's tools. This is cheap stuff and I am perplexed why
it is not happening. Three lines of code - better practice.

See https://issues.apache.org/jira/browse/WICKET-2881


Regards

Bernard


On Thu, 3 Jun 2010 08:26:45 -0400, you wrote:

Hrm, perhaps you should have qualified your advice: If you're using
NetBeans, then for best performance...

Also, the packaging of markup on the classpath allows you to create
re-usable JARs of components and IMHO is one of the best features of
Wicket. So perhaps the qualification should really be, If you're using
NetBeans, and you're not planning on packaging your Wicket components in
a re-usable JAR, then for best performance...

The way your original post is phrased makes it sound like a best
practice, and it implies the Wicket default to fetch markup from the
classpath is inferior. I don't think this is a consensus among the
community.

jk

On Thu, Jun 03, 2010 at 08:57:43PM +1200, b...@actrix.gen.nz wrote:
 Martijn,
 
 You are making a *lot* of assumptions.
 
 Not everybody uses Eclipse.
 
 Nobody in this thread would consider restarts acceptable, still we are
 using this subject.
 
 HTML files location has to do with performance in the developing
 process depending on how the IDE handles the files.
 
 Please advise how to configure the NetBeans IDE to redeploy a HTML
 file in a Java package in a J2EE app server with the same speed as
 HTML files in the web directory (milliseconds not seconds).
 
 
 Thanks
 
 Bernard
 
 
 
 
 On Sun, 30 May 2010 15:23:09 +0200, you wrote:
 
 Huh?
 
 Storing the HTML in the packages has *nothing* to do with requiring
 restarts. Only wrongly configured IDEs may cause that.
 
 If your HTML doesn't get reloaded when you change it, then you should
 run Wicket in DEVELOPMENT mode. Also make sure you've configured
 Eclipse to copy all resources (not just .properties files)
 
 The Wicket Quickstart project and using Maven to generate your eclipse
 project files (mvn eclipse:eclipse) will configure everything
 correctly.
 
 Martijn
 
 On Sat, May 29, 2010 at 11:18 PM,  b...@actrix.gen.nz wrote:
  Hi,
 
  For best performance of redeploys in Wicket, consider storing HTML not
  in the Java package structure but in the web directory. So if your IDE
  and app server allow for hot deployment, then HTML changes deploy much
  faster, ie instantly. In your application init(), you add one
  statement
 
  getResourceSettings().addResourceFolder(wicket);
 
  where wicket matches the url-pattern in your filter-mapping in
  web.xml.
 
  PLease see https://issues.apache.org/jira/browse/WICKET-2881 for some
  background on how to take this one step further.
 
  Additionally, with GlassFish V3, you get session preservation on hot
  deployment of Java classes.
 
  You can enable deploy on save for convenience.
 
  If that is not fast enough, you can run your app in debug mode and hot
  swap classes after save while you are debugging it.
 
  All this comes with the NetBeans IDE. You really don't have to worry
  about this stuff anymore.
 
  Regards
 
  Bernard
 
 
 
  On Sat, 29 May 2010 16:12:46 +0100, you wrote:
 
 have you tried JRebel? ?I've not used it myself, but there was an
 interview on JavaPosse recently, sounds like it'd be an ideal fit for
 any Wicket developer.
 
 Dan
 
 On 22/07/28164 20:59, David Chang wrote:
  I am using Tomcat, any tips about how to develop out 
  

Re: Dialog involving multiple pages and a VO: some best practices?

2010-06-04 Thread Igor Vaynberg
obviously you have to know what you are passing around. you shouldnt
pass around objects that link to page instances, such as anonymous
classes of models.

-igor

On Fri, Jun 4, 2010 at 2:04 AM, Joseph Pachod j...@thomas-daily.de wrote:
 Igor Vaynberg wrote:

 usually i simply allow pages to take models of whatever it is they
 need, just like any other component. in case of a dto being passed
 around you can simply use the default model: new ModelDto(new
 Dto()); and pass that to any page. that way the page does not need to
 worry about where the objects comes from or how to store it.

 -igor

 As answered to Maruo, is there any dragon lurking there, with some return
 page de serialized instance's references pointing to some other reference
 that the one behind the current model being given around ?

 I was somehow under the impression it was kind of risky...

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



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



Re: DataTable in DataTable

2010-06-04 Thread Igor Vaynberg
just like you would with any other component, wicket doesnt care

-igor

On Fri, Jun 4, 2010 at 2:23 AM, midikem
ext.anders.nyst...@apotekensservice.se wrote:

 Hi is it possible to add a dataTable in a DataTable and how?
 I have a dataTable and when i press on a line in it i want a new dataTable
 to popup
 below the line i have pressed. How do i do this?
 I have a DefaultDataTabletest(dataTable, columns, provider, 10)
 where i have added the columns to a arrayList.
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/DataTable-in-DataTable-tp2242922p2242922.html
 Sent from the Wicket - User mailing list archive at Nabble.com.

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



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



Re: Frustrating behavior ... same browser, same war, same tomcat version - different behavior!!!

2010-06-04 Thread Igor Vaynberg
right, sounds like the session is being lost and the page is being
rerendered fresh.

-igor

On Fri, Jun 4, 2010 at 1:46 PM, Scott Swank scott.sw...@gmail.com wrote:
 Do you have apache or a load balancer or anything else in the network?
  Is there maybe a simple difference in your httpd.conf pertaining to
 sessions?

 On Fri, Jun 4, 2010 at 1:32 PM, Bryan Montgomery mo...@english.net wrote:
 Thanks for the ideas. Still no joy.

 The behavior is consistent between three different clients, all running
 different versions of IE (6,7 and 8).
 I was able to use the debugging feature built in to IE 8 to see that the
 wicket ajax javascript was gettting called. At some point in that process it
 lost the value of the field and it got set to an empty field.

 I have the feeling that there is something different with the environment on
 this particular server - but I have no idea what at this point.

 On Fri, Jun 4, 2010 at 1:32 PM, gnul nullc...@gmail.com wrote:

 
  Essentially, part of the process generates dynamic web forms based on xml
  configuration files. We noticed that on one of our servers when we
 deployed
  the war file that the fields would not hold their values, and as soon as
 you
  tabbed out, the entry would disappear. Taking the same war file and
  deploying it to another server the form acts as expected.
 

 If it works on one server, but not the other, and they are configured
 the same (meaning same appserver/tomcat version, same jvm, same
 user/group/perms, etc.), the first thing I do is clean the appserver
 and do a fresh deploy.

 For example, say you are deploying to /var/lib/tomcat/webapps/, I
 would shutdown both tomcats, remove the exploded directories (e.g.
 myapp.war = myapp/ ) and re-deploy the war files to each server.  I
 would also clean out tomcat's temp directory (e.g.
 /var/cache/tomcat5/temp), then restart them both.

  -gnul

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




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



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



How to do a multiple page form?

2010-06-04 Thread David Chang
Hi, I would like to do a multiple page form. For example, I have a two-page 
form. Both pages have a few fields that need validation. The first page has a 
button called Next and the second page has a Previous button and a Submit 
button.

Any pointers or how-to info will be greatly appreciated.

Best and have a great weekend!

-David


  

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



Re: How to do a multiple page form?

2010-06-04 Thread Pedro Santos
Do you searching for an wizard implementation?
http://www.wicket-library.com/wicket-examples/wizard/

On Fri, Jun 4, 2010 at 11:49 PM, David Chang david_q_zh...@yahoo.comwrote:

 Hi, I would like to do a multiple page form. For example, I have a two-page
 form. Both pages have a few fields that need validation. The first page has
 a button called Next and the second page has a Previous button and a
 Submit button.

 Any pointers or how-to info will be greatly appreciated.

 Best and have a great weekend!

 -David




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




-- 
Pedro Henrique Oliveira dos Santos


Re: Question about usage of PageMap

2010-06-04 Thread Pedro Santos
I believe that passing the page where user click Add as parameter to the
wizard is an simple solution to has an reference to set on the cancel
response.

On Fri, Jun 4, 2010 at 3:55 AM, Swanthe Lindgren 
swanthe.lindg...@megasol.se wrote:

 Hello all.
 I our application we have a lot of search and maintenance pages for
 different type of entities. On each of these pages we put an Add button,
 which takes the user to a wizard to add a new entity of that type. In the
 wizard, we want to be able to send the user back to where it came from if
 the Cancel button is pressed.

 Questions:
 Is there a simple way to know how the user entered the wizard?
 Is this where the PageMap comes in, or is there any other way to track the
 users path in the application?

 //Swanthe



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




-- 
Pedro Henrique Oliveira dos Santos


Re: TextField that renders a link

2010-06-04 Thread Mauro Ciancio
Hello,

  An option is to create a panel that inside of it has
two components, a textbox and a link. Via ajax
you can update the textbox's model and show the
link if needed.

  I don't know if there is a pre-made component with
that functions, but I've wrapped two components
into a panel and it works pretty good.

Regards.

On Fri, Jun 4, 2010 at 1:27 PM, Josh Chappelle jchappe...@4redi.com wrote:

 Does anyone know of a TextField component or perhaps a Behavior that can be
 added to a TextField that will render a link when the user types a URL into
 it?



 Thanks,



 Josh




-- 
Mauro Ciancio maurociancio at gmail dot com


Re: SessionStore life cycle in cluster?

2010-06-04 Thread DmitryM

Igor,

Can you please comment on the following couple of points I got?

1. Pulling session from memcached node: I double checked the
recommendation and it looks like fetching session from the memcached node
doesn't take much time (around 200ms at most). But there was a
recommendation about immediate session attributes deserialization after
session replication
(http://apache-wicket.1842946.n4.nabble.com/A-few-clustering-questions-td1863992.html#a1863993).
Do you think it may be a potential issue causing the request processing
delay I experienced?

2. The memcached-session-manager's developer suggested I could try to use
plain HttpSessionStore (instead of default SecondLevelCacheSessionStore).
But when I tried his suggestion I got the following stacktrace:

java.lang.ExceptionInInitializerError
at sun.misc.Unsafe.ensureClassInitialized(Native Method)
at
sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(UnsafeFieldAccessorFactory.java:25)
at
sun.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:122)
at java.lang.reflect.Field.acquireFieldAccessor(Field.java:918)
at java.lang.reflect.Field.getFieldAccessor(Field.java:899)
at java.lang.reflect.Field.getLong(Field.java:528)
at 
java.io.ObjectStreamClass.getDeclaredSUID(ObjectStreamClass.java:1614)
at java.io.ObjectStreamClass.access$700(ObjectStreamClass.java:52)
at java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:425)
at java.security.AccessController.doPrivileged(Native Method)
at java.io.ObjectStreamClass.init(ObjectStreamClass.java:413)
at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java:310)
at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:547)
at 
java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1583)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1496)
at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1732)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
at 
java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
at 
java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
at 
java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
at 
java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:480)
at org.apache.wicket.Component.readObject(Component.java:4457)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at 
java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1849)
at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1667)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1323)
at 
java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1667)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1323)
at 
java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1667)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1323)
at 
java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
at