Re: Tracking logged in users / SessionStore questions

2008-09-11 Thread behlma

Now another question has popped up. My bulletin board overview page, the one
displaying all currently active/guests users and forums is a (stateless)
BookmarkablePage. To be able to track the (guest) users however, I'm calling
getSession().bind() in the page's constructor.

The session gets bound the very first time I access the page (and I'm
displayed as a guest user). The url (www.myurl.com/forum) at this point
however has no notion of jsessionid whatsoever, so if I simply refresh the
page, a new session gets bound, now displaying two guests. Consequently, for
every refresh a new session is spawned.

Now I understand that this is the correct behaviour, but is there any way
around people being able to spawn thousands of sessions :) ?

-- 
View this message in context: 
http://www.nabble.com/Tracking-logged-in-users---SessionStore-questions-tp19273568p19450432.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Cannot create Spring Bean via Proxy in Wicket

2008-09-11 Thread cricdigs

This is a great thread! It saved my day. Since yesterday I was getting this
error and just couldn't figure out the reason. Of course it was the object
instead of the interface!

Thanks a bunch!


Sergey Podatelev wrote:
> 
> On Jan 14, 2008 1:13 AM, Konstantin Ignatyev <[EMAIL PROTECTED]> wrote:
> 
> You have to use interface and cast to the interface
> 
> 
> Too bad I've forgotten about the whole injection idea of using interfaces
> instead of their specific implementations.
> Surely, your suggestion did the trick.
> 
> Thanks a bunch.
> 
> -- 
> sp
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Cannot-create-Spring-Bean-via-Proxy-in-Wicket-tp14791465p19450157.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Newbie Question: Dynamically Building Form Elements

2008-09-11 Thread Jonathan Locke


also see wicket-rad if appropriate


igor.vaynberg wrote:
> 
> have a look see here for an example
> 
> https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-crud/
> 
> -igor
> 
> On Thu, Sep 11, 2008 at 6:29 PM, walnutmon <[EMAIL PROTECTED]>
> wrote:
>>
>> Very new to Wicket, I've been reading about it for a few days, I'm really
>> excited now that I'm using it.
>>
>> The stuff I do requires that you be able to create dynamic form
>> elements...
>> as an example, how would I be able to create a form that has a radio
>> button
>> input, where the amount of radio buttons depends on a call to some other
>> object?
>>
>> A quick example...
>>
>> 
>>
>> 
>>
>> This will be an area that could have any number of radio button options
>> based on a call to some psuedo function 'List
>> getRadioButtonSelectionOptions();'
>>
>> I am unable to just call 'add(optionIndex, listOfOptions.getNext());'
>> because there is nothing mapped to it in HTML, however, I can't put it in
>> HTML, because I don't know how many options there will be.
>>
>> Thanks!
>> Justin
>> --
>> View this message in context:
>> http://www.nabble.com/Newbie-Question%3A--Dynamically-Building-Form-Elements-tp19447802p19447802.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Newbie-Question%3A--Dynamically-Building-Form-Elements-tp19447802p19450053.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: FeedbackPanel and page refresh (f5) after submit

2008-09-11 Thread Igor Vaynberg
here is how it works:

if the message is reported against session it is held until rendered,
if the message is reported against a component it is held only during
the request in which it has been reported. wicket is smart enough to
look at the render strategy and not clear messages during the redirect
between post and get, so i am not sure why this is not working for you
as it is working fine in the forminput wicket example.

if you want to change this behavior you can override
session.cleanupFeedbackMessages() and implement whatever behavior you
wish.
by the way, this is all very apparent from the code. i suggest you
learn your ide and useful ide tools such as call hieararchy,
ctrl+click to follow, etc.

-igor

On Thu, Sep 11, 2008 at 8:43 PM, Timo Rantalaiho <[EMAIL PROTECTED]> wrote:
> On Thu, 11 Sep 2008, Ajayi Yinka wrote:
>> > Thomas Lutz wrote:
>> > >
>> > > I've a form with some validation added, nothing special (Required, Email
>> > > check). When I submit the form I get the validation messages in the
>> > > FeedbackPanel as expected, but :-), hitting f5 for a page refresh after
>> > > the submit removes them (don't ask why refresh after submit... users of
>> > > my webapp do stuff like this :-)).
>> > > The form is not submitted, only redisplayed, but the validation messages
>> > > are missing.
>> > > Is there something I can do about this ?
>
> I think that what happens is that
>
> a) the normal POST
>
> b) the redirect to GET after POST [1]
>
> c) feedback messages are cleared from session on detaching
>   the request [2]
>
> d) refresh does the GET again, and the flash feedback
>   messages cannot be displayed, because they are already
>   cleared from the session
>
> The solution is left as an exercise for the reader ;)
> Because now I must get going...
>
> Best wishes,
> Timo
>
>
> [1] http://en.wikipedia.org/wiki/Post/Redirect/Get
> [2]
> http://fisheye6.atlassian.com/browse/wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/RequestCycle.java?r=645227#l1058
>
> --
> Timo Rantalaiho
> Reaktor Innovations Oyhttp://www.ri.fi/ >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: FeedbackPanel and page refresh (f5) after submit

2008-09-11 Thread Timo Rantalaiho
On Thu, 11 Sep 2008, Ajayi Yinka wrote:
> > Thomas Lutz wrote:
> > >
> > > I've a form with some validation added, nothing special (Required, Email
> > > check). When I submit the form I get the validation messages in the
> > > FeedbackPanel as expected, but :-), hitting f5 for a page refresh after
> > > the submit removes them (don't ask why refresh after submit... users of
> > > my webapp do stuff like this :-)).
> > > The form is not submitted, only redisplayed, but the validation messages
> > > are missing.
> > > Is there something I can do about this ?

I think that what happens is that

a) the normal POST

b) the redirect to GET after POST [1]

c) feedback messages are cleared from session on detaching 
   the request [2]

d) refresh does the GET again, and the flash feedback
   messages cannot be displayed, because they are already 
   cleared from the session

The solution is left as an exercise for the reader ;) 
Because now I must get going...

Best wishes,
Timo


[1] http://en.wikipedia.org/wiki/Post/Redirect/Get 
[2]
http://fisheye6.atlassian.com/browse/wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/RequestCycle.java?r=645227#l1058

-- 
Timo Rantalaiho   
Reaktor Innovations Oyhttp://www.ri.fi/ >

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: WicketTester feature request

2008-09-11 Thread Timo Rantalaiho
On Thu, 11 Sep 2008, Jan Stette wrote:
> Absolutely, I see what you're saying.  Part of the problem here may be that
> on the project I'm working on, WicketTester is indeed used to do
> integration/functional tests.  I'm not sure why this was done in the first
> place, but it does seem to work - most of the time!  I guess the API that
> WicketTester provides for performing actions like clicking links, submitting
> forms etc. was convenient to drive from the system test harness, possibly
> simpler than actually driving a "real" web front end.
> 
> Anyway, if this really is an abuse of WicketTester that you have no
> intention of supporting, then please say so!

Well, I don't know if it's so black and white, but the
reality is that there are a lot of bugs and feature requests
in Wicket compared to the development effort available, so
prioritisation happens inevitably. In theory, it sounds like
a good idea to support RequestCycle lifecycle methods, and
it would make sense for WicketTester to mimic the real
behaviour as close as possible, but in practice it might
require some heavy debugging and coding that don't come out
of nowhere :)

And -- without meaning to put you off -- there's another
important point to consider, which is the backwards
compatibility of the changes. Making changes deep in 1.3 or
1.4 WicketTester code at the moment might produce unwanted
effects in existing projects making heavy use of
WicketTester and having worked around its quirks. This can
happen even with legitimate bug fixes, and is sometimes
necessary. But sometimes you just need to leave bugs in,
because fixing them would break too much existing code.

However, in Wicket 1.5 the backwards compatibility
requirement can be relaxed somewhat, so in there you have
more chances of getting that kind of fixes in. And
meanwhile, if the root cause of the problem is found, it's
possible that there are viable workarounds for 1.3 / 1.4 as
well.

If you can provide a good patch to help resolve your
problem, the chances of getting it fixed increase
dramatically ;) Though the backwards compatibility point
above remains.

> Still, there seems to be one case where this happens with just the basic
> WicketTester functionality.  First, creating a WicketTester:
> 
> XWicketTester.createRequestCycle() line: 436

What is this line? Are you explicitly creating the 
RequestCycle? 

> Hope that makes sense at all...

Sure, it is just a bit difficult to follow in this form :) 
Maybe you could create a working code example, such as a 
quickstart or even a JUnit test as a patch against the 
Wicket codebase? Then it would be easier to investigate 
further.

Best wishes,
Timo

-- 
Timo Rantalaiho   
Reaktor Innovations Oyhttp://www.ri.fi/ >

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Newbie Question: Dynamically Building Form Elements

2008-09-11 Thread Igor Vaynberg
have a look see here for an example

https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-crud/

-igor

On Thu, Sep 11, 2008 at 6:29 PM, walnutmon <[EMAIL PROTECTED]> wrote:
>
> Very new to Wicket, I've been reading about it for a few days, I'm really
> excited now that I'm using it.
>
> The stuff I do requires that you be able to create dynamic form elements...
> as an example, how would I be able to create a form that has a radio button
> input, where the amount of radio buttons depends on a call to some other
> object?
>
> A quick example...
>
> 
>
> 
>
> This will be an area that could have any number of radio button options
> based on a call to some psuedo function 'List
> getRadioButtonSelectionOptions();'
>
> I am unable to just call 'add(optionIndex, listOfOptions.getNext());'
> because there is nothing mapped to it in HTML, however, I can't put it in
> HTML, because I don't know how many options there will be.
>
> Thanks!
> Justin
> --
> View this message in context: 
> http://www.nabble.com/Newbie-Question%3A--Dynamically-Building-Form-Elements-tp19447802p19447802.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wicket + jboss 4.0.5 + slf4j-log4j12 markup refresh problem issue

2008-09-11 Thread jWeekend

Lukasz,

I agree that this is an irritating constraint JBoss, and others,
inadvertently force on their users and it's a shame to lose time fiddling
around with this stuff - but if that's your stack, then I guess you need a
workaround, eg try Wicket 1.2.x (not what I would recommend).
 
Have you asked the JBoss community if they have any solutions to this
reliance on legacy libraries and inevitable conflicts? I would be surprised
if you were the first to come across this type of issue as many JBoss users
develop/deploy using the up to date versions of other components of their
preferred stacks.

Also note that 
http://java.dzone.com/articles/whats-new-seam-21-an-interview Seam 2.1 has
full support for Wicket  (as a civilised option for the view layer), so they
may have solved this problem for you already.

Regards - Cemal
http://www.jWeekend.co.uk http://jWeekend.co.uk 






Lukasz Kucharski wrote:
> 
>> Have you looked at this:
>>
>> http://wiki.jboss.org/wiki/ClassLoadingConfiguration
>>
>> There's a section in there about how to "isolate" your application
>> from JBoss' stuff.
>>
> 
> Thanks for the link. I'll try those solutions tomorrow when I get back
> to work. I guess this is similar to what we used to do with WLS 8.1
> and its  configuration tag in web.xml. I must
> say I've always been bit sceptic about messing with standard class
> loading order in app servers and containers. I must say, I'm surprised
> Wicket will not work out of the box in such a popular environment. I
> did not expect to encounter such problems during evaluation stage.
> 
> -- 
> Pozdrawiam
> 
> Lukasz Kucharski
> [EMAIL PROTECTED]
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Wicket-%2B-jboss-4.0.5-%2B-slf4j-log4j12-markup-refresh-problem-issue-tp19439480p19448042.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Newbie Question: Dynamically Building Form Elements

2008-09-11 Thread James Carman
Take a look at ListView.

On Thu, Sep 11, 2008 at 9:29 PM, walnutmon <[EMAIL PROTECTED]> wrote:
>
> Very new to Wicket, I've been reading about it for a few days, I'm really
> excited now that I'm using it.
>
> The stuff I do requires that you be able to create dynamic form elements...
> as an example, how would I be able to create a form that has a radio button
> input, where the amount of radio buttons depends on a call to some other
> object?
>
> A quick example...
>
> 
>
> 
>
> This will be an area that could have any number of radio button options
> based on a call to some psuedo function 'List
> getRadioButtonSelectionOptions();'
>
> I am unable to just call 'add(optionIndex, listOfOptions.getNext());'
> because there is nothing mapped to it in HTML, however, I can't put it in
> HTML, because I don't know how many options there will be.
>
> Thanks!
> Justin
> --
> View this message in context: 
> http://www.nabble.com/Newbie-Question%3A--Dynamically-Building-Form-Elements-tp19447802p19447802.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Newbie Question: Dynamically Building Form Elements

2008-09-11 Thread walnutmon

Very new to Wicket, I've been reading about it for a few days, I'm really
excited now that I'm using it.  

The stuff I do requires that you be able to create dynamic form elements...
as an example, how would I be able to create a form that has a radio button
input, where the amount of radio buttons depends on a call to some other
object?

A quick example...





This will be an area that could have any number of radio button options
based on a call to some psuedo function 'List
getRadioButtonSelectionOptions();'

I am unable to just call 'add(optionIndex, listOfOptions.getNext());'
because there is nothing mapped to it in HTML, however, I can't put it in
HTML, because I don't know how many options there will be.

Thanks!
Justin
-- 
View this message in context: 
http://www.nabble.com/Newbie-Question%3A--Dynamically-Building-Form-Elements-tp19447802p19447802.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wicket + jboss 4.0.5 + slf4j-log4j12 markup refresh problem issue

2008-09-11 Thread Igor Vaynberg
On Thu, Sep 11, 2008 at 11:22 AM, Lukasz Kucharski <[EMAIL PROTECTED]> wrote:
> I must say, I'm surprised
> Wicket will not work out of the box in such a popular environment. I
> did not expect to encounter such problems during evaluation stage.

why does such a popular environment force outdated dependencies onto its users?

-igor


>
> --
> Pozdrawiam
>
> Lukasz Kucharski
> [EMAIL PROTECTED]
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wicket + jboss 4.0.5 + slf4j-log4j12 markup refresh problem issue

2008-09-11 Thread James Carman
By the way, I wouldn't fault Wicket too much when it comes to the
JBoss/Log4j issue.  Many others have had problems and it has nothing
to do with Wicket itself.

http://www.theserverside.com/discussions/thread.tss?thread_id=29870

http://www.theserverside.com/discussions/thread.tss?thread_id=34146

http://www.techienuggets.com/Detail?tx=22

http://raibledesigns.com/rd/entry/fun_with_log4j_and_jboss


