Re: Design Rules for Application

2010-05-26 Thread Per Newgro

Hello Christian,

good starting points (beside the really good existing wicket books) are here
http://wicket.apache.org/
http://www.wicketstuff.org/wicket14
https://cwiki.apache.org/WICKET

All you asked for is out there. Other source of knowledge is this 
mailing-list.

Search older entries by using nabble.com

Cheers
Per


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



Displaying message from ConversionException

2010-05-26 Thread Michal Jedynak

Hello.

Iv'e got a TextField that uses my custom converter which throws several
ConversionException with different messages.
How can I display a message of the exception on a page? In my properties
file I've got a property 'form.component.IConverter' which shows
message that I define, but I don't know how to put there a message from the
exception. Variable ${exception} displays a full stack trace of the
exception.
Is there a way to get only message from it? 

--
Michal
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Displaying-message-from-ConversionException-tp2231197p2231197.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



Dataview linkedline

2010-05-26 Thread midikem

Hi,

I want to be able to select a line in my dataview and onClick on the line i
want something to happend.
My guess is that i use LinkPanel in some way but how do I do it? I have been
looking around for a while, but i cant find the answear. Thx.

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Dataview-linkedline-tp2231274p2231274.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



set focus on IE

2010-05-26 Thread Alexander Monakhov
Hi, guys.

Here is code I'm using to show modal window in response of AjaxLink onClick
event:

public void onClick( AjaxRequestTarget target ) {
  modal.show( target );
  target.focusComponent( getComponentToBeFocuse() );
}

It's working correctly on FireFox and Opera, but isn't working on IEv7/IEv6.
Could you give me any suggestion?

Best regards, Alexander.


Re: Clear URL parameters

2010-05-26 Thread Erik van Oosten
If the user only browsed stateless pages up to that point there is no 
http session, but only a new wicket session for each request. You can 
call WebSession.bind() to force the creation of a http session.


Regards,
Erik.


Op 24-05-10 17:51, andres.santana wrote:

Does redirect affects a Custom Session? I mean using setRedirect(true) works
but something I set in the WebSession is lost.

-
--
arsh
   



--
Erik van Oosten
http://www.day-to-day-stuff.blogspot.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-05-26 Thread Stefan Lindner
I think this is a general Wicket problem. You have component A originally 
attached to Container C1 an then call Container C2.add(A). This means you want 
to remove Component A from Parent C1 and add it to Parent C2? Is this what you 
are doing?

Stefan

-Ursprüngliche Nachricht-
Von: DerBernd [mailto:beha...@web.de] 
Gesendet: Mittwoch, 26. Mai 2010 07:51
An: users@wicket.apache.org
Betreff: Re: drag and drop


Hi,
now I tried jwicket-examples and it works quite well. But at the momemt I
stuck into a problem and I hope you can help me out.

I have a Panel Placeholder that implements IDroppable
And a Panel Field that implements IDraggable

So I have some empty Placeholders and a few Placeholders that are filled
with a Field. (held in an repeatingView of Placeholder). When I drop a Field 
over an empty Placeholder, I want to add the Field to the empty Placeholder
and remove it on its old Placeholder.

Here's the code of the placeholder.

public void onDrop(AjaxRequestTarget target, Component draggedComponent,
SpecialKeys specialKeys) {
Field field = (Field)draggedComponent;


listPanel.add(feld); //add it to the repeating View

PanelWochenplanung panelWochenplanung =
findParent(PanelWochenplanung.class); // get the ParentPanel
target.addComponent(panelWochenplanung); // render the ParentPanel with all
Placeholders in

}

When I drop the field (e.g. FeldA2 from the placeholder_t2r0) on an other
placeholder I get the following error, that the dropped field was not found
on the PAGE! 


component
panelMitte:listPanel:panelWochenplanung:platzhalter_t2r0:listPanel:feldA2
not found on page kursa.wochenplanung.WochenplanungPage[id = 1], listener
interface = [RequestListenerInterface name=IBehaviorListener, method=public
abstract void org.apache.wicket.behavior.IBehaviorListener.onRequest()]

 
I hope you can get me a idea about what is wrong;)
Thank you
Bernd
http://apache-wicket.1842946.n4.nabble.com/file/n2231075/WicketMessage.txt
WicketMessage.txt 
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/drag-and-drop-tp1881857p2231075.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-05-26 Thread DerBernd

Exactly, this is what I want to do!
Can you tell me how to solf this problem?
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/drag-and-drop-tp1881857p2231455.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-05-26 Thread Ernesto Reinaldo Barreiro
Why don't you use repeaters? What about C1 and C2 contains a repeaters
a draw contents based on some Info. When you move A from C1 to C2
then you just move InfoA, info associated twith A, from C1 to C2 and
then repaint them. As they are dynamically generated based on Info
then the effect will be as if you moved A from C1 to C2  (evevn whe
you are rebuilding the component tree).

