Re: Is there a way to be notified when a tab in a TabbedPanel is selected?

2009-01-29 Thread Erik van Oosten

Hi Zhubin,

Everytime there is a tab switch, method getPanel from the ITab instance 
is called.


Regards,
   Erik.


Zhubin Salehi wrote:

Hi all,

How can I be notified when one of the tabs in a TabbedPanel is selected?
Where is no onSelect() method in ITab interface, is there a way to achieve
this?

Thanks,
Zhubin
  


--
Erik van Oosten
http://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: [OT] Wicket Like framework for desktop applications?

2009-01-29 Thread Erik van Oosten
If your going with Swing I strongly recommend Glazed Lists for 
everything you do with drop down lists, selection lists and tables. 
Every time a coworker thought it was not worth the little extra hassle, 
we had to revert that decision later on.


If you are willing to spend a little bit of cash, JFormDesigner is an 
excellent choice to draw your UIs.


Regards,
   Erik.





2009/1/28 jWeekend 

  

Nino,

Swing has a familiar programming model, is very flexible, extensible,
powerful and robust. You can also make use of all the core and 


--
Erik van Oosten
http://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



DataView and increasing session size

2009-01-29 Thread Jürgen Lind

Hi,

I have a question on how the DataView component is supposed to work. In my
application, I have to show quite large list of entities and so I am using
a DataView together with LoadableDetachableModels to read the data on demand.
However, when looking at the serialized sessions, I can observe that the
session size constantly increases by a fairly large amount although I am
just using the navigator to page through the list. Also, when looking into
the serialized session, I can see that the objects that are supposed to
be reloaded on demand are serialized into the session as well.

Is this the behavior that I would expect from the DataView or am I making
some mistake here?

Regards,

J.

--
Dr. Jürgen Lind
iteratec GmbHFon: +49 (0)89 614551-44
Inselkammerstrasse 4 Fax: +49 (0)89 614551-10
82008 Unterhaching   Web: www.iteratec.de

Sitz und Registergericht der iteratec GmbH: München HRB 113 519
Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf Menzel


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



Re: [OT] Wicket Like framework for desktop applications?

2009-01-29 Thread Thomas Singer
>> far easier than web dev
> 
> Nope.

It is easier, because you just need to code and are absolutely free in
refactoring. No need to mess with XML or HTML files, too. No need to use
reflection. BTW, Wicket is the only web-application framework, I've found
which feels quite similar easily. Others are a nightmare - just like Eclipse
RCP is.

> I can spot a Swing UI a mile away. Usually ugly, and doesn't mesh
> correctly with established GUI standards on platforms.

Maybe you can spot a *bad* Swing UI a mile away. Please take a look at
JFormDesigner, JGoodies tools or even - shame on me - our SmartSVN.

>> runs much faster than a webapp (but everybody knows than
>> > desktop are faster than networks), etc...
> 
> But first you have to locally install the application, ensure you have
> a compatible JRE, fix your classpath if you have multiple JRE's
> installed.

On Windows, a good Java application comes (at least optionally) with its own
JRE, on Mac it is already installed - even on decent Linux versions it is
installed. If someone is changing its systemwide classpath, (s)he deserves
any problems. One major advantage of Java applications is, that you usually
can move it around (from one location to another at the same machine, or
even on a different machine), you don't need to *install* it.

> Next you often don't have working copy/paste between
> native applications and swing apps, 

Copy/pasting text is supported since ages. Copy/pasting non-text requires
coding like in native applications, too.

> are the swing apps slow

10 years ago you were right.

> don't
> support drag'n drop between the OS and the swing application, etc.

Depends on the application. Of course, it needs extra coding, just like for
native applications, too.

> I tend to like native apps much better than Java apps.

For me it is the opposite, because I often have to work with multiple
operating systems and there are only very few native applications on
different operating systems.

> And in several
> cases, I like web apps even more than respective native GUI apps
> (gmail, bug trackers, viewvc, etc).

This is right for applications which require no serious user or file system
interaction or which inherently operate remotely - like those you've
mentioned. For any other application (file manager, IDE, decent e-mail
client, office-style application) *I* never would use a web-application
judging by the ones I already saw or tried. But that's just *me* opinion.

--
Best regards,
Thomas Singer
_
syntevo GmbH
http://www.syntevo.com



Martijn Dashorst wrote:
> On Wed, Jan 28, 2009 at 2:39 PM, Piller Sébastien  wrote:
>> far easier than web dev
> 
> Nope.
> 
>> almost no compatibility issue between jre versions
> 
> With Wicket you don't even have any compatibility issues *AT ALL*.
> 
>>  looks pretty nice (builtin selectable "look and feel", etc.)
> 
> I can spot a Swing UI a mile away. Usually ugly, and doesn't mesh
> correctly with established GUI standards on platforms.
> 
>> runs much faster than a webapp (but everybody knows than
>> desktop are faster than networks), etc...
> 
> But first you have to locally install the application, ensure you have
> a compatible JRE, fix your classpath if you have multiple JRE's
> installed. Next you often don't have working copy/paste between
> native applications and swing apps, are the swing apps slow, don't
> support drag'n drop between the OS and the swing application, etc.
> 
> I tend to like native apps much better than Java apps. And in several
> cases, I like web apps even more than respective native GUI apps
> (gmail, bug trackers, viewvc, etc).
> 
> Martijn
> 
> -
> 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



[OT] German wicket programmers wanted

2009-01-29 Thread Stefan Lindner
We are looking for Wicket programmers with native German language for a project 
in Health Care. If anybody on this list knows about persons with free 
development capacity please mail to

Stefan Lindner
lind...@visionet.de


Re: [OT] Wicket Like framework for desktop applications?

2009-01-29 Thread Martijn Dashorst
On Thu, Jan 29, 2009 at 10:59 AM, Thomas Singer  wrote:
>>> far easier than web dev
>>
>> Nope.
>
> It is easier, because you just need to code and are absolutely free in
> refactoring. No need to mess with XML or HTML files, too. No need to use
> reflection. BTW, Wicket is the only web-application framework, I've found
> which feels quite similar easily. Others are a nightmare - just like Eclipse
> RCP is.

I can create a web app 100x faster than any swing app. Just a matter
of experience and preference. I just loathe broad claims that Foo is
far easier than Bar. It is NOT. Just a matter of your experience.

>> I can spot a Swing UI a mile away. Usually ugly, and doesn't mesh
>> correctly with established GUI standards on platforms.
>
> Maybe you can spot a *bad* Swing UI a mile away. Please take a look at
> JFormDesigner, JGoodies tools or even - shame on me - our SmartSVN.

Nope. even 'good' Swing UIs are horrible. But there are also enough
bad native Windows/OS X apps for that matter. Just tends to be that I
don't have Java developers' GUI design skills even in normal regard.

> One major advantage of Java applications is, that you usually
> can move it around (from one location to another at the same machine, or
> even on a different machine), you don't need to *install* it.

This is just a Windows quirk. Most OS X apps don't need to be
installed either. But Java apps often need JAVA_HOME to be setup. And
if it doesn't point to JDK 6, the application doesn't work, but if
your platform only supports JDK 5, and the default is JDK 1.4, your in
a world of hurt. And don't get me started about incompatibilities
between platforms. OS X Java != Windows Java != Linux Java

> Copy/pasting text is supported since ages. Copy/pasting non-text requires
> coding like in native applications, too.

Why can't I reliably copy/paste text between my Swing apps and native
applications then?

>> are the swing apps slow
>
> 10 years ago you were right.

This is something that is claimed by everybody. However my experience
is that swing apps are slow. Java isn't, but swing is.

Martijn

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



Re: [OT] Wicket Like framework for desktop applications?

2009-01-29 Thread Nino Martinez

Erik van Oosten wrote:
If your going with Swing I strongly recommend Glazed Lists for 
everything you do with drop down lists, selection lists and tables. 
Every time a coworker thought it was not worth the little extra 
hassle, we had to revert that decision later on.

Thanks, they look nice...


If you are willing to spend a little bit of cash, JFormDesigner is an 
excellent choice to draw your UIs.


Regards,
   Erik.





2009/1/28 jWeekend 

 

Nino,

Swing has a familiar programming model, is very flexible, 
extensible,

powerful and robust. You can also make use of all the core and 





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



migration from jsf to wicket

2009-01-29 Thread janneru
we are on the way to migrate our old struts web app to something more
modern.
our first try was seam/jsf, but the performance of jsf was very
disappointing.

so now our plan is to use seam (as we like its component model and the
performance was quite good - after using @BypassInterceptors) with
wicket;
on the one hand we are very impressed by wicket's java-centric approach, on
the other hand we have a lack of understanding of how to achieve some basic
things with wicket, as our experience comes from jsp and jsf.

there are some problems that we didnt find an elegant solution for with
wicket, perhaps somebody can help us to understand the wicket way...


1) working with many attributes of an object
we have some pages where we access many attributes of an object, say we want
to show all 20 attributes of a person and all 10 attributes of
person.getAddress();
in the PersonPage.java i would have to add 30 label (or input) components,
30 lines with nearly identical java code: add(new Label("firstName",
person.getName() );
isn't it tedious to always keep PersonDetails.java and PersonDetails.html
files in sync? in jsf/jsp the changes are only in the jsp/xhtml

2) page composition
in  tiles and facelet compositions the layout is separated in templates
(with navigation, sidebars, header, footers, ...) that decorate the concrete
pages (eg the personDetails page); its possible that the concrete page
(personDetail.xhtml) defines some content of the decoration, e.g. that the
window title of the template should be replaced with: "Details of ${
person.name}";
in the template i would write  with tiles or  
in facelets;
the content for windowTitle is defined in personDetails.xhtml or in the
tiles definition for the personDetails.jsp

3) preview functionality
is this right: as soon as we use page composition and components, the
preview feature is gone; how do you experienced wicket users handle this? is
it usable in a prototype phase - before the html prototype is decomposed
into composition parts and components?

is there a resource on the web that helps with the task of migrating from
jsf to wicket?
the only one i know is the seam-booking example with the two versions; a
migration guide could be a motivation for jsf users to try out wicket (and
find out thats it better... :-) .

thanx in advance, uwe!

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



Re: [OT] Wicket Like framework for desktop applications?

2009-01-29 Thread Nino Martinez

Martijn Dashorst wrote:

On Thu, Jan 29, 2009 at 10:59 AM, Thomas Singer  wrote:
  

far easier than web dev


Nope.
  

It is easier, because you just need to code and are absolutely free in
refactoring. No need to mess with XML or HTML files, too. No need to use
reflection. BTW, Wicket is the only web-application framework, I've found
which feels quite similar easily. Others are a nightmare - just like Eclipse
RCP is.



I can create a web app 100x faster than any swing app.
Thats why I considered bundling a wicket app with 
http://winstone.sourceforge.net/ and then just run it as a "application" 
locally... Problem are that I need the awt robot to manipulate the 
desktop...

 Just a matter
of experience and preference. I just loathe broad claims that Foo is
far easier than Bar. It is NOT. Just a matter of your experience.

  

I can spot a Swing UI a mile away. Usually ugly, and doesn't mesh
correctly with established GUI standards on platforms.
  

Maybe you can spot a *bad* Swing UI a mile away. Please take a look at
JFormDesigner, JGoodies tools or even - shame on me - our SmartSVN.



Nope. even 'good' Swing UIs are horrible. But there are also enough
bad native Windows/OS X apps for that matter. Just tends to be that I
don't have Java developers' GUI design skills even in normal regard.

  

One major advantage of Java applications is, that you usually
can move it around (from one location to another at the same machine, or
even on a different machine), you don't need to *install* it.



This is just a Windows quirk. Most OS X apps don't need to be
installed either. But Java apps often need JAVA_HOME to be setup. And
if it doesn't point to JDK 6, the application doesn't work, but if
your platform only supports JDK 5, and the default is JDK 1.4, your in
a world of hurt. And don't get me started about incompatibilities
between platforms. OS X Java != Windows Java != Linux Java

  

Copy/pasting text is supported since ages. Copy/pasting non-text requires
coding like in native applications, too.



Why can't I reliably copy/paste text between my Swing apps and native
applications then?

  

are the swing apps slow
  

10 years ago you were right.



This is something that is claimed by everybody. However my experience
is that swing apps are slow. Java isn't, but swing is.

Martijn

-
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: Issues with wicket-contrib-input-events in Mozilla

2009-01-29 Thread Nino Martinez

Hi Duke

dukejansen wrote:

Additional testing with FireBug reveals that the JavaScript engine is
reporting an error when the Escape or Enter key is hit:

document.getElementById("cancelLink9d7").click is not a function
http://.../resources/wicket.contrib.input.events.InputBehavior/shortcuts.js
Line 4

It seems like somehow that click function doesn't exist in Firefox...

Researching online a bit confirms this... for example:

http://quomon.com/question_simulation-click-html-anchor-javascript_2786.aspx

My guess is that the input-events package was written to work with buttons,
which have a click event, and not anchor tags, which don't, which means I'll
need to modify that code a bit to work with anchor tags...
  
I cant exactly remember what the scope where, just that it did support 
links at some point, in safari and IE. Patches are always welcome..


But looking in the source there are some auto hooking for links 
actually, which uses href instead of click AFAIR it should just pick it 
up automaticly...:



function init${wicketComponentId}() {
   shortcut.add("${keys}",function() {
window.location=document.getElementById('${wicketComponentId}').href; },{
   'disable_in_input':${disable_in_input},
   'type':'${type}',
   'propagate':${propagate},
   'target':${target}
});
}
init${wicketComponentId}();


Did you check the examples, and see if they still are working, they do 
include a link aswell?


https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-core/input-events-parent/input-events-examples



dukejansen wrote:
  

Has anyone had any issues getting the wicket-contrib-input-events package
to work properly with Mozilla?

It seems to work great in IE, but somehow my events are not being picked
up in Firefox.

Specifically, let's say I have a link which launches a modal, and inside
that modal is a panel with an OK button and a Cancel button. I have set up
keyboard shortcuts so that Escape fires the Cancel onclick event and Enter
fires the OK onclick event.

This works great in IE, but in Firefox when I hit "Enter" it seems to
think I'm clicking the link that was originally clicked to launch the
modal - the link that presumably still has focus behind the modal mask.

I believe that Nino actually tested against FF2, so I was surprised by
this, and thought perhaps I'm seeing the result of some kind of
interaction with other JavaScript on the page.

Has anyone else run into this, and if so do you have any wisdom to share?

Thanks.

-Jason




  



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



Re: migration from jsf to wicket

2009-01-29 Thread Martin Makundi
> 1) working with many attributes of an object
> we have some pages where we access many attributes of an object, say we want
> to show all 20 attributes of a person and all 10 attributes of
> person.getAddress();
> in the PersonPage.java i would have to add 30 label (or input) components,
> 30 lines with nearly identical java code: add(new Label("firstName",
> person.getName() );
> isn't it tedious to always keep PersonDetails.java and PersonDetails.html
> files in sync? in jsf/jsp the changes are only in the jsp/xhtml

There are few options that come into my mind:
1. add(new Label(CONSTANT_FIRST_NAME, person.getName() ); // Now you
can re-use your constant from WicketTests.
2. add(new Label(CONSTANT_FIRST_NAME, new PropertyModel(person,
Person.NAME_CONSTANT) ); // Now you can re-use your Entity's NAME
-constant from JPA/ORM/Hibernate queries.
3. use CompoundPropertyModels. Yes. You will have to sync the names in
html and in Java. Maybe someone will develop a nice plugin that
automates this in the future:
http://cwiki.apache.org/WICKET/working-with-wicket-models.html#WorkingwithWicketmodels-CompoundPropertyModels
http://cwiki.apache.org/WICKET/more-on-models.html

> 2) page composition
You can treat Title just as a Label. See  tag and Wicket
modularity:
http://cwiki.apache.org/WICKET/wickets-xhtml-tags.html
http://www.javalobby.org/java/forums/t60926.html
http://cwiki.apache.org/WICKET/create-dynamic-markup-hierarchies-using-panels.html

> 3) preview functionality
> is this right: as soon as we use page composition and components, the
> preview feature is gone; how do you experienced wicket users handle this? is
> it usable in a prototype phase - before the html prototype is decomposed
> into composition parts and components?

The runtime page hierarchy is ofcourse visible only at runtime, but
you can preview each panel separately ofcourse (if it makes sense).

> is there a resource on the web that helps with the task of migrating from
> jsf to wicket?

I would save the html files using a browser (if the html markup is not
available separately) and just pick up from there, starting to add
wicket:id's to the components of the page, one-by-one (in development
& debug mode it is quite fast as you do not need to restart the jetty
server after saved&compiled change).

my 2 cents ;)

**
Martin

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



Re: DataView and increasing session size

2009-01-29 Thread Michael Sparer

the objects shouldn't be serialized into the session if you're using
loadabledetachable models, please show us some code

regards,
Michael


