Re: Issue w/ Ajax and setting form containers visible in Deployment mode.

2013-11-08 Thread Ben S
Thank for the clarification; I'll be sure to keep that in mind with future 
development. My web application is now running as designed, thanks for your 
feedback everyone!



On Thursday, November 7, 2013 11:46 PM, Martin Grigorov mgrigo...@apache.org 
wrote:
 
Hi,

wicket:xyz tags are not rendered in deployment mode.
See IMarkupSettings#setStripWicketTags(boolean)



On Thu, Nov 7, 2013 at 8:53 PM, Ben S br...@yahoo.com wrote:

 Hi, I found the solution before receiving an answer.

 I found that using the wicket:container markup tags in development mode
 will actually work with setVisible toggling, but not in deployment mode. I
 don't know if this is due to me using the wicket:container tag incorrectly
 or not. For my solution I just switched the tags over to div tags. I
 realized after the fact I probably could have used panels as opposed to
 containers for the solution, but it's a bit too late for that now.



 On Thursday, November 7, 2013 9:12 AM, Ben S br...@yahoo.com wrote:

 Here's the code and markup, I'll begin looking for any errors  I have
 made, thanks!
 http://pastebin.com/eVQfYCpx





 On Thursday, November 7, 2013 5:20 AM, Nick Pratt nbpr...@gmail.com
 wrote:

 This functionality does work - can you put your code up on
 pastebin/gist/whatever so we can take a look? (Markup and Source please)



 On Wed, Nov 6, 2013 at 8:14 PM, Ben S br...@yahoo.com wrote:

  Hello,
 
  I've been trying to work on this issue for hours and have had no luck.
 
  Basically, my code works just fine in development mode as intended,
  however when in Deployment mode I can't seem to get WebMarkupContainers
  toggle between visibility.
 
  If they're visible, they won't go invisible, however if they are
 invisible
  they will toggle visible.
 
  However, the markup containers seems to work as expected when the form is
  passed to the AjaxRequestTarget,  however this will clear all the data
  that's on the form page, even though the form is set up for a compound
  property model..
 
  Is there any way to set the webmarkupcontainers visible to false using
  ajax in Deployment mode?


Re: wicket conversation scope - weld integration

2013-11-08 Thread brazz
Hi again,

finally i found the last problem bei incident:
I had the beans.xml under WEB-INF and WEB-INF/META-INF as described in the
docs and user forums. But actually it turned out that i had to put it under
classes/META-INF or whatever the class folder is named. 
But nevertheless your hints were very valuable. 

Thank you!



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/wicket-conversation-scope-weld-integration-tp4662028p4662228.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Struggling with ContextRelativeResource, RenderedDynamicImageResource and SharedResources

2013-11-08 Thread Ernesto Reinaldo Barreiro
may I ask what is the use case for this 1x1 PNG? Is it something that
cannot be handled via CSS + static image on resources?


On Fri, Nov 8, 2013 at 8:49 AM, Dirk Forchel dirk.forc...@exedio.comwrote:

 Okay. I know, but their is no need for an additional parameter. I want to
 generate always the same image (a 1x1px PNG with a transparent background).
 So I don't see the need for a parameter.
 But I try to prepare a quickstart.



 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Struggling-with-ContextRelativeResource-RenderedDynamicImageResource-and-SharedResources-tp4662190p4662225.html
 Sent from the Users forum mailing list archive at Nabble.com.

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




-- 
Regards - Ernesto Reinaldo Barreiro


Re: Session expires almost immediate after login

2013-11-08 Thread Martin Grigorov
Hi,

The sessionid appears in the url when the application is requested for a
first time.
In this case the request doesn't bring JSESSIONID cookie and the server
doesn't know whether cookies are supported/enabled in the browser so it
uses both url rewriting and cookie in the response. When the second request
is comes the server sees the cookie and there is no need to write the
sessionid in the url anymore.
Remove the cookie locally and you will see it in the url.

You can add a session listener to see why the sessions are invalidated. See
http://www.mkyong.com/servlet/a-simple-httpsessionlistener-example-active-sessions-counter/
.
Put a breakpoint or dump the stacktrace in onDestroyed.