Best,

Ernesto


On Wed, May 26, 2010 at 1:36 PM, DerBernd beha...@web.de wrote:

 Exactly, this is what I want to do!
 Can you tell me how to solf this problem?
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/drag-and-drop-tp1881857p2231455.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-05-26 Thread Ernesto Reinaldo Barreiro
Is my poor English is getting worse because of lack of sleep?


Why don't you use repeaters?

1-Let's say C1 and C2 contain repeaters
that draw their contents based on some list of Info classes.
2-When you move A from C1 to C2 then you just move InfoA, info
associated twith A, from C1 to C2 and
then repaint them.

As the content is dynamically generated based on Info classes then
the effect will be as if you have moved A from C1 to C2  (even if you
are just rebuilding the component tree).

Best,

Ernesto

On Wed, May 26, 2010 at 1:47 PM, Ernesto Reinaldo Barreiro
reier...@gmail.com wrote:
 Why don't you use repeaters? What about C1 and C2 contains a repeaters
 a draw contents based on some Info. When you move A from C1 to C2
 then you just move InfoA, info associated twith A, from C1 to C2 and
 then repaint them. As they are dynamically generated based on Info
 then the effect will be as if you moved A from C1 to C2  (evevn whe
 you are rebuilding the component tree).

 Best,

 Ernesto


 On Wed, May 26, 2010 at 1:36 PM, DerBernd beha...@web.de wrote:

 Exactly, this is what I want to do!
 Can you tell me how to solf this problem?
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/drag-and-drop-tp1881857p2231455.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: Veil behavior of wicketstuff-minis

2010-05-26 Thread nmetzger

This is pretty easy to do. I added a veil to my page by implementing
IAjaxIndicatorAware, adding the method getAjaxIndicatorMarkupId() and
providing style definitions on the html side. Like this:

public class MyPage extends WebPage implements IAjaxIndicatorAware{
 public MyPage(){
  //Do what ever you need to do in your contructor
 }

public String getAjaxIndicatorMarkupId() {
return veil;
}
}

div id=veil style=display:none;position:absolute;top:0;left:0;
 z-index=9;background-color:grey;
 width:100%;height:100%;color:white;
 opacity:0.4;filter:alpha(opacity=40)
h1 style=position:absolute;top:25%;left:25%Loading .../h1
/div

Hope this helps,

Natalie

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Veil-behavior-of-wicketstuff-minis-tp2228127p2231564.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: change (redirect) the markup html file

2010-05-26 Thread Daniel Aschauer
Thanks!

But, I don't have a setStyle in WebPage-class, there is a
setStyle-method only in ResourceReference?
How could I use this?

Daniel

2010/5/25 Jeremy Thomerson jer...@wickettraining.com:
 You could use style for this if you'd like, and use a PageParameter to set
 the style in the constructor (SomePage_style1.html, SomePage_style2.html)

 public SomePage(PageParameters params) {
 setStyle(params.get(style));
 }

 On Tue, May 25, 2010 at 5:23 AM, Daniel Aschauer
 daniel.ascha...@gmail.comwrote:

 Hello!

 Maybe a simple question, but I didn't figured it out yet. I have a set
 of very simular mainly static pages, so I want to use one java class
 and depending on a given parameter use differnt html-markup files. Is
 there a method that does this kind of redirect or changes the name of
 the refered .html?

 Thanks alot,
 Daniel

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




 --
 Jeremy Thomerson
 http://www.wickettraining.com


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



Guice singleton scope

2010-05-26 Thread Marek Šabo
Hi all,

I wanted to try the @Singleton annotation in guice with sort of data
facade. What concerns me is the scope of the created singleton. Javadoc
says its a singleton per Injector. So if I create configured
InjectorHolder and return Injector in Application's init(), does it mean
there is a singleton for the whole application (thus for all sessions)?

I would prefer per session based singleton, because the facade
construction is not short, I don't want to instantiate it every
time it's injected. Have you ever considered this -- any ideas?

Regards,

-- 
Marek Šabo



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



Re: Guice singleton scope

2010-05-26 Thread James Carman
That's not a singleton at all.  That's a session-scoped bean.