Jürgen Lind-2 wrote:
> 
> Hi,
> 
> I have a question on how the DataView component is supposed to work. In my
> application, I have to show quite large list of entities and so I am using
> a DataView together with LoadableDetachableModels to read the data on
> demand.
> However, when looking at the serialized sessions, I can observe that the
> session size constantly increases by a fairly large amount although I am
> just using the navigator to page through the list. Also, when looking into
> the serialized session, I can see that the objects that are supposed to
> be reloaded on demand are serialized into the session as well.
> 
> Is this the behavior that I would expect from the DataView or am I making
> some mistake here?
> 
> Regards,
> 
> J.
> 
> --
> Dr. Jürgen Lind
> iteratec GmbHFon: +49 (0)89 614551-44
> Inselkammerstrasse 4 Fax: +49 (0)89 614551-10
> 82008 Unterhaching   Web: www.iteratec.de
> 
> Sitz und Registergericht der iteratec GmbH: München HRB 113 519
> Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf Menzel
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 
> 
> 


-
Michael Sparer
http://talk-on-tech.blogspot.com
-- 
View this message in context: 
http://www.nabble.com/DataView-and-increasing-session-size-tp21723557p21724558.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: getRequest().getPage() always null

2009-01-29 Thread Michael Sparer

sounds as if you want to implement your own authorization stuff - I'd suggest
to have a look into wicket-auth-roles (and the examples). there's a lot
already implemented and you don't have to hook into the requestcycle too
much ...

regards,
Michael


Arthur Leigh Allen wrote:
> 
> Hello people,
> 
> any explanation or suggestion?
> Is there a possible way to retrieve the page from the request cycle?
> There is the getPage() method but the result is always null. Why?
> 
> I would appreciate any answers.
> 
> Thx a lot
> Leigh
> 
> 
> 
> 
> 
> Von: Dipu 
> An: users@wicket.apache.org
> Gesendet: Mittwoch, den 21. Januar 2009, 17:46:38 Uhr
> Betreff: Re: getRequest().getPage() always null
> 
> I think  setting this
> get().getApplicationSettings().setPageExpiredErrorPage(StartPage.class)
> in your application's init method  will solve your problem if i
> understand it correctly.
> 
> regards
> Dipu
> 
> On Wed, Jan 21, 2009 at 3:18 PM, Arthur Leigh Allen
>  wrote:
>> Hello wicket community,
>>
>>
>> there is a second issue I don't know how to solve.
>>
>> Imagine the following situation:
>> -User visits page
>> -User logs in
>> -User clones the browser window by pressing Strg+N (2 browser windows
>> with logged-in-panels are shown now)
>> -User logs out in second page
>> -User closes second page
>> -User calls a use case function for logged-in-users in a panel in first
>> page (*)
>>
>> The aim is to navigate to the start page when the user tries the last
>> action (*).
>>
>> My idea is to override the onBeginRequest method of the WebRequestCycle
>> in the application class.
>> Then check if the boolean member "wasLoggedIn" in my page is set to true
>> and the boolean member "isLoggedIn" in the session is set to false.
>> When this constellation happens, I would call the
>> setResponsePage(StartPage.class) etc.
>>
>> The problem is: When I call getRequest().getPage() in the onBeginRequest
>> method, the result is always null.
>> Do you know how to get the page the request was initiated from?
>>
>> Best regards
>> Leigh
>>
>>
>>
>>
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 
> 
>   
> 


-
Michael Sparer
http://talk-on-tech.blogspot.com
-- 
View this message in context: 
http://www.nabble.com/getRequest%28%29.getPage%28%29-always-null-tp21585241p21724628.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



Architectural dilemma: Wicket + REST (JSR311)

2009-01-29 Thread Fabrizio Giudici

Hi there.

My application, along with the usual HTML pages generated with Wicket, 
should also expose some RESTful services. These REST calls should return 
documents of various types: images, movies, as well as RDF/XML and N3 
and so far.
In an architectural spike I've made, I've used Jersey (implementation of 
JSR-311) and of course the two things can co-exist; so everything works 
and I don't have "technical" problems to solve (at the moment).


The dilemma is architectural: I'm guessing whether getting JSR-311 in 
increases complexity in a way that can be avoided. In other words, could 
Wicket be able to serve the same facilities provided by JSR-311 (I mean, 
the subset I need)?
Actually, Wicket can serve non-HTML contents by means of 
DynamicWebResource, so it seems doable. There are two specific questions 
now:


1. Security. For HTML pages, protected areas shoud handle login in the 
WIcket way (or what I assume is the normal Wicket way), i.e. rendering a 
specific HTML login page. For other types of documents, instead, I need 
HTTP authentication and perhaps in future some token-based approach. The 
point is that in any case either I deny the access or I give the 
resource, but I can't send back an HTML login page when the client 
expects a different document type. Would I be able to handle this with 
Wicket?


2. Having the same URL delivering different contents according to the 
Accept header. For instance, http://foo.bar/blah should normally render 
an HTML page; but if a Accept: text/n3 header is specified, a N3 should 
be returned. This means that in the former case the default Wicket 
workflow would be ok; in the latter, a DynamicWebResource should be 
provided. I think I can solve this using JSR-311: I could implement a 
super-filter that discriminates on the presence of the Accept: header 
and dispatches either to the Wicket or to the Jersey filter (of course I 
would implement a custom URL mount scheme so Wicket accepts the same URL 
as Jersey).


Hints? I'm searching to find ASAP a reason for deciding to keep Jersey 
or to get rid of it, so I can go on with the development without too 
many fears of having to change something in future.


Thanks.

--
Fabrizio Giudici - Java Architect, Project Manager
Tidalwave s.a.s. - "We make Java work. Everywhere."
weblogs.java.net/blog/fabriziogiudici - www.tidalwave.it/blog
fabrizio.giud...@tidalwave.it - mobile: +39 348.150.6941


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



Re: Architectural dilemma: Wicket + REST (JSR311)

2009-01-29 Thread Erik van Oosten
Wicket is all about stateful applications (though stateless stuff is 
useful and is supported).
REST is all about stateless resources (though you sometimes need 
stateful hacks for login/authentication).


Given these premises, I would not implement REST resources with Wicket 
(well, maybe if you have just 1 or 2). If you want to be more powerful, 
I would rather implement REST stuff with Spring MVC. Currently I am 
using Restlets which works very well also. Jersey sounds fine as well.


Regards.
   Erik.


Fabrizio Giudici wrote:

Hi there.

My application, along with the usual HTML pages generated with Wicket, 
should also expose some RESTful services. These REST calls should 
return documents of various types: images, movies, as well as RDF/XML 
and N3 and so far.
In an architectural spike I've made, I've used Jersey (implementation 
of JSR-311) and of course the two things can co-exist; so everything 
works and I don't have "technical" problems to solve (at the moment).


The dilemma is architectural: I'm guessing whether getting JSR-311 in 
increases complexity in a way that can be avoided. In other words, 
could Wicket be able to serve the same facilities provided by JSR-311 
(I mean, the subset I need)?
Actually, Wicket can serve non-HTML contents by means of 
DynamicWebResource, so it seems doable. There are two specific 
questions now:


1. Security. For HTML pages, protected areas shoud handle login in the 
WIcket way (or what I assume is the normal Wicket way), i.e. rendering 
a specific HTML login page. For other types of documents, instead, I 
need HTTP authentication and perhaps in future some token-based 
approach. The point is that in any case either I deny the access or I 
give the resource, but I can't send back an HTML login page when the 
client expects a different document type. Would I be able to handle 
this with Wicket?


2. Having the same URL delivering different contents according to the 
Accept header. For instance, http://foo.bar/blah should normally 
render an HTML page; but if a Accept: text/n3 header is specified, a 
N3 should be returned. This means that in the former case the default 
Wicket workflow would be ok; in the latter, a DynamicWebResource 
should be provided. I think I can solve this using JSR-311: I could 
implement a super-filter that discriminates on the presence of the 
Accept: header and dispatches either to the Wicket or to the Jersey 
filter (of course I would implement a custom URL mount scheme so 
Wicket accepts the same URL as Jersey).


Hints? I'm searching to find ASAP a reason for deciding to keep Jersey 
or to get rid of it, so I can go on with the development without too 
many fears of having to change something in future.


Thanks.



--
Erik van Oosten
http://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: DataView and increasing session size

2009-01-29 Thread Jürgen Lind

After some twiddling I found that the PagingNavigator seems to be the culprit.
If I leave it out, the session grows only moderately, when I put it in, the
domain objects end up in the session... Anyway here is the code:

public class AuftragUebersicht extends MasterLayout {

  @SpringBean
  private AuftragBA auftragBA;

  public AuftragUebersicht() {
this.initComponents();
  }

  private void initComponents() {

final AuftragDataView auftragDataView = new AuftragDataView("resultList",
new AuftragDataProvider(AuftragUebersicht.this.auftragBA), 10);

Form form = new Form("searchForm") {

  public Form initComponents() {
final TextField auftragsnummerField = new TextField("auftragsnummer",
 new Model(""));
add(auftragsnummerField);

Button searchButton = new Button("search") {
  public void onSubmit() {
String auftragsnummer = 
auftragsnummerField.getModelObjectAsString();

AuftragDataProvider p = (AuftragDataProvider)
 auftragDataView.getDataProvider();
p.setQuery(new AuftragUebersichtQuery(auftragsnummer));

if (auftragDataView.getDataProvider().size() == 0) {
  AuftragUebersicht.this.info("No results found!");
}
  }
};
add(searchButton);

return this;
  }

}.initComponents();

WebMarkupContainer resultListContainer = new 
WebMarkupContainer("resultListContainer") {
  public boolean isVisible() {
return auftragDataView.getDataProvider().size() > 0;
  }
};

CheckGroup group = new CheckGroup("group", new ArrayList());

group.add(new CheckGroupSelector("groupselector"));

group.add(auftragDataView);

resultListContainer.add(new PagingNavigator("navigator", auftragDataView));

resultListContainer.add(group);

form.add(resultListContainer);

this.add(form);

  }
}

public class AuftragDataView extends DataView {

  public AuftragDataView(String id, IDataProvider dataProvider, int 
itemsPerPage) {
super(id, dataProvider, itemsPerPage);
  }

  @Override
  protected void populateItem(final Item item) {

final PartnerAuftrag auftrag = (PartnerAuftrag) item.getModelObject();
item.add(new Label("auftragsnummer", auftrag.getAuftragsnummer()));
...

item.add(new Link("update", new Model(auftrag)) {
  public void onClick() {
AuftragBearbeiten page = new AuftragBearbeiten((PartnerAuftrag) 
getModelObject());
setResponsePage(page);
  }
});

item.add(new AttributeModifier("class", true, new AbstractReadOnlyModel() {
  public Object getObject() {
return (item.getIndex() % 2 == 1) ? "even" : "odd";
  }
}));
  }

  @Override
  protected void onDetach() {
super.onDetach();
  }
}

public class AuftragDataProvider implements IDataProvider {

  private AuftragBA  auftragBA;
  private AuftragUebersichtQuery query;

  private Collection result;

  public AuftragDataProvider(AuftragUebersichtQuery query, AuftragBA auftragBA) 
{
this.query = query;
this.auftragBA = auftragBA;
  }

  public AuftragUebersichtQuery getQuery() {
return this.query;
  }

  public void setQuery(AuftragUebersichtQuery query) {
this.query = query;
this.result = null;
  }

  public Iterator iterator(int first, int count) {
if (this.result == null) {
  this.performQuery();
}
return new ArrayList(this.result).subList(first, first + 
count).iterator();
  }

  public IModel model(final Object object) {
return new DetachablePartnerAuftragModel((PartnerAuftrag) object, 
this.auftragBA);
  }

  public int size() {
if (this.result == null) {
  this.performQuery();
}
return this.result.size();
  }

  public void detach() {
this.result = null;
  }

  private void performQuery() {
...
  }
}


public class DetachablePartnerAuftragModel extends LoadableDetachableModel {

  private Long  id;
  private AuftragBA auftragBA;

  public DetachablePartnerAuftragModel(PartnerAuftrag auftrag, AuftragBA 
auftragBA) {
this(auftrag.getAuftragsId(), auftragBA);
  }

  public DetachablePartnerAuftragModel(Long id, AuftragBA auftragBA) {
this.id = id;
this.auftragBA = auftragBA;
  }

  @Override
  protected Object load() {
return this.auftragBA.findAuftragByAuftragsId(this.id);
  }

  @Override
  protected void onDetach() {
super.onDetach();
  }
}

Michael Sparer wrote:
> the objects shouldn't be serialized into the session if you're using
> loadabledetachable models, please show us some code
>
> regards,
> Michael
>
>
> Jürgen Lind-2 wrote:
>> Hi,
>>
>> I have a question on how the DataView component is supposed to work. In my
>> application, I have to show quite large list of entities and so I am using
>> a DataView together with LoadableDetachableModels to read the data on
>> demand.
>> However

Re: Architectural dilemma: Wicket + REST (JSR311)

2009-01-29 Thread Fabrizio Giudici

Erik van Oosten wrote:
Wicket is all about stateful applications (though stateless stuff is 
useful and is supported).
REST is all about stateless resources (though you sometimes need 
stateful hacks for login/authentication).


Given these premises, I would not implement REST resources with Wicket 
(well, maybe if you have just 1 or 2). If you want to be more 
powerful, I would rather implement REST stuff with Spring MVC. 
Currently I am using Restlets which works very well also. Jersey 
sounds fine as well.
I'm aware of the Wicket focus on stateful stuff. But, as you say, 
sometimes a few things are stateless - and, yes, I have just a few 
resources (three "categories" of objects, each would get its own URL).  
So, hmmm, still I don't see a strong motivation to go either way...


--
Fabrizio Giudici - Java Architect, Project Manager
Tidalwave s.a.s. - "We make Java work. Everywhere."
weblogs.java.net/blog/fabriziogiudici - www.tidalwave.it/blog
fabrizio.giud...@tidalwave.it - mobile: +39 348.150.6941


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



Re: DataView and increasing session size

2009-01-29 Thread Michael Sparer

I took a cursory glance over your code and saw

 item.add(new Link("update", new Model(auftrag))

this way the "auftrag" gets into your session, you should say
item.getModel() there instead of new Model(auftrag)

check your code if there is similar stuff in it - spotting those things
might be quite tedious, but you could e.g. temporarily remove the
"Serializable" from your model-classes and go spotting nonserializable
exceptions until they don't ocurr anymore. 

hope that helps a bit - and thanks for beating leverkusen in 2000 ;-)

regards,
Michael 


Jürgen Lind-2 wrote:
> 
> After some twiddling I found that the PagingNavigator seems to be the
> culprit.
> If I leave it out, the session grows only moderately, when I put it in,
> the
> domain objects end up in the session... Anyway here is the code:
> 
> public class AuftragUebersicht extends MasterLayout {
> 
>@SpringBean
>private AuftragBA auftragBA;
> 
>public AuftragUebersicht() {
>  this.initComponents();
>}
> 
>private void initComponents() {
> 
>  final AuftragDataView auftragDataView = new
> AuftragDataView("resultList",
>  new AuftragDataProvider(AuftragUebersicht.this.auftragBA), 10);
> 
>  Form form = new Form("searchForm") {
> 
>public Form initComponents() {
>  final TextField auftragsnummerField = new
> TextField("auftragsnummer",
>   new
> Model(""));
>  add(auftragsnummerField);
> 
>  Button searchButton = new Button("search") {
>public void onSubmit() {
>  String auftragsnummer =
> auftragsnummerField.getModelObjectAsString();
> 
>  AuftragDataProvider p = (AuftragDataProvider)
>   auftragDataView.getDataProvider();
>  p.setQuery(new AuftragUebersichtQuery(auftragsnummer));
> 
>  if (auftragDataView.getDataProvider().size() == 0) {
>AuftragUebersicht.this.info("No results found!");
>  }
>}
>  };
>  add(searchButton);
> 
>  return this;
>}
> 
>  }.initComponents();
> 
>  WebMarkupContainer resultListContainer = new
> WebMarkupContainer("resultListContainer") {
>public boolean isVisible() {
>  return auftragDataView.getDataProvider().size() > 0;
>}
>  };
> 
>  CheckGroup group = new CheckGroup("group", new
> ArrayList());
> 
>  group.add(new CheckGroupSelector("groupselector"));
> 
>  group.add(auftragDataView);
> 
>  resultListContainer.add(new PagingNavigator("navigator",
> auftragDataView));
> 
>  resultListContainer.add(group);
> 
>  form.add(resultListContainer);
> 
>  this.add(form);
> 
>}
> }
> 
> public class AuftragDataView extends DataView {
> 
>public AuftragDataView(String id, IDataProvider dataProvider, int
> itemsPerPage) {
>  super(id, dataProvider, itemsPerPage);
>}
> 
>@Override
>protected void populateItem(final Item item) {
> 
>  final PartnerAuftrag auftrag = (PartnerAuftrag)
> item.getModelObject();
>  item.add(new Label("auftragsnummer", auftrag.getAuftragsnummer()));
>  ...
> 
>  item.add(new Link("update", new Model(auftrag)) {
>public void onClick() {
>  AuftragBearbeiten page = new AuftragBearbeiten((PartnerAuftrag)
> getModelObject());
>  setResponsePage(page);
>}
>  });
> 
>  item.add(new AttributeModifier("class", true, new
> AbstractReadOnlyModel() {
>public Object getObject() {
>  return (item.getIndex() % 2 == 1) ? "even" : "odd";
>}
>  }));
>}
> 
>@Override
>protected void onDetach() {
>  super.onDetach();
>}
> }
> 
> public class AuftragDataProvider implements IDataProvider {
> 
>private AuftragBA  auftragBA;
>private AuftragUebersichtQuery query;
> 
>private Collection result;
> 
>public AuftragDataProvider(AuftragUebersichtQuery query, AuftragBA
> auftragBA) {
>  this.query = query;
>  this.auftragBA = auftragBA;
>}
> 
>public AuftragUebersichtQuery getQuery() {
>  return this.query;
>}
> 
>public void setQuery(AuftragUebersichtQuery query) {
>  this.query = query;
>  this.result = null;
>}
> 
>public Iterator iterator(int first, int count) {
>  if (this.result == null) {
>this.performQuery();
>  }
>  return new ArrayList(this.result).subList(first,
> first + count).iterator();
>}
> 
>public IModel model(final Object object) {
>  return new DetachablePartnerAuftragModel((PartnerAuftrag) object,
> this.auftragBA);
>}
> 
>public int size() {
>  if (this.result == null) {
>this.performQuery();
>  }
>  return this.result.size();
>}
> 
>public void detach() {
>  this.result = null;
>}
> 
>private void performQuery() {
>  ...
>}
> }
> 
> 
> public class Detachabl