On Thu, Nov 7, 2013 at 5:06 PM, Marieke Vandamme marieke.vanda...@tvh.bewrote:

 Dear wicket users,

 We have an ecommerce platform based on wicket. Since our latest release
 (with wicket 6.8.0) multiple users complain that their session expires too
 early.
 We did not set the timeout in our web.xml or something, so it's handled by
 jetty, and the default of 30 minutes is set there.
 The users we could ask, are using google chrome as browser. One time we
 could see this problem, the jsessionid was present in the url when going to
 the login page.
 Myself I never have this problem, and the jsessionid is never present in my
 url. The user needs to turn on cookies, because this is something that we
 test on the login page, and otherwise no login is possible.
 Has it something to do with the jsessionid? Has anyone else had this
 problem? I know it's hard, because I can not simulate or attach quickstart
 or something.
 Any help is appreciated. Thanks in advance. Kind Regards, Marieke Vandamme



 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Session-expires-almost-immediate-after-login-tp4662205.html
 Sent from the Users forum mailing list archive at Nabble.com.

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




Re: Struggling with ContextRelativeResource, RenderedDynamicImageResource and SharedResources

2013-11-08 Thread Dirk Forchel
No, actually not. We've got a complete layout for our web applications from
an external design company and they use this CSS+static image resource thing
quite often. And, as I have mentioned before, we have two Wicket web
applications running in the same container. One of them on the root context
and one of them on e.g. /foo. If I start the application server (Tomcat)
and request the home page of the second application (e.g.
/foo/uk/en/home.html) the first application is initialized too, just to
render the static placeholder image from the web container. I was wondering
why and started to do some investigation. If I would disable the first web
application (remove the servlet from web.xml), all works fine and even the
static image resource from the web container is delivered.
By the way ... I've finished to prepare a quickstart (see uploaded
quickstart.zip file). At the first glance all images were rendered. I've
added an additional mapper (the LocalMapper from the Wicket examples) to
simulate our Country/Language mapping solution and ... oh wonder ... the
second and third images are not rendered!

quickstart.zip
http://apache-wicket.1842946.n4.nabble.com/file/n4662232/quickstart.zip  



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Struggling-with-ContextRelativeResource-RenderedDynamicImageResource-and-SharedResources-tp4662190p4662232.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Wicket site on Android phone

2013-11-08 Thread dpmihai
I also tried to make a desktop Wicket application to look good on Android
phone.

1. Depending on application there is a big possibility to not be able to
show all the information. For me, it was ok to use css media query to have a
different css for Android phone. I had to tweak with fonts size and hide
some markups.

2. Modal Windows are a big pain for me. I had to make them show near the top
with fixed position like:

.wicket-modal { 
position: fixed !important; 
top:5% !important;  
}

Without this, on Webkit browser if you scroll down to click some link which
opens a modal, you even won't be able to see the modal (depends on how much
scrolling you need).

I cannot drag a modal on screen (neither in Webkit browser nor in Chrome).
Only the background is dragged.

So I guess, if you can avoid modals, then do it. If you cannot avoid them,
then keep them as small as possible.




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-site-on-Android-phone-tp2966635p4662234.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Wicket Components as Class Members

2013-11-08 Thread mashleyttu
Dumb question everyone,

I heard somewhere that it is bad to declare variables as final in Wicket
because they are treated as class members, and Wicket serializes the page
that would increase your session size.

Because of this I have not declared any components I add to my page as final
(or created class member variables for them), and if I need to access them
from an anonymous class I use the page.get(compId) method. This has made
my code very cumbersome and hard to read.

I got to thinking, since Wicket serializes all the components anyways, what
would it hurt to make a component final or a class member when declaring it?

It would sure make it easier to access later on. I really feel like an idiot
asking this question, just concerned about session size.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-Components-as-Class-Members-tp4662235.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Wicket Components as Class Members

2013-11-08 Thread meduolis
The only thing I googled related to final and wicket is this:

7. Java nuances — There are two Java nuances that catch many Wicket
newcomers off-guard. 


1. The first is serialization. Wicket uses Java serialization to store the
state of your component hierarchy (the page and all its components and their
components and so-on) in memory or on disk between page requests. This means
you need to be careful because things can get serialized by accident. The
most common cause of this is declaring a variable final outside of an
anonymous inner class and then using it inside that anonymous inner class.
Doing this causes the compiler to add a member variable to the anonymous
inner class. If that final variable is a large collection or a service from
your middle-tier, this can cause a gigantic explosion of memory usage and
can be hard to track down. In short: be very cautious with what you
reference within anonymous inner classes and use member variables in your
classes sparingly.


source:
http://wickettraining.com/ten-things-every-wicket-programmer-should-know.html



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-Components-as-Class-Members-tp4662235p4662237.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Handler after jqXhR success et before ajax response proccess