On Wed, May 26, 2010 at 12:45 PM, Marek Šabo ms...@buk.cvut.cz wrote:
 Hi all,

 I wanted to try the @Singleton annotation in guice with sort of data
 facade. What concerns me is the scope of the created singleton. Javadoc
 says its a singleton per Injector. So if I create configured
 InjectorHolder and return Injector in Application's init(), does it mean
 there is a singleton for the whole application (thus for all sessions)?

 I would prefer per session based singleton, because the facade
 construction is not short, I don't want to instantiate it every
 time it's injected. Have you ever considered this -- any ideas?

 Regards,

 --
 Marek Šabo



 -
 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: Guice singleton scope

2010-05-26 Thread Marek Šabo
Yes, I gather that is correct term for this.
What would be the proper way to implement it? Just put a referrence with
@Inject in the custom WebSession?

Anyway, ad my first question, I suppose then the singleton would be in
the scope of whole application thus needing synchronization.

Regards

On 05/26/2010 06:48 PM, James Carman wrote:
 That's not a singleton at all.  That's a session-scoped bean.

 On Wed, May 26, 2010 at 12:45 PM, Marek Šabo ms...@buk.cvut.cz wrote:
   
 Hi all,

 I wanted to try the @Singleton annotation in guice with sort of data
 facade. What concerns me is the scope of the created singleton. Javadoc
 says its a singleton per Injector. So if I create configured
 InjectorHolder and return Injector in Application's init(), does it mean
 there is a singleton for the whole application (thus for all sessions)?

 I would prefer per session based singleton, because the facade
 construction is not short, I don't want to instantiate it every
 time it's injected. Have you ever considered this -- any ideas?

 Regards,

 --
 Marek Šabo



 -
 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


   


-- 
Marek Šabo
Server Manager
Club SU CVUT Buben
Bubenečská Kolej (421)
XMPP: zeratul...@gmail.com


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



Re: Guice singleton scope

2010-05-26 Thread James Carman
On Wed, May 26, 2010 at 1:05 PM, Marek Šabo ms...@buk.cvut.cz wrote:
 Yes, I gather that is correct term for this.
 What would be the proper way to implement it? Just put a referrence with
 @Inject in the custom WebSession?

 Anyway, ad my first question, I suppose then the singleton would be in
 the scope of whole application thus needing synchronization.

There's no problem making your bean @SessionScoped, but that doesn't
necessarily guarantee that you only have one thread going through it
at a time.  Do you need to worry about threading?  What kind of bean
is it?

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



Re: Dataview linkedline

2010-05-26 Thread Igor Vaynberg
add a link to your item, and put everything into the link.

-igor

On Wed, May 26, 2010 at 2:19 AM, midikem
ext.anders.nyst...@apotekensservice.se wrote:

 Hi,

 I want to be able to select a line in my dataview and onClick on the line i
 want something to happend.
 My guess is that i use LinkPanel in some way but how do I do it? I have been
 looking around for a while, but i cant find the answear. Thx.

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Dataview-linkedline-tp2231274p2231274.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: wicket file upload

2010-05-26 Thread mdh