Problems running wicket application on Jetty - Help please.

2009-01-29 Thread Daniel Ferreira Castro
I know that this can be a little "gray zone problem", but let me ask anyway.

I went to the quickstart, http://wicket.apache.org/quickstart.html, e
executed the command bellow

1)
mvn archetype:create -DarchetypeGroupId=org.apache.wicket
-DarchetypeArtifactId=wicket-archetype-quickstart -DarchetypeVersion=1.3.5
-DgroupId=com.mycompany -DartifactId=myproject

I changed the groupId and artifactId to fit my package and project names.

After that, inside the project folder I run the command bellow.

2)
mvn eclipse:eclipse -DdownloadSources=true

I imported the project to eclipse workspace.
After that I run mvn jetty::run to start the Jetty and test my Wicket
project.
But I recieved this error.

2009-01-29 09:39:42.578::WARN:  Error for /ecommFwkBackOffice/
java.lang.NoClassDefFoundError: org/hibernate/Session

Yes, the problem is that Jetty can not load the Session Hibernate class.
But this is related due the way that my project, in fact projects, are
organized.

I organized the artifacts like that.
I have a data access project that is called dataAccess.
This projects have all the DTOs and DAOs to access the database.  It uses
Hibernate persistence and Maven as dependency manager.
The project export its classes and Maven Dependencies, configured by eclipse
on project build tab.

I have a second project called backOffice that have the dataAccess project
as dependency.
The wicket pages of this project consumes resources from dataAccess project
and thoses resources are hibernate dependents.

And in future I will have a third project, also a wicket project, that is
the fron end to end user.
That is why I choose to split the solution on three different projects.

The problem is that I run the backOffice using mvn jetty:run and when I
access it the exception occurs.
So for some reason the classes are not beeing correctly deployed on Jetty.

Does anyone have faced a problem like that and knows how to solve it?

-- 
"Two rules to succeed in life:
1 - don´t tell people everything you know."

We shall go on to the end.
We shall fight in France
We shall fightover the seas and oceans.
We shall fight with growing confidence and growing strength in the air.
We shall defend our island whatever the cost may be
We shall fight on beaches, we shall fight on the landing grounds,
We shall fight in the fields and in the streets,
We shall fight on the hills.
We shall never surrender.
Winston Churchill


Re: DataView and increasing session size

2009-01-29 Thread Jürgen Lind

Michael,

thanks for your help, it significantly reduced the amount of session data.
Still, the session keeps growing... Is there any way to determine which
objects get serialized and where they are dangling? Removing the Serializable
interface helps me to spot my own classes but it does not work on classes
not under my control.

Regards,

J.

PS:
> hope that helps a bit - and thanks for beating leverkusen in 2000 ;-)

My pleasure, however, I only came to Munich/Unterhaching in 2000 so it is not
really to my credit. Still, as a long time FCK Fan, I love to see Leverkusen
loosing after sending us down a League in 1996...


Michael Sparer wrote:

I took a cursory glance over your code and saw

 item.add(new Link("update", new Model(auftrag))

this way the "auftrag" gets into your session, you should say
item.getModel() there instead of new Model(auftrag)

check your code if there is similar stuff in it - spotting those things
might be quite tedious, but you could e.g. temporarily remove the
"Serializable" from your model-classes and go spotting nonserializable
exceptions until they don't ocurr anymore. 


hope that helps a bit - and thanks for beating leverkusen in 2000 ;-)

regards,
Michael 



Jürgen Lind-2 wrote:

After some twiddling I found that the PagingNavigator seems to be the
culprit.
If I leave it out, the session grows only moderately, when I put it in,
the
domain objects end up in the session... Anyway here is the code:

public class AuftragUebersicht extends MasterLayout {

   @SpringBean
   private AuftragBA auftragBA;

   public AuftragUebersicht() {
 this.initComponents();
   }

   private void initComponents() {

 final AuftragDataView auftragDataView = new
AuftragDataView("resultList",
 new AuftragDataProvider(AuftragUebersicht.this.auftragBA), 10);

 Form form = new Form("searchForm") {

   public Form initComponents() {
 final TextField auftragsnummerField = new
TextField("auftragsnummer",
  new
Model(""));
 add(auftragsnummerField);

 Button searchButton = new Button("search") {
   public void onSubmit() {
 String auftragsnummer =
auftragsnummerField.getModelObjectAsString();

 AuftragDataProvider p = (AuftragDataProvider)
  auftragDataView.getDataProvider();
 p.setQuery(new AuftragUebersichtQuery(auftragsnummer));

 if (auftragDataView.getDataProvider().size() == 0) {
   AuftragUebersicht.this.info("No results found!");
 }
   }
 };
 add(searchButton);

 return this;
   }

 }.initComponents();

 WebMarkupContainer resultListContainer = new
WebMarkupContainer("resultListContainer") {
   public boolean isVisible() {
 return auftragDataView.getDataProvider().size() > 0;
   }
 };

 CheckGroup group = new CheckGroup("group", new
ArrayList());

 group.add(new CheckGroupSelector("groupselector"));

 group.add(auftragDataView);

 resultListContainer.add(new PagingNavigator("navigator",
auftragDataView));

 resultListContainer.add(group);

 form.add(resultListContainer);

 this.add(form);

   }
}

public class AuftragDataView extends DataView {

   public AuftragDataView(String id, IDataProvider dataProvider, int
itemsPerPage) {
 super(id, dataProvider, itemsPerPage);
   }

   @Override
   protected void populateItem(final Item item) {

 final PartnerAuftrag auftrag = (PartnerAuftrag)
item.getModelObject();
 item.add(new Label("auftragsnummer", auftrag.getAuftragsnummer()));
 ...

 item.add(new Link("update", new Model(auftrag)) {
   public void onClick() {
 AuftragBearbeiten page = new AuftragBearbeiten((PartnerAuftrag)
getModelObject());
 setResponsePage(page);
   }
 });

 item.add(new AttributeModifier("class", true, new
AbstractReadOnlyModel() {
   public Object getObject() {
 return (item.getIndex() % 2 == 1) ? "even" : "odd";
   }
 }));
   }

   @Override
   protected void onDetach() {
 super.onDetach();
   }
}

public class AuftragDataProvider implements IDataProvider {

   private AuftragBA  auftragBA;
   private AuftragUebersichtQuery query;

   private Collection result;

   public AuftragDataProvider(AuftragUebersichtQuery query, AuftragBA
auftragBA) {
 this.query = query;
 this.auftragBA = auftragBA;
   }

   public AuftragUebersichtQuery getQuery() {
 return this.query;
   }

   public void setQuery(AuftragUebersichtQuery query) {
 this.query = query;
 this.result = null;
   }

   public Iterator iterator(int first, int count) {
 if (this.result == null) {
   this.performQuery();
 }
 return new ArrayList(this.result).subList(first,
first + count).iterator();
   }