2013-11-08 Thread Olivier Dutrieux
I use a AjaxCallListener (getBeforeHandler) to execute some javascript before
the ajax processing, but I don't find a handler to execute some javascript
after jqXHR.success et before the Ajax response is process.

Is there a aim ?

Duto



-
Duto
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Handler-after-jqXhR-success-et-before-ajax-response-proccess-tp4662239.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Handler after jqXhR success et before ajax response proccess

2013-11-08 Thread Sven Meier
There's no callback before the Ajax response is processed - what do you 
need it for?


Sven

On 11/08/2013 07:45 PM, Olivier Dutrieux wrote:

I use a AjaxCallListener (getBeforeHandler) to execute some javascript before
the ajax processing, but I don't find a handler to execute some javascript
after jqXHR.success et before the Ajax response is process.

Is there a aim ?

Duto



-
Duto
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Handler-after-jqXhR-success-et-before-ajax-response-proccess-tp4662239.html
Sent from the Users forum mailing list archive at Nabble.com.

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




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



Re: Wicket Components as Class Members

2013-11-08 Thread Sven Meier

Hi,

since Wicket serializes all the components anyways, what would it hurt 
to make a

component final or a class member when declaring it?

your reasoning is sound, it does not hurt (besides 4 additional bytes 
for the object reference).



if I need to access them from an anonymous class I use the page.get(compId) 
method.
This has made my code very cumbersome and hard to read.


I've seen this in some projects, personally I can't stand this usage.
  


Regards
Sven


On 11/08/2013 05:08 PM, mashleyttu wrote:

Dumb question everyone,

I heard somewhere that it is bad to declare variables as final in Wicket
because they are treated as class members, and Wicket serializes the page
that would increase your session size.

Because of this I have not declared any components I add to my page as final
(or created class member variables for them), and if I need to access them
from an anonymous class I use the page.get(compId) method. This has made
my code very cumbersome and hard to read.

I got to thinking, since Wicket serializes all the components anyways, what
would it hurt to make a component final or a class member when declaring it?

It would sure make it easier to access later on. I really feel like an idiot
asking this question, just concerned about session size.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-Components-as-Class-Members-tp4662235.html
Sent from the Users forum mailing list archive at Nabble.com.

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




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



Re: Handler after jqXhR success et before ajax response proccess

2013-11-08 Thread Olivier Dutrieux
To simple explain : on before XHRHttpRequest I change some div and want to
restore the div before Ajax response is processed because sometime the
respond processed update the div and sometime not. and if the ajax response
update the div I want to keep it (don't restore it) and if the div is not
update I want to restore it and for me the best think is to restore it in
all case before the response is processed ...

Sorry for my english :s

Duto



-
Duto
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Handler-after-jqXhR-success-et-before-ajax-response-proccess-tp4662239p4662242.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Handler after jqXhR success et before ajax response proccess

2013-11-08 Thread Olivier Dutrieux
Is there a aim to execute processAjaxResponse (javascript method to handled
the ajax response by wicket-ajax.js) in IAjaxCallListener's success handler
if I set wr ajaxAttribute to false ?

Duto





-
Duto
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Handler-after-jqXhR-success-et-before-ajax-response-proccess-tp4662239p4662245.html
Sent from the Users forum mailing list archive at Nabble.com.

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



filtering html proxy

2013-11-08 Thread Lucio Crusca
Hello *,

I need to build a page (maybe with Wicket, but not sure yet) that proxies 
another page on a different server that I do not own nor control in any way.

Some background: let's call proxy my (wicket?) page, let's call backend 
the other page.

Backend has a HTML form with three input fields and a submit button. When 
submitted, it shows a new form with two more input fields and a new submit 
button. The action URL of this second form changes with the previous three 
input fields. There are some fixed rules for this URL, but I don't know them. I 
only know that the same input values always yield the same action URL. When 
this second form is submitted, it shows a result from its database with a 
link. I need to take that link and save it in my database, in order to avoid 
filling in the two forms manually every time I need the link.

Now my idea is to create a proxy page that loads the backend html, filters it 
changing all the action=... links and making them point to itself, so that 
it can intercept the form submission, act on its behalf, intercept the reply, 
save the result URL and show it to the final user.

It would probably easier to do that with some scripting language, but this toy 
will grow up and become something serious, so I'd prefer starting off with some 
serious tool... I already have my Wicket-centric codebase and I'd like to 
reuse it, you see, so many things already done, but I fail to understand how 
to generate HTML code in Wicket the way it's needed for this pourpose, and I 
wonder if Wicket makes sense at all in this case.

Any suggestions?







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