On Thu, Sep 11, 2008 at 7:13 PM, James Carman
<[EMAIL PROTECTED]> wrote:
> If you're just evaluating, try creating a "quickstart"
> (http://wicket.apache.org/quickstart.html) and just use the embedded
> Jetty server (mvn jetty:run or run the Start class in your project) to
> check things out.  It works quite well.
>
> On Thu, Sep 11, 2008 at 2:22 PM, Lukasz Kucharski <[EMAIL PROTECTED]> wrote:
>>> Have you looked at this:
>>>
>>> http://wiki.jboss.org/wiki/ClassLoadingConfiguration
>>>
>>> There's a section in there about how to "isolate" your application
>>> from JBoss' stuff.
>>>
>>
>> Thanks for the link. I'll try those solutions tomorrow when I get back
>> to work. I guess this is similar to what we used to do with WLS 8.1
>> and its  configuration tag in web.xml. I must
>> say I've always been bit sceptic about messing with standard class
>> loading order in app servers and containers. I must say, I'm surprised
>> Wicket will not work out of the box in such a popular environment. I
>> did not expect to encounter such problems during evaluation stage.
>>
>> --
>> Pozdrawiam
>>
>> Lukasz Kucharski
>> [EMAIL PROTECTED]
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wicket + jboss 4.0.5 + slf4j-log4j12 markup refresh problem issue

2008-09-11 Thread James Carman
If you're just evaluating, try creating a "quickstart"
(http://wicket.apache.org/quickstart.html) and just use the embedded
Jetty server (mvn jetty:run or run the Start class in your project) to
check things out.  It works quite well.

On Thu, Sep 11, 2008 at 2:22 PM, Lukasz Kucharski <[EMAIL PROTECTED]> wrote:
>> Have you looked at this:
>>
>> http://wiki.jboss.org/wiki/ClassLoadingConfiguration
>>
>> There's a section in there about how to "isolate" your application
>> from JBoss' stuff.
>>
>
> Thanks for the link. I'll try those solutions tomorrow when I get back
> to work. I guess this is similar to what we used to do with WLS 8.1
> and its  configuration tag in web.xml. I must
> say I've always been bit sceptic about messing with standard class
> loading order in app servers and containers. I must say, I'm surprised
> Wicket will not work out of the box in such a popular environment. I
> did not expect to encounter such problems during evaluation stage.
>
> --
> Pozdrawiam
>
> Lukasz Kucharski
> [EMAIL PROTECTED]
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: check if FeedbackPanel has error messages

2008-09-11 Thread Igor Vaynberg
you can put the code to clear in form.onerror()

-igor

On Thu, Sep 11, 2008 at 2:05 PM, newbieabc <[EMAIL PROTECTED]> wrote:
>
> Hi, I'm new to wicket framework.
> I have a form that performs a mathematical calculation with the user input
> and then outputs the result.
> I have added a couple of basic validations to the input fields, like
> numbervalidator, and required field etc.
> And also have a feedbackpanel to display the error messages, if validation
> fails.
>
> I would like to reset some fields if the feedbackpanel has messages, but
> can't find a way to do this.
> I've tried using the "anyMessage()" method, but it hasn't worked.
>
> I guess I'm not sure where to place this method either, since the form
> onSubmit won't get called if the validation fails.
>
> Any help would be great.
>
>
>
>
> --
> View this message in context: 
> http://www.nabble.com/check-if-FeedbackPanel-has-error-messages-tp19444744p19444744.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: check if FeedbackPanel has error messages

2008-09-11 Thread Ritesh Trivedi

In general, here are the things you can do before you seek out for help - not
necessarily in this order

1. Best thing to do it to look at wicket sources and its Javadocs. Look at
FeedbackMessages.java and Session.java, IFeedbackMessageFilter.java,
ContainerFeedbackMessageFilter, ComponentFeedbackMessageFilter etc. 

In general, in FF when you open javadocs, look for FeedbackFilter or any
other relevant keyword and look at all the classes that match, that will
give you overall picture.

2. Check wiki pages for relevant stuff (wicket reference docs has some good
docs)

3. If you have access to Wicket in action - check there

4. Search for relevant postings on this forum ( for this particular one
there are plenty of messages)


newbieabc wrote:
> 
> Hi, I'm new to wicket framework.
> I have a form that performs a mathematical calculation with the user input
> and then outputs the result.
> I have added a couple of basic validations to the input fields, like
> numbervalidator, and required field etc.
> And also have a feedbackpanel to display the error messages, if validation
> fails.
> 
> I would like to reset some fields if the feedbackpanel has messages, but
> can't find a way to do this.
> I've tried using the "anyMessage()" method, but it hasn't worked.
> 
> I guess I'm not sure where to place this method either, since the form
> onSubmit won't get called if the validation fails.
> 
> Any help would be great.
> 
> 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/check-if-FeedbackPanel-has-error-messages-tp19444744p19445598.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: ajax & dropdowns

2008-09-11 Thread Scott Swank
This is apparently an IE6 bug, in that inserting an image in the dom
above the select screws up the tabindex/focus in some way.  If I have
the span/image already in the dom and I just toggle display:block vs.
display:hidden then things work.

Is there any way that I populate the  tag of the wicket ajax
response so that I can use dhtml to toggle my display?

Thank you!

Scott

On Wed, Sep 10, 2008 at 5:57 PM, Scott Swank <[EMAIL PROTECTED]> wrote:
> Matej,
>
> I duplicated this scenario in a simple Wicket page and I do not see
> the problem, so this seems to be the result of some other interaction
> rather than a Wicket javascript bug.  I will post back once I have a
> better sense of the issue.
>
> Thank you,
> Scott
 I am seeing a focus issue when an
 AjaxFormComponentUpdatingBehavior("onblur") is fired from a form
 component and the next form component is a drop down.  When I then tab
 out of the drop down I go to the 1st item on the page rather than the
 next item on the form.

 This only occurs in IE6, and only if an element prior to the dropdown
 is updated.  Here are the ajax logs from IE6 and Firefox3.  I suspect
 that this behavior is related to the fact that I see details such as
 the following for FF3, but not for IE6.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



check if FeedbackPanel has error messages

2008-09-11 Thread newbieabc

Hi, I'm new to wicket framework.
I have a form that performs a mathematical calculation with the user input
and then outputs the result.
I have added a couple of basic validations to the input fields, like
numbervalidator, and required field etc.
And also have a feedbackpanel to display the error messages, if validation
fails.

I would like to reset some fields if the feedbackpanel has messages, but
can't find a way to do this.
I've tried using the "anyMessage()" method, but it hasn't worked.

I guess I'm not sure where to place this method either, since the form
onSubmit won't get called if the validation fails.

Any help would be great.




-- 
View this message in context: 
http://www.nabble.com/check-if-FeedbackPanel-has-error-messages-tp19444744p19444744.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Form Constructor is not invoked

2008-09-11 Thread Johan Compagner
When the link is clicked you are going to the page with the form that
is already created. So no construction is being done at that time.

If you want to control visibility of some components depending on data
override the isVisible() method of that component.

On 9/11/08, zaheers <[EMAIL PROTECTED]> wrote:
>
> Appreciate your help with this issue.
>
> Our application has a HomePage called PetStorepage which adds different
> Panels as links. When the Profile Panel link is clicked the ProfileForm
> constructor should be invoked. But I see that the ProfileForm constructor is
> invoked only the first time the PetStorePage is called. Subsequent clicks on
> the ProfilePanel link from within the PetStorePage do not invoke the
> ProfileForm constructor although the page gets rendered.
>
> Due to this the logic to enable or disable a component if some variable is
> set in session is not getting executed. How to resolve this ?.
>
>
> http://www.nabble.com/file/p19441401/ProfilePanel.txt ProfilePanel.txt
> http://www.nabble.com/file/p19441401/PetStorePage.txt PetStorePage.txt
> http://www.nabble.com/file/p19441401/SwitchingLink.txt SwitchingLink.txt
> --
> View this message in context:
> http://www.nabble.com/Form-Constructor-is-not-invoked-tp19441401p19441401.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Form Constructor is not invoked

2008-09-11 Thread zaheers

No, because we're trying to make the form automatically refresh when the
panel's page is refreshed, by using a dynamic model.  Is this something that
would not be possible with forms?


igor.vaynberg wrote:
> 
> when the link is clicked are you calling new ProfileForm() ?
> 

-- 
View this message in context: 
http://www.nabble.com/Form-Constructor-is-not-invoked-tp19441401p19441811.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Form Constructor is not invoked

2008-09-11 Thread Igor Vaynberg
when the link is clicked are you calling new ProfileForm() ?

-igor

On Thu, Sep 11, 2008 at 11:32 AM, zaheers <[EMAIL PROTECTED]> wrote:
>
> Appreciate your help with this issue.
>
> Our application has a HomePage called PetStorepage which adds different
> Panels as links. When the Profile Panel link is clicked the ProfileForm
> constructor should be invoked. But I see that the ProfileForm constructor is
> invoked only the first time the PetStorePage is called. Subsequent clicks on
> the ProfilePanel link from within the PetStorePage do not invoke the
> ProfileForm constructor although the page gets rendered.
>
> Due to this the logic to enable or disable a component if some variable is
> set in session is not getting executed. How to resolve this ?.
>
>
> http://www.nabble.com/file/p19441401/ProfilePanel.txt ProfilePanel.txt
> http://www.nabble.com/file/p19441401/PetStorePage.txt PetStorePage.txt
> http://www.nabble.com/file/p19441401/SwitchingLink.txt SwitchingLink.txt
> --
> View this message in context: 
> http://www.nabble.com/Form-Constructor-is-not-invoked-tp19441401p19441401.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Wicket 1.4 m3 StatelessForm

2008-09-11 Thread FakeBoy

Hi everyone,
I try to work with StatelessForm, but I have strange problem. When I fill in
form fields first time everything works good. But If I have some validation
in some field (in my example field: first name is required) and if the
walidation failed, and i try to click submit button some strange character
(;,:) appear in form fields and it is not possible to submit form. I thing
that problem is in URL, because it looks strange and i can see a lot of
duplicated values for the same field. I discovered ,  if I didnt call super
constructor with page parameters it works fine. (bu there are other problems
with page parameters)

public StatelessFormPage(PageParameters pageParameters) {
//PROBLEM - when I delete this everything works but if not it 
works
strange
super(pageParameters);

//FEEDBACK PANEL
FeedbackPanel feedbackPanel = new 
FeedbackPanel("feedbackPanel");
add(feedbackPanel);

//STATELESS FORM
StatelessForm form = new StatelessForm("form");
add(form);

//FORMS FIELDS
form.add(new TextField("firstName", new
PropertyModel(this, "firstName")).setRequired(true));
form.add(new TextField("lastName", new 
PropertyModel(this,
"lastName")));

//SUBMIT BUTTON
Button submit = new Button("submit") {
@Override
public void onSubmit() {
System.out.println("Button:onSubmit()");
System.out.println("First name: " + 
firstName);
System.out.println("Last name: " + 
lastName);
}
};
form.add(submit);
}


Wicket version: 1.4 m3 
Source code: 
java ->   http://www.nabble.com/file/p19441542/StatelessFormPage.java
StatelessFormPage.java   
html ->   http://www.nabble.com/file/p19441542/StatelessFormPage.html
StatelessFormPage.html  

Thanks a lot, Dave
-- 
View this message in context: 
http://www.nabble.com/Wicket-1.4-m3-StatelessForm-tp19441542p19441542.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Form Constructor is not invoked

2008-09-11 Thread zaheers

Appreciate your help with this issue. 

Our application has a HomePage called PetStorepage which adds different
Panels as links. When the Profile Panel link is clicked the ProfileForm
constructor should be invoked. But I see that the ProfileForm constructor is
invoked only the first time the PetStorePage is called. Subsequent clicks on
the ProfilePanel link from within the PetStorePage do not invoke the
ProfileForm constructor although the page gets rendered. 

Due to this the logic to enable or disable a component if some variable is
set in session is not getting executed. How to resolve this ?.


http://www.nabble.com/file/p19441401/ProfilePanel.txt ProfilePanel.txt 
http://www.nabble.com/file/p19441401/PetStorePage.txt PetStorePage.txt 
http://www.nabble.com/file/p19441401/SwitchingLink.txt SwitchingLink.txt 
-- 
View this message in context: 
http://www.nabble.com/Form-Constructor-is-not-invoked-tp19441401p19441401.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wicket + jboss 4.0.5 + slf4j-log4j12 markup refresh problem issue

2008-09-11 Thread Lukasz Kucharski
> Have you looked at this:
>
> http://wiki.jboss.org/wiki/ClassLoadingConfiguration
>
> There's a section in there about how to "isolate" your application
> from JBoss' stuff.
>

Thanks for the link. I'll try those solutions tomorrow when I get back
to work. I guess this is similar to what we used to do with WLS 8.1
and its  configuration tag in web.xml. I must
say I've always been bit sceptic about messing with standard class
loading order in app servers and containers. I must say, I'm surprised
Wicket will not work out of the box in such a popular environment. I
did not expect to encounter such problems during evaluation stage.

-- 
Pozdrawiam

Lukasz Kucharski
[EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Embedding Wicket into an existing web application

2008-09-11 Thread Philippe Marschall
Hi

I'd like to integrate Wicket into an existing web application. That
means a part of the web page should be done Wicket. Similar to a
portlet, except that I don't use JSR-186.

The application is structured in a chain of servlet filters. Ideally I'd
able to split the callback processing in a different filter than the
rendering. This way I can be sure that the response is not yet committed
and I can do a redirect in callbacks if I feel like it.

My envisioned setup looks something like this:

- ... other filters ...
- MyWicketCallbackFilter
 * figure out the application from the request
 * process callbacks
  * if redirect then redirect and stop
  * else delegate to next filter
- ... other filters ...
- ... rendering starts here ...
- MyWicketRenderingFilter
 * let application from above render
 * Maybe also add headers
 * delegate to next filter
- ... maybe some more rendering ...

Ideally I'd also be able to configure the URL generation of Wicket. That
means mostly prefixes for the path.

Does this make sense? Is this feasible? Do you have any pointers for me?

Cheers
Philippe

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wicket + jboss 4.0.5 + slf4j-log4j12 markup refresh problem issue

2008-09-11 Thread James Carman
Have you looked at this:

http://wiki.jboss.org/wiki/ClassLoadingConfiguration

There's a section in there about how to "isolate" your application
from JBoss' stuff.

On Thu, Sep 11, 2008 at 12:55 PM, Lukasz Kucharski <[EMAIL PROTECTED]> wrote:
> Hi group
>
> Did anyone use wicket witch such configuration - i know this may sound
> silly but  I'm having serious issues with slf4j binding for log4j.
> Jboss internally uses very old implementation of log4j for which i
> guess no slf4j binding exists (pre 1.2.x versions i guess).
>
> I run wicket application successfully and log4j logging is working but
> my wicket markup does not refresh, ever! This is because when
> refreshing worker thread is starting it generates this error:
>
> 2008-09-11 15:46:04,781 ERROR [] thread.Task  - Task
> ModificationWatcher terminated
> java.lang.NoSuchMethodError: org.apache.log4j.Logger.isTraceEnabled()Z
>at 
> org.slf4j.impl.Log4jLoggerAdapter.isTraceEnabled(Log4jLoggerAdapter.java:81)
>at org.apache.wicket.util.thread.Task$1.run(Task.java:107)
>at java.lang.Thread.run(Thread.java:619)
>
>
> which makes it unusable - my markup does not get refreshed. This is
> serious concern for us. Please help.
>
> Regards
> Lukasz
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Wicket + jboss 4.0.5 + slf4j-log4j12 markup refresh problem issue

2008-09-11 Thread Lukasz Kucharski
Hi group

Did anyone use wicket witch such configuration - i know this may sound
silly but  I'm having serious issues with slf4j binding for log4j.
Jboss internally uses very old implementation of log4j for which i
guess no slf4j binding exists (pre 1.2.x versions i guess).

I run wicket application successfully and log4j logging is working but
my wicket markup does not refresh, ever! This is because when
refreshing worker thread is starting it generates this error:

2008-09-11 15:46:04,781 ERROR [] thread.Task  - Task
ModificationWatcher terminated
java.lang.NoSuchMethodError: org.apache.log4j.Logger.isTraceEnabled()Z
at 
org.slf4j.impl.Log4jLoggerAdapter.isTraceEnabled(Log4jLoggerAdapter.java:81)
at org.apache.wicket.util.thread.Task$1.run(Task.java:107)
at java.lang.Thread.run(Thread.java:619)


which makes it unusable - my markup does not get refreshed. This is
serious concern for us. Please help.

Regards
Lukasz

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Form values lost in combination of Forms plus ModalWindow

2008-09-11 Thread German Morales
Hi again,

jira issue added:
   https://issues.apache.org/jira/browse/WICKET-1826

I've attached a quickstart project which shows my problem, has detailed
explanation, and also proposes 2 solutions (you must uncomment some code to
see it working). Of course, the solutions work for my particular case, but
as you told me, it is not the way it is supposed to be.

Meanwhile (i guess it can take a while until someone looks into it), could
you at least tell me if there could be any side effect in overriding
isInputNullable for CheckBox, DropDownChoice, and so on? (TextField already
does it).

Thanks again,

German


2008/9/10 Matej Knopp <[EMAIL PROTECTED]>

> On Wed, Sep 10, 2008 at 10:49 PM, German Morales
> <[EMAIL PROTECTED]> wrote:
> > I don't see any div inside span in my stuff (we have suffered problems
> with
> > this long ago, and we are more careful lately).
> >
> > Besides that, is it ok that the ModalWindow creates its own div at body
> > level? Isn't that the reason of my problem?
> That is intentional. I don't think that should cause you the problems.
>
> -Matej
> >
> > German
> >
> > 2008/9/10 Matej Knopp <[EMAIL PROTECTED]>
> >
> >> Check if your DOM hierarchy is valid, e.g. if you don't have any 
> >> tag inside  tags.
> >>
> >> -Matej
> >>
> >> On Wed, Sep 10, 2008 at 10:08 PM, German Morales
> >> <[EMAIL PROTECTED]> wrote:
> >> > I think that we are closer to the problem now...
> >> >
> >> > In my case (going back to the original post), the form i'm submitting
> is
> >> > inside a ModalWindow.
> >> >
> >> > I'm using Firebug to see the generated DOM in runtime, and i find this
> >> > (extracted...) before calling the ModalWindow:
> >> >
> >> > 
> >> >window>
> >> >  
> >> >   
> >> >   
> >> > 
> >> >
> >> > after calling the modal window:
> >> >
> >> > 
> >> >window>
> >> >  
> >> >   
> >> >   
> >> >   
> >> >  
> >> >   
> >> > 
> >> >
> >> > I think that it's ok that the second form is rendered as form, since
> it
> >> does
> >> > not have another form outside (to be rendered as div).
> >> > The problem is that ModalWindow inserted a div outside my root form.
> >> > Therefore Wicket.Form.serialize() must be serializing up to that
> second
> >> > form.
> >> >
> >> > I'm looking at the live Modal window example
> >> > http://www.wicket-library.com/wicket-examples/ajax/modal-window.1
> >> > and i see that this behavior of adding a separated div at body level
> is
> >> > "normal", not something strange in my structure.
> >> >
> >> > German
> >> >
> >> > 2008/9/10 Matej Knopp <[EMAIL PROTECTED]>
> >> >
> >> >> You are right. It calls Wicket.Form.serialize(form) with the nested
> >> >> form, but the serialize method should find parent with  tag
> name
> >> >> and serialize that.
> >> >>
> >> >> -Matej
> >> >>
> >> >>
> >> >> On Wed, Sep 10, 2008 at 9:04 PM, German Morales
> >> >> <[EMAIL PROTECTED]> wrote:
> >> >> > There are no nested form tags, as expected... let me give you more
> >> >> details
> >> >> > i'm discovering:
> >> >> >
> >> >> > The AjaxSubmitLink has something like this...
> >> >> >  function onclick(event) {
> >> >> >   var wcall = wicketSubmitFormById(" < id of my nested form > ");
> >> >> >   return false;
> >> >> >  }
> >> >> >
> >> >> > This calls wicketSubmitFormById, no surprises...
> >> >> >  function wicketSubmitFormById(formId, url, submitButton,
> >> successHandler,
> >> >> > failureHandler, precondition, channel) {
> >> >> >   var call = new Wicket.Ajax.Call(url, successHandler,
> failureHandler,
> >> >> > channel);
> >> >> >   ...
> >> >> >   return call.submitFormById(formId, submitButton);
> >> >> >  }
> >> >> >
> >> >> > which calls submitFormById...
> >> >> >  submitFormById: function(formId, submitButton) {
> >> >> >   var form = Wicket.$(formId);
> >> >> >   ...
> >> >> >   return this.submitForm(form, submitButton);
> >> >> >  }
> >> >> >
> >> >> > which calls submitForm passing my nested form (i'm debugging with
> >> >> Firebug)
> >> >> >  // Submits a form using ajax.
> >> >> >  // This method serializes a form and sends it as POST body.
> >> >> >  submitForm: function(form, submitButton) {
> >> >> >   var body = function() {
> >> >> > var s = Wicket.Form.serialize(form);
> >> >> > if (submitButton != null) {
> >> >> >   s += Wicket.Form.encode(submitButton) + "=1";
> >> >> > }
> >> >> > return s;
> >> >> >   }
> >> >> >   return this.request.post(body);
> >> >> >  }
> >> >> >
> >> >> > which ultimately calls Wicket.Form.serialize(form) with my nested
> >> form,
> >> >> not
> >> >> > with the root form.
> >> >> >
> >> >> > Am i right?
> >> >> >
> >> >> > German
> >> >> >
> >> >> > PS: meanwhile i'm trying to produce a quickstart... but i guess it
> >> will
> >> >> take
> >> >> > me some time.
> >> >> > 2008/9/10 Matej Knopp <[EMAIL PROTECTED]>
> >> >> >
> >> >> >> But that is exactly what should happen. Wicket javascript should
> find
> >> >> >> root form element and serialize that. Can you please check in your
> >> >

Wciket fails to set seesion and request attributes for external webpages

2008-09-11 Thread Benny Weingarten

Hello.

I am worker on a Jboss server, with a  set on the same
path as the wicket filter. Thus, all wicket pages are under the security
constraint. 

To support that I have a login page outside the path of
. I also have an error page in teh same location as the
login page:

Path:
/ login.jsp
/ error.jsp
/folder_under_constraint/Wicket_Class1.java
/folder_under_constraint/Wicket_Class2.java
.
.
/folder_under_constraint/Wicket_Classn.java

In case of an error I want to redirect to invalidate the session, redirect
to the error page, and pass an error message to the error page. I haven't
been able to do this. It appears that wicket doesn't pass session or request
attributes to external pages. What am I doing wrong?

Session.get().invalidate();
// none of the following setAttribute statements actually mange to pass any
http attributes to the error page.
httpServletRequest.setAttribute("some_attribute", "some_value");
HttpServletRequest.getSession().setAttribute("some_attribute",
"some_value");
request.getParameterMap().put("some_attribute", "some_value");
throw new
org.apache.wicket.RedirectToUrlException("/some_page_not_under_wicket_filter.jsp");

thanks,
Benny.

-- 
View this message in context: 
http://www.nabble.com/Wciket-fails-to-set-seesion-and-request-attributes-for-external-webpages-tp19438970p19438970.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Any wicket based (or plain java) Calendars out there? (not a datepicker)

2008-09-11 Thread Scott Swank
webical uses Wicket for its UI.

http://code.google.com/p/webical/wiki/StandardsAndTechnologies


On Thu, Sep 11, 2008 at 6:45 AM, Wayne Pope
<[EMAIL PROTECTED]> wrote:
> Hi,
>
> does anyone know of a Calendar out there - something comparible to Google's
> calander in terms of functionality.
> I've found plenty of  php ones and a couple of 'clunky' java ones.
>
> Any pointers much appreciated.
>
> thanks
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Components render problem

2008-09-11 Thread Ajayi Yinka
Thanks, I have downloaded the code, but it seems your application structure
is somehow different from mine. I will try to figure this out.

On Thu, Sep 11, 2008 at 7:53 AM, Serkan Camurcuoglu <[EMAIL PROTECTED]>wrote:

>
> I can't help that much but I've uploaded my quickstart project here
> http://www.nabble.com/file/p19436483/ajaylogin.zip ajaylogin.zip  , you
> can
> run it using
>
> mvn -Dmaven.test.skip=true jetty:run
>
> and see for yourself.. Good luck..
>
>
>
>
>
>
> Ajayi Yinka wrote:
> >
> > Thanks so much, I appreciate this, Now help me remove the onError method
> > from the LoginForm class so that Login.class is not called. Do the same
> > thing again and check the result. check if the page in the
> setResponsePage
> > is redered. Actually, I am confussed with this problem.
> >
> > thanks so much
> > yinka
> >
> > On Thu, Sep 11, 2008 at 6:57 AM, Serkan Camurcuoglu
> > <[EMAIL PROTECTED]>wrote:
> >
> >> when I try, it works as expected, onError is called whenever data is not
> >> entered, and onSubmit is called when I enter both values..
> >>
> >>
> >>
> >> Ajayi Yinka wrote:
> >>
> >>> When I debugged the codes, it wasn't getting to the onSubmit method.
> >>> Maybe
> >>> you try to do this with the code, don't enter value when the page is
> >>> first
> >>> rendered and click the submit button. After that, enter values nto the
> >>> textfields and click the submit button and check if the onSubmit method
> >>> is
> >>> executed. If this works for you, then something is wrong in my code
> that
> >>> I
> >>> don't know about.
> >>> Thanks so much,
> >>> yinka
> >>>
> >>> On Thu, Sep 11, 2008 at 6:33 AM, Serkan Camurcuoglu
> >>> <[EMAIL PROTECTED]
> >>> >wrote:
> >>>
> >>>
> >>>
>  turning your code into a quickstart project works for me, onSubmit is
>  successfully called.. Did you debug and see the return value of
>  continueToOriginalDestination() ?
> 
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Components-render-problem-tp19411126p19436483.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Apache FOP and Wicket

2008-09-11 Thread Adrian Wiesmann
> Why not? I was remembering that Wicket can manage any markup, not just
> HTML . .
> 
> Am I missing something ?

Not sure. If you do, so do I :)

I have written a renderer which takes an XML containing some UI
description and either generates Swing, HTML (Wicket), PDF (FOP) or CSV
from the same UI description (but from different templates).

Although you can ask Wicket to generate the PDF, there is no direct link
between FOP and Wicket. Wicket only calls my renderer and forwards the
generated file to the user via HTTP.

The problem with having Wicket generate your FOP files will be that you
will have to write all UI elements on your own because there are no
classes/objects you can use.

hth,
Adrian

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: cross session leakage

2008-09-11 Thread Edward Zarecor
Look at the fisheye tab in Jira.

Ed.

On Thu, Sep 11, 2008 at 10:37 AM, Weaver, Scott <[EMAIL PROTECTED]>wrote:

> Thanks Martijn.  The comments/description really doesn't tell me much, I
> will see if looking at the code changes tells me more.
>
> Thanks again,
> -scott
>
> > -Original Message-
> > From: Martijn Dashorst [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, September 11, 2008 9:22 AM
> > To: users@wicket.apache.org
> > Subject: Re: cross session leakage
> >
> > afaik http://issues.apache.org/jira/browse/WICKET-1409
> >
> > On Thu, Sep 11, 2008 at 3:35 PM, Weaver, Scott
> > <[EMAIL PROTECTED]> wrote:
> > > Yes I to would like to know the cause also as we have had this happen
> > more than once in our production environment, five or six times that I
> > know (through trouble tickets).
> > >
> > > -scott
> > >
> > >> -Original Message-
> > >> From: Edward [mailto:[EMAIL PROTECTED]
> > >> Sent: Wednesday, September 10, 2008 4:44 PM
> > >> To: users@wicket.apache.org
> > >> Subject: cross session leakage
> > >>
> > >>
> > >> 1.3.4 says it fixed cross session leakage due to a dangling thread
> > >> local
> > >> in exceptional circumstances... but I don't see an actual but
> > >> identified
> > >> in the release notes.  What exactly was fixed and what was the
> > >> exceptional circumstance?
> > >>
> > >> Thanks,
> > >>
> > >> Edward
> > >>
> > >>
> > >>
> > >> 
> > -
> > >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> > >> For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> > > -
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> >
> >
> > --
> > Become a Wicket expert, learn from the best: http://wicketinaction.com
> > Apache Wicket 1.3.4 is released
> > Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: cross session leakage

2008-09-11 Thread Johan Compagner
if you guys want to test if wicket still leaks a threadlocal somehow
then what you should do is make a filter that goes around our filter
and that test the Session.get(),  RequestCycle.get() and the
Applicaiton.get()
if one of these are already there before (and after) our wicketfilter then
there is a leak

And that is what was fixed, somehow there could be an request dont remember
exactly which one
that could throw an exception again in a finally block and because of that
the finally block that did its job wasnt executed completely

johan


On Thu, Sep 11, 2008 at 4:37 PM, Weaver, Scott <[EMAIL PROTECTED]>wrote:

> Thanks Martijn.  The comments/description really doesn't tell me much, I
> will see if looking at the code changes tells me more.
>
> Thanks again,
> -scott> -Original Message-> From: Martijn Dashorst [mailto:
> [EMAIL PROTECTED]> Sent: Thursday, September 11, 2008 9:22 AM>
> To: [EMAIL PROTECTED] 
> > Subject: Re: cross session leakage
> >
> > afaik http://issues.apache.org/jira/browse/WICKET-1409
> >
> > On Thu, Sep 11, 2008 at 3:35 PM, Weaver, Scott
> > <[EMAIL PROTECTED]> wrote:
> > > Yes I to would like to know the cause also as we have had this happen
> > more than once in our production environment, five or six times that I
> > know (through trouble tickets).
> > >
> > > -scott
> > >
> > >> -Original Message-
> > >> From: Edward [mailto:[EMAIL PROTECTED]
> > >> Sent: Wednesday, September 10, 2008 4:44 PM
> > >> To: users@wicket.apache.org
> > >> Subject: cross session leakage
> > >>
> > >>
> > >> 1.3.4 says it fixed cross session leakage due to a dangling thread
> > >> local
> > >> in exceptional circumstances... but I don't see an actual but
> > >> identified
> > >> in the release notes.  What exactly was fixed and what was the
> > >> exceptional circumstance?
> > >>
> > >> Thanks,
> > >>
> > >> Edward
> > >>
> > >>
> > >>
> > >> 
> > -
> > >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> > >> For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> > > -
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> >
> >
> > --
> > Become a Wicket expert, learn from the best: http://wicketinaction.com
> > Apache Wicket 1.3.4 is released
> > Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Components render problem

2008-09-11 Thread Serkan Camurcuoglu

I can't help that much but I've uploaded my quickstart project here 
http://www.nabble.com/file/p19436483/ajaylogin.zip ajaylogin.zip  , you can
run it using

mvn -Dmaven.test.skip=true jetty:run

and see for yourself.. Good luck..






Ajayi Yinka wrote:
> 
> Thanks so much, I appreciate this, Now help me remove the onError method
> from the LoginForm class so that Login.class is not called. Do the same
> thing again and check the result. check if the page in the setResponsePage
> is redered. Actually, I am confussed with this problem.
> 
> thanks so much
> yinka
> 
> On Thu, Sep 11, 2008 at 6:57 AM, Serkan Camurcuoglu
> <[EMAIL PROTECTED]>wrote:
> 
>> when I try, it works as expected, onError is called whenever data is not
>> entered, and onSubmit is called when I enter both values..
>>
>>
>>
>> Ajayi Yinka wrote:
>>
>>> When I debugged the codes, it wasn't getting to the onSubmit method.
>>> Maybe
>>> you try to do this with the code, don't enter value when the page is
>>> first
>>> rendered and click the submit button. After that, enter values nto the
>>> textfields and click the submit button and check if the onSubmit method
>>> is
>>> executed. If this works for you, then something is wrong in my code that
>>> I
>>> don't know about.
>>> Thanks so much,
>>> yinka
>>>
>>> On Thu, Sep 11, 2008 at 6:33 AM, Serkan Camurcuoglu
>>> <[EMAIL PROTECTED]
>>> >wrote:
>>>
>>>
>>>
 turning your code into a quickstart project works for me, onSubmit is
 successfully called.. Did you debug and see the return value of
 continueToOriginalDestination() ?

> 
> 

-- 
View this message in context: 
http://www.nabble.com/Components-render-problem-tp19411126p19436483.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Dynamic (generated) HTML

2008-09-11 Thread James Carman
You can use Velocity to generate HTML and then have Wicket parse that
resulting markup.  Check out the wicket-velocity subproject.

On Thu, Sep 11, 2008 at 10:34 AM, Adriano dos Santos Fernandes
<[EMAIL PROTECTED]> wrote:
> Can wicket be used with dynamic (generated) HTML?
>
> I mean, for example, HTML is generated to a stream based on a table metadata
> and wicket reads that stream and call the page class to add logic (also
> querying the metadata) to it normally (as if the HTML was static).
>
> If yes, can anyone point out how should I start to do it?
>
> Thanks,
>
>
> Adriano
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: cross session leakage

2008-09-11 Thread Weaver, Scott
Thanks Martijn.  The comments/description really doesn't tell me much, I will 
see if looking at the code changes tells me more.

Thanks again,
-scott

> -Original Message-
> From: Martijn Dashorst [mailto:[EMAIL PROTECTED]
> Sent: Thursday, September 11, 2008 9:22 AM
> To: users@wicket.apache.org
> Subject: Re: cross session leakage
>
> afaik http://issues.apache.org/jira/browse/WICKET-1409
>
> On Thu, Sep 11, 2008 at 3:35 PM, Weaver, Scott
> <[EMAIL PROTECTED]> wrote:
> > Yes I to would like to know the cause also as we have had this happen
> more than once in our production environment, five or six times that I
> know (through trouble tickets).
> >
> > -scott
> >
> >> -Original Message-
> >> From: Edward [mailto:[EMAIL PROTECTED]
> >> Sent: Wednesday, September 10, 2008 4:44 PM
> >> To: users@wicket.apache.org
> >> Subject: cross session leakage
> >>
> >>
> >> 1.3.4 says it fixed cross session leakage due to a dangling thread
> >> local
> >> in exceptional circumstances... but I don't see an actual but
> >> identified
> >> in the release notes.  What exactly was fixed and what was the
> >> exceptional circumstance?
> >>
> >> Thanks,
> >>
> >> Edward
> >>
> >>
> >>
> >> 
> -
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
>
> --
> Become a Wicket expert, learn from the best: http://wicketinaction.com
> Apache Wicket 1.3.4 is released
> Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: FeedbackPanel and page refresh (f5) after submit

2008-09-11 Thread Ajayi Yinka
this is exacltly the same problem I am having. Could anyone render any
solution to this.

Thanks
Yinka.

On Thu, Sep 11, 2008 at 7:40 AM, kayce <[EMAIL PROTECTED]> wrote:

>
> Did you find a solution for this?
> Thanks
>
>
> Thomas Lutz wrote:
> >
> > I've a form with some validation added, nothing special (Required, Email
> > check). When I submit the form I get the validation messages in the
> > FeedbackPanel as expected, but :-), hitting f5 for a page refresh after
> > the submit removes them (don't ask why refresh after submit... users of
> > my webapp do stuff like this :-)).
> > The form is not submitted, only redisplayed, but the validation messages
> > are missing.
> > Is there something I can do about this ?
> >
> > Thanks in advance,
> > Tom
> >
>
> --
> View this message in context:
> http://www.nabble.com/FeedbackPanel-and-page-refresh-%28f5%29-after-submit-tp14413642p19436382.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Dynamic (generated) HTML

2008-09-11 Thread James Carman
This might help you:

public abstract class AbstractVelocityPanel extends VelocityPanel
{
//**
// Fields
//**

private final IStringResourceStream templateResource;
private boolean parseGeneratedMarkup = true;

protected abstract void populateVelocityContext(Map context);

//**
// Constructors
//**

protected AbstractVelocityPanel(String id)
{
super(id, Model.valueOf(Collections.emptyMap()));
setModel(new DetachableVelocityContextModel());
this.templateResource = new PackageResourceStream(getClass(),
getClass().getSimpleName() + ".vm");
}


private class DetachableVelocityContextModel extends LoadableDetachableModel
{
protected Object load()
{
final Map context = new HashMap();
populateVelocityContext(context);
return context;
}
}
//**
// Getter/Setter Methods
//**

protected IStringResourceStream getTemplateResource()
{
return templateResource;
}

//**
// Other Methods
//**

protected boolean parseGeneratedMarkup()
{
return parseGeneratedMarkup;
}

public void setParseGeneratedMarkup(boolean parseGeneratedMarkup)
{
this.parseGeneratedMarkup = parseGeneratedMarkup;
}

protected boolean getStatelessHint()
{
return true;
}
}


On Thu, Sep 11, 2008 at 10:40 AM, James Carman
<[EMAIL PROTECTED]> wrote:
> You can use Velocity to generate HTML and then have Wicket parse that
> resulting markup.  Check out the wicket-velocity subproject.
>
> On Thu, Sep 11, 2008 at 10:34 AM, Adriano dos Santos Fernandes
> <[EMAIL PROTECTED]> wrote:
>> Can wicket be used with dynamic (generated) HTML?
>>
>> I mean, for example, HTML is generated to a stream based on a table metadata
>> and wicket reads that stream and call the page class to add logic (also
>> querying the metadata) to it normally (as if the HTML was static).
>>
>> If yes, can anyone point out how should I start to do it?
>>
>> Thanks,
>>
>>
>> Adriano
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: How to made a direct response html in wicket

2008-09-11 Thread miata

Thanks!!!
it's perfect and very simple...
For remove the div we can add the setRenderBodyOnly():
label.setRenderBodyOnly(true);


Stefan Lindner wrote:
> 
> You can always have
> 
>   
>   
>   
> 
> 
> and java
> 
>   class MyPage extens WebPage {
>   public MyPage() {
>   add(new Label("content", "a lot of html tags and things fort he
> page").setEscapeModelStrings(false));
>   }
> 
> -Ursprüngliche Nachricht-
> Von: miata [mailto:[EMAIL PROTECTED] 
> Gesendet: Donnerstag, 11. September 2008 16:05
> An: users@wicket.apache.org
> Betreff: How to made a direct response html in wicket
> 
> 
> Hi,
> 
> I have a problem to including a html flow in web page.
> In Jsp page, the code will be like this :
> 
> 
> <%=api.callHtml %>
> 
>  
> How I can tranfered the html flow since wicket Page without markup ??? 
> If someone have an idea...
> 
> thanks
> -- 
> View this message in context:
> http://www.nabble.com/How-to-made-a-direct-response-html-in-wicket-tp19435569p19435569.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-made-a-direct-response-html-in-wicket-tp19435569p19436395.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: FeedbackPanel and page refresh (f5) after submit

2008-09-11 Thread kayce

Did you find a solution for this?
Thanks


Thomas Lutz wrote:
> 
> I've a form with some validation added, nothing special (Required, Email 
> check). When I submit the form I get the validation messages in the 
> FeedbackPanel as expected, but :-), hitting f5 for a page refresh after 
> the submit removes them (don't ask why refresh after submit... users of 
> my webapp do stuff like this :-)).
> The form is not submitted, only redisplayed, but the validation messages 
> are missing.
> Is there something I can do about this ?
> 
> Thanks in advance,
> Tom
> 

-- 
View this message in context: 
http://www.nabble.com/FeedbackPanel-and-page-refresh-%28f5%29-after-submit-tp14413642p19436382.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: WebResource and authentication

2008-09-11 Thread Adriano dos Santos Fernandes

Serkan Camurcuoglu escreveu:

Session javadoc says:

*Access via Thread Local *- In the odd case where neither a 
RequestCycle nor a Component is available, the currently active 
Session for the calling thread can be retrieved by calling the static 
method Session.get(). This last form should only be used if the first 
two forms cannot be used since thread local access can involve a 
potentially more expensive hash map lookup.

Thanks. I'll try it.


Adriano


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Dynamic (generated) HTML

2008-09-11 Thread Adriano dos Santos Fernandes

Can wicket be used with dynamic (generated) HTML?

I mean, for example, HTML is generated to a stream based on a table 
metadata and wicket reads that stream and call the page class to add 
logic (also querying the metadata) to it normally (as if the HTML was 
static).


If yes, can anyone point out how should I start to do it?

Thanks,


Adriano


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: cross session leakage

2008-09-11 Thread Martijn Dashorst
afaik http://issues.apache.org/jira/browse/WICKET-1409

On Thu, Sep 11, 2008 at 3:35 PM, Weaver, Scott <[EMAIL PROTECTED]> wrote:
> Yes I to would like to know the cause also as we have had this happen more 
> than once in our production environment, five or six times that I know 
> (through trouble tickets).
>
> -scott
>
>> -Original Message-
>> From: Edward [mailto:[EMAIL PROTECTED]
>> Sent: Wednesday, September 10, 2008 4:44 PM
>> To: users@wicket.apache.org
>> Subject: cross session leakage
>>
>>
>> 1.3.4 says it fixed cross session leakage due to a dangling thread
>> local
>> in exceptional circumstances... but I don't see an actual but
>> identified
>> in the release notes.  What exactly was fixed and what was the
>> exceptional circumstance?
>>
>> Thanks,
>>
>> Edward
>>
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.3.4 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: https flips to http

2008-09-11 Thread insom

Thanks to everyone who has suggested solutions. It turns out that the issue
is stranger than I thought, and it's not Wicket-specific. I'll share what
we've got, in case it helps anyone else (not that we have a solution yet.)

We have a load balancer, Apache, and Tomcat handling requests. When any
servlet application is called, for example,
https://jprod01.chemeketa.edu/docs/ (which is one of the sample apps that
installs with Tomcat), it display perfectly fine if it has the "/" after
docs. But if the URL is https://jprod01.chemeketa.edu/docs (without the "/")
then browser automatically gets redirected to
http://jprod01.chemeketa.edu/docs/ (with the "/" but without the "s" in
"https"). Why? Who knows.


Rikard Lindström wrote:
> 
> I have the same problem as above, and by using the Tamper Data plugin I
> get similar results.
> A request to https flips to http. Everything works ofc if both protocols
> are opened, but in production mode we only use https :(
> Do you have any ideas how to solve this issue?
> 

-- 
View this message in context: 
http://www.nabble.com/https-flips-to-http-tp19403303p19435935.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to made a direct response html in wicket

2008-09-11 Thread James Carman
Probably want to add setRenderBodyOnly(true)

On Thu, Sep 11, 2008 at 10:11 AM, Stefan Lindner <[EMAIL PROTECTED]> wrote:
> You can always have
>
>
>
>
>
>
> and java
>
>class MyPage extens WebPage {
>public MyPage() {
>add(new Label("content", "a lot of html tags and things fort 
> he page").setEscapeModelStrings(false));
>}
>
> -Ursprüngliche Nachricht-
> Von: miata [mailto:[EMAIL PROTECTED]
> Gesendet: Donnerstag, 11. September 2008 16:05
> An: users@wicket.apache.org
> Betreff: How to made a direct response html in wicket
>
>
> Hi,
>
> I have a problem to including a html flow in web page.
> In Jsp page, the code will be like this :
>
> 
> <%=api.callHtml %>
> 
>
> How I can tranfered the html flow since wicket Page without markup ???
> If someone have an idea...
>
> thanks
> --
> View this message in context: 
> http://www.nabble.com/How-to-made-a-direct-response-html-in-wicket-tp19435569p19435569.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Components render problem

2008-09-11 Thread Ajayi Yinka
Thanks so much, I appreciate this, Now help me remove the onError method
from the LoginForm class so that Login.class is not called. Do the same
thing again and check the result. check if the page in the setResponsePage
is redered. Actually, I am confussed with this problem.

thanks so much
yinka

On Thu, Sep 11, 2008 at 6:57 AM, Serkan Camurcuoglu <[EMAIL PROTECTED]>wrote:

> when I try, it works as expected, onError is called whenever data is not
> entered, and onSubmit is called when I enter both values..
>
>
>
> Ajayi Yinka wrote:
>
>> When I debugged the codes, it wasn't getting to the onSubmit method. Maybe
>> you try to do this with the code, don't enter value when the page is first
>> rendered and click the submit button. After that, enter values nto the
>> textfields and click the submit button and check if the onSubmit method is
>> executed. If this works for you, then something is wrong in my code that I
>> don't know about.
>> Thanks so much,
>> yinka
>>
>> On Thu, Sep 11, 2008 at 6:33 AM, Serkan Camurcuoglu <[EMAIL PROTECTED]
>> >wrote:
>>
>>
>>
>>> turning your code into a quickstart project works for me, onSubmit is
>>> successfully called.. Did you debug and see the return value of
>>> continueToOriginalDestination() ?
>>>
>>> Ajayi Yinka wrote:
>>>
>>>
>>>
 Thanks for your concern. I added it (check the LoginForm class, you will
 see
 the onSubmit method). I used the default form submit button. I tried the
 wicket button before, but the same problem persist.

 On Thu, Sep 11, 2008 at 5:33 AM, Serkan Camurcuoglu <
 [EMAIL PROTECTED]


> wrote:
>
>



> how do you submit the form? it seems like you do not add a submit
> button
> or
> submit link into the form..
>
>
>
> Ajayi Yinka wrote:
>
>
>
>
>
>> Hi,
>> This problem still persist till now. I can really figure out the cause
>> of
>> the problem. Could anyone help me out? This is one of the pages in my
>> application. I have searched all the texts I have on wicket to get the
>> cause
>> of the problem but I coudn't find one.
>>
>> I appreciate any asisstance anyone can render on this.
>>
>> Thanks in advance.
>> package web.page;
>>
>> import web.UserSession;
>> import web.component.MainNavigationComponent;
>> import pojo.User;
>> import services.TouchPayService;
>> import java.util.List;
>> import org.apache.wicket.Session;
>> import org.apache.wicket.injection.web.InjectorHolder;
>> import org.apache.wicket.markup.html.form.Form;
>> import org.apache.wicket.markup.html.form.PasswordTextField;
>> import org.apache.wicket.markup.html.form.TextField;
>> import org.apache.wicket.markup.html.panel.FeedbackPanel;
>> import org.apache.wicket.model.Model;
>> import org.apache.wicket.spring.injection.annot.SpringBean;
>>
>> /**
>>  *
>>  * @author AJAYI YINKA
>>  */
>> public final class Login extends AbstractConsoleWebPage  {
>>
>>  Form form;
>>  private TextField userId;
>>  private PasswordTextField userPassword;
>>  List users;
>>  @SpringBean
>>  TouchPayService touchpay;
>>  private static final long serialVersionUID = 1L;
>>  public Login() {
>>
>>  InjectorHolder.getInjector().inject(this);
>>
>>  org.apache.wicket.Component mainNavigation;
>>
>>  mainNavigation = new MainNavigationComponent("mainNavigation",
>> null);
>>
>>  userId = new TextField("userId", new Model(" "));
>>  userId.setRequired(true);
>>
>>
>>  userPassword = new PasswordTextField("userPassword", new Model("
>> "));
>>  userPassword.setRequired(true);
>>
>>  form = new LoginFormComponent("f");
>>
>>  add(new FeedbackPanel("errorMsg"));
>>  form.add(userId);
>>  form.add(userPassword);
>>  add(form);
>>  add(mainNavigation);
>>
>>
>>  }
>>
>>  public void setUser(User user) {
>>  ((UserSession) getSession()).setCurrentUser(user);
>>  }
>>
>>
>>  @Override
>>  public String getTitle() {
>>  return "Login Page";
>>  }
>>
>>  class LoginFormComponent extends Form {
>>
>>  public LoginFormComponent(String id) {
>>  super(id);
>>  }
>>
>>  @Override
>>  public void onError(){
>>
>>  setResponsePage(Login.class);
>>   }
>>
>>  @Override
>>  public void onSubmit() {
>>
>>
>>  String userId = (String) Login.this.getUserId();
>>  String userPassword = (String) Login.this.getPassword();
>>
>>  User user = null;
>>  users = touchpay.findAllUsers();
>>
>>  for (User userInDB : users) {
>>  if ((userInDB.getUsername().equa

RE: How to made a direct response html in wicket

2008-09-11 Thread Stefan Lindner
You can always have






and java

class MyPage extens WebPage {
public MyPage() {
add(new Label("content", "a lot of html tags and things fort he 
page").setEscapeModelStrings(false));
}

-Ursprüngliche Nachricht-
Von: miata [mailto:[EMAIL PROTECTED] 
Gesendet: Donnerstag, 11. September 2008 16:05
An: users@wicket.apache.org
Betreff: How to made a direct response html in wicket


Hi,

I have a problem to including a html flow in web page.
In Jsp page, the code will be like this :


<%=api.callHtml %>

 
How I can tranfered the html flow since wicket Page without markup ??? 
If someone have an idea...

thanks
-- 
View this message in context: 
http://www.nabble.com/How-to-made-a-direct-response-html-in-wicket-tp19435569p19435569.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How to made a direct response html in wicket

2008-09-11 Thread miata

Hi,

I have a problem to including a html flow in web page.
In Jsp page, the code will be like this :


<%=api.callHtml %>

 
How I can tranfered the html flow since wicket Page without markup ??? 
If someone have an idea...

thanks
-- 
View this message in context: 
http://www.nabble.com/How-to-made-a-direct-response-html-in-wicket-tp19435569p19435569.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Components render problem

2008-09-11 Thread Serkan Camurcuoglu
when I try, it works as expected, onError is called whenever data is not 
entered, and onSubmit is called when I enter both values..



Ajayi Yinka wrote:

When I debugged the codes, it wasn't getting to the onSubmit method. Maybe
you try to do this with the code, don't enter value when the page is first
rendered and click the submit button. After that, enter values nto the
textfields and click the submit button and check if the onSubmit method is
executed. If this works for you, then something is wrong in my code that I
don't know about.
Thanks so much,
yinka

On Thu, Sep 11, 2008 at 6:33 AM, Serkan Camurcuoglu <[EMAIL PROTECTED]>wrote:

  

turning your code into a quickstart project works for me, onSubmit is
successfully called.. Did you debug and see the return value of
continueToOriginalDestination() ?

Ajayi Yinka wrote:



Thanks for your concern. I added it (check the LoginForm class, you will
see
the onSubmit method). I used the default form submit button. I tried the
wicket button before, but the same problem persist.

On Thu, Sep 11, 2008 at 5:33 AM, Serkan Camurcuoglu <[EMAIL PROTECTED]
  

wrote:



  

how do you submit the form? it seems like you do not add a submit button
or
submit link into the form..



Ajayi Yinka wrote:





Hi,
This problem still persist till now. I can really figure out the cause
of
the problem. Could anyone help me out? This is one of the pages in my
application. I have searched all the texts I have on wicket to get the
cause
of the problem but I coudn't find one.

I appreciate any asisstance anyone can render on this.

Thanks in advance.
package web.page;

import web.UserSession;
import web.component.MainNavigationComponent;
import pojo.User;
import services.TouchPayService;
import java.util.List;
import org.apache.wicket.Session;
import org.apache.wicket.injection.web.InjectorHolder;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.form.PasswordTextField;
import org.apache.wicket.markup.html.form.TextField;
import org.apache.wicket.markup.html.panel.FeedbackPanel;
import org.apache.wicket.model.Model;
import org.apache.wicket.spring.injection.annot.SpringBean;

/**
 *
 * @author AJAYI YINKA
 */
public final class Login extends AbstractConsoleWebPage  {

  Form form;
  private TextField userId;
  private PasswordTextField userPassword;
  List users;
  @SpringBean
  TouchPayService touchpay;
  private static final long serialVersionUID = 1L;
  public Login() {

  InjectorHolder.getInjector().inject(this);

  org.apache.wicket.Component mainNavigation;

  mainNavigation = new MainNavigationComponent("mainNavigation",
null);

  userId = new TextField("userId", new Model(" "));
  userId.setRequired(true);


  userPassword = new PasswordTextField("userPassword", new Model("
"));
  userPassword.setRequired(true);

  form = new LoginFormComponent("f");

  add(new FeedbackPanel("errorMsg"));
  form.add(userId);
  form.add(userPassword);
  add(form);
  add(mainNavigation);


  }

  public void setUser(User user) {
  ((UserSession) getSession()).setCurrentUser(user);
  }


  @Override
  public String getTitle() {
  return "Login Page";
  }

  class LoginFormComponent extends Form {

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

  @Override
  public void onError(){

  setResponsePage(Login.class);
   }

  @Override
  public void onSubmit() {


  String userId = (String) Login.this.getUserId();
  String userPassword = (String) Login.this.getPassword();

  User user = null;
  users = touchpay.findAllUsers();

  for (User userInDB : users) {
  if ((userInDB.getUsername().equals(userId)) &&
(userInDB.getPassword().equals(userPassword))) {
  user = userInDB;
  }
  }
  if (user == null) {
  // not yet implemented
  } else {
  setUser(user);
  Session.get().info("You have logged in successfully");

  if (!continueToOriginalDestination()) {
  setResponsePage(HomePage.class);
  }
  }

  }
  }

  /** Helper methods to retrieve the userId and the password **/
  protected String getUserId() {
  return userId.getModelObjectAsString();
  }

  protected String getPassword() {
  return userPassword.getModelObjectAsString();
  }
}




On Wed, Sep 10, 2008 at 6:18 AM, Ajayi Yinka <
[EMAIL PROTECTED]


  

wrote:





  

hi guys,
I have try to get over the problem by calling Login.class in onError
method. this seems to cover this bugs, but I am not satistify as the
error
message is still redisplaying in the next page.
I think what i really need is the problems that are associated with
validation.

On Wed, Sep 10, 2008 at 4:58 AM, Ajayi Yinka <
[EMAIL PROTECTED]




wrote:


   

Re: Components render problem

2008-09-11 Thread Ajayi Yinka
When I debugged the codes, it wasn't getting to the onSubmit method. Maybe
you try to do this with the code, don't enter value when the page is first
rendered and click the submit button. After that, enter values nto the
textfields and click the submit button and check if the onSubmit method is
executed. If this works for you, then something is wrong in my code that I
don't know about.
Thanks so much,
yinka

On Thu, Sep 11, 2008 at 6:33 AM, Serkan Camurcuoglu <[EMAIL PROTECTED]>wrote:

> turning your code into a quickstart project works for me, onSubmit is
> successfully called.. Did you debug and see the return value of
> continueToOriginalDestination() ?
>
> Ajayi Yinka wrote:
>
>> Thanks for your concern. I added it (check the LoginForm class, you will
>> see
>> the onSubmit method). I used the default form submit button. I tried the
>> wicket button before, but the same problem persist.
>>
>> On Thu, Sep 11, 2008 at 5:33 AM, Serkan Camurcuoglu <[EMAIL PROTECTED]
>> >wrote:
>>
>>
>>
>>> how do you submit the form? it seems like you do not add a submit button
>>> or
>>> submit link into the form..
>>>
>>>
>>>
>>> Ajayi Yinka wrote:
>>>
>>>
>>>
 Hi,
 This problem still persist till now. I can really figure out the cause
 of
 the problem. Could anyone help me out? This is one of the pages in my
 application. I have searched all the texts I have on wicket to get the
 cause
 of the problem but I coudn't find one.

 I appreciate any asisstance anyone can render on this.

 Thanks in advance.
 package web.page;

 import web.UserSession;
 import web.component.MainNavigationComponent;
 import pojo.User;
 import services.TouchPayService;
 import java.util.List;
 import org.apache.wicket.Session;
 import org.apache.wicket.injection.web.InjectorHolder;
 import org.apache.wicket.markup.html.form.Form;
 import org.apache.wicket.markup.html.form.PasswordTextField;
 import org.apache.wicket.markup.html.form.TextField;
 import org.apache.wicket.markup.html.panel.FeedbackPanel;
 import org.apache.wicket.model.Model;
 import org.apache.wicket.spring.injection.annot.SpringBean;

 /**
  *
  * @author AJAYI YINKA
  */
 public final class Login extends AbstractConsoleWebPage  {

   Form form;
   private TextField userId;
   private PasswordTextField userPassword;
   List users;
   @SpringBean
   TouchPayService touchpay;
   private static final long serialVersionUID = 1L;
   public Login() {

   InjectorHolder.getInjector().inject(this);

   org.apache.wicket.Component mainNavigation;

   mainNavigation = new MainNavigationComponent("mainNavigation",
 null);

   userId = new TextField("userId", new Model(" "));
   userId.setRequired(true);


   userPassword = new PasswordTextField("userPassword", new Model("
 "));
   userPassword.setRequired(true);

   form = new LoginFormComponent("f");

   add(new FeedbackPanel("errorMsg"));
   form.add(userId);
   form.add(userPassword);
   add(form);
   add(mainNavigation);


   }

   public void setUser(User user) {
   ((UserSession) getSession()).setCurrentUser(user);
   }


   @Override
   public String getTitle() {
   return "Login Page";
   }

   class LoginFormComponent extends Form {

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

   @Override
   public void onError(){

   setResponsePage(Login.class);
}

   @Override
   public void onSubmit() {


   String userId = (String) Login.this.getUserId();
   String userPassword = (String) Login.this.getPassword();

   User user = null;
   users = touchpay.findAllUsers();

   for (User userInDB : users) {
   if ((userInDB.getUsername().equals(userId)) &&
 (userInDB.getPassword().equals(userPassword))) {
   user = userInDB;
   }
   }
   if (user == null) {
   // not yet implemented
   } else {
   setUser(user);
   Session.get().info("You have logged in successfully");

   if (!continueToOriginalDestination()) {
   setResponsePage(HomePage.class);
   }
   }

   }
   }

   /** Helper methods to retrieve the userId and the password **/
   protected String getUserId() {
   return userId.getModelObjectAsString();
   }

   protected String getPassword() {
   return userPassword.getModelObjectAsString();
   }
 }


>>>

Any wicket based (or plain java) Calendars out there? (not a datepicker)

2008-09-11 Thread Wayne Pope
Hi,

does anyone know of a Calendar out there - something comparible to Google's
calander in terms of functionality.
I've found plenty of  php ones and a couple of 'clunky' java ones.

Any pointers much appreciated.

thanks


RE: cross session leakage

2008-09-11 Thread Weaver, Scott
Yes I to would like to know the cause also as we have had this happen more than 
once in our production environment, five or six times that I know (through 
trouble tickets).

-scott

> -Original Message-
> From: Edward [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, September 10, 2008 4:44 PM
> To: users@wicket.apache.org
> Subject: cross session leakage
>
>
> 1.3.4 says it fixed cross session leakage due to a dangling thread
> local
> in exceptional circumstances... but I don't see an actual but
> identified
> in the release notes.  What exactly was fixed and what was the
> exceptional circumstance?
>
> Thanks,
>
> Edward
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Components render problem

2008-09-11 Thread Serkan Camurcuoglu
turning your code into a quickstart project works for me, onSubmit is 
successfully called.. Did you debug and see the return value of 
continueToOriginalDestination() ?




Ajayi Yinka wrote:

Thanks for your concern. I added it (check the LoginForm class, you will see
the onSubmit method). I used the default form submit button. I tried the
wicket button before, but the same problem persist.

On Thu, Sep 11, 2008 at 5:33 AM, Serkan Camurcuoglu <[EMAIL PROTECTED]>wrote:

  

how do you submit the form? it seems like you do not add a submit button or
submit link into the form..



Ajayi Yinka wrote:



Hi,
This problem still persist till now. I can really figure out the cause of
the problem. Could anyone help me out? This is one of the pages in my
application. I have searched all the texts I have on wicket to get the
cause
of the problem but I coudn't find one.

I appreciate any asisstance anyone can render on this.

Thanks in advance.
package web.page;

import web.UserSession;
import web.component.MainNavigationComponent;
import pojo.User;
import services.TouchPayService;
import java.util.List;
import org.apache.wicket.Session;
import org.apache.wicket.injection.web.InjectorHolder;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.form.PasswordTextField;
import org.apache.wicket.markup.html.form.TextField;
import org.apache.wicket.markup.html.panel.FeedbackPanel;
import org.apache.wicket.model.Model;
import org.apache.wicket.spring.injection.annot.SpringBean;

/**
 *
 * @author AJAYI YINKA
 */
public final class Login extends AbstractConsoleWebPage  {

   Form form;
   private TextField userId;
   private PasswordTextField userPassword;
   List users;
   @SpringBean
   TouchPayService touchpay;
   private static final long serialVersionUID = 1L;
   public Login() {

   InjectorHolder.getInjector().inject(this);

   org.apache.wicket.Component mainNavigation;

   mainNavigation = new MainNavigationComponent("mainNavigation",
null);

   userId = new TextField("userId", new Model(" "));
   userId.setRequired(true);


   userPassword = new PasswordTextField("userPassword", new Model("
"));
   userPassword.setRequired(true);

   form = new LoginFormComponent("f");

   add(new FeedbackPanel("errorMsg"));
   form.add(userId);
   form.add(userPassword);
   add(form);
   add(mainNavigation);


   }

   public void setUser(User user) {
   ((UserSession) getSession()).setCurrentUser(user);
   }


   @Override
   public String getTitle() {
   return "Login Page";
   }

   class LoginFormComponent extends Form {

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

   @Override
   public void onError(){

   setResponsePage(Login.class);
}

   @Override
   public void onSubmit() {


   String userId = (String) Login.this.getUserId();
   String userPassword = (String) Login.this.getPassword();

   User user = null;
   users = touchpay.findAllUsers();

   for (User userInDB : users) {
   if ((userInDB.getUsername().equals(userId)) &&
(userInDB.getPassword().equals(userPassword))) {
   user = userInDB;
   }
   }
   if (user == null) {
   // not yet implemented
   } else {
   setUser(user);
   Session.get().info("You have logged in successfully");

   if (!continueToOriginalDestination()) {
   setResponsePage(HomePage.class);
   }
   }

   }
   }

   /** Helper methods to retrieve the userId and the password **/
   protected String getUserId() {
   return userId.getModelObjectAsString();
   }

   protected String getPassword() {
   return userPassword.getModelObjectAsString();
   }
}




On Wed, Sep 10, 2008 at 6:18 AM, Ajayi Yinka <[EMAIL PROTECTED]
  

wrote:



  

hi guys,
I have try to get over the problem by calling Login.class in onError
method. this seems to cover this bugs, but I am not satistify as the
error
message is still redisplaying in the next page.
I think what i really need is the problems that are associated with
validation.

On Wed, Sep 10, 2008 at 4:58 AM, Ajayi Yinka <[EMAIL PROTECTED]


wrote:
  




I thought as much, it seems I am missing something out in validation
process. Please help me check out from this snippet of my codes

userId = new TextField("userId", new Model(""));
   userId.setRequired(true);


   userPassword = new PasswordTextField("userPassword", new
Model(""));
   userPassword.setRequired(true);

   form.add(userId);
   form.add(userPassword);
 add(form);

add(new FeedbackPanel("errorMsg"));

thanks.



On Wed, Sep 10, 2008 at 4:06 AM, Serkan Camurcuoglu <
[EMAIL PROTECTED]


  

wrote:
   if onSubmit is not called and the form is redisplayed with the
values

Re: Apache FOP and Wicket

2008-09-11 Thread Paolo Di Tommaso
Why not? I was remembering that Wicket can manage any markup, not just HTML
. .

Am I missing something ?

Paolo

On Thu, Sep 11, 2008 at 3:03 PM, Edvin Syse <[EMAIL PROTECTED]> wrote:

> I don't think Wicket is the right tool for that, try Freemarker instead.
> You can still serve up the file through Wicket though :)
>
> -- Edvin
>
> Paolo Di Tommaso skrev:
>
>  Dear all,
>>
>> If I'm not wrong Wicket is able to manage any king of markup not just
>> HTML.
>>
>>
>> So it would be possibile to use Wicket to generate an Apache FOP markup to
>> rendere a PDF file? Any suggestions?
>>
>> Thank you,
>> -- Paolo
>>
>>
>>
>
> --
> Med vennlig hilsen
>
> Edvin Syse
> Programutvikler
>
> www.sysedata.no / [EMAIL PROTECTED]
> Tlf: 333 49700  / Faks: 333 49701
> Adresse: Møllegaten 12, 3111 Tønsberg
>
> Syse Data AS -Profesjonelle IT-tjenester
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Reporting Engine on Wicket 1.3.4

2008-09-11 Thread Ajayi Yinka
thanks, I will try that
yinka

On Thu, Sep 11, 2008 at 6:00 AM, Edvin Syse <[EMAIL PROTECTED]> wrote:

> The freemarker-version is something like this:
>
> The user has created a template using the .fo format with Freemarker, a
> (too) simple example could be:
>
> http://tornado.no/template/show?template=global.fop
>
> (Notice the list-directive to iterate over articles in this case, since it
> is a CMS).
>
> Then, in the Wicket page I do:
>
> byte[] b = FopUtils.createPDF(aStringWithTheMarkup);
> RequestCycle.get().setRequestTarget(new ResourceStreamRequestTarget(
> new ByteArrayResourceStream(b, contentType)).setFileName(page.getTitle() +
> ".pdf"));
>
> (contentType is "application/pdf").
>
> The FopUtils class is like this:
>
> public class FopUtils {
>   private static FopFactory fopFactory = FopFactory.newInstance();
>
>   public static byte[] createPDF(String foMarkup) throws IOException,
> FOPException, TransformerException {
>   ByteArrayOutputStream out = new ByteArrayOutputStream();
>
>   FOUserAgent foUserAgent = fopFactory.newFOUserAgent();
>   Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, foUserAgent,
> out);
>
>   // Setup JAXP using identity transformer
>   TransformerFactory factory = TransformerFactory.newInstance();
>   javax.xml.transform.Transformer transformer =
> factory.newTransformer(); // identity transformer
>
>   // Setup input stream
>   Source src = new StreamSource(new StringInputStream(foMarkup));
>
>   // Resulting SAX events (the generated FO) must be piped through to
> FOP
>   Result res = new SAXResult(fop.getDefaultHandler());
>
>   // Start XSLT transformation and FOP processing
>   transformer.transform(src, res);
>
>   // Result processing
>   FormattingResults foResults = fop.getResults();
>
>   out.close();
>   return out.toByteArray();
>   }
>
>
> }
>
> .. and you get a simple PDF served in milliseconds :)
>
> -- Edvin
>
>
>
> Ajayi Yinka skrev:
>
>  Hi, could you shed more lights on how you achieve this?
>>
>> Thanks in advance.
>> Yinka
>>
>> On Thu, Sep 11, 2008 at 3:56 AM, Edvin Syse <[EMAIL PROTECTED]> wrote:
>>
>>
>>
>>> We use Apache XmlGraphhics/FOP to create PDF successfully in our
>>> Wicket-applications. Some places I use an external XML-datasource and
>>> convert using XSLT, and other times I use Freemarker to generate the .fo
>>> directly. It's extremely fast, and the markup is easy to understand and
>>> easy
>>> to change/style.
>>>
>>> Actually, in our Wicket-based CMS, the users can change templates so that
>>> the same article can output HTML, RSS/XML or even PDF through Apache FOP
>>> :)
>>>
>>> -- Edvin
>>>
>>> David R Robison skrev:
>>>
>>>
>>>
 We use Jasper reports. We took what had been started and made some
 modifications and have it working in Wicket. It works well for us. David

 Eyal Golan wrote:



> reiern70:
> Could you please elaborate on how you included BIRT as the part of the
> application?
> You can mail directly to me if you feel it is out of Wicket's scope.
>
> Thanks
>
> On Tue, Sep 9, 2008 at 2:19 PM, reiern70 <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
>> Hi,
>>
>> Actually there is no deed to have BIRT in a separated WAR: in our
>> project
>> we
>> have included it as a (singleton) runtime which is part of the
>> application.
>> We also have some kind of WEB interface to manage report parameters...
>> We
>> found BIRT quite useful  for generating reports thought we had
>> some
>> problems when migrating to new versions (sometimes things that were
>> working
>> perfectly with one version got terrible unfixed when moving to the
>> next).
>> With BIRT you get "for free" the ability to produce Excel, Word,
>> etc...
>>
>> In our project we went a bit further and built a machinery that allows
>> to
>> combine BIRT (and non BIRT) PDF reports into books: BIRT reports are
>> very
>> good in summarizing information but you are on your own when you have
>> to
>> combine them... This "tool" allows you to build a tree like structure
>> (a
>> book) where the nodes are BIRT reports. The  tool will help in
>> collecting
>> all the bookmarks into a table of contents, generate combined
>> bookmarks
>> and
>> so on...
>>
>> For simpler use cases I have used iText, JFreeChart, JExcelAPI,
>> OpenCSV...
>>
>> Best,
>>
>> Ernesto
>>
>>
>>
>> egolan74 wrote:
>>
>>
>>
>>
>>> Hi,
>>> We use BIRT as a report engine.
>>> A freelancer has created the prototype BIRT project, and now we took
>>> over
>>> it.
>>> 1. BIRT gives you all your needs.
>>> 2. I don't like it very much actually.
>>> 3. It is a different project than Wicket. (different WAR)
>>> 4. I plan to check how to integrate i

Re: Wicket, HTML or XHTML ?

2008-09-11 Thread pierre . goiffon
Erik van Oosten <[EMAIL PROTECTED]> wrote on 11/09/2008 15:06:05:

> For Wicket the doctype is not needed, so do what you like. Just remember
> to keep it in XML syntax.

Reading this I wonder if I just have to produce well-formed html files (
http://www.w3.org/TR/REC-xml/#sec-well-formed), or taking care of the 
points listed in the XHTML 1.0 recommandation in chapter 4 (
http://www.w3.org/TR/xhtml1/#diffs) ?

I wanted to generate HTML instead of XHTML to get rid of the mandatory 
Appendix C (http://www.w3.org/TR/xhtml1/#guidelines) rules.

> There is only one ceavat: you should always
> write  instead of ,

OK


Re: Components render problem

2008-09-11 Thread Ajayi Yinka
Thanks for your concern. I added it (check the LoginForm class, you will see
the onSubmit method). I used the default form submit button. I tried the
wicket button before, but the same problem persist.

On Thu, Sep 11, 2008 at 5:33 AM, Serkan Camurcuoglu <[EMAIL PROTECTED]>wrote:

> how do you submit the form? it seems like you do not add a submit button or
> submit link into the form..
>
>
>
> Ajayi Yinka wrote:
>
>> Hi,
>> This problem still persist till now. I can really figure out the cause of
>> the problem. Could anyone help me out? This is one of the pages in my
>> application. I have searched all the texts I have on wicket to get the
>> cause
>> of the problem but I coudn't find one.
>>
>> I appreciate any asisstance anyone can render on this.
>>
>> Thanks in advance.
>> package web.page;
>>
>> import web.UserSession;
>> import web.component.MainNavigationComponent;
>> import pojo.User;
>> import services.TouchPayService;
>> import java.util.List;
>> import org.apache.wicket.Session;
>> import org.apache.wicket.injection.web.InjectorHolder;
>> import org.apache.wicket.markup.html.form.Form;
>> import org.apache.wicket.markup.html.form.PasswordTextField;
>> import org.apache.wicket.markup.html.form.TextField;
>> import org.apache.wicket.markup.html.panel.FeedbackPanel;
>> import org.apache.wicket.model.Model;
>> import org.apache.wicket.spring.injection.annot.SpringBean;
>>
>> /**
>>  *
>>  * @author AJAYI YINKA
>>  */
>> public final class Login extends AbstractConsoleWebPage  {
>>
>>Form form;
>>private TextField userId;
>>private PasswordTextField userPassword;
>>List users;
>>@SpringBean
>>TouchPayService touchpay;
>>private static final long serialVersionUID = 1L;
>>public Login() {
>>
>>InjectorHolder.getInjector().inject(this);
>>
>>org.apache.wicket.Component mainNavigation;
>>
>>mainNavigation = new MainNavigationComponent("mainNavigation",
>> null);
>>
>>userId = new TextField("userId", new Model(" "));
>>userId.setRequired(true);
>>
>>
>>userPassword = new PasswordTextField("userPassword", new Model("
>> "));
>>userPassword.setRequired(true);
>>
>>form = new LoginFormComponent("f");
>>
>>add(new FeedbackPanel("errorMsg"));
>>form.add(userId);
>>form.add(userPassword);
>>add(form);
>>add(mainNavigation);
>>
>>
>>}
>>
>>public void setUser(User user) {
>>((UserSession) getSession()).setCurrentUser(user);
>>}
>>
>>
>>@Override
>>public String getTitle() {
>>return "Login Page";
>>}
>>
>>class LoginFormComponent extends Form {
>>
>>public LoginFormComponent(String id) {
>>super(id);
>>}
>>
>>@Override
>>public void onError(){
>>
>>setResponsePage(Login.class);
>> }
>>
>>@Override
>>public void onSubmit() {
>>
>>
>>String userId = (String) Login.this.getUserId();
>>String userPassword = (String) Login.this.getPassword();
>>
>>User user = null;
>>users = touchpay.findAllUsers();
>>
>>for (User userInDB : users) {
>>if ((userInDB.getUsername().equals(userId)) &&
>> (userInDB.getPassword().equals(userPassword))) {
>>user = userInDB;
>>}
>>}
>>if (user == null) {
>>// not yet implemented
>>} else {
>>setUser(user);
>>Session.get().info("You have logged in successfully");
>>
>>if (!continueToOriginalDestination()) {
>>setResponsePage(HomePage.class);
>>}
>>}
>>
>>}
>>}
>>
>>/** Helper methods to retrieve the userId and the password **/
>>protected String getUserId() {
>>return userId.getModelObjectAsString();
>>}
>>
>>protected String getPassword() {
>>return userPassword.getModelObjectAsString();
>>}
>> }
>>
>>
>>
>>
>> On Wed, Sep 10, 2008 at 6:18 AM, Ajayi Yinka <[EMAIL PROTECTED]
>> >wrote:
>>
>>
>>
>>> hi guys,
>>> I have try to get over the problem by calling Login.class in onError
>>> method. this seems to cover this bugs, but I am not satistify as the
>>> error
>>> message is still redisplaying in the next page.
>>> I think what i really need is the problems that are associated with
>>> validation.
>>>
>>> On Wed, Sep 10, 2008 at 4:58 AM, Ajayi Yinka <[EMAIL PROTECTED]
>>> >wrote:
>>>
>>>
>>>
 I thought as much, it seems I am missing something out in validation
 process. Please help me check out from this snippet of my codes

 userId = new TextField("userId", new Model(""));
userId.setRequired(true);


userPassword = new PasswordTextField("userPassword", new
 Model(""));
userPassword.setRequired(true);

form.add(userId);
form.add(userPassword)

Re: Apache FOP and Wicket

2008-09-11 Thread Edvin Syse
I don't think Wicket is the right tool for that, try Freemarker instead. 
You can still serve up the file through Wicket though :)


-- Edvin

Paolo Di Tommaso skrev:

Dear all,

If I'm not wrong Wicket is able to manage any king of markup not just HTML.


So it would be possibile to use Wicket to generate an Apache FOP markup to
rendere a PDF file? Any suggestions?

Thank you,
-- Paolo

  


--
Med vennlig hilsen

Edvin Syse
Programutvikler

www.sysedata.no / [EMAIL PROTECTED]
Tlf: 333 49700  / Faks: 333 49701
Adresse: Møllegaten 12, 3111 Tønsberg

Syse Data AS -Profesjonelle IT-tjenester 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wicket, HTML or XHTML ?

2008-09-11 Thread Erik van Oosten
For Wicket the doctype is not needed, so do what you like. Just remember
to keep it in XML syntax. There is only one ceavat: you should always
write  instead of ,
Wicket ignores the XML definition that specifies that these should be
treated as semantically equivalent.

Regards,
Erik.


[EMAIL PROTECTED] wrote:
> Hello,
> As a Wicket beginner, I was wondering if there are any contra-indication 
> to generate some HTML 4.01 Strict instead of any XHTML 1.0 version 
> (transitionnal or strict) ? 
> I tried to simply add an HTML 4.01 strict doctype to my html files, and it 
> seems to work fine (thought in development mode I have in the source the 
> xmlns:wicket in the body tag and all of the Wicket XHTML tags - going to 
> deployement mode an they disappear)
> Is there anything I must take care of ? Wicket use a namespace server-side 
> so... ?
> Best regards,
> P. Goiffon
>   

--
Erik van Oosten
http://day-to-day-stuff.blogspot.com/



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Reporting Engine on Wicket 1.3.4

2008-09-11 Thread Edvin Syse
Btw, the ByteArrayResourceStream is just a simple extension of the 
AbstractResourceStream, wrapping the bytearray :)


-- Edvin

Edvin Syse skrev:

The freemarker-version is something like this:

The user has created a template using the .fo format with Freemarker, 
a (too) simple example could be:


http://tornado.no/template/show?template=global.fop

(Notice the list-directive to iterate over articles in this case, 
since it is a CMS).


Then, in the Wicket page I do:

byte[] b = FopUtils.createPDF(aStringWithTheMarkup);
RequestCycle.get().setRequestTarget(new ResourceStreamRequestTarget(
new ByteArrayResourceStream(b, 
contentType)).setFileName(page.getTitle() + ".pdf"));


(contentType is "application/pdf").

The FopUtils class is like this:

public class FopUtils {
   private static FopFactory fopFactory = FopFactory.newInstance();

   public static byte[] createPDF(String foMarkup) throws IOException, 
FOPException, TransformerException {

   ByteArrayOutputStream out = new ByteArrayOutputStream();

   FOUserAgent foUserAgent = fopFactory.newFOUserAgent();
   Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, 
foUserAgent, out);


   // Setup JAXP using identity transformer
   TransformerFactory factory = TransformerFactory.newInstance();
   javax.xml.transform.Transformer transformer = 
factory.newTransformer(); // identity transformer


   // Setup input stream
   Source src = new StreamSource(new StringInputStream(foMarkup));

   // Resulting SAX events (the generated FO) must be piped 
through to FOP

   Result res = new SAXResult(fop.getDefaultHandler());

   // Start XSLT transformation and FOP processing
   transformer.transform(src, res);

   // Result processing
   FormattingResults foResults = fop.getResults();

   out.close();
   return out.toByteArray();
   }


}

.. and you get a simple PDF served in milliseconds :)

-- Edvin



Ajayi Yinka skrev:

Hi, could you shed more lights on how you achieve this?

Thanks in advance.
Yinka

On Thu, Sep 11, 2008 at 3:56 AM, Edvin Syse <[EMAIL PROTECTED]> wrote:

 

We use Apache XmlGraphhics/FOP to create PDF successfully in our
Wicket-applications. Some places I use an external XML-datasource and
convert using XSLT, and other times I use Freemarker to generate the 
.fo
directly. It's extremely fast, and the markup is easy to understand 
and easy

to change/style.

Actually, in our Wicket-based CMS, the users can change templates so 
that
the same article can output HTML, RSS/XML or even PDF through Apache 
FOP :)


-- Edvin

David R Robison skrev:

   

We use Jasper reports. We took what had been started and made some
modifications and have it working in Wicket. It works well for us. 
David


Eyal Golan wrote:

 

reiern70:
Could you please elaborate on how you included BIRT as the part of 
the

application?
You can mail directly to me if you feel it is out of Wicket's scope.

Thanks

On Tue, Sep 9, 2008 at 2:19 PM, reiern70 <[EMAIL PROTECTED]> wrote:



   

Hi,

Actually there is no deed to have BIRT in a separated WAR: in our
project
we
have included it as a (singleton) runtime which is part of the
application.
We also have some kind of WEB interface to manage report 
parameters...

We
found BIRT quite useful  for generating reports thought we 
had some

problems when migrating to new versions (sometimes things that were
working
perfectly with one version got terrible unfixed when moving to the
next).
With BIRT you get "for free" the ability to produce Excel, Word, 
etc...


In our project we went a bit further and built a machinery that 
allows

to
combine BIRT (and non BIRT) PDF reports into books: BIRT reports are
very
good in summarizing information but you are on your own when you 
have to
combine them... This "tool" allows you to build a tree like 
structure (a

book) where the nodes are BIRT reports. The  tool will help in
collecting
all the bookmarks into a table of contents, generate combined 
bookmarks

and
so on...

For simpler use cases I have used iText, JFreeChart, JExcelAPI,
OpenCSV...

Best,

Ernesto



egolan74 wrote:


 

Hi,
We use BIRT as a report engine.
A freelancer has created the prototype BIRT project, and now we 
took

over
it.
1. BIRT gives you all your needs.
2. I don't like it very much actually.
3. It is a different project than Wicket. (different WAR)
4. I plan to check how to integrate it to be in the same project 
/ WAR

of
our main web application.

Our integration:
We don't like the way BIRT implemented the parameters window so we
wanted
to
make our own.
We found out that it would be much easier to develop it with Wicket
than
to
customize it in BIRT.
So:
1. We have a page that has an IFrame (inline frame).
2. For each report (in the BIRT project) there's a Wicket's 
popup modal

window to select parameters.
I am very happy with the module we built for that. It is 
very easy





to


 

create new para

Re: Reporting Engine on Wicket 1.3.4

2008-09-11 Thread Edvin Syse

The freemarker-version is something like this:

The user has created a template using the .fo format with Freemarker, a 
(too) simple example could be:


http://tornado.no/template/show?template=global.fop

(Notice the list-directive to iterate over articles in this case, since 
it is a CMS).


Then, in the Wicket page I do:

byte[] b = FopUtils.createPDF(aStringWithTheMarkup);
RequestCycle.get().setRequestTarget(new ResourceStreamRequestTarget(
new ByteArrayResourceStream(b, contentType)).setFileName(page.getTitle() 
+ ".pdf"));


(contentType is "application/pdf").

The FopUtils class is like this:

public class FopUtils {
   private static FopFactory fopFactory = FopFactory.newInstance();

   public static byte[] createPDF(String foMarkup) throws IOException, 
FOPException, TransformerException {

   ByteArrayOutputStream out = new ByteArrayOutputStream();

   FOUserAgent foUserAgent = fopFactory.newFOUserAgent();
   Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, foUserAgent, 
out);


   // Setup JAXP using identity transformer
   TransformerFactory factory = TransformerFactory.newInstance();
   javax.xml.transform.Transformer transformer = 
factory.newTransformer(); // identity transformer


   // Setup input stream
   Source src = new StreamSource(new StringInputStream(foMarkup));

   // Resulting SAX events (the generated FO) must be piped through 
to FOP

   Result res = new SAXResult(fop.getDefaultHandler());

   // Start XSLT transformation and FOP processing
   transformer.transform(src, res);

   // Result processing
   FormattingResults foResults = fop.getResults();

   out.close();
   return out.toByteArray();
   }


}

.. and you get a simple PDF served in milliseconds :)

-- Edvin



Ajayi Yinka skrev:

Hi, could you shed more lights on how you achieve this?

Thanks in advance.
Yinka

On Thu, Sep 11, 2008 at 3:56 AM, Edvin Syse <[EMAIL PROTECTED]> wrote:

  

We use Apache XmlGraphhics/FOP to create PDF successfully in our
Wicket-applications. Some places I use an external XML-datasource and
convert using XSLT, and other times I use Freemarker to generate the .fo
directly. It's extremely fast, and the markup is easy to understand and easy
to change/style.

Actually, in our Wicket-based CMS, the users can change templates so that
the same article can output HTML, RSS/XML or even PDF through Apache FOP :)

-- Edvin

David R Robison skrev:



We use Jasper reports. We took what had been started and made some
modifications and have it working in Wicket. It works well for us. David

Eyal Golan wrote:

  

reiern70:
Could you please elaborate on how you included BIRT as the part of the
application?
You can mail directly to me if you feel it is out of Wicket's scope.

Thanks

On Tue, Sep 9, 2008 at 2:19 PM, reiern70 <[EMAIL PROTECTED]> wrote:





Hi,

Actually there is no deed to have BIRT in a separated WAR: in our
project
we
have included it as a (singleton) runtime which is part of the
application.
We also have some kind of WEB interface to manage report parameters...
We
found BIRT quite useful  for generating reports thought we had some
problems when migrating to new versions (sometimes things that were
working
perfectly with one version got terrible unfixed when moving to the
next).
With BIRT you get "for free" the ability to produce Excel, Word, etc...

In our project we went a bit further and built a machinery that allows
to
combine BIRT (and non BIRT) PDF reports into books: BIRT reports are
very
good in summarizing information but you are on your own when you have to
combine them... This "tool" allows you to build a tree like structure (a
book) where the nodes are BIRT reports. The  tool will help in
collecting
all the bookmarks into a table of contents, generate combined bookmarks
and
so on...

For simpler use cases I have used iText, JFreeChart, JExcelAPI,
OpenCSV...

Best,

Ernesto



egolan74 wrote:


  

Hi,
We use BIRT as a report engine.
A freelancer has created the prototype BIRT project, and now we took
over
it.
1. BIRT gives you all your needs.
2. I don't like it very much actually.
3. It is a different project than Wicket. (different WAR)
4. I plan to check how to integrate it to be in the same project / WAR
of
our main web application.

Our integration:
We don't like the way BIRT implemented the parameters window so we
wanted
to
make our own.
We found out that it would be much easier to develop it with Wicket
than
to
customize it in BIRT.
So:
1. We have a page that has an IFrame (inline frame).
2. For each report (in the BIRT project) there's a Wicket's popup modal
window to select parameters.
I am very happy with the module we built for that. It is very easy




to


  

create new parameters window.
3. When the user chooses the parameters and press OK, I set, using
AttributeModifier, the src attribute of the inline frame.
4. It is all Ajax, so the inline 

Wicket, HTML or XHTML ?

2008-09-11 Thread pierre . goiffon
Hello,
As a Wicket beginner, I was wondering if there are any contra-indication 
to generate some HTML 4.01 Strict instead of any XHTML 1.0 version 
(transitionnal or strict) ? 
I tried to simply add an HTML 4.01 strict doctype to my html files, and it 
seems to work fine (thought in development mode I have in the source the 
xmlns:wicket in the body tag and all of the Wicket XHTML tags - going to 
deployement mode an they disappear)
Is there anything I must take care of ? Wicket use a namespace server-side 
so... ?
Best regards,
P. Goiffon

Re: WebResource and authentication

2008-09-11 Thread Serkan Camurcuoglu

Session javadoc says:

*Access via Thread Local *- In the odd case where neither a RequestCycle 
nor a Component is available, the currently active Session for the 
calling thread can be retrieved by calling the static method 
Session.get(). This last form should only be used if the first two forms 
cannot be used since thread local access can involve a potentially more 
expensive hash map lookup.







Adriano dos Santos Fernandes wrote:

Am I on wrong direction?

How can I have a PDF generator integrated with Wicket authentication?

I can't image how can I ask Wicket if user is authenticated or not. I 
don't even see how can I access the Session from WebResource...



Adriano


Adriano dos Santos Fernandes escreveu:

H!

I inherited my application class from AuthenticatedWebApplication so 
my pages requires authentication. It worked.


But I've created a class inherited from WebResource to deliver Jasper 
Report in PDF and mounted it with this code:

   mountSharedResource("/Report", new ResourceReference("Report") {
   @Override
   protected Resource newResource()
   {
   return new ReportWebResource();
   }
   }.getSharedResourceKey());

The problem is that when I access /Report it bypass the 
authentication system, and I don't want this. How can I make 
WebResource require authentication?


Thanks,


Adriano


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: WebResource and authentication

2008-09-11 Thread Adriano dos Santos Fernandes

Am I on wrong direction?

How can I have a PDF generator integrated with Wicket authentication?

I can't image how can I ask Wicket if user is authenticated or not. I 
don't even see how can I access the Session from WebResource...



Adriano


Adriano dos Santos Fernandes escreveu:

H!

I inherited my application class from AuthenticatedWebApplication so 
my pages requires authentication. It worked.


But I've created a class inherited from WebResource to deliver Jasper 
Report in PDF and mounted it with this code:

   mountSharedResource("/Report", new ResourceReference("Report") {
   @Override
   protected Resource newResource()
   {
   return new ReportWebResource();
   }
   }.getSharedResourceKey());

The problem is that when I access /Report it bypass the authentication 
system, and I don't want this. How can I make WebResource require 
authentication?


Thanks,


Adriano


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Components render problem

2008-09-11 Thread Serkan Camurcuoglu
how do you submit the form? it seems like you do not add a submit button 
or submit link into the form..



Ajayi Yinka wrote:

Hi,
This problem still persist till now. I can really figure out the cause of
the problem. Could anyone help me out? This is one of the pages in my
application. I have searched all the texts I have on wicket to get the cause
of the problem but I coudn't find one.

I appreciate any asisstance anyone can render on this.

Thanks in advance.
package web.page;

import web.UserSession;
import web.component.MainNavigationComponent;
import pojo.User;
import services.TouchPayService;
import java.util.List;
import org.apache.wicket.Session;
import org.apache.wicket.injection.web.InjectorHolder;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.form.PasswordTextField;
import org.apache.wicket.markup.html.form.TextField;
import org.apache.wicket.markup.html.panel.FeedbackPanel;
import org.apache.wicket.model.Model;
import org.apache.wicket.spring.injection.annot.SpringBean;

/**
 *
 * @author AJAYI YINKA
 */
public final class Login extends AbstractConsoleWebPage  {

Form form;
private TextField userId;
private PasswordTextField userPassword;
List users;
@SpringBean
TouchPayService touchpay;
private static final long serialVersionUID = 1L;
public Login() {

InjectorHolder.getInjector().inject(this);

org.apache.wicket.Component mainNavigation;

mainNavigation = new MainNavigationComponent("mainNavigation",
null);

userId = new TextField("userId", new Model(" "));
userId.setRequired(true);


userPassword = new PasswordTextField("userPassword", new Model("
"));
userPassword.setRequired(true);

form = new LoginFormComponent("f");

add(new FeedbackPanel("errorMsg"));
form.add(userId);
form.add(userPassword);
add(form);
add(mainNavigation);


}

public void setUser(User user) {
((UserSession) getSession()).setCurrentUser(user);
}


@Override
public String getTitle() {
return "Login Page";
}

class LoginFormComponent extends Form {

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

@Override
public void onError(){

setResponsePage(Login.class);
 }

@Override
public void onSubmit() {


String userId = (String) Login.this.getUserId();
String userPassword = (String) Login.this.getPassword();

User user = null;
users = touchpay.findAllUsers();

for (User userInDB : users) {
if ((userInDB.getUsername().equals(userId)) &&
(userInDB.getPassword().equals(userPassword))) {
user = userInDB;
}
}
if (user == null) {
// not yet implemented
} else {
setUser(user);
Session.get().info("You have logged in successfully");

if (!continueToOriginalDestination()) {
setResponsePage(HomePage.class);
}
}

}
}

/** Helper methods to retrieve the userId and the password **/
protected String getUserId() {
return userId.getModelObjectAsString();
}

protected String getPassword() {
return userPassword.getModelObjectAsString();
}
}




On Wed, Sep 10, 2008 at 6:18 AM, Ajayi Yinka <[EMAIL PROTECTED]>wrote:

  

hi guys,
I have try to get over the problem by calling Login.class in onError
method. this seems to cover this bugs, but I am not satistify as the error
message is still redisplaying in the next page.
I think what i really need is the problems that are associated with
validation.

On Wed, Sep 10, 2008 at 4:58 AM, Ajayi Yinka <[EMAIL PROTECTED]>wrote:



I thought as much, it seems I am missing something out in validation
process. Please help me check out from this snippet of my codes

userId = new TextField("userId", new Model(""));
userId.setRequired(true);


userPassword = new PasswordTextField("userPassword", new
Model(""));
userPassword.setRequired(true);

form.add(userId);
form.add(userPassword);
  add(form);

add(new FeedbackPanel("errorMsg"));

thanks.



On Wed, Sep 10, 2008 at 4:06 AM, Serkan Camurcuoglu <[EMAIL PROTECTED]
  

wrote:

if onSubmit is not called and the form is redisplayed with the values

that you've last entered, it seems like the form is not validated
successfully..



Ajayi Yinka wrote:



Hi guys,
I am a newbie in wicket. I am presently developpng an application using
wicket framework. I am having problem in submitting my forms.
The form submissionis actually working whenever I enter a value but if
no
value is put in the textbox, feedback panel will  display  the error
message
(I think this is good).

The problem is that if I now en

Apache FOP and Wicket

2008-09-11 Thread Paolo Di Tommaso
Dear all,

If I'm not wrong Wicket is able to manage any king of markup not just HTML.


So it would be possibile to use Wicket to generate an Apache FOP markup to
rendere a PDF file? Any suggestions?

Thank you,
-- Paolo


Re: Reporting Engine on Wicket 1.3.4

2008-09-11 Thread Ajayi Yinka
Hi, could you shed more lights on how you achieve this?

Thanks in advance.
Yinka

On Thu, Sep 11, 2008 at 3:56 AM, Edvin Syse <[EMAIL PROTECTED]> wrote:

> We use Apache XmlGraphhics/FOP to create PDF successfully in our
> Wicket-applications. Some places I use an external XML-datasource and
> convert using XSLT, and other times I use Freemarker to generate the .fo
> directly. It's extremely fast, and the markup is easy to understand and easy
> to change/style.
>
> Actually, in our Wicket-based CMS, the users can change templates so that
> the same article can output HTML, RSS/XML or even PDF through Apache FOP :)
>
> -- Edvin
>
> David R Robison skrev:
>
>> We use Jasper reports. We took what had been started and made some
>> modifications and have it working in Wicket. It works well for us. David
>>
>> Eyal Golan wrote:
>>
>>> reiern70:
>>> Could you please elaborate on how you included BIRT as the part of the
>>> application?
>>> You can mail directly to me if you feel it is out of Wicket's scope.
>>>
>>> Thanks
>>>
>>> On Tue, Sep 9, 2008 at 2:19 PM, reiern70 <[EMAIL PROTECTED]> wrote:
>>>
>>>
>>>
 Hi,

 Actually there is no deed to have BIRT in a separated WAR: in our
 project
 we
 have included it as a (singleton) runtime which is part of the
 application.
 We also have some kind of WEB interface to manage report parameters...
 We
 found BIRT quite useful  for generating reports thought we had some
 problems when migrating to new versions (sometimes things that were
 working
 perfectly with one version got terrible unfixed when moving to the
 next).
 With BIRT you get "for free" the ability to produce Excel, Word, etc...

 In our project we went a bit further and built a machinery that allows
 to
 combine BIRT (and non BIRT) PDF reports into books: BIRT reports are
 very
 good in summarizing information but you are on your own when you have to
 combine them... This "tool" allows you to build a tree like structure (a
 book) where the nodes are BIRT reports. The  tool will help in
 collecting
 all the bookmarks into a table of contents, generate combined bookmarks
 and
 so on...

 For simpler use cases I have used iText, JFreeChart, JExcelAPI,
 OpenCSV...

 Best,

 Ernesto



 egolan74 wrote:


> Hi,
> We use BIRT as a report engine.
> A freelancer has created the prototype BIRT project, and now we took
> over
> it.
> 1. BIRT gives you all your needs.
> 2. I don't like it very much actually.
> 3. It is a different project than Wicket. (different WAR)
> 4. I plan to check how to integrate it to be in the same project / WAR
> of
> our main web application.
>
> Our integration:
> We don't like the way BIRT implemented the parameters window so we
> wanted
> to
> make our own.
> We found out that it would be much easier to develop it with Wicket
> than
> to
> customize it in BIRT.
> So:
> 1. We have a page that has an IFrame (inline frame).
> 2. For each report (in the BIRT project) there's a Wicket's popup modal
> window to select parameters.
> I am very happy with the module we built for that. It is very easy
>
>
 to


> create new parameters window.
> 3. When the user chooses the parameters and press OK, I set, using
> AttributeModifier, the src attribute of the inline frame.
> 4. It is all Ajax, so the inline frame is updated with the src, and the
> report is generated with the correct parameters..
> This module is VERY new in our project. I still have some bugs, but
> this
> is
> how we integrated BIRT and Wicket.
>
> A question to you all:
> Has anyone worked with Wicket and BIRT?
> (funny, but I planned to ask this anyway)
>
> Eyal
>
>
> On Mon, Sep 8, 2008 at 11:30 AM, Leon Nieuwoudt
> <[EMAIL PROTECTED]>wrote:
>
>
>
>> Hi all
>>
>> I would like to know what kind of reporting engines are commonly used
>> for Wicket-based apps? We have the need to generate CSV, Excel, and
>> PDF files with graphs and pretty graphics.
>>
>> We've looked at the JasperReports integration but the docs say it's
>> not
>> complete
>>
>> Thanks in advance
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>>
> --
> Eyal Golan
> [EMAIL PROTECTED]
>
> Visit: http://jvdrums.sourceforge.net/
> LinkedIn: http://www.linkedin.com/in/egolan74
>
> P Save a tree. Please don't print this e-mail unless it's really
>
>
 necessary


> -
> Eyal Golan
> [EMAIL PROTECTED]
>
> Visit: JVDr

Re: Components render problem

2008-09-11 Thread Ajayi Yinka
Hi,
This problem still persist till now. I can really figure out the cause of
the problem. Could anyone help me out? This is one of the pages in my
application. I have searched all the texts I have on wicket to get the cause
of the problem but I coudn't find one.

I appreciate any asisstance anyone can render on this.

Thanks in advance.
package web.page;

import web.UserSession;
import web.component.MainNavigationComponent;
import pojo.User;
import services.TouchPayService;
import java.util.List;
import org.apache.wicket.Session;
import org.apache.wicket.injection.web.InjectorHolder;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.form.PasswordTextField;
import org.apache.wicket.markup.html.form.TextField;
import org.apache.wicket.markup.html.panel.FeedbackPanel;
import org.apache.wicket.model.Model;
import org.apache.wicket.spring.injection.annot.SpringBean;

/**
 *
 * @author AJAYI YINKA
 */
public final class Login extends AbstractConsoleWebPage  {

Form form;
private TextField userId;
private PasswordTextField userPassword;
List users;
@SpringBean
TouchPayService touchpay;
private static final long serialVersionUID = 1L;
public Login() {

InjectorHolder.getInjector().inject(this);

org.apache.wicket.Component mainNavigation;

mainNavigation = new MainNavigationComponent("mainNavigation",
null);

userId = new TextField("userId", new Model(" "));
userId.setRequired(true);


userPassword = new PasswordTextField("userPassword", new Model("
"));
userPassword.setRequired(true);

form = new LoginFormComponent("f");

add(new FeedbackPanel("errorMsg"));
form.add(userId);
form.add(userPassword);
add(form);
add(mainNavigation);


}

public void setUser(User user) {
((UserSession) getSession()).setCurrentUser(user);
}


@Override
public String getTitle() {
return "Login Page";
}

class LoginFormComponent extends Form {

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

@Override
public void onError(){

setResponsePage(Login.class);
 }

@Override
public void onSubmit() {


String userId = (String) Login.this.getUserId();
String userPassword = (String) Login.this.getPassword();

User user = null;
users = touchpay.findAllUsers();

for (User userInDB : users) {
if ((userInDB.getUsername().equals(userId)) &&
(userInDB.getPassword().equals(userPassword))) {
user = userInDB;
}
}
if (user == null) {
// not yet implemented
} else {
setUser(user);
Session.get().info("You have logged in successfully");

if (!continueToOriginalDestination()) {
setResponsePage(HomePage.class);
}
}

}
}

/** Helper methods to retrieve the userId and the password **/
protected String getUserId() {
return userId.getModelObjectAsString();
}

protected String getPassword() {
return userPassword.getModelObjectAsString();
}
}




On Wed, Sep 10, 2008 at 6:18 AM, Ajayi Yinka <[EMAIL PROTECTED]>wrote:

>
> hi guys,
> I have try to get over the problem by calling Login.class in onError
> method. this seems to cover this bugs, but I am not satistify as the error
> message is still redisplaying in the next page.
> I think what i really need is the problems that are associated with
> validation.
>
> On Wed, Sep 10, 2008 at 4:58 AM, Ajayi Yinka <[EMAIL PROTECTED]>wrote:
>
>>
>>
>> I thought as much, it seems I am missing something out in validation
>> process. Please help me check out from this snippet of my codes
>>
>> userId = new TextField("userId", new Model(""));
>> userId.setRequired(true);
>>
>>
>> userPassword = new PasswordTextField("userPassword", new
>> Model(""));
>> userPassword.setRequired(true);
>>
>> form.add(userId);
>> form.add(userPassword);
>>   add(form);
>>
>> add(new FeedbackPanel("errorMsg"));
>>
>> thanks.
>>
>>
>>
>> On Wed, Sep 10, 2008 at 4:06 AM, Serkan Camurcuoglu <[EMAIL PROTECTED]
>> > wrote:
>>
>>> if onSubmit is not called and the form is redisplayed with the values
>>> that you've last entered, it seems like the form is not validated
>>> successfully..
>>>
>>>
>>>
>>> Ajayi Yinka wrote:
>>>
 Hi guys,
 I am a newbie in wicket. I am presently developpng an application using
 wicket framework. I am having problem in submitting my forms.
 The form submissionis actually working whenever I enter a value but if
 no
 value is put in the textbox, feedback panel will  display  the error
 message
 (I think this is good).

 The problem is that if I now en

Wicket 1.3.4 + SWFObject

2008-09-11 Thread Piller Sébastien

Hello,

this time I haven't any dummy question :)

I've developped a wicket panel to display a *.swf file with a 
autoinstall feature of the flash player, using SWFObject, and I'm ready 
to share it with the community.


Are you interested?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: WicketTester feature request

2008-09-11 Thread Jan Stette
2008/9/11 Timo Rantalaiho <[EMAIL PROTECTED]>

Hi Timo, thanks for your reply.  See below for comments.


On Wed, 10 Sep 2008, Jan Stette wrote:
> > I've had a few problems with WicketTester recently and would like to
> submit
> > a request for when it gets overhauled for version 1.5 (is that still the
> > plan by the way?):
>
> Depending on what exactly "overhaul" means (English is not
> my native language), yes it is :)


Cool!


> > It would be really useful to have a clean way to hook in code to execute
> > pre- and post-request for operations that take place through
> WicketTester.
> > In other words, some way to intercept all operations.  In a real
> > application, I can use a ServletFilter or override methods in
> WicketFilter
> > to perform per-request initialisation and cleanup, but WicketTester
> doesn't
> > execute its operations through these classes.  So it would be very useful
> to
> > do something similar when using WicketTester.
>
> I'm not sure I understand what are you trying to achieve. Do
> you have a concrete example?


One example is where something like a Hibernate Session is initialised and a
transaction created at the start of each request, then closed at the end of
the request.  So, to make the same steps happen in a test that uses the
WicketTester.



> WicketTester (and unit testing in general) should aim to
> test one behavior of an object in a certain state per test
> execution. So the test methods should conceptually be
> something like
>
>Panel containing selected user
>- is visible
>- displays user data
>- stores changed user data
>
> It sounds suspicious if you do a lot of operations in a single
> unit test method. Longer integration / acceptance / functional
> tests are better done with a different kind of tool that is
> actually invoking the whole deployed application.
>
> Does this seem to make sense?


Absolutely, I see what you're saying.  Part of the problem here may be that
on the project I'm working on, WicketTester is indeed used to do
integration/functional tests.  I'm not sure why this was done in the first
place, but it does seem to work - most of the time!  I guess the API that
WicketTester provides for performing actions like clicking links, submitting
forms etc. was convenient to drive from the system test harness, possibly
simpler than actually driving a "real" web front end.

Anyway, if this really is an abuse of WicketTester that you have no
intention of supporting, then please say so!


> I've tried various ways for doing this.  One was to extend the
> RequestCycle
> > with code that it calls out to "pre" processing when created and "post"
> > processing when detached.  I found this didn't work as sometimes
> > WicketTester will create multiple request cycles whilst performing a
> single
> > operation, so I got multiple invocations to the "pre" code.
>
> Do you have an example of when multiple request cycles get
> created on a single operation? It sounds strange. Maybe the
> request cycle gets created ad hoc (as you mentioned) in some
> places without checking first whether there is one in place
> already.


Looking closer at this to find an example, I've realised that it's our own
extended WicketTester class that does this in a lot of cases, for reasons
that aren't entirely clear to me.  So it's probably our fault - sorry about
that.  (The guy who wrote this code is no longer with us so I'm trying to
piece all this together...)

Still, there seems to be one case where this happens with just the basic
WicketTester functionality.  First, creating a WicketTester:

XWicketTester.createRequestCycle() line: 436
XWicketTester(MockWebApplication).(WebApplication, String) line: 199

XWicketTester(BaseWicketTester).(WebApplication, String) line: 205
XWicketTester(WicketTester).(WebApplication, String) line: 308
XWicketTester(WicketTester).(WebApplication) line: 291
XWicketTester.(WebApplication) line: 65
Test(Test).initTester() line: 141
Test(Test).openLoginPage() line: 197

then directly afterwards going to a page:

XWicketTester.createRequestCycle() line: 436
XWicketTester(MockWebApplication).setupRequestAndResponse(boolean) line: 547

XWicketTester(MockWebApplication).setupRequestAndResponse() line: 561
XWicketTester(MockWebApplication).processRequestCycle(Class, PageParameters)
line: 370
XWicketTester(MockWebApplication).processRequestCycle(Class) line: 359
XWicketTester(BaseWicketTester).startPage(Class) line: 290
Test(Test).openLoginPage() line: 197

I can't see any call to RequestCycle.detach() between those two.

Hope that makes sense at all...

Regards,
Jan


Access iframe

2008-09-11 Thread NTS

Hi,

I have a wicket page with a textbox, button and iframe in it. when the user
enters some text and submits, a request is sent to another ASP page(on
different domain) with the value and the callback file name.

AjaxButton btnFindMe = new AjaxButton("btnFindMe", finderPanelForm) {
@Override
protected void onSubmit(final AjaxRequestTarget target, final
Form form) {
target.addComponent(iframe);
iframe.add(new AttributeModifier("src", true, new
AbstractReadOnlyModel() {
@Override
public Object getObject() {
String callbackPage = "http://mywicketdomain/finder/";;
String retValue =
"http://someotherdomain/callme.asp?query="; + tmpQuery + "&FileName=" +
callbackPage;
return retValue;
}
}));
}
};

The ASP to which I am sending data will respond back (with values in query
string) by redirecting to the page I have passed.

Now I want to get the value back from Iframe to the main wicket page. Any
clues?

I dont have any control over the ASP file.

Thanks,
NTS

-
http://ntsrikanth.blogspot.com/
-- 
View this message in context: 
http://www.nabble.com/Access-iframe-tp19432530p19432530.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Hot deployment / code swapping

2008-09-11 Thread pixologe


Martijn Dashorst wrote:
> 
> Wicket can't magically detect changes that are not on the classpath.
> 

Well, you never what what Frameworks might be able to do below the hood.
And with all the magical things wicket can do, I wouldn't have been too
surprised to find a config param pointing to my sources folder so that it
could be scanned at runtime...

Even more when there is something like
IResourceSettings#setResourcePollFrequency which def helped lead me into the
wrong direction here - but I guess this is just for polling the files within
the target location then...

Thanks.




-- 
View this message in context: 
http://www.nabble.com/Hot-deployment---code-swapping-tp19410295p19432378.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Reporting Engine on Wicket 1.3.4

2008-09-11 Thread Edvin Syse
We use Apache XmlGraphhics/FOP to create PDF successfully in our 
Wicket-applications. Some places I use an external XML-datasource and 
convert using XSLT, and other times I use Freemarker to generate the .fo 
directly. It's extremely fast, and the markup is easy to understand and 
easy to change/style.


Actually, in our Wicket-based CMS, the users can change templates so 
that the same article can output HTML, RSS/XML or even PDF through 
Apache FOP :)


-- Edvin

David R Robison skrev:
We use Jasper reports. We took what had been started and made some 
modifications and have it working in Wicket. It works well for us. David


Eyal Golan wrote:

reiern70:
Could you please elaborate on how you included BIRT as the part of the
application?
You can mail directly to me if you feel it is out of Wicket's scope.

Thanks

On Tue, Sep 9, 2008 at 2:19 PM, reiern70 <[EMAIL PROTECTED]> wrote:

 

Hi,

Actually there is no deed to have BIRT in a separated WAR: in our 
project

we
have included it as a (singleton) runtime which is part of the 
application.
We also have some kind of WEB interface to manage report 
parameters... We

found BIRT quite useful  for generating reports thought we had some
problems when migrating to new versions (sometimes things that were 
working
perfectly with one version got terrible unfixed when moving to the 
next).

With BIRT you get "for free" the ability to produce Excel, Word, etc...

In our project we went a bit further and built a machinery that 
allows to
combine BIRT (and non BIRT) PDF reports into books: BIRT reports are 
very
good in summarizing information but you are on your own when you 
have to
combine them... This "tool" allows you to build a tree like 
structure (a
book) where the nodes are BIRT reports. The  tool will help in 
collecting
all the bookmarks into a table of contents, generate combined 
bookmarks and

so on...

For simpler use cases I have used iText, JFreeChart, JExcelAPI, 
OpenCSV...


Best,

Ernesto



egolan74 wrote:
   

Hi,
We use BIRT as a report engine.
A freelancer has created the prototype BIRT project, and now we 
took over

it.
1. BIRT gives you all your needs.
2. I don't like it very much actually.
3. It is a different project than Wicket. (different WAR)
4. I plan to check how to integrate it to be in the same project / 
WAR of

our main web application.

Our integration:
We don't like the way BIRT implemented the parameters window so we 
wanted

to
make our own.
We found out that it would be much easier to develop it with Wicket 
than

to
customize it in BIRT.
So:
1. We have a page that has an IFrame (inline frame).
2. For each report (in the BIRT project) there's a Wicket's popup 
modal

window to select parameters.
 I am very happy with the module we built for that. It is very 
easy
  

to
   

create new parameters window.
3. When the user chooses the parameters and press OK, I set, using
AttributeModifier, the src attribute of the inline frame.
4. It is all Ajax, so the inline frame is updated with the src, and 
the

report is generated with the correct parameters..
This module is VERY new in our project. I still have some bugs, but 
this

is
how we integrated BIRT and Wicket.

A question to you all:
Has anyone worked with Wicket and BIRT?
(funny, but I planned to ask this anyway)

Eyal


On Mon, Sep 8, 2008 at 11:30 AM, Leon Nieuwoudt
<[EMAIL PROTECTED]>wrote:

 

Hi all

I would like to know what kind of reporting engines are commonly used
for Wicket-based apps? We have the need to generate CSV, Excel, and
PDF files with graphs and pretty graphics.

We've looked at the JasperReports integration but the docs say 
it's not

complete

Thanks in advance

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
Eyal Golan
[EMAIL PROTECTED]

Visit: http://jvdrums.sourceforge.net/
LinkedIn: http://www.linkedin.com/in/egolan74

P Save a tree. Please don't print this e-mail unless it's really
  

necessary
   

-
Eyal Golan
[EMAIL PROTECTED]

Visit: JVDrums
LinkedIn: LinkedIn

  

--
View this message in context:
http://www.nabble.com/Reporting-Engine-on-Wicket-1.3.4-tp19367975p19390209.html 


Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






  




--
Med vennlig hilsen

Edvin Syse
Programutvikler

www.sysedata.no / [EMAIL PROTECTED]
Tlf: 333 49700  / Faks: 333 49701
Adresse: Møllegaten 12, 3111 Tønsberg

Syse Data AS -Profesjonelle IT-tjenester 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Migrate to 1.4 - Problems...

2008-09-11 Thread Markus
Hi all,

 

first of all, I want to ask how the CompundPropertyModel replaces the
BoundCompoundPropertyModel? How can I bind something?  Before it was
model.bind(Component, String), now it´s only model.bind(String)? What
Component is bound? How?  Don´t get that  L

 

 

Second:

 

regF.add(new AjaxFallbackButton("submitButton", regF) {

 

  private static final long serialVersionUID = 1L;

 

  /**

   * @see
org.apache.wicket.ajax.markup.html.form.AjaxButton#onSubmit(org.apache.wicke
t.ajax.AjaxRequestTarget,

   *  org.apache.wicket.markup.html.form.Form)

   */

  @Override

  protected void onSubmit(AjaxRequestTarget target, Form
form) {

...

  }

}

 

So Form is here unparameterized(?) and would work, but I have to cast the
ModelObject. If I parameterize(?) the Form Eclipse says I have to override
something, what I don´t do… says Eclipse.

If I remove the @Override Eclipse says it has the same result-Type as a
given method so I have to override it?

 

Can anyone help me out of this?

 

Regards 

Markus



Re: JavaRebel experience

2008-09-11 Thread Johan Compagner
thats our own modification watcher
turn it on (development mode or manual)

On Wed, Sep 10, 2008 at 4:52 PM, reikje <[EMAIL PROTECTED]> wrote:

>
> Is it possible to have Java Rebel reload the Wicket HTML as well? Like when
> we deploy a war file to JBoss, it will contain html and class files. The
> class files I can reload using Java Rebel, how would you do it with the
> html
> files?
>
>
> Stefan Simik wrote:
> >
> > Java Rebel worked for me too.
> > I had no such problem.
> >
>
> --
> View this message in context:
> http://www.nabble.com/JavaRebel-experience-tp13422257p19414750.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


BookmarkablePageLink in ModalWindow, a bug?

2008-09-11 Thread Artur W.

Hi,

I create a bookmarkablePageLink and add it to the page:
new BookmarkablePageLink("link", ProductPage.class, new PageParameters("0="
+ product.getId()));

It generates correct url:
http://127.0.0.1:8080/myapp/admin/product/2446/

But when I add the same bookmarkablePageLink  to a ModalWinow it generates
(incorect?) url:
http://127.0.0.1:8080/myapp/admin/product/2446/wicket:pageMapName/modal-dialog-pagemap/

When I click on this link, a than submit a form on the ModalWindow it gives
a error (because the pageMap was cleared when opening the
BookmarbablePage??)

I use Wicket 1.3.4.

Thanks in advance,
Artur

-- 
View this message in context: 
http://www.nabble.com/BookmarkablePageLink-in-ModalWindow%2C-a-bug--tp19430177p19430177.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: https flips to http

2008-09-11 Thread Rikard Lindström

I have the same problem as above, and by using the Tamper Data plugin I get
similar results.
A request to https flips to http. Everything works ofc if both protocols are
opened, but in production mode we only use https :(
Do you have any ideas how to solve this issue?

http://www.nabble.com/file/p19429650/redirect.bmp 


Jeremy Thomerson-5 wrote:
> 
> Wicket uses relative URLs, so at first guess, I'd think it was something
> else.  Start with something like 


-- 
View this message in context: 
http://www.nabble.com/https-flips-to-http-tp19403303p19429650.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Forcing HybridUrlCodingStrategy version change

2008-09-11 Thread Sergio García

I've trying to make an ajax undo implementation into a wicket page. Is there
any way to force HybridUrlCodingStrategy version change? I want that some
(or all) of the ajax enabled components could change the wicket page version
so the users could press the web browser back button in order to undo their
last change. 

Thank you

-- 
View this message in context: 
http://www.nabble.com/Forcing-HybridUrlCodingStrategy-version-change-tp19429257p19429257.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]