   public IModel model(final Object object) {
 return new DetachablePartner

java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory

2009-01-29 Thread Wadi Jalil Maluf
Hi all!I'm facing some trouble running the wicket stuff examples because no
one start due to java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory

 exception.I'm using netbeans 6.5 and netbeans.

Thanks,

Wadi



Re: Graphs, Charts and Wicket

2009-01-29 Thread newbieabc

If you don't mind, could you post your code to display the chart you used?
I was interested the gradient fill chart they offered, but am really new to
wicket and didn't understand how to add it in wicket.

Thanks! 


Jurek Piasek wrote:
> 
> I have been using Amcharts
> 
> http://www.amcharts.com/
> 
> together with SWFObject
> http://cwiki.apache.org/WICKET/creating-a-behavior-to-use-a-javascript-library.html
> 
> Regards,
> Jurek
> 
> 
> On Sun, Nov 16, 2008 at 8:20 PM, Yazbek, Daniel (Daniel)
> wrote:
> 
>> Hi all,
>>
>>
>>
>> I'd like to put some simple bar graphs, pie graphs and possible line
>> graphs into my wicket pages.
>>
>>
>>
>> Have any of you used a good framework that you can recommend, that also
>> plays nicely with Wicket?
>>
>>
>>
>> Thanks!
>>
>>
>>
>> -Daniel.
>>
>>
>>
>>
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Graphs%2C-Charts-and-Wicket-tp20532374p21727142.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: java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory

2009-01-29 Thread rmattler

NoClassDefFoundError means that netbeans or the server can't find a file.

I'm guessing that it can't find the slf4j.jar  http://www.slf4j.org/faq.html

>From the wicket site:

Important note about logging dependencies for 1.3.0 and later.

As of Wicket 1.3.0, Wicket uses the SLF4J project for logging. SLF4J is
similar to commons-logging, in that it allows libraries/frameworks like
Wicket to avoid forcing a choice of logging framework on their users.

You cannot use Wicket without adding an SLF4J logging implementation to your
classpath. Most people use log4j. If you do, just include slf4j-log4j12.jar
on your classpath to get Wicket to use log4j too. If you want to use
commons-logging or JDK14 logging or something else, please see the SLF4J
site for more information.



wadi wrote:
> 
> Hi all!I'm facing some trouble running the wicket stuff examples because
> no
> one start due to java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
> 
>  exception.I'm using netbeans 6.5 and netbeans.
> 
> Thanks,
> 
> Wadi
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/java.lang.NoClassDefFoundError%3A-org-slf4j-LoggerFactory-tp21726877p21727315.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: Getting data from applet

2009-01-29 Thread rmattler

You are correct the applet was not doing a form submit.  The servlet works.
Thanks.


igor.vaynberg wrote:
> 
> the question is: how does the uploader send the upload? does it send
> the data as part of the form submit or in the background independently
> of the form data? since it can do things like pause/resume i am going
> to assume the latter which is why you are not seeing that data as part
> of the form submit. you still need that other servlet to receive the
> data. if my assumptions are incorrect feel free to create a quickstart
> so that we may investigate further.
> 
> -igor
> 
> On Tue, Jan 27, 2009 at 8:17 AM, rmattler  wrote:
>>
>> List items = upload.parseRequest(request);
>>
>> items is still empty
>>
>>
>>
>>
>> try form.setmultipart(true)
>>
>> -igor
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Getting-data-from-applet-tp21686123p21688568.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
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Getting-data-from-applet-tp21686123p21727416.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: migration from jsf to wicket

2009-01-29 Thread John Krasnay
On Thu, Jan 29, 2009 at 12:41:31PM +0200, Martin Makundi wrote:
> > 1) working with many attributes of an object
> > we have some pages where we access many attributes of an object, say we want
> > to show all 20 attributes of a person and all 10 attributes of
> > person.getAddress();
> > in the PersonPage.java i would have to add 30 label (or input) components,
> > 30 lines with nearly identical java code: add(new Label("firstName",
> > person.getName() );
> > isn't it tedious to always keep PersonDetails.java and PersonDetails.html
> > files in sync? in jsf/jsp the changes are only in the jsp/xhtml
> 
> There are few options that come into my mind:
> 1. add(new Label(CONSTANT_FIRST_NAME, person.getName() ); // Now you
> can re-use your constant from WicketTests.
> 2. add(new Label(CONSTANT_FIRST_NAME, new PropertyModel(person,
> Person.NAME_CONSTANT) ); // Now you can re-use your Entity's NAME
> -constant from JPA/ORM/Hibernate queries.
> 3. use CompoundPropertyModels. Yes. You will have to sync the names in
> html and in Java. Maybe someone will develop a nice plugin that
> automates this in the future:
> http://cwiki.apache.org/WICKET/working-with-wicket-models.html#WorkingwithWicketmodels-CompoundPropertyModels
> http://cwiki.apache.org/WICKET/more-on-models.html
> 

RepeatingView can also come in handy...

  RepeatingView rv = new RepeatingView("field");
  add(rv);
  String[] props = { "firstName", "lastName", ... };
  for (String prop : props) {
rv.add(new Label(rv.newChildId(), new PropertyModel(person, prop));
  }

If you have something more complex than a Label, just substitute your
own custom panel.

> > 2) page composition
> You can treat Title just as a Label. See  tag and Wicket
> modularity:
> http://cwiki.apache.org/WICKET/wickets-xhtml-tags.html
> http://www.javalobby.org/java/forums/t60926.html
> http://cwiki.apache.org/WICKET/create-dynamic-markup-hierarchies-using-panels.html
> 

One common approach is to use markup inheritance, then have the parent
class expose overridable methods.

  public abstract class BasePage extends WebPage {

public BasePage() {
  add(new Label("title", new AbstractReadOnlyModel() {
public Object getObject() {
  return getPageTitle();
}
  }));
}

public abstract String getPageTitle();
  }

  public class PersonPage extends BasePage {

public PersonPage(PageParameters pp) {
  // load person object based on pp
}

public String getPageTitle() {
  return getPerson().getName();
}
  }

The trick here is to avoid calling the overridable method directly from
the base class constructor (else we'd call PersonPage.getPageTitle
before the person was loaded). That's what the AbstractReadOnlyMethod
thing is about.

> > 3) preview functionality
> > is this right: as soon as we use page composition and components, the
> > preview feature is gone; how do you experienced wicket users handle this? is
> > it usable in a prototype phase - before the html prototype is decomposed
> > into composition parts and components?
> 
> The runtime page hierarchy is ofcourse visible only at runtime, but
> you can preview each panel separately ofcourse (if it makes sense).
> 

It's important to note that everything outside the  tag
(for markup inheritance) or the  tag (for panels) is
ignored by Wicket. You can therefore use this to create a reasonable
harness for previewing...

  

  
  


  My Panel Preview
  
...
  

  

But ultimately the point of a component-based framework is to avoid
copying boilerplate around, so if you're looking for previews of
fully-formed pages you're doing it wrong.

jk

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



Focus on component

2009-01-29 Thread Philipp Daumke

Dear all,

I try to show and focus on a text field when clicking on a link. The 
focus however doesn't work. I tried to follow an example in cwiki 
(http://cwiki.apache.org/WICKET/calling-javascript-function-on-wicket-components-onclick.html) 
but I somehow do something wrong. I tried to add some javascript 
attribute via AttributeAppender, but then I get a null pointer exception 
in onClick ("target is null"). When I comment that line out (so don't 
add the Attribute), everything works fine except that focus doesn't work.


Any help appreciated.
Thanks a lot
Philipp

Here's my code:

in a WebMarkupContainer:
link.add(new AttributeAppender("onClick", new 
Model("getElementById('"+textfield.getMarkupId()+ "').onFocus();"), ";"));


in my custom Link Class:
public void onClick(AjaxRequestTarget target)
   {
   showFormThatContainsTextField(target);
}

void showFormThatContainsTextField(AjaxRequestTarget target)
   {
   // toggle the visibility
...
   // redraw the add container.
   target.addComponent(this);
   }

--

Averbis GmbH
c/o Klinikum der Albert-Ludwigs-Universität
Stefan-Meier-Strasse 26
D-79104 Freiburg

Fon: +49 (0) 761 - 203 6707
Fax: +49 (0) 761 - 203 6800
E-Mail: dau...@averbis.de

Geschäftsführer: Dr. med. Philipp Daumke, Kornél Markó
Sitz der Gesellschaft: Freiburg i. Br.
AG Freiburg i. Br., HRB 701080


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



Re: migration from jsf to wicket

2009-01-29 Thread janneru
martin & john,

thank you very much for your ideas!
this helps me very much to make the next steps, i will post the results when
the integration is done!

bestregards, uwe!

On Thu, Jan 29, 2009 at 11:41 AM, Martin Makundi <
martin.maku...@koodaripalvelut.com> wrote:

> > 1) working with many attributes of an object
> > we have some pages where we access many attributes of an object, say we
> want
> > to show all 20 attributes of a person and all 10 attributes of
> > person.getAddress();
> > in the PersonPage.java i would have to add 30 label (or input)
> components,
> > 30 lines with nearly identical java code: add(new Label("firstName",
> > person.getName() );
> > isn't it tedious to always keep PersonDetails.java and PersonDetails.html
> > files in sync? in jsf/jsp the changes are only in the jsp/xhtml
>
> There are few options that come into my mind:
> 1. add(new Label(CONSTANT_FIRST_NAME, person.getName() ); // Now you
> can re-use your constant from WicketTests.
> 2. add(new Label(CONSTANT_FIRST_NAME, new PropertyModel(person,
> Person.NAME_CONSTANT) ); // Now you can re-use your Entity's NAME
> -constant from JPA/ORM/Hibernate queries.
> 3. use CompoundPropertyModels. Yes. You will have to sync the names in
> html and in Java. Maybe someone will develop a nice plugin that
> automates this in the future:
>
> http://cwiki.apache.org/WICKET/working-with-wicket-models.html#WorkingwithWicketmodels-CompoundPropertyModels
> http://cwiki.apache.org/WICKET/more-on-models.html
>
> > 2) page composition
> You can treat Title just as a Label. See  tag and Wicket
> modularity:
> http://cwiki.apache.org/WICKET/wickets-xhtml-tags.html
> http://www.javalobby.org/java/forums/t60926.html
>
> http://cwiki.apache.org/WICKET/create-dynamic-markup-hierarchies-using-panels.html
>
> > 3) preview functionality
> > is this right: as soon as we use page composition and components, the
> > preview feature is gone; how do you experienced wicket users handle this?
> is
> > it usable in a prototype phase - before the html prototype is decomposed
> > into composition parts and components?
>
> The runtime page hierarchy is ofcourse visible only at runtime, but
> you can preview each panel separately ofcourse (if it makes sense).
>
> > is there a resource on the web that helps with the task of migrating from
> > jsf to wicket?
>
> I would save the html files using a browser (if the html markup is not
> available separately) and just pick up from there, starting to add
> wicket:id's to the components of the page, one-by-one (in development
> & debug mode it is quite fast as you do not need to restart the jetty
> server after saved&compiled change).
>
> my 2 cents ;)
>
> **
> Martin
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: applet web.xml mapping

2009-01-29 Thread rmattler

It appears I still have some things to learn about servlet mapping.

But I still don't understand why changing my url-pattern form
/* to /app/* would
make my applet not work.

Any way if anybody else want to use an applet to upload files here is how I
did it.

My web.xml file is:

 
 
  
WicketSessionFilter
   
org.apache.wicket.protocol.http.servlet.WicketSessionFilter

  filterName
  
  WicketFilter

  
 
  
  
WicketSessionFilter
/upload
   
 
  
UploadServlet
com.moviemakerzone.servlet.UploadServlet
  
 
  
UploadServlet
/upload
  


Upload html is:


 







Servlet is:

public class UploadServlet extends HttpServlet {

private static final String FILE_PIC_PATH = "c:\\temp\\picSave\\";

protected void doGet(HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException {
doPost(req, res); // redirect to post
}

protected void doPost(HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException {

// login page path
String loginPagePath = req.getContextPath() + "/login";

try {
org.apache.wicket.Session wicketSession =
org.apache.wicket.Session.get();
// if not logged in
UserSession session = (UserSession) Session.get();
if (session.getUser().getUsername() == null) {
res.sendRedirect(loginPagePath);
} else {
process(req);
}

System.out.println(wicketSession);
} catch (Exception e) {

System.out.println(e.getLocalizedMessage());
res.sendRedirect(loginPagePath);
}

}
}









-- 
View this message in context: 
http://www.nabble.com/applet-web.xml-mapping-tp21689586p21727627.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: java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory

2009-01-29 Thread Wadi Jalil Maluf
Thanks!

-Mensaje original-
De: rmattler [mailto:robertmatt...@gmail.com] 
Enviado el: jueves, 29 de enero de 2009 11:55
Para: users@wicket.apache.org
Asunto: Re: java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory


NoClassDefFoundError means that netbeans or the server can't find a file.

I'm guessing that it can't find the slf4j.jar  http://www.slf4j.org/faq.html

>From the wicket site:

Important note about logging dependencies for 1.3.0 and later.

As of Wicket 1.3.0, Wicket uses the SLF4J project for logging. SLF4J is
similar to commons-logging, in that it allows libraries/frameworks like
Wicket to avoid forcing a choice of logging framework on their users.

You cannot use Wicket without adding an SLF4J logging implementation to your
classpath. Most people use log4j. If you do, just include slf4j-log4j12.jar
on your classpath to get Wicket to use log4j too. If you want to use
commons-logging or JDK14 logging or something else, please see the SLF4J
site for more information.



wadi wrote:
> 
> Hi all!I'm facing some trouble running the wicket stuff examples because
> no
> one start due to java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
> 
>  exception.I'm using netbeans 6.5 and netbeans.
> 
> Thanks,
> 
> Wadi
> 
> 
> 

-- 
View this message in context:
http://www.nabble.com/java.lang.NoClassDefFoundError%3A-org-slf4j-LoggerFact
ory-tp21726877p21727315.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


__ Information from ESET NOD32 Antivirus, version of virus signature
database 3805 (20090127) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com


 

__ Information from ESET NOD32 Antivirus, version of virus signature
database 3805 (20090127) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
 


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



Re: Is there a way to be notified when a tab in a TabbedPanel is selected?

2009-01-29 Thread Zhubin Salehi

So every time a tab is selected, a new instance of that panel will be
created?


Erik van Oosten wrote:
> 
> Hi Zhubin,
> 
> Everytime there is a tab switch, method getPanel from the ITab instance 
> is called.
> 
> Regards,
> Erik.
> 
> 
> Zhubin Salehi wrote:
>> Hi all,
>>
>> How can I be notified when one of the tabs in a TabbedPanel is selected?
>> Where is no onSelect() method in ITab interface, is there a way to
>> achieve
>> this?
>>
>> Thanks,
>> Zhubin
>>   
> 
> -- 
> Erik van Oosten
> http://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
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Is-there-a-way-to-be-notified-when-a-tab-in-a-TabbedPanel-is-selected--tp21713724p21728222.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: Is there a way to be notified when a tab in a TabbedPanel is selected?

2009-01-29 Thread Martin Makundi
Yes, simply every time your panel is instantiated, it means someone
navigated to the particular tab. You can monitor this also in your
panel class.

**
Martin

2009/1/29 Zhubin Salehi :
>
> So every time a tab is selected, a new instance of that panel will be
> created?
>
>
> Erik van Oosten wrote:
>>
>> Hi Zhubin,
>>
>> Everytime there is a tab switch, method getPanel from the ITab instance
>> is called.
>>
>> Regards,
>> Erik.
>>
>>
>> Zhubin Salehi wrote:
>>> Hi all,
>>>
>>> How can I be notified when one of the tabs in a TabbedPanel is selected?
>>> Where is no onSelect() method in ITab interface, is there a way to
>>> achieve
>>> this?
>>>
>>> Thanks,
>>> Zhubin
>>>
>>
>> --
>> Erik van Oosten
>> http://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
>>
>>
>>
>
> --
> View this message in context: 
> http://www.nabble.com/Is-there-a-way-to-be-notified-when-a-tab-in-a-TabbedPanel-is-selected--tp21713724p21728222.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: Is there a way to be notified when a tab in a TabbedPanel is selected?

2009-01-29 Thread Erik van Oosten

Yes, unless you use the PanelCachingTab decorator.

   Erik.

Zhubin Salehi wrote:

So every time a tab is selected, a new instance of that panel will be
created?
  


--
Erik van Oosten
http://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: Is there a way to be notified when a tab in a TabbedPanel is selected?

2009-01-29 Thread Zhubin Salehi

So which Panel method is a best to monitor when that panel is selected? I
need to set a model property for each of my tabs.

Also I tried to stop Wicket from instantiating a new Panel every time a tab
is selected, here is the code:

/* advanced search check box */
add(new AjaxCheckBox("advancedSearch", new
PropertyModel(FindUserAccount.this, "advancedSearch")) {

private static final long serialVersionUID = 
-4363834871762525665L;

@Override
protected void onUpdate(AjaxRequestTarget target) {
target.addComponent(findUserAcountForm);
}
});

/* advanced search container */
final WebMarkupContainer advancedSearchContainer;
add(advancedSearchContainer = new
WebMarkupContainer("advancedSearchContainer") {

private static final long serialVersionUID = 
-6418171712342793920L;

@Override
public boolean isVisible() {
return advancedSearch;
}
});

Is that how PanelCachingTab is supposed to be used?

Thanks,
Zhubin

Martin Makundi wrote:
> 
> Yes, simply every time your panel is instantiated, it means someone
> navigated to the particular tab. You can monitor this also in your
> panel class.
> 
> **
> Martin
> 

-- 
View this message in context: 
http://www.nabble.com/Is-there-a-way-to-be-notified-when-a-tab-in-a-TabbedPanel-is-selected--tp21713724p21728481.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: Is there a way to be notified when a tab in a TabbedPanel is selected?

2009-01-29 Thread Zhubin Salehi

Sorry wrong code fragment! Here is the right one:

/* 'search by MobiNET ID tab */
tabs.add(new PanelCachingTab(new AbstractTab(new
StringResourceModel("title.byMobinetId",
FindUserAccount.this, null)) {

private static final long serialVersionUID = 
5564837747113048306L;

public Panel getPanel(String panelId) {
return new MobinetTab(panelId);
}
}));

/* 'search by person's details tab */
tabs.add(new PanelCachingTab(new AbstractTab(new
StringResourceModel("title.byPersonDetails",
FindUserAccount.this, null)) {

private static final long serialVersionUID = 
211211104202913141L;

public Panel getPanel(String panelId) {
return new PersonDetailTab(panelId);
}
}));

-- 
View this message in context: 
http://www.nabble.com/Is-there-a-way-to-be-notified-when-a-tab-in-a-TabbedPanel-is-selected--tp21713724p21728517.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: Is there a way to be notified when a tab in a TabbedPanel is selected?

2009-01-29 Thread Erik van Oosten

How about this:

tabs.add(new PanelCachingTab(new AbstractTab(new
StringResourceModel("title.byMobinetId",
FindUserAccount.this, null)) {

private static final long serialVersionUID = 
5564837747113048306L;

public Panel getPanel(String panelId) {
return new MobinetTab(panelId);
}
}) {

   @Override
   public Panel getPanel(final String panelId) {

   // ... DO SOMETHING UPON TAB SELECTION ...

   return super.getPanel(panelId);
   }

   });

This override getPanel from PanelCachingTab. But you could also 
implement your own ITab.


Regards,
   Erik.


Zhubin Salehi wrote:

Sorry wrong code fragment! Here is the right one:

/* 'search by MobiNET ID tab */
tabs.add(new PanelCachingTab(new AbstractTab(new
StringResourceModel("title.byMobinetId",
FindUserAccount.this, null)) {

private static final long serialVersionUID = 
5564837747113048306L;

public Panel getPanel(String panelId) {
return new MobinetTab(panelId);
}
}));

/* 'search by person's details tab */
tabs.add(new PanelCachingTab(new AbstractTab(new
StringResourceModel("title.byPersonDetails",
FindUserAccount.this, null)) {

private static final long serialVersionUID = 
211211104202913141L;

public Panel getPanel(String panelId) {
return new PersonDetailTab(panelId);
}
}));

  


--

Erik van Oosten
http://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: Is there a way to be notified when a tab in a TabbedPanel is selected?

2009-01-29 Thread Zhubin Salehi

This code looks cool, thanks a lot!


Erik van Oosten wrote:
> 
> How about this:
> 
>   tabs.add(new PanelCachingTab(new AbstractTab(new
> StringResourceModel("title.byMobinetId",
>   FindUserAccount.this, null)) {
> 
>   private static final long serialVersionUID = 
> 5564837747113048306L;
> 
>   public Panel getPanel(String panelId) {
>   return new MobinetTab(panelId);
>   }
>   }) {
> 
> @Override
> public Panel getPanel(final String panelId) {
> 
> // ... DO SOMETHING UPON TAB SELECTION ...
> 
> return super.getPanel(panelId);
> }
> 
> });
> 
> This override getPanel from PanelCachingTab. But you could also 
> implement your own ITab.
> 
> Regards,
> Erik.
> 

-- 
View this message in context: 
http://www.nabble.com/Is-there-a-way-to-be-notified-when-a-tab-in-a-TabbedPanel-is-selected--tp21713724p21728759.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



textfield to take only numnbers

2009-01-29 Thread miro

I s there  any textfield which  takes only numbers, I dont want user to enter
letters only numbers so I want a textfield which  takes only numbers is
there any such  textfield ? 
-- 
View this message in context: 
http://www.nabble.com/textfield-to--take-only-numnbers-tp21729554p21729554.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: textfield to take only numnbers

2009-01-29 Thread Philipp Daumke

Hi Miro,

can't you use a PatternValidator such as:

add(new TextField("textfieldname").add(new PatternValidator("^\\d+$")));

Cheers
Philipp

I s there  any textfield which  takes only numbers, I dont want user to enter
letters only numbers so I want a textfield which  takes only numbers is
there any such  textfield ? 
  



--

Averbis GmbH
c/o Klinikum der Albert-Ludwigs-Universität
Stefan-Meier-Strasse 26
D-79104 Freiburg

Fon: +49 (0) 761 - 203 6707
Fax: +49 (0) 761 - 203 6800
E-Mail: dau...@averbis.de

Geschäftsführer: Dr. med. Philipp Daumke, Kornél Markó
Sitz der Gesellschaft: Freiburg i. Br.
AG Freiburg i. Br., HRB 701080


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



Re: getRequest().getPage() always null

2009-01-29 Thread Johan Compagner
because in the onbeginrequest of the requestcycle
the request parsing starts.. it is not done yet. so the request cycle doenst
know the page

What you should do is have a AbstractSecurePage and do you stuff there (and
so on)
But look at the other projects like Swarm/Wasp or wicket-aut-roles


On Wed, Jan 28, 2009 at 21:18, Arthur Leigh Allen <
arthurleigh.al...@yahoo.de> wrote:

> Hello people,
>
> any explanation or suggestion?
> Is there a possible way to retrieve the page from the request cycle?
> There is the getPage() method but the result is always null. Why?
>
> I would appreciate any answers.
>
> Thx a lot
> Leigh
>
>
>
>
> 
> Von: Dipu 
> An: users@wicket.apache.org
> Gesendet: Mittwoch, den 21. Januar 2009, 17:46:38 Uhr
> Betreff: Re: getRequest().getPage() always null
>
> I think  setting this
> get().getApplicationSettings().setPageExpiredErrorPage(StartPage.class)
> in your application's init method  will solve your problem if i
> understand it correctly.
>
> regards
> Dipu
>
> On Wed, Jan 21, 2009 at 3:18 PM, Arthur Leigh Allen
>  wrote:
> > Hello wicket community,
> >
> >
> > there is a second issue I don't know how to solve.
> >
> > Imagine the following situation:
> > -User visits page
> > -User logs in
> > -User clones the browser window by pressing Strg+N (2 browser windows
> with logged-in-panels are shown now)
> > -User logs out in second page
> > -User closes second page
> > -User calls a use case function for logged-in-users in a panel in first
> page (*)
> >
> > The aim is to navigate to the start page when the user tries the last
> action (*).
> >
> > My idea is to override the onBeginRequest method of the WebRequestCycle
> in the application class.
> > Then check if the boolean member "wasLoggedIn" in my page is set to true
> and the boolean member "isLoggedIn" in the session is set to false.
> > When this constellation happens, I would call the
> setResponsePage(StartPage.class) etc.
> >
> > The problem is: When I call getRequest().getPage() in the onBeginRequest
> method, the result is always null.
> > Do you know how to get the page the request was initiated from?
> >
> > Best regards
> > Leigh
> >
> >
> >
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>
>
>


Re: Focus on component

2009-01-29 Thread Michael Sparer

use target.(pre|append)Javascript if you want additional JS executed
before/after doing the wicket-ajax stuff

if you only want to set the focus (without any ajax involved), don't use
ajaxlink, use e.g. a simple WebmarkupContainer

hth,
michael


Philipp Daumke-2 wrote:
> 
> Dear all,
> 
> I try to show and focus on a text field when clicking on a link. The 
> focus however doesn't work. I tried to follow an example in cwiki 
> (http://cwiki.apache.org/WICKET/calling-javascript-function-on-wicket-components-onclick.html)
>  
> but I somehow do something wrong. I tried to add some javascript 
> attribute via AttributeAppender, but then I get a null pointer exception 
> in onClick ("target is null"). When I comment that line out (so don't 
> add the Attribute), everything works fine except that focus doesn't work.
> 
> Any help appreciated.
> Thanks a lot
> Philipp
> 
> Here's my code:
> 
> in a WebMarkupContainer:
> link.add(new AttributeAppender("onClick", new 
> Model("getElementById('"+textfield.getMarkupId()+ "').onFocus();"), ";"));
> 
> in my custom Link Class:
> public void onClick(AjaxRequestTarget target)
> {
> showFormThatContainsTextField(target);
>  }
> 
> void showFormThatContainsTextField(AjaxRequestTarget target)
> {
> // toggle the visibility
>  ...
> // redraw the add container.
> target.addComponent(this);
> }
> 
> -- 
> 
> Averbis GmbH
> c/o Klinikum der Albert-Ludwigs-Universität
> Stefan-Meier-Strasse 26
> D-79104 Freiburg
> 
> Fon: +49 (0) 761 - 203 6707
> Fax: +49 (0) 761 - 203 6800
> E-Mail: dau...@averbis.de
> 
> Geschäftsführer: Dr. med. Philipp Daumke, Kornél Markó
> Sitz der Gesellschaft: Freiburg i. Br.
> AG Freiburg i. Br., HRB 701080
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 
> 
> 


-
Michael Sparer
http://techblog.molindo.at
-- 
View this message in context: 
http://www.nabble.com/Focus-on-component-tp21727553p21730148.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



Flicker on AJAX tree updates

2009-01-29 Thread Seven Corners

I have a LinkTree where the nodes represent systems, servers, or services
within a system.  The nodes have specific images associated with their
semantics and their health, and the health is polled at intervals to see if
I need to change the resource, e.g., to represent if a server is down.  I
have the code working but there's a lot of flicker whenever the timer goes
off.  It looks like under the scenes, the table repaints itself completely,
contracts to the root node and expands again to its previous state.  The
timers are associated with each node, so I don't see why the whole tree
should repaint.

I've added logic so we only change the image resource references when the
health actually changes, so theoretically the tree should never repaint if
it's just sitting there without anyone clicking it and the health doesn't
change.

Here is some of my code.  Is it obvious what I'm doing wrong?  Thanks for
your time.

public class SystemLinkTree extends LinkTree
{
...
protected Component newNodeComponent(java.lang.String id, IModel model)
{
return new LinkIconPanel(id, model, SystemLinkTree.this)
{
private static final long serialVersionUID = 1L;

@Override
protected Component newImageComponent(java.lang.String
componentId, BaseTree tree, IModel model)
{
Object obj = ( ( DefaultMutableTreeNode 
)model.getObject()
).getUserObject();
if ( obj instanceof PlatformInfoBean )
{
PlatformInfoBean.eRole role =
((PlatformInfoBean)obj).getRole();
switch ( role )
{
case system:
{   
final Image img = new Image(
componentId, getSystemStatusIcon(((PlatformInfoBean)obj).getSystemHealth())
);
img.setOutputMarkupId(true);
hashImageToHealth.put( img.getMarkupId(
true ), ((PlatformInfoBean)obj).getSystemHealth() );
img.add( new
AjaxSelfUpdatingTimerBehavior(standardUpdateDuration)
{
@Override
protected void
onPostProcessTarget(AjaxRequestTarget target)
{
final String strRole =
((SignInSession)Session.get()).getRoleName();
ServiceHealth.Health previousHealth =
hashImageToHealth.get( img.getMarkupId( true ) );
ServiceHealth.Health currentHealth =
getSystemHealth( strRole );
if ( previousHealth != currentHealth )
{
hashImageToHealth.put(
img.getMarkupId(), currentHealth );
img.setImageResourceReference(
getSystemStatusIcon( currentHealth ) );
}
}
});  
return img;
}
case access:
case storage:
final Image img = new Image( componentId,
getPlatformStatusIcon(((PlatformInfoBean)obj).getSystemHealth()) );
img.setOutputMarkupId( true );
hashImageToHealth.put( img.getMarkupId( true ),
((PlatformInfoBean)obj).getSystemHealth() );
hashPlatformImages.put( img.getMarkupId( true ),
(PlatformInfoBean)obj);
img.add( new
AjaxSelfUpdatingTimerBehavior(standardUpdateDuration)
{
@Override
protected void
onPostProcessTarget(AjaxRequestTarget target)
{
final String clientRole =
((SignInSession)Session.get()).getRoleName();   
 
ServiceHealth.Health previousHealth =
hashImageToHealth.get( img.getMarkupId( true ) );
try
{
ServiceHealth.Health currentHealth =
PlatformAdapter.getPlatformAggregateHealth( clientRole,
hashPlatformImages.get( img.getMarkupId( true ) ).getId()
).getSystemHealth();
if ( previousHealth != 
currentHealth )
{   

hashImageToHealth.

Re: Issues with wicket-contrib-input-events in Mozilla

2009-01-29 Thread dukejansen

Nino,

Thanks for the quick reply...

I dug a bit deeper and you are correct, it does have some hooks for handling
Links, but it may only work for links which extend from the base Link class.

// Try to bind to link so shortcut will work. Should 
only be done if
// no other handlers were found
if (component instanceof Link && eventType == null) {
linkUnbound = true;
return;
}

In my case, the link is an Ajax link which launches a Modal, and AjaxLink
does not extend Link. Furthermore, the behavior of simply handling the link
by calling location = href is not necessarily sufficient - I believe this
would circumvent any onclick event handlers set on the   tag, which would
prevent the AjaxLink from working...

I'm thinking the hook for ajax links probably needs to be something like a
combination of the two mechanisms - instead of trying to call click(), which
doesn't exist, would need to call the onclick() directly, and then check
it's result and if true follow the link, if false do not... that way it
could still handle the ajax fallback links as well, I believe.

This is all theory, haven't actually verified any of this would work yet...

On top of all this, I'm working with a 1.4 backport we made of the
input-events code, so any fix I come up with will likely not make it back
into the main trunk for the input-events module...

-Jason


Nino Martinez-2 wrote:
> 
> I cant exactly remember what the scope where, just that it did support 
> links at some point, in safari and IE. Patches are always welcome..
> 
> But looking in the source there are some auto hooking for links 
> actually, which uses href instead of click AFAIR it should just pick it 
> up automaticly...:
> 
> 
> function init${wicketComponentId}() {
> shortcut.add("${keys}",function() {
>
> 
> window.location=document.getElementById('${wicketComponentId}').href;
>
> },{
> 'disable_in_input':${disable_in_input},
> 'type':'${type}',
> 'propagate':${propagate},
> 'target':${target}
>
> });
> }
> init${wicketComponentId}();
> 
> 
> Did you check the examples, and see if they still are working, they do 
> include a link aswell?
> 
> https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-core/input-events-parent/input-events-examples
> 

-- 
View this message in context: 
http://www.nabble.com/Issues-with-wicket-contrib-input-events-in-Mozilla-tp21718528p21730952.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



OpenLayer with google WMS

2009-01-29 Thread Wadi Jalil Maluf
Hi All!Does anyone knows how to use openlayer map control with google map
like this example http://openlayers.org/dev/examples/google.html in wicket?

Thanks!



Re: Problems running wicket application on Jetty - Help please.

2009-01-29 Thread Igor Vaynberg
you have to declare those dependencies in the pom of your project. mvn
jetty:run does not see what you have exported in eclipse - that is an
eclipse specific feature.

-igor

On Thu, Jan 29, 2009 at 4:30 AM, Daniel Ferreira Castro
 wrote:
> I know that this can be a little "gray zone problem", but let me ask anyway.
>
> I went to the quickstart, http://wicket.apache.org/quickstart.html, e
> executed the command bellow
>
> 1)
> mvn archetype:create -DarchetypeGroupId=org.apache.wicket
> -DarchetypeArtifactId=wicket-archetype-quickstart -DarchetypeVersion=1.3.5
> -DgroupId=com.mycompany -DartifactId=myproject
>
> I changed the groupId and artifactId to fit my package and project names.
>
> After that, inside the project folder I run the command bellow.
>
> 2)
> mvn eclipse:eclipse -DdownloadSources=true
>
> I imported the project to eclipse workspace.
> After that I run mvn jetty::run to start the Jetty and test my Wicket
> project.
> But I recieved this error.
>
> 2009-01-29 09:39:42.578::WARN:  Error for /ecommFwkBackOffice/
> java.lang.NoClassDefFoundError: org/hibernate/Session
>
> Yes, the problem is that Jetty can not load the Session Hibernate class.
> But this is related due the way that my project, in fact projects, are
> organized.
>
> I organized the artifacts like that.
> I have a data access project that is called dataAccess.
> This projects have all the DTOs and DAOs to access the database.  It uses
> Hibernate persistence and Maven as dependency manager.
> The project export its classes and Maven Dependencies, configured by eclipse
> on project build tab.
>
> I have a second project called backOffice that have the dataAccess project
> as dependency.
> The wicket pages of this project consumes resources from dataAccess project
> and thoses resources are hibernate dependents.
>
> And in future I will have a third project, also a wicket project, that is
> the fron end to end user.
> That is why I choose to split the solution on three different projects.
>
> The problem is that I run the backOffice using mvn jetty:run and when I
> access it the exception occurs.
> So for some reason the classes are not beeing correctly deployed on Jetty.
>
> Does anyone have faced a problem like that and knows how to solve it?
>
> --
> "Two rules to succeed in life:
> 1 - don´t tell people everything you know."
> 
> We shall go on to the end.
> We shall fight in France
> We shall fightover the seas and oceans.
> We shall fight with growing confidence and growing strength in the air.
> We shall defend our island whatever the cost may be
> We shall fight on beaches, we shall fight on the landing grounds,
> We shall fight in the fields and in the streets,
> We shall fight on the hills.
> We shall never surrender.
> Winston Churchill
>

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



Re: OpenLayer with google WMS

2009-01-29 Thread Jeremy Thomerson
There's an openlayer integration in wicketstuff (
http://wicketstuff.org/maven/repository/org/wicketstuff/) with examples.
I've never used it.  I believe it's a work of Nino.  I've looked at the
examples, though.

On Thu, Jan 29, 2009 at 11:19 AM, Wadi Jalil Maluf wrote:

> Hi All!Does anyone knows how to use openlayer map control with google map
> like this example http://openlayers.org/dev/examples/google.html in
> wicket?
>
> Thanks!
>
>


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


deploy WicketServlet on Geronimo but 404?

2009-01-29 Thread Edwin Ansicodd

I'm trying to deploy a SpringWebApplication in a .war on Geronimo.  

I can see in the console that the app is deploying and no errors are
occurring.

But when I try to access the URL for the app, I get HTTP Status 404 'The
requested resource is not available.  

Would anyone have any suggestions for why the App is not accessible?

My web.xml:


http://java.sun.com/dtd/web-app_2_3.dtd";>


JPS
JPS
 

contextConfigLocation
/WEB-INF/applicationContext.xml


 

org.springframework.web.context.ContextLoaderListener
 
 
 

JPSApplication

org.apache.wicket.protocol.http.WicketServlet

applicationFactoryClassName
   
org.apache.wicket.spring.SpringWebApplicationFactory 
   



configuration

deployment

1




JPSApplication
/jps/*





My geronimo-web.xml:


http://geronimo.apache.org/xml/ns/j2ee/application-2.0";
xmlns:client="http://geronimo.apache.org/xml/ns/j2ee/application-client-2.0";
xmlns:conn="http://geronimo.apache.org/xml/ns/j2ee/connector-1.2";
xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2";
xmlns:ejb="http://openejb.apache.org/xml/ns/openejb-jar-2.2";
xmlns:name="http://geronimo.apache.org/xml/ns/naming-1.2";
xmlns:pers="http://java.sun.com/xml/ns/persistence";
xmlns:pkgen="http://openejb.apache.org/xml/ns/pkgen-2.1";
xmlns:sec="http://geronimo.apache.org/xml/ns/security-2.0";
xmlns:web="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1";>


default
JPS_generic
1.0
car


/JPS_generic


My applicationContext.xml:


http://www.springframework.org/schema/beans";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd";>






-- 
View this message in context: 
http://www.nabble.com/deploy-WicketServlet-on-Geronimo-but-404--tp21732316p21732316.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: OpenLayer with google WMS

2009-01-29 Thread Wadi Jalil Maluf
Thanks Jeremy, but it uses wicket 1,4 and I'm using 1.3.4, anyway I'm
getting 
java.lang.ClassNotFoundException:
com.vividsolutions.jts.geom.GeometryFactory
exeptions so I'll just use GMAP integration instead,
thanks!

-Mensaje original-
De: Jeremy Thomerson [mailto:jer...@wickettraining.com] 
Enviado el: jueves, 29 de enero de 2009 15:42
Para: users@wicket.apache.org
Asunto: Re: OpenLayer with google WMS

There's an openlayer integration in wicketstuff (
http://wicketstuff.org/maven/repository/org/wicketstuff/) with examples.
I've never used it.  I believe it's a work of Nino.  I've looked at the
examples, though.

On Thu, Jan 29, 2009 at 11:19 AM, Wadi Jalil Maluf
wrote:

> Hi All!Does anyone knows how to use openlayer map control with google map
> like this example http://openlayers.org/dev/examples/google.html in
> wicket?
>
> Thanks!
>
>


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



__ Information from ESET NOD32 Antivirus, version of virus signature
database 3805 (20090127) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com

 

__ Information from ESET NOD32 Antivirus, version of virus signature
database 3805 (20090127) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
 


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



Re: Issues with wicket-contrib-input-events in Mozilla

2009-01-29 Thread dukejansen

The code I posted below actually doesn't even get called if the tag has an
onclick attribute...

I'm working up a workaround now, I'll post it if it ends up working...

-Jason


dukejansen wrote:
> 
> Nino,
> 
> Thanks for the quick reply...
> 
> I dug a bit deeper and you are correct, it does have some hooks for
> handling Links, but it may only work for links which extend from the base
> Link class.
> 
>   // Try to bind to link so shortcut will work. Should 
> only be done if
>   // no other handlers were found
>   if (component instanceof Link && eventType == null) {
>   linkUnbound = true;
>   return;
>   }
> 
> In my case, the link is an Ajax link which launches a Modal, and AjaxLink
> does not extend Link. Furthermore, the behavior of simply handling the
> link by calling location = href is not necessarily sufficient - I believe
> this would circumvent any onclick event handlers set on the   tag, which
> would prevent the AjaxLink from working...
> 
> I'm thinking the hook for ajax links probably needs to be something like a
> combination of the two mechanisms - instead of trying to call click(),
> which doesn't exist, would need to call the onclick() directly, and then
> check it's result and if true follow the link, if false do not... that way
> it could still handle the ajax fallback links as well, I believe.
> 
> This is all theory, haven't actually verified any of this would work
> yet...
> 
> On top of all this, I'm working with a 1.4 backport we made of the
> input-events code, so any fix I come up with will likely not make it back
> into the main trunk for the input-events module...
> 
> -Jason
> 
> 
> Nino Martinez-2 wrote:
>> 
>> I cant exactly remember what the scope where, just that it did support 
>> links at some point, in safari and IE. Patches are always welcome..
>> 
>> But looking in the source there are some auto hooking for links 
>> actually, which uses href instead of click AFAIR it should just pick it 
>> up automaticly...:
>> 
>> 
>> function init${wicketComponentId}() {
>> shortcut.add("${keys}",function() {
>>
>> 
>> window.location=document.getElementById('${wicketComponentId}').href;
>>
>> },{
>> 'disable_in_input':${disable_in_input},
>> 'type':'${type}',
>> 'propagate':${propagate},
>> 'target':${target}
>>
>> });
>> }
>> init${wicketComponentId}();
>> 
>> 
>> Did you check the examples, and see if they still are working, they do 
>> include a link aswell?
>> 
>> https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-core/input-events-parent/input-events-examples
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Issues-with-wicket-contrib-input-events-in-Mozilla-tp21718528p21732636.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: textfield to take only numnbers

2009-01-29 Thread Heikki Uotinen
Pass the field type in the TextField's constructor

http://wicketstuff.org/wicket13/compref/?wicket:bookmarkablePage=:org.apache.wicket.examples.compref.TextFieldPage


-Heikki

-Original Message-
From: miro [mailto:miroconn...@yahoo.com] 
Sent: 29. tammikuuta 2009 17:52
To: users@wicket.apache.org
Subject: textfield to take only numnbers


I s there  any textfield which  takes only numbers, I dont want user to enter
letters only numbers so I want a textfield which  takes only numbers is
there any such  textfield ? 
-- 
View this message in context: 
http://www.nabble.com/textfield-to--take-only-numnbers-tp21729554p21729554.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: OpenLayer with google WMS

2009-01-29 Thread Jeremy Thomerson
https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/branches/wicket-1.3.x/wicket-contrib-openlayers/
https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/branches/wicket-1.3.x/wicket-contrib-openlayers-examples/


On Thu, Jan 29, 2009 at 12:16 PM, Wadi Jalil Maluf wrote:

> Thanks Jeremy, but it uses wicket 1,4 and I'm using 1.3.4, anyway I'm
> getting
> java.lang.ClassNotFoundException:
> com.vividsolutions.jts.geom.GeometryFactory
> exeptions so I'll just use GMAP integration instead,
> thanks!
>
> -Mensaje original-
> De: Jeremy Thomerson [mailto:jer...@wickettraining.com]
> Enviado el: jueves, 29 de enero de 2009 15:42
> Para: users@wicket.apache.org
> Asunto: Re: OpenLayer with google WMS
>
> There's an openlayer integration in wicketstuff (
> http://wicketstuff.org/maven/repository/org/wicketstuff/) with examples.
> I've never used it.  I believe it's a work of Nino.  I've looked at the
> examples, though.
>
> On Thu, Jan 29, 2009 at 11:19 AM, Wadi Jalil Maluf
> wrote:
>
> > Hi All!Does anyone knows how to use openlayer map control with google map
> > like this example http://openlayers.org/dev/examples/google.html in
> > wicket?
> >
> > Thanks!
> >
> >
>
>
> --
> Jeremy Thomerson
> http://www.wickettraining.com
>
>
>
> __ Information from ESET NOD32 Antivirus, version of virus
> signature
> database 3805 (20090127) __
>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
>
>
>
> __ Information from ESET NOD32 Antivirus, version of virus
> signature
> database 3805 (20090127) __
>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
>
>
>
> -
> 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


Re: Issues with wicket-contrib-input-events in Mozilla

2009-01-29 Thread nino martinez wael
Ahh ok, it would be very nice if there could be a patch somehow on this..

BTW the auto hook is extremely simple.. So it will only auto hook in the
most simple cases, you can always override, and manually tell it what todo..

2009/1/29 dukejansen 

>
> The code I posted below actually doesn't even get called if the tag has an
> onclick attribute...
>
> I'm working up a workaround now, I'll post it if it ends up working...
>
> -Jason
>
>
> dukejansen wrote:
> >
> > Nino,
> >
> > Thanks for the quick reply...
> >
> > I dug a bit deeper and you are correct, it does have some hooks for
> > handling Links, but it may only work for links which extend from the base
> > Link class.
> >
> >   // Try to bind to link so shortcut will work.
> Should only be done if
> >   // no other handlers were found
> >   if (component instanceof Link && eventType == null)
> {
> >   linkUnbound = true;
> >   return;
> >   }
> >
> > In my case, the link is an Ajax link which launches a Modal, and AjaxLink
> > does not extend Link. Furthermore, the behavior of simply handling the
> > link by calling location = href is not necessarily sufficient - I believe
> > this would circumvent any onclick event handlers set on the   tag, which
> > would prevent the AjaxLink from working...
> >
> > I'm thinking the hook for ajax links probably needs to be something like
> a
> > combination of the two mechanisms - instead of trying to call click(),
> > which doesn't exist, would need to call the onclick() directly, and then
> > check it's result and if true follow the link, if false do not... that
> way
> > it could still handle the ajax fallback links as well, I believe.
> >
> > This is all theory, haven't actually verified any of this would work
> > yet...
> >
> > On top of all this, I'm working with a 1.4 backport we made of the
> > input-events code, so any fix I come up with will likely not make it back
> > into the main trunk for the input-events module...
> >
> > -Jason
> >
> >
> > Nino Martinez-2 wrote:
> >>
> >> I cant exactly remember what the scope where, just that it did support
> >> links at some point, in safari and IE. Patches are always welcome..
> >>
> >> But looking in the source there are some auto hooking for links
> >> actually, which uses href instead of click AFAIR it should just pick it
> >> up automaticly...:
> >>
> >> 
> >> function init${wicketComponentId}() {
> >> shortcut.add("${keys}",function() {
> >>
> >>
> >> window.location=document.getElementById('${wicketComponentId}').href;
> >>
> >> },{
> >> 'disable_in_input':${disable_in_input},
> >> 'type':'${type}',
> >> 'propagate':${propagate},
> >> 'target':${target}
> >>
> >> });
> >> }
> >> init${wicketComponentId}();
> >> 
> >>
> >> Did you check the examples, and see if they still are working, they do
> >> include a link aswell?
> >>
> >>
> https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-core/input-events-parent/input-events-examples
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Issues-with-wicket-contrib-input-events-in-Mozilla-tp21718528p21732636.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: textfield to take only numnbers

2009-01-29 Thread Jeremy Thomerson
new TextField("id");
new TextField("id", Integer.class);
new TextField("id", Integer.class);


On Thu, Jan 29, 2009 at 9:52 AM, miro  wrote:

>
> I s there  any textfield which  takes only numbers, I dont want user to
> enter
> letters only numbers so I want a textfield which  takes only numbers is
> there any such  textfield ?
> --
> View this message in context:
> http://www.nabble.com/textfield-to--take-only-numnbers-tp21729554p21729554.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
>
>


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


Re: OpenLayer with google WMS

2009-01-29 Thread nino martinez wael
hhehe just a second faster than me :)

2009/1/29 Jeremy Thomerson 

>
> https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/branches/wicket-1.3.x/wicket-contrib-openlayers/
>
> https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/branches/wicket-1.3.x/wicket-contrib-openlayers-examples/
>
>
> On Thu, Jan 29, 2009 at 12:16 PM, Wadi Jalil Maluf  >wrote:
>
> > Thanks Jeremy, but it uses wicket 1,4 and I'm using 1.3.4, anyway I'm
> > getting
> > java.lang.ClassNotFoundException:
> > com.vividsolutions.jts.geom.GeometryFactory
> > exeptions so I'll just use GMAP integration instead,
> > thanks!
> >
> > -Mensaje original-
> > De: Jeremy Thomerson [mailto:jer...@wickettraining.com]
> > Enviado el: jueves, 29 de enero de 2009 15:42
> > Para: users@wicket.apache.org
> > Asunto: Re: OpenLayer with google WMS
> >
> > There's an openlayer integration in wicketstuff (
> > http://wicketstuff.org/maven/repository/org/wicketstuff/) with examples.
> > I've never used it.  I believe it's a work of Nino.  I've looked at the
> > examples, though.
> >
> > On Thu, Jan 29, 2009 at 11:19 AM, Wadi Jalil Maluf
> > wrote:
> >
> > > Hi All!Does anyone knows how to use openlayer map control with google
> map
> > > like this example http://openlayers.org/dev/examples/google.html in
> > > wicket?
> > >
> > > Thanks!
> > >
> > >
> >
> >
> > --
> > Jeremy Thomerson
> > http://www.wickettraining.com
> >
> >
> >
> > __ Information from ESET NOD32 Antivirus, version of virus
> > signature
> > database 3805 (20090127) __
> >
> > The message was checked by ESET NOD32 Antivirus.
> >
> > http://www.eset.com
> >
> >
> >
> > __ Information from ESET NOD32 Antivirus, version of virus
> > signature
> > database 3805 (20090127) __
> >
> > The message was checked by ESET NOD32 Antivirus.
> >
> > http://www.eset.com
> >
> >
> >
> > -
> > 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
>


RefreshingView/DataView with FormComponents and getForm

2009-01-29 Thread Ryan
I have a Panel with a DataView, inside populateItem I add TextFields to
the Item (and the dataView is added to the Form).

This panel contains a FeedbackPanel that should only show errors
generated by fields added in populateItem. Unfortunately the Item object
has its parent set to null. So calls to getParent on the TextFields
looks like this:

textField.getParent() -> item.getParent() -> null.

This breaks the ContainerFeedbackMessageFilter and also breaks getForm()
on the textfields (which throws a WicketRuntimeException because it
cannot find the form).


Is this the proper behavior? I was hoping item.getParent() would point
to the dataView.

Any ideas/pointers?

Thanks!
Ryan

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



Re: OpenLayer with google WMS

2009-01-29 Thread nino martinez wael
Regarding your trouble with JTS

There is a dependency to this :

http://mvnrepository.com/artifact/com.vividsolutions/jts

But it should be handled by maven... Unless you just dropped in the jar,
then you have to manually put it on class path..

2009/1/29 Wadi Jalil Maluf 

> Thanks Jeremy, but it uses wicket 1,4 and I'm using 1.3.4, anyway I'm
> getting
> java.lang.ClassNotFoundException:
> com.vividsolutions.jts.geom.GeometryFactory
> exeptions so I'll just use GMAP integration instead,
> thanks!
>
> -Mensaje original-
> De: Jeremy Thomerson [mailto:jer...@wickettraining.com]
> Enviado el: jueves, 29 de enero de 2009 15:42
> Para: users@wicket.apache.org
> Asunto: Re: OpenLayer with google WMS
>
> There's an openlayer integration in wicketstuff (
> http://wicketstuff.org/maven/repository/org/wicketstuff/) with examples.
> I've never used it.  I believe it's a work of Nino.  I've looked at the
> examples, though.
>
> On Thu, Jan 29, 2009 at 11:19 AM, Wadi Jalil Maluf
> wrote:
>
> > Hi All!Does anyone knows how to use openlayer map control with google map
> > like this example http://openlayers.org/dev/examples/google.html in
> > wicket?
> >
> > Thanks!
> >
> >
>
>
> --
> Jeremy Thomerson
> http://www.wickettraining.com
>
>
>
> __ Information from ESET NOD32 Antivirus, version of virus
> signature
> database 3805 (20090127) __
>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
>
>
>
> __ Information from ESET NOD32 Antivirus, version of virus
> signature
> database 3805 (20090127) __
>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Issues with wicket-contrib-input-events in Mozilla

2009-01-29 Thread dukejansen

Okay, nevermind. It turns out the issue can be corrected much more simply, by
using an "onclick" event type instead of a "click" event type, which
arguably may have been obvious.

I'm still not certain whether this will still work properly for
AjaxFallbackLinks or other links that have both an onclick AND an href, but
I believe for most/all of my use cases, that's not an issue...

-Jason


dukejansen wrote:
> 
> The code I posted below actually doesn't even get called if the tag has an
> onclick attribute...
> 
> I'm working up a workaround now, I'll post it if it ends up working...
> 
> -Jason
> 
> 
> dukejansen wrote:
>> 
>> Nino,
>> 
>> Thanks for the quick reply...
>> 
>> I dug a bit deeper and you are correct, it does have some hooks for
>> handling Links, but it may only work for links which extend from the base
>> Link class.
>> 
>>  // Try to bind to link so shortcut will work. Should 
>> only be done if
>>  // no other handlers were found
>>  if (component instanceof Link && eventType == null) {
>>  linkUnbound = true;
>>  return;
>>  }
>> 
>> In my case, the link is an Ajax link which launches a Modal, and AjaxLink
>> does not extend Link. Furthermore, the behavior of simply handling the
>> link by calling location = href is not necessarily sufficient - I believe
>> this would circumvent any onclick event handlers set on the   tag, which
>> would prevent the AjaxLink from working...
>> 
>> I'm thinking the hook for ajax links probably needs to be something like
>> a combination of the two mechanisms - instead of trying to call click(),
>> which doesn't exist, would need to call the onclick() directly, and then
>> check it's result and if true follow the link, if false do not... that
>> way it could still handle the ajax fallback links as well, I believe.
>> 
>> This is all theory, haven't actually verified any of this would work
>> yet...
>> 
>> On top of all this, I'm working with a 1.4 backport we made of the
>> input-events code, so any fix I come up with will likely not make it back
>> into the main trunk for the input-events module...
>> 
>> -Jason
>> 
>> 
>> Nino Martinez-2 wrote:
>>> 
>>> I cant exactly remember what the scope where, just that it did support 
>>> links at some point, in safari and IE. Patches are always welcome..
>>> 
>>> But looking in the source there are some auto hooking for links 
>>> actually, which uses href instead of click AFAIR it should just pick it 
>>> up automaticly...:
>>> 
>>> 
>>> function init${wicketComponentId}() {
>>> shortcut.add("${keys}",function() {
>>>
>>> 
>>> window.location=document.getElementById('${wicketComponentId}').href;
>>>
>>> },{
>>> 'disable_in_input':${disable_in_input},
>>> 'type':'${type}',
>>> 'propagate':${propagate},
>>> 'target':${target}
>>>
>>> });
>>> }
>>> init${wicketComponentId}();
>>> 
>>> 
>>> Did you check the examples, and see if they still are working, they do 
>>> include a link aswell?
>>> 
>>> https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-core/input-events-parent/input-events-examples
>>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Issues-with-wicket-contrib-input-events-in-Mozilla-tp21718528p21732972.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: OpenLayer with google WMS

2009-01-29 Thread nino martinez wael
Hi Wadi

just use the old one theres a version for 1.3 branch aswell..

https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/branches/wicket-1.3.x/wicket-contrib-openlayers/

But the pick are yours to decide..


2009/1/29 Wadi Jalil Maluf 

> Thanks Jeremy, but it uses wicket 1,4 and I'm using 1.3.4, anyway I'm
> getting
> java.lang.ClassNotFoundException:
> com.vividsolutions.jts.geom.GeometryFactory
> exeptions so I'll just use GMAP integration instead,
> thanks!
>
> -Mensaje original-
> De: Jeremy Thomerson [mailto:jer...@wickettraining.com]
> Enviado el: jueves, 29 de enero de 2009 15:42
> Para: users@wicket.apache.org
> Asunto: Re: OpenLayer with google WMS
>
> There's an openlayer integration in wicketstuff (
> http://wicketstuff.org/maven/repository/org/wicketstuff/) with examples.
> I've never used it.  I believe it's a work of Nino.  I've looked at the
> examples, though.
>
> On Thu, Jan 29, 2009 at 11:19 AM, Wadi Jalil Maluf
> wrote:
>
> > Hi All!Does anyone knows how to use openlayer map control with google map
> > like this example http://openlayers.org/dev/examples/google.html in
> > wicket?
> >
> > Thanks!
> >
> >
>
>
> --
> Jeremy Thomerson
> http://www.wickettraining.com
>
>
>
> __ Information from ESET NOD32 Antivirus, version of virus
> signature
> database 3805 (20090127) __
>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
>
>
>
> __ Information from ESET NOD32 Antivirus, version of virus
> signature
> database 3805 (20090127) __
>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Issues with wicket-contrib-input-events in Mozilla

2009-01-29 Thread nino martinez wael
Hehe, great :) So no problems after all?

2009/1/29 dukejansen 

>
> Okay, nevermind. It turns out the issue can be corrected much more simply,
> by
> using an "onclick" event type instead of a "click" event type, which
> arguably may have been obvious.
>
> I'm still not certain whether this will still work properly for
> AjaxFallbackLinks or other links that have both an onclick AND an href, but
> I believe for most/all of my use cases, that's not an issue...
>
> -Jason
>
>
> dukejansen wrote:
> >
> > The code I posted below actually doesn't even get called if the tag has
> an
> > onclick attribute...
> >
> > I'm working up a workaround now, I'll post it if it ends up working...
> >
> > -Jason
> >
> >
> > dukejansen wrote:
> >>
> >> Nino,
> >>
> >> Thanks for the quick reply...
> >>
> >> I dug a bit deeper and you are correct, it does have some hooks for
> >> handling Links, but it may only work for links which extend from the
> base
> >> Link class.
> >>
> >>  // Try to bind to link so shortcut will work.
> Should only be done if
> >>  // no other handlers were found
> >>  if (component instanceof Link && eventType == null)
> {
> >>  linkUnbound = true;
> >>  return;
> >>  }
> >>
> >> In my case, the link is an Ajax link which launches a Modal, and
> AjaxLink
> >> does not extend Link. Furthermore, the behavior of simply handling the
> >> link by calling location = href is not necessarily sufficient - I
> believe
> >> this would circumvent any onclick event handlers set on the   tag, which
> >> would prevent the AjaxLink from working...
> >>
> >> I'm thinking the hook for ajax links probably needs to be something like
> >> a combination of the two mechanisms - instead of trying to call click(),
> >> which doesn't exist, would need to call the onclick() directly, and then
> >> check it's result and if true follow the link, if false do not... that
> >> way it could still handle the ajax fallback links as well, I believe.
> >>
> >> This is all theory, haven't actually verified any of this would work
> >> yet...
> >>
> >> On top of all this, I'm working with a 1.4 backport we made of the
> >> input-events code, so any fix I come up with will likely not make it
> back
> >> into the main trunk for the input-events module...
> >>
> >> -Jason
> >>
> >>
> >> Nino Martinez-2 wrote:
> >>>
> >>> I cant exactly remember what the scope where, just that it did support
> >>> links at some point, in safari and IE. Patches are always welcome..
> >>>
> >>> But looking in the source there are some auto hooking for links
> >>> actually, which uses href instead of click AFAIR it should just pick it
> >>> up automaticly...:
> >>>
> >>> 
> >>> function init${wicketComponentId}() {
> >>> shortcut.add("${keys}",function() {
> >>>
> >>>
> >>> window.location=document.getElementById('${wicketComponentId}').href;
> >>>
> >>> },{
> >>> 'disable_in_input':${disable_in_input},
> >>> 'type':'${type}',
> >>> 'propagate':${propagate},
> >>> 'target':${target}
> >>>
> >>> });
> >>> }
> >>> init${wicketComponentId}();
> >>> 
> >>>
> >>> Did you check the examples, and see if they still are working, they do
> >>> include a link aswell?
> >>>
> >>>
> https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-core/input-events-parent/input-events-examples
> >>>
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Issues-with-wicket-contrib-input-events-in-Mozilla-tp21718528p21732972.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: RefreshingView/DataView with FormComponents and getForm

2009-01-29 Thread Igor Vaynberg
show us your code

-igor

On Thu, Jan 29, 2009 at 10:36 AM, Ryan  wrote:
> I have a Panel with a DataView, inside populateItem I add TextFields to
> the Item (and the dataView is added to the Form).
>
> This panel contains a FeedbackPanel that should only show errors
> generated by fields added in populateItem. Unfortunately the Item object
> has its parent set to null. So calls to getParent on the TextFields
> looks like this:
>
> textField.getParent() -> item.getParent() -> null.
>
> This breaks the ContainerFeedbackMessageFilter and also breaks getForm()
> on the textfields (which throws a WicketRuntimeException because it
> cannot find the form).
>
>
> Is this the proper behavior? I was hoping item.getParent() would point
> to the dataView.
>
> Any ideas/pointers?
>
> Thanks!
> Ryan
>
> -
> 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: migration from jsf to wicket

2009-01-29 Thread dtoffe

For 1) I suggest you to take a look at Wicket Web Beans:

  http://wicketwebbeans.sourceforge.net/

Cheers,

Daniel



janneru wrote:
> 
> martin & john,
> 
> thank you very much for your ideas!
> this helps me very much to make the next steps, i will post the results
> when
> the integration is done!
> 
> bestregards, uwe!
> 
> 

-- 
View this message in context: 
http://www.nabble.com/migration-from-jsf-to-wicket-tp21724080p21733565.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: RefreshingView/DataView with FormComponents and getForm

2009-01-29 Thread Ryan
I hacked together a quickstart and pasted the code here:
http://pastebin.com/m3d0a54

I didnt know if there was a policy on pasting code to the list..

Thanks,
Ryan 

On Thu, Jan 29, 2009 at 10:47:13AM -0800, Igor Vaynberg exclaimed:

>show us your code
>
>-igor
>
>On Thu, Jan 29, 2009 at 10:36 AM, Ryan  wrote:
>> I have a Panel with a DataView, inside populateItem I add TextFields to
>> the Item (and the dataView is added to the Form).
>>
>> This panel contains a FeedbackPanel that should only show errors
>> generated by fields added in populateItem. Unfortunately the Item object
>> has its parent set to null. So calls to getParent on the TextFields
>> looks like this:
>>
>> textField.getParent() -> item.getParent() -> null.
>>
>> This breaks the ContainerFeedbackMessageFilter and also breaks getForm()
>> on the textfields (which throws a WicketRuntimeException because it
>> cannot find the form).
>>
>>
>> Is this the proper behavior? I was hoping item.getParent() would point
>> to the dataView.
>>
>> Any ideas/pointers?
>>
>> Thanks!
>> Ryan
>>
>> -
>> 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: OpenLayer with google WMS

2009-01-29 Thread Wadi Jalil Maluf
Thanks!One more thing, by default the map is too big, how do I set the
size?thanks again,
Regards,
Wadi

-Mensaje original-
De: nino martinez wael [mailto:nino.martinez.w...@gmail.com] 
Enviado el: jueves, 29 de enero de 2009 16:30
Para: users@wicket.apache.org
Asunto: Re: OpenLayer with google WMS

Hi Wadi

just use the old one theres a version for 1.3 branch aswell..

https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/branches/wicke
t-1.3.x/wicket-contrib-openlayers/

But the pick are yours to decide..


2009/1/29 Wadi Jalil Maluf 

> Thanks Jeremy, but it uses wicket 1,4 and I'm using 1.3.4, anyway I'm
> getting
> java.lang.ClassNotFoundException:
> com.vividsolutions.jts.geom.GeometryFactory
> exeptions so I'll just use GMAP integration instead,
> thanks!
>
> -Mensaje original-
> De: Jeremy Thomerson [mailto:jer...@wickettraining.com]
> Enviado el: jueves, 29 de enero de 2009 15:42
> Para: users@wicket.apache.org
> Asunto: Re: OpenLayer with google WMS
>
> There's an openlayer integration in wicketstuff (
> http://wicketstuff.org/maven/repository/org/wicketstuff/) with examples.
> I've never used it.  I believe it's a work of Nino.  I've looked at the
> examples, though.
>
> On Thu, Jan 29, 2009 at 11:19 AM, Wadi Jalil Maluf
> wrote:
>
> > Hi All!Does anyone knows how to use openlayer map control with google
map
> > like this example http://openlayers.org/dev/examples/google.html in
> > wicket?
> >
> > Thanks!
> >
> >
>
>
> --
> Jeremy Thomerson
> http://www.wickettraining.com
>
>
>
> __ Information from ESET NOD32 Antivirus, version of virus
> signature
> database 3805 (20090127) __
>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
>
>
>
> __ Information from ESET NOD32 Antivirus, version of virus
> signature
> database 3805 (20090127) __
>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>



__ Information from ESET NOD32 Antivirus, version of virus signature
database 3805 (20090127) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com

 

__ Information from ESET NOD32 Antivirus, version of virus signature
database 3805 (20090127) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
 


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



Re: RefreshingView/DataView with FormComponents and getForm

2009-01-29 Thread Igor Vaynberg
this is because you are using a refreshing view in combination with
form components.

in your case view items are removed from the refreshing view before
your filter runs, so you have a disconnect between

page->form->refresingview- | ->item->formcomponent

and so formcomponent.getform() cannot find the form.

what you should do is either set an item reuse strategy on the
refreshing view to prevent it from removing the view items or use a
form-friendly repeater - eg RepeatingView.

-igor

On Thu, Jan 29, 2009 at 11:50 AM, Ryan  wrote:
> I hacked together a quickstart and pasted the code here:
> http://pastebin.com/m3d0a54
>
> I didnt know if there was a policy on pasting code to the list..
>
> Thanks,
> Ryan
>
> On Thu, Jan 29, 2009 at 10:47:13AM -0800, Igor Vaynberg exclaimed:
>
>>show us your code
>>
>>-igor
>>
>>On Thu, Jan 29, 2009 at 10:36 AM, Ryan  wrote:
>>> I have a Panel with a DataView, inside populateItem I add TextFields to
>>> the Item (and the dataView is added to the Form).
>>>
>>> This panel contains a FeedbackPanel that should only show errors
>>> generated by fields added in populateItem. Unfortunately the Item object
>>> has its parent set to null. So calls to getParent on the TextFields
>>> looks like this:
>>>
>>> textField.getParent() -> item.getParent() -> null.
>>>
>>> This breaks the ContainerFeedbackMessageFilter and also breaks getForm()
>>> on the textfields (which throws a WicketRuntimeException because it
>>> cannot find the form).
>>>
>>>
>>> Is this the proper behavior? I was hoping item.getParent() would point
>>> to the dataView.
>>>
>>> Any ideas/pointers?
>>>
>>> Thanks!
>>> Ryan
>>>
>>> -
>>> 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
>
>

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



Re: Focus on component

2009-01-29 Thread Philipp Daumke

Hi Michael,

thanks for your help, but it doesn't work yet. My code:

TextField myField = new TextField("text");
myField.setOutputMarkupId(true);
myField.setOutputMarkupPlaceholderTag(true);
add(myField);

   private final class MyLink extends AjaxFallbackLink
   {
 
   public void onClick(AjaxRequestTarget target)

   {
   onShowForm(target);
   
target.appendJavascript("getElementById('"+myField.getMarkupId()+ 
"').focus()");

   }
   }

Is there something obviously wrong? Correct Javascript syntax and 
semantic? Is there an alternative "wicket" approach so that I don't have 
to use Javascript myself?

Thanks for help
Philipp


use target.(pre|append)Javascript if you want additional JS executed
before/after doing the wicket-ajax stuff

if you only want to set the focus (without any ajax involved), don't use
ajaxlink, use e.g. a simple WebmarkupContainer

hth,
michael


Philipp Daumke-2 wrote:
  

Dear all,

I try to show and focus on a text field when clicking on a link. The 
focus however doesn't work. I tried to follow an example in cwiki 
(http://cwiki.apache.org/WICKET/calling-javascript-function-on-wicket-components-onclick.html) 
but I somehow do something wrong. I tried to add some javascript 
attribute via AttributeAppender, but then I get a null pointer exception 
in onClick ("target is null"). When I comment that line out (so don't 
add the Attribute), everything works fine except that focus doesn't work.


Any help appreciated.
Thanks a lot
Philipp

Here's my code:

in a WebMarkupContainer:
link.add(new AttributeAppender("onClick", new 
Model("getElementById('"+textfield.getMarkupId()+ "').onFocus();"), ";"));


in my custom Link Class:
public void onClick(AjaxRequestTarget target)
{
showFormThatContainsTextField(target);
 }

void showFormThatContainsTextField(AjaxRequestTarget target)
{
// toggle the visibility
 ...
// redraw the add container.
target.addComponent(this);
}

--

Averbis GmbH
c/o Klinikum der Albert-Ludwigs-Universität
Stefan-Meier-Strasse 26
D-79104 Freiburg

Fon: +49 (0) 761 - 203 6707
Fax: +49 (0) 761 - 203 6800
E-Mail: dau...@averbis.de

Geschäftsführer: Dr. med. Philipp Daumke, Kornél Markó
Sitz der Gesellschaft: Freiburg i. Br.
AG Freiburg i. Br., HRB 701080


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







-
Michael Sparer
http://techblog.molindo.at
  



--

Averbis GmbH
c/o Klinikum der Albert-Ludwigs-Universität
Stefan-Meier-Strasse 26
D-79104 Freiburg

Fon: +49 (0) 761 - 203 6707
Fax: +49 (0) 761 - 203 6800
E-Mail: dau...@averbis.de

Geschäftsführer: Dr. med. Philipp Daumke, Kornél Markó
Sitz der Gesellschaft: Freiburg i. Br.
AG Freiburg i. Br., HRB 701080


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



UTF-8 bug in wicket? Or in Tomcat?

2009-01-29 Thread Philipp Daumke

Hi all,

when I enter German umlauts (e.g. "äöü") in a wicket text field it's 
converted to "äöü". Everything seems to be in "UTF-8". I already 
tried to apply a filter as described in 
http://wiki.apache.org/tomcat/Tomcat/UTF-8 without success. Any ideas?


Thanks for your help
Philipp
--

Averbis GmbH
c/o Klinikum der Albert-Ludwigs-Universität
Stefan-Meier-Strasse 26
D-79104 Freiburg

Fon: +49 (0) 761 - 203 6707
Fax: +49 (0) 761 - 203 6800
E-Mail: dau...@averbis.de

Geschäftsführer: Dr. med. Philipp Daumke, Kornél Markó
Sitz der Gesellschaft: Freiburg i. Br.
AG Freiburg i. Br., HRB 701080


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



Re: Focus on component

2009-01-29 Thread Matthew Hanlon
You can write a behaviour for it so it will be more reusable.
The following is based on
http://cwiki.apache.org/WICKET/request-focus-on-a-specific-form-component.html
and
works for both regular and ajax requests.

private final class MyLink extends AjaxFallbackLink
  {
  public void onClick(AjaxRequestTarget target)
  {
  onShowForm(target);
  myField.add(new FocusBehavior());
  }
  }

public class FocusBehavior extends AbstractBehavior
{
/**
 *
 */
private static final long serialVersionUID = 1L;

@Override
public void bind(Component component) {
super.bind(component);
component.setOutputMarkupId(true);
final Response response = component.getResponse();
if (response instanceof WebResponse && !((WebResponse)response).isAjax()) {
component.setComponentBorder(new IComponentBorder() {
/**
 *
 */
private static final long serialVersionUID = 1L;
 public void renderBefore(Component component) {
}
 public void renderAfter(Component component) {
final Response response = component.getResponse();
response.write(
"document.getElementById(\"" +
component.getMarkupId() +
"\").focus()");
}
});
}
this.component = component;
}
 private Component component;
 @Override
public void renderHead(IHeaderResponse response) {
if (response.getResponse() instanceof WebResponse &&
((WebResponse)response.getResponse()).isAjax()) {
response.renderOnLoadJavascript("document.getElementById('" +
component.getMarkupId() + "').focus()");
}

}

@Override
public boolean isTemporary() {
return true;
}
}

On Thu, Jan 29, 2009 at 4:07 PM, Philipp Daumke  wrote:

> Hi Michael,
>
> thanks for your help, but it doesn't work yet. My code:
>
> TextField myField = new TextField("text");
> myField.setOutputMarkupId(true);
> myField.setOutputMarkupPlaceholderTag(true);
> add(myField);
>
>   private final class MyLink extends AjaxFallbackLink
>   {
>   public void onClick(AjaxRequestTarget target)
>   {
>   onShowForm(target);
>   target.appendJavascript("getElementById('"+myField.getMarkupId()+
> "').focus()");
>   }
>   }
>
> Is there something obviously wrong? Correct Javascript syntax and semantic?
> Is there an alternative "wicket" approach so that I don't have to use
> Javascript myself?
> Thanks for help
> Philipp
>
>
>  use target.(pre|append)Javascript if you want additional JS executed
>> before/after doing the wicket-ajax stuff
>>
>> if you only want to set the focus (without any ajax involved), don't use
>> ajaxlink, use e.g. a simple WebmarkupContainer
>>
>> hth,
>> michael
>>
>>
>> Philipp Daumke-2 wrote:
>>
>>
>>> Dear all,
>>>
>>> I try to show and focus on a text field when clicking on a link. The
>>> focus however doesn't work. I tried to follow an example in cwiki (
>>> http://cwiki.apache.org/WICKET/calling-javascript-function-on-wicket-components-onclick.html)
>>> but I somehow do something wrong. I tried to add some javascript attribute
>>> via AttributeAppender, but then I get a null pointer exception in onClick
>>> ("target is null"). When I comment that line out (so don't add the
>>> Attribute), everything works fine except that focus doesn't work.
>>>
>>> Any help appreciated.
>>> Thanks a lot
>>> Philipp
>>>
>>> Here's my code:
>>>
>>> in a WebMarkupContainer:
>>> link.add(new AttributeAppender("onClick", new
>>> Model("getElementById('"+textfield.getMarkupId()+ "').onFocus();"), ";"));
>>>
>>> in my custom Link Class:
>>> public void onClick(AjaxRequestTarget target)
>>>{
>>>showFormThatContainsTextField(target);
>>>  }
>>>
>>> void showFormThatContainsTextField(AjaxRequestTarget target)
>>>{
>>>// toggle the visibility
>>> ...
>>>// redraw the add container.
>>>target.addComponent(this);
>>>}
>>>
>>> --
>>>
>>> Averbis GmbH
>>> c/o Klinikum der Albert-Ludwigs-Universität
>>> Stefan-Meier-Strasse 26
>>> D-79104 Freiburg
>>>
>>> Fon: +49 (0) 761 - 203 6707
>>> Fax: +49 (0) 761 - 203 6800
>>> E-Mail: dau...@averbis.de
>>>
>>> Geschäftsführer: Dr. med. Philipp Daumke, Kornél Markó
>>> Sitz der Gesellschaft: Freiburg i. Br.
>>> AG Freiburg i. Br., HRB 701080
>>>
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>>
>>>
>>>
>>>
>>
>>
>> -
>> Michael Sparer
>> http://techblog.molindo.at
>>
>>
>
>
> --
>
> Averbis GmbH
> c/o Klinikum der Albert-Ludwigs-Universität
> Stefan-Meier-Strasse 26
> D-79104 Freiburg
>
> Fon: +49 (0) 761 - 203 6707
> Fax: +49 (0) 761 - 203 6800
> E-Mail: dau...@averbis.de
>
> Geschäftsführer: Dr. med. Philipp Daumke, Kornél Markó
> Sitz der Gesellschaft: Freiburg i. Br.
> AG Freiburg i. Br., HRB 701080
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Matthew Rolli

Re: UTF-8 bug in wicket? Or in Tomcat?

2009-01-29 Thread Mathias P.W Nilsson

Do you save it to a database and then display the text? How do you present
it?
-- 
View this message in context: 
http://www.nabble.com/UTF-8-bug-in-wicket--Or-in-Tomcat--tp21738467p21738754.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: UTF-8 bug in wicket? Or in Tomcat?

2009-01-29 Thread Philipp Daumke

Hi Mathias,

'äöü' is actually already converted to 'äöü' when I add a breakpoint 
at the onSubmit method of my form (so right when I get the input of the 
text field from my model).


My whole eclipse is in UTF-8, Wicket writes UTF-8 to each HTML-Page, my 
firefox says UTF-8. What I think is that Wicket or Tomcat treats my 
UTF8-String äöü as an ISO-8859-1 String and converts it from iso to 
utf8, so into 'äöü'. When I copy 'äöü' into a tmp.txt file in 
unix-shell which is in UTF-8 and do an "iconv -futf8 -tlatin1 tmp.txt" 
on it, the output is 'äöü' again.


Any idea what to do?
All the best
Philipp

Do you save it to a database and then display the text? How do you present
it?
  



--

Averbis GmbH
c/o Klinikum der Albert-Ludwigs-Universität
Stefan-Meier-Strasse 26
D-79104 Freiburg

Fon: +49 (0) 761 - 203 6707
Fax: +49 (0) 761 - 203 6800
E-Mail: dau...@averbis.de

Geschäftsführer: Dr. med. Philipp Daumke, Kornél Markó
Sitz der Gesellschaft: Freiburg i. Br.
AG Freiburg i. Br., HRB 701080


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



How to unsubscribe

2009-01-29 Thread Jawad Kakar
Hi,
I have sent 3 emails to unsubscribe, but still I am getting emails. Wondering 
if someone can help me
Thanks
Jawad


--- On Thu, 1/29/09, Zhubin Salehi  wrote:

> From: Zhubin Salehi 
> Subject: Re: Is there a way to be notified when a tab in a TabbedPanel is 
> selected?
> To: users@wicket.apache.org
> Date: Thursday, January 29, 2009, 3:12 PM
> This code looks cool, thanks a lot!
> 
> 
> Erik van Oosten wrote:
> > 
> > How about this:
> > 
> > tabs.add(new PanelCachingTab(new AbstractTab(new
> > StringResourceModel("title.byMobinetId",
> > FindUserAccount.this, null)) {
> > 
> > private static final long serialVersionUID =
> 5564837747113048306L;
> > 
> > public Panel getPanel(String panelId) {
> > return new MobinetTab(panelId);
> > }
> > }) {
> > 
> > @Override
> > public Panel getPanel(final String
> panelId) {
> > 
> > // ... DO SOMETHING UPON TAB SELECTION
> ...
> > 
> > return super.getPanel(panelId);
> > }
> > 
> > });
> > 
> > This override getPanel from PanelCachingTab. But you
> could also 
> > implement your own ITab.
> > 
> > Regards,
> > Erik.
> > 
> 
> -- 
> View this message in context:
> http://www.nabble.com/Is-there-a-way-to-be-notified-when-a-tab-in-a-TabbedPanel-is-selected--tp21713724p21728759.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 to unsubscribe

2009-01-29 Thread Jeremy Thomerson
Have you tried sending a single, new message (not replying or forwarding)?
Also, make sure that your email comes from the address that is subscribed
(i.e., did you subscribe under an alias that forwards to your
j_ka...@yahoo.com address?

On Thu, Jan 29, 2009 at 6:21 PM, Jawad Kakar  wrote:

> Hi,
> I have sent 3 emails to unsubscribe, but still I am getting emails.
> Wondering if someone can help me
> Thanks
> Jawad
>
>
> --- On Thu, 1/29/09, Zhubin Salehi  wrote:
>
> > From: Zhubin Salehi 
> > Subject: Re: Is there a way to be notified when a tab in a TabbedPanel is
> selected?
> > To: users@wicket.apache.org
> > Date: Thursday, January 29, 2009, 3:12 PM
> > This code looks cool, thanks a lot!
> >
> >
> > Erik van Oosten wrote:
> > >
> > > How about this:
> > >
> > > tabs.add(new PanelCachingTab(new AbstractTab(new
> > > StringResourceModel("title.byMobinetId",
> > > FindUserAccount.this, null)) {
> > >
> > > private static final long serialVersionUID =
> > 5564837747113048306L;
> > >
> > > public Panel getPanel(String panelId) {
> > > return new MobinetTab(panelId);
> > > }
> > > }) {
> > >
> > > @Override
> > > public Panel getPanel(final String
> > panelId) {
> > >
> > > // ... DO SOMETHING UPON TAB SELECTION
> > ...
> > >
> > > return super.getPanel(panelId);
> > > }
> > >
> > > });
> > >
> > > This override getPanel from PanelCachingTab. But you
> > could also
> > > implement your own ITab.
> > >
> > > Regards,
> > > Erik.
> > >
> >
> > --
> > View this message in context:
> >
> http://www.nabble.com/Is-there-a-way-to-be-notified-when-a-tab-in-a-TabbedPanel-is-selected--tp21713724p21728759.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
>
>


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


Ajaxified Notification

2009-01-29 Thread PSkarthic

Hi
  I am karthic i am using wicket in project and its going well.

 I have scenerio like this 
Client will click a button
and the click event will request something but the requested
values will be from the other  server(webservices).
   My Question is the value from other server may come anytime from
1 secs to 1 mins so the thread will listen for the values to arrive . How to
notify this values to client side is it possible in wicket? The notification
should be ajax like that is the client page should not be refreshed

(Like automatic updation to clien when an event occur on server)

Anybody have any idea
please guide me

Thanks
Karthic
-- 
View this message in context: 
http://www.nabble.com/Ajaxified-Notification-tp21742197p21742197.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: UTF-8 bug in wicket? Or in Tomcat?

2009-01-29 Thread Marc Ende

Hi Philipp,

are your texts are stored in a database? Then you've got two more points 
where you can search:

The encoding of the table and the encoding of the connection.
Do you've got the same issues with the templates?

Marc

Philipp Daumke schrieb:

Hi Mathias,

'äöü' is actually already converted to 'äöü' when I add a 
breakpoint at the onSubmit method of my form (so right when I get the 
input of the text field from my model).


My whole eclipse is in UTF-8, Wicket writes UTF-8 to each HTML-Page, 
my firefox says UTF-8. What I think is that Wicket or Tomcat treats my 
UTF8-String äöü as an ISO-8859-1 String and converts it from iso to 
utf8, so into 'äöü'. When I copy 'äöü' into a tmp.txt file in 
unix-shell which is in UTF-8 and do an "iconv -futf8 -tlatin1 tmp.txt" 
on it, the output is 'äöü' again.


Any idea what to do?
All the best
Philipp
Do you save it to a database and then display the text? How do you 
present

it?
  






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



Increasing session size

2009-01-29 Thread Jürgen Lind

One more thing: just as a rule of thumb, what would be a reasonable
amount of data that gets added to the session for a single request?
20k? 100k?

Regards,

J.



Michael Sparer wrote:

I took a cursory glance over your code and saw

 item.add(new Link("update", new Model(auftrag))

this way the "auftrag" gets into your session, you should say
item.getModel() there instead of new Model(auftrag)

check your code if there is similar stuff in it - spotting those things
might be quite tedious, but you could e.g. temporarily remove the
"Serializable" from your model-classes and go spotting nonserializable
exceptions until they don't ocurr anymore. 


hope that helps a bit - and thanks for beating leverkusen in 2000 ;-)

regards,
Michael 



Jürgen Lind-2 wrote:

After some twiddling I found that the PagingNavigator seems to be the
culprit.
If I leave it out, the session grows only moderately, when I put it in,
the
domain objects end up in the session... Anyway here is the code:

public class AuftragUebersicht extends MasterLayout {

   @SpringBean
   private AuftragBA auftragBA;

   public AuftragUebersicht() {
 this.initComponents();
   }

   private void initComponents() {

 final AuftragDataView auftragDataView = new
AuftragDataView("resultList",
 new AuftragDataProvider(AuftragUebersicht.this.auftragBA), 10);

 Form form = new Form("searchForm") {

   public Form initComponents() {
 final TextField auftragsnummerField = new
TextField("auftragsnummer",
  new
Model(""));
 add(auftragsnummerField);

 Button searchButton = new Button("search") {
   public void onSubmit() {
 String auftragsnummer =
auftragsnummerField.getModelObjectAsString();

 AuftragDataProvider p = (AuftragDataProvider)
  auftragDataView.getDataProvider();
 p.setQuery(new AuftragUebersichtQuery(auftragsnummer));

 if (auftragDataView.getDataProvider().size() == 0) {
   AuftragUebersicht.this.info("No results found!");
 }
   }
 };
 add(searchButton);

 return this;
   }

 }.initComponents();

 WebMarkupContainer resultListContainer = new
WebMarkupContainer("resultListContainer") {
   public boolean isVisible() {
 return auftragDataView.getDataProvider().size() > 0;
   }
 };

 CheckGroup group = new CheckGroup("group", new
ArrayList());

 group.add(new CheckGroupSelector("groupselector"));

 group.add(auftragDataView);

 resultListContainer.add(new PagingNavigator("navigator",
auftragDataView));

 resultListContainer.add(group);

 form.add(resultListContainer);

 this.add(form);

   }
}

public class AuftragDataView extends DataView {

   public AuftragDataView(String id, IDataProvider dataProvider, int
itemsPerPage) {
 super(id, dataProvider, itemsPerPage);
   }

   @Override
   protected void populateItem(final Item item) {

 final PartnerAuftrag auftrag = (PartnerAuftrag)
item.getModelObject();
 item.add(new Label("auftragsnummer", auftrag.getAuftragsnummer()));
 ...

 item.add(new Link("update", new Model(auftrag)) {
   public void onClick() {
 AuftragBearbeiten page = new AuftragBearbeiten((PartnerAuftrag)
getModelObject());
 setResponsePage(page);
   }
 });

 item.add(new AttributeModifier("class", true, new
AbstractReadOnlyModel() {
   public Object getObject() {
 return (item.getIndex() % 2 == 1) ? "even" : "odd";
   }
 }));
   }

   @Override
   protected void onDetach() {
 super.onDetach();
   }
}

public class AuftragDataProvider implements IDataProvider {

   private AuftragBA  auftragBA;
   private AuftragUebersichtQuery query;

   private Collection result;

   public AuftragDataProvider(AuftragUebersichtQuery query, AuftragBA
auftragBA) {
 this.query = query;
 this.auftragBA = auftragBA;
   }

   public AuftragUebersichtQuery getQuery() {
 return this.query;
   }

   public void setQuery(AuftragUebersichtQuery query) {
 this.query = query;
 this.result = null;
   }

   public Iterator iterator(int first, int count) {
 if (this.result == null) {
   this.performQuery();
 }
 return new ArrayList(this.result).subList(first,
first + count).iterator();
   }

   public IModel model(final Object object) {
 return new DetachablePartnerAuftragModel((PartnerAuftrag) object,
this.auftragBA);
   }

   public int size() {
 if (this.result == null) {
   this.performQuery();
 }
 return this.result.size();
   }

   public void detach() {
 this.result = null;
   }

   private void performQuery() {
 ...
   }
}


public class DetachablePartnerAuftragModel extends LoadableDetachableModel
{

   private Long  id;
   private AuftragBA auftragBA;

   public DetachablePartnerAuftra

Re: Increasing session size

2009-01-29 Thread Igor Vaynberg
considering wicket only keeps last-accessed page in session your
session shouldnt just keep growing...

-igor

On Thu, Jan 29, 2009 at 11:20 PM, Jürgen Lind  wrote:
> One more thing: just as a rule of thumb, what would be a reasonable
> amount of data that gets added to the session for a single request?
> 20k? 100k?
>
> Regards,
>
> J.
>
>
>
> Michael Sparer wrote:
>>
>> I took a cursory glance over your code and saw
>>
>>  item.add(new Link("update", new Model(auftrag))
>>
>> this way the "auftrag" gets into your session, you should say
>> item.getModel() there instead of new Model(auftrag)
>>
>> check your code if there is similar stuff in it - spotting those things
>> might be quite tedious, but you could e.g. temporarily remove the
>> "Serializable" from your model-classes and go spotting nonserializable
>> exceptions until they don't ocurr anymore.
>> hope that helps a bit - and thanks for beating leverkusen in 2000 ;-)
>>
>> regards,
>> Michael
>>
>> Jürgen Lind-2 wrote:
>>>
>>> After some twiddling I found that the PagingNavigator seems to be the
>>> culprit.
>>> If I leave it out, the session grows only moderately, when I put it in,
>>> the
>>> domain objects end up in the session... Anyway here is the code:
>>>
>>> public class AuftragUebersicht extends MasterLayout {
>>>
>>>   @SpringBean
>>>   private AuftragBA auftragBA;
>>>
>>>   public AuftragUebersicht() {
>>> this.initComponents();
>>>   }
>>>
>>>   private void initComponents() {
>>>
>>> final AuftragDataView auftragDataView = new
>>> AuftragDataView("resultList",
>>> new AuftragDataProvider(AuftragUebersicht.this.auftragBA), 10);
>>>
>>> Form form = new Form("searchForm") {
>>>
>>>   public Form initComponents() {
>>> final TextField auftragsnummerField = new
>>> TextField("auftragsnummer",
>>>  new
>>> Model(""));
>>> add(auftragsnummerField);
>>>
>>> Button searchButton = new Button("search") {
>>>   public void onSubmit() {
>>> String auftragsnummer =
>>> auftragsnummerField.getModelObjectAsString();
>>>
>>> AuftragDataProvider p = (AuftragDataProvider)
>>>  auftragDataView.getDataProvider();
>>> p.setQuery(new AuftragUebersichtQuery(auftragsnummer));
>>>
>>> if (auftragDataView.getDataProvider().size() == 0) {
>>>   AuftragUebersicht.this.info("No results found!");
>>> }
>>>   }
>>> };
>>> add(searchButton);
>>>
>>> return this;
>>>   }
>>>
>>> }.initComponents();
>>>
>>> WebMarkupContainer resultListContainer = new
>>> WebMarkupContainer("resultListContainer") {
>>>   public boolean isVisible() {
>>> return auftragDataView.getDataProvider().size() > 0;
>>>   }
>>> };
>>>
>>> CheckGroup group = new CheckGroup("group", new
>>> ArrayList());
>>>
>>> group.add(new CheckGroupSelector("groupselector"));
>>>
>>> group.add(auftragDataView);
>>>
>>> resultListContainer.add(new PagingNavigator("navigator",
>>> auftragDataView));
>>>
>>> resultListContainer.add(group);
>>>
>>> form.add(resultListContainer);
>>>
>>> this.add(form);
>>>
>>>   }
>>> }
>>>
>>> public class AuftragDataView extends DataView {
>>>
>>>   public AuftragDataView(String id, IDataProvider dataProvider, int
>>> itemsPerPage) {
>>> super(id, dataProvider, itemsPerPage);
>>>   }
>>>
>>>   @Override
>>>   protected void populateItem(final Item item) {
>>>
>>> final PartnerAuftrag auftrag = (PartnerAuftrag)
>>> item.getModelObject();
>>> item.add(new Label("auftragsnummer", auftrag.getAuftragsnummer()));
>>> ...
>>>
>>> item.add(new Link("update", new Model(auftrag)) {
>>>   public void onClick() {
>>> AuftragBearbeiten page = new AuftragBearbeiten((PartnerAuftrag)
>>> getModelObject());
>>> setResponsePage(page);
>>>   }
>>> });
>>>
>>> item.add(new AttributeModifier("class", true, new
>>> AbstractReadOnlyModel() {
>>>   public Object getObject() {
>>> return (item.getIndex() % 2 == 1) ? "even" : "odd";
>>>   }
>>> }));
>>>   }
>>>
>>>   @Override
>>>   protected void onDetach() {
>>> super.onDetach();
>>>   }
>>> }
>>>
>>> public class AuftragDataProvider implements IDataProvider {
>>>
>>>   private AuftragBA  auftragBA;
>>>   private AuftragUebersichtQuery query;
>>>
>>>   private Collection result;
>>>
>>>   public AuftragDataProvider(AuftragUebersichtQuery query, AuftragBA
>>> auftragBA) {
>>> this.query = query;
>>> this.auftragBA = auftragBA;
>>>   }
>>>
>>>   public AuftragUebersichtQuery getQuery() {
>>> return this.query;
>>>   }
>>>
>>>   public void setQuery(AuftragUebersichtQuery query) {
>>> this.query = query;
>>> this.result = null;
>>>   }
>>>
>>>   public Iterator iterator(int first, int count) {
>>> if (this.result == null) {
>>>  

Re: deploy WicketServlet on Geronimo but 404?

2009-01-29 Thread Edwin Ansicodd

The SpringWebApplication is in org.apache.wicket.spring


-- 
View this message in context: 
http://www.nabble.com/deploy-WicketServlet-on-Geronimo-but-404--tp21732316p21742638.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: deploy WicketServlet on Geronimo but 404?

2009-01-29 Thread Edwin Ansicodd

The SpringWebApplication is in org.apache.wicket.spring


-- 
View this message in context: 
http://www.nabble.com/deploy-WicketServlet-on-Geronimo-but-404--tp21732316p21742640.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: deploy WicketServlet on Geronimo but 404?

2009-01-29 Thread Igor Vaynberg
do your logs show that the spring context has been initialized fine?

-igor

On Thu, Jan 29, 2009 at 11:37 PM, Edwin Ansicodd
 wrote:
>
> The SpringWebApplication is in org.apache.wicket.spring
>
>
> --
> View this message in context: 
> http://www.nabble.com/deploy-WicketServlet-on-Geronimo-but-404--tp21732316p21742640.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: UTF-8 bug in wicket? Or in Tomcat?

2009-01-29 Thread Jonas
Hi,

have you tried setting

getRequestCycleSettings().setResponseRequestEncoding("UTF-8");
getMarkupSettings().setDefaultMarkupEncoding("UTF-8");

in your Application#init

If you don't set the default markup encoding explicitly, the default
for it is the 'os provided encoding' (see:
IMarkupSettings#getDefaultMarkupEncoding)

cheers,
Jonas



On Fri, Jan 30, 2009 at 1:02 AM, Philipp Daumke  wrote:
> Hi Mathias,
>
> 'äöü' is actually already converted to 'äöü' when I add a breakpoint at
> the onSubmit method of my form (so right when I get the input of the text
> field from my model).
>
> My whole eclipse is in UTF-8, Wicket writes UTF-8 to each HTML-Page, my
> firefox says UTF-8. What I think is that Wicket or Tomcat treats my
> UTF8-String äöü as an ISO-8859-1 String and converts it from iso to utf8, so
> into 'äöü'. When I copy 'äöü' into a tmp.txt file in unix-shell which
> is in UTF-8 and do an "iconv -futf8 -tlatin1 tmp.txt" on it, the output is
> 'äöü' again.
>
> Any idea what to do?
> All the best
> Philipp
>>
>> Do you save it to a database and then display the text? How do you present
>> it?
>>
>
>
> --
>
> Averbis GmbH
> c/o Klinikum der Albert-Ludwigs-Universität
> Stefan-Meier-Strasse 26
> D-79104 Freiburg
>
> Fon: +49 (0) 761 - 203 6707
> Fax: +49 (0) 761 - 203 6800
> E-Mail: dau...@averbis.de
>
> Geschäftsführer: Dr. med. Philipp Daumke, Kornél Markó
> Sitz der Gesellschaft: Freiburg i. Br.
> AG Freiburg i. Br., HRB 701080
>
>
> -
> 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



FormComponentPanel and specifying tabindex for form input

2009-01-29 Thread Gianni Doe
I've got a custom date picker component that extends  
FormComponentPanel and I include it in my markup with.

[date picker]

The component uses a hidden form field to store an ISO formatted date  
value and a display field to show the localised full date.

It's the hidden field that is used as the component model.






I'd like to somehow be able to specify the tabindex attribute for the  
date display field in the page markup, so that this can be controlled  
by the page designer. I tried setting a tabindex attribute on the  
 with the intention of removing it and then setting it on the  
date field, but the attribute is immutable and can't be removed from  
the .


Any ideas?
Thanks
Gianni


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