create your own FileItemFactory that returns a DatabaseImageStorageFileItem 
(which you'll have to create).  When the request is processed, your 
DatabaseImageStorageFileItem 
will be created

I understand your idea, but I still have the problem of how do I make the
request use my FileItemFactory.

Looking at the code for MultipartServletWebRequest (which is the request
type used for a file upload) it hard codes the factory used (line 94 in
1.4.1):
   DiskFileItemFactory factory = new DiskFileItemFactory();

Does wicket provide some hook that I could use to insert my own
FileItemFactory, so that it will use that instead of the
DiskFileItemFactory? It might just be that I don't understand wicket well
enough and I'm looking in the wrong place.

I use FileUploadField on the form, but I can't see anything in there that
allows a factory to be specified.
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/wicket-file-upload-tp2230621p2232247.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: [PROPOSAL] Application.runAs() Method...

2010-05-26 Thread Joe Fawzy
Hi
Please make this configurable(can be disabled) as i am on appengine, they
does not allow threads
thanks
Joe

On Tue, May 25, 2010 at 4:34 PM, James Carman ja...@carmanconsulting.comwrote:

 Sorry, subject should be wrap() method, not runAs().

 On Tue, May 25, 2010 at 9:33 AM, James Carman
 ja...@carmanconsulting.com wrote:
  I've been thinking about this whole idea of needing to access the
  application object in different threads idea.  What if the Application
  class had a method like this:
 
  public Runnable wrap(Runnable task)
 
  Basically, the Application would create a Runnable object that can be
  run within the context of itself (by setting/clearing the ThreadLocal
  variable).  Then, you can use that Runnable anywhere to run a task
  with all of the appropriate Wickety goodness set up for you (except
  for the request cycle of course because you're not executing within a
  request cycle).  Now, what the Application stores in the Runnable
  doesn't have to be the Application itself.  We can set up a static
  MapString,WeakReferenceApplication object on the Application class
  and when an Application is constructed, it registers itself (the key
  could be a UUID.randomUUID().toString()).  Then, we could have a
  method like
 
  public static Application get(String id);
 
  on the Application class to get back the original Application object.
 

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




Re: [PROPOSAL] Application.runAs() Method...

2010-05-26 Thread James Carman
Well, this doesn't start any threads or anything.  So, it wouldn't
immediately allow folks to start up threads.  All this would do is
create an object that *can* be run in another thread, but have access
to this Application in it.  Also, this is just a proposal.  I'm just
wanting folks to give feedback about the idea.  I think this is the
most flexible way to solve the problem we're seeing folks have.

On Wed, May 26, 2010 at 4:28 PM, Joe Fawzy joewic...@gmail.com wrote:
 Hi
 Please make this configurable(can be disabled) as i am on appengine, they
 does not allow threads
 thanks
 Joe

 On Tue, May 25, 2010 at 4:34 PM, James Carman 
 ja...@carmanconsulting.comwrote:

 Sorry, subject should be wrap() method, not runAs().

 On Tue, May 25, 2010 at 9:33 AM, James Carman
 ja...@carmanconsulting.com wrote:
  I've been thinking about this whole idea of needing to access the
  application object in different threads idea.  What if the Application
  class had a method like this:
 
  public Runnable wrap(Runnable task)
 
  Basically, the Application would create a Runnable object that can be
  run within the context of itself (by setting/clearing the ThreadLocal
  variable).  Then, you can use that Runnable anywhere to run a task
  with all of the appropriate Wickety goodness set up for you (except
  for the request cycle of course because you're not executing within a
  request cycle).  Now, what the Application stores in the Runnable
  doesn't have to be the Application itself.  We can set up a static
  MapString,WeakReferenceApplication object on the Application class
  and when an Application is constructed, it registers itself (the key
  could be a UUID.randomUUID().toString()).  Then, we could have a
  method like
 
  public static Application get(String id);
 
  on the Application class to get back the original Application object.
 

 -
 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: wicket file upload

2010-05-26 Thread Jeremy Thomerson
On Wed, May 26, 2010 at 2:51 PM, mdh mhorn...@ntlworld.com wrote:


 create your own FileItemFactory that returns a
 DatabaseImageStorageFileItem
 (which you'll have to create).  When the request is processed, your
 DatabaseImageStorageFileItem
 will be created

 I understand your idea, but I still have the problem of how do I make the
 request use my FileItemFactory.

 Looking at the code for MultipartServletWebRequest (which is the request
 type used for a file upload) it hard codes the factory used (line 94 in
 1.4.1):
   DiskFileItemFactory factory = new DiskFileItemFactory();

 Does wicket provide some hook that I could use to insert my own
 FileItemFactory, so that it will use that instead of the
 DiskFileItemFactory? It might just be that I don't understand wicket well
 enough and I'm looking in the wrong place.

 I use FileUploadField on the form, but I can't see anything in there that
 allows a factory to be specified.
 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/wicket-file-upload-tp2230621p2232247.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


The latest 1.4.9 has a constructor in MultipartServletWebRequest that takes
a FileItemFactory.  I'm not sure how long that constructor has been there.

-- 
Jeremy Thomerson
http://www.wickettraining.com


Best books for learning wicket

2010-05-26 Thread Todd Nine
Hi all,
  I've done quite a bit of reading and prototyping, and it seems that
Wicket is going to be our best bet for building our application.  I have
a few questions.

I found a good thread on nabble here about serialization and stateless
pages.  The wiki has some documentation here

https://cwiki.apache.org/WICKET/stateless-pages.html

How easy is it to build stateless pages?  We're looking at building
components of our site, then assembling them together via a central look
and feel.  Our system will run on a distributed cluster, so we can't
guarantee sticky sessions.  We could serialize sessions to Cassandra,
but I'd prefer to avoid session serialization as much as possible.


We'll be using the open auth 1.0a authentication framework.  Has anyone
used Wicket with oAuth/spring security before?



Our design person will be building all the mockups using Html and
jQuery.  I've found this plugin. 
 
http://code.google.com/p/wiquery/wiki/QuickStart

Has anyone implemented this?  We've decided jQuery will be our main JS
library, but I want to avoid any pitfalls of integrating it incorrectly
from the start.


I would also like Spring and my business tier to perform most of the
validation.  We'll be exposing a lot of our services as REST services,
so I want the business tier to validate the input is correct.  Are there
any tutorials/documentation on how to link these two into the wicket
validation framework?

Thanks in advance for answering all the noob questions.

Todd


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