Re: Requirements for a progress bar in a file upload form

2013-10-24 Thread Martin Grigorov
Hi,


On Thu, Oct 24, 2013 at 12:21 AM, MartinoSuperman
martinosuper...@live.nlwrote:

 Hi,

 I built a form in Wicket, in which a file can be uploaded to the server.

 Furthermore, to show the progress of uploading I also built in a progress
 bar.

 The problem now is that that progress bar does not work. I do not know what
 I forgot to implement and/or what I did. I think I forgot something.


May we ask what you have implemented ? :-)



 My question is: What are the requirements for the working of a progress bar
 in a form for uploading a file?

 Thanks for your help in advance!



 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Requirements-for-a-progress-bar-in-a-file-upload-form-tp4661935.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: CSS include order

2013-10-24 Thread Martin Grigorov
Hi,

1) You can use FilteredHeaderItem to group the site-wide CSS in the
beginning of the body, for example.
2) You can use PriorityHeaderItem to put component ones at the top
3) You can use custom header item comparator to re-order them on your
custom criteria

See http://wicketinaction.com/2012/07/wicket-6-resource-management/ for
explanation of all of those approaches.


On Wed, Oct 23, 2013 at 6:34 PM, Nick Pratt nbpr...@gmail.com wrote:

 Is there a quick/simple way to ensure that our site-wide CSS is included
 last (as included in our BasePage.html head section), after all other
 Components have contributed their CSS files?

 N



Re: CSS include order

2013-10-24 Thread Nick Pratt
Thanks Martin.

I figured out a slightly simpler approach (which I think works, please
correct me if Im mistaken) - I added the site-wide CSS to my BasePage in
Java rather than a simple include ref in the markup :

@Override
public void renderHead( IHeaderResponse response )
 {
super.renderHead( response );
 response.render( CssReferenceHeaderItem.forUrl( assets/css/global.css )
);
}

This results in the global.css being appended last in the head and thus
allows us to override anything provided by any Component or Behavior used
on the Page.


On Thu, Oct 24, 2013 at 3:33 AM, Martin Grigorov mgrigo...@apache.orgwrote:

 Hi,

 1) You can use FilteredHeaderItem to group the site-wide CSS in the
 beginning of the body, for example.
 2) You can use PriorityHeaderItem to put component ones at the top
 3) You can use custom header item comparator to re-order them on your
 custom criteria

 See http://wicketinaction.com/2012/07/wicket-6-resource-management/ for
 explanation of all of those approaches.


 On Wed, Oct 23, 2013 at 6:34 PM, Nick Pratt nbpr...@gmail.com wrote:

  Is there a quick/simple way to ensure that our site-wide CSS is included
  last (as included in our BasePage.html head section), after all other
  Components have contributed their CSS files?
 
  N
 



Re: CSS include order

2013-10-24 Thread Martin Grigorov
On Thu, Oct 24, 2013 at 4:00 PM, Nick Pratt nbpr...@gmail.com wrote:

 Thanks Martin.

 I figured out a slightly simpler approach (which I think works, please
 correct me if Im mistaken) - I added the site-wide CSS to my BasePage in
 Java rather than a simple include ref in the markup :

 @Override
 public void renderHead( IHeaderResponse response )
  {
 super.renderHead( response );
  response.render( CssReferenceHeaderItem.forUrl( assets/css/global.css )


Use CssHeaderItem instead.
The behavior is the same, just the semantic is more clear.


 );
 }

 This results in the global.css being appended last in the head and thus
 allows us to override anything provided by any Component or Behavior used
 on the Page.


Yes. This is yet another way to do it.




 On Thu, Oct 24, 2013 at 3:33 AM, Martin Grigorov mgrigo...@apache.org
 wrote:

  Hi,
 
  1) You can use FilteredHeaderItem to group the site-wide CSS in the
  beginning of the body, for example.
  2) You can use PriorityHeaderItem to put component ones at the top
  3) You can use custom header item comparator to re-order them on your
  custom criteria
 
  See http://wicketinaction.com/2012/07/wicket-6-resource-management/ for
  explanation of all of those approaches.
 
 
  On Wed, Oct 23, 2013 at 6:34 PM, Nick Pratt nbpr...@gmail.com wrote:
 
   Is there a quick/simple way to ensure that our site-wide CSS is
 included
   last (as included in our BasePage.html head section), after all other
   Components have contributed their CSS files?
  
   N
  
 



AW: Loading content of IFrames only when displayed

2013-10-24 Thread Christian Schröter
Now why didn't I think oft hat. Thank you Martin.

Maybe we can remove the final declaration in the next release (if there is no 
objections)

Cheers,

Christian

-Ursprüngliche Nachricht-
Von: Martin Grigorov [mailto:mgrigo...@apache.org] 
Gesendet: Montag, 21. Oktober 2013 10:18
An: users@wicket.apache.org
Betreff: Re: Loading content of IFrames only when displayed

Hi,

You can use custom Behavior that removes the 'url' attribute in its
#onComponentTag() and adds 'data-url' instead.
Component#onComponentTag() is executed before Behavior#onComponentTag() so it 
should work OK.


On Thu, Oct 17, 2013 at 5:29 PM, Christian Schröter  
christian.schroe...@1und1.de wrote:

 Hello,

 I'm using the InlineFrame class to display an IFrame. Now the IFrame 
 is added in a dialog prompt, which is not visible by default. The user 
 has to click a certain link to see the IFrame in the dialog prompt.

 Unfortunately the browser loads the URL defined in the source 
 attribute, no matter if the IFrame is visible or not. In my opinion, 
 it would be better to load the content only if the iframe is visible.

 A solution to achieve this goal is explained here:
 http://stackoverflow.com/**questions/13437091/is-it-**
 possible-to-not-load-an-**iframe-in-a-hidden-div-until-**
 the-div-is-displayedhttp://stackoverflow.com/questions/13437091/is-it
 -possible-to-not-load-an-iframe-in-a-hidden-div-until-the-div-is-displ
 ayed

 But for some reason the onComponentTag(ComonentTag tag) is declared 
 final in the InlineFrame class.
 I don't understand why the method is final and I'm a bit clueless how 
 to proceed.

 Hopefully someone can help me.

 Thanks,
 Christian



Re: Loading content of IFrames only when displayed

2013-10-24 Thread Martin Grigorov
https://issues.apache.org/jira/browse/WICKET-5393
Done


On Thu, Oct 24, 2013 at 5:08 PM, Christian Schröter 
christian.schroe...@1und1.de wrote:

 Now why didn't I think oft hat. Thank you Martin.

 Maybe we can remove the final declaration in the next release (if there is
 no objections)

 Cheers,

 Christian

 -Ursprüngliche Nachricht-
 Von: Martin Grigorov [mailto:mgrigo...@apache.org]
 Gesendet: Montag, 21. Oktober 2013 10:18
 An: users@wicket.apache.org
 Betreff: Re: Loading content of IFrames only when displayed

 Hi,

 You can use custom Behavior that removes the 'url' attribute in its
 #onComponentTag() and adds 'data-url' instead.
 Component#onComponentTag() is executed before Behavior#onComponentTag() so
 it should work OK.


 On Thu, Oct 17, 2013 at 5:29 PM, Christian Schröter 
 christian.schroe...@1und1.de wrote:

  Hello,
 
  I'm using the InlineFrame class to display an IFrame. Now the IFrame
  is added in a dialog prompt, which is not visible by default. The user
  has to click a certain link to see the IFrame in the dialog prompt.
 
  Unfortunately the browser loads the URL defined in the source
  attribute, no matter if the IFrame is visible or not. In my opinion,
  it would be better to load the content only if the iframe is visible.
 
  A solution to achieve this goal is explained here:
  http://stackoverflow.com/**questions/13437091/is-it-**
  possible-to-not-load-an-**iframe-in-a-hidden-div-until-**
  the-div-is-displayedhttp://stackoverflow.com/questions/13437091/is-it
  -possible-to-not-load-an-iframe-in-a-hidden-div-until-the-div-is-displ
  ayed
 
  But for some reason the onComponentTag(ComonentTag tag) is declared
  final in the InlineFrame class.
  I don't understand why the method is final and I'm a bit clueless how
  to proceed.
 
  Hopefully someone can help me.
 
  Thanks,
  Christian
 



Add or remove a row in RefreshingView with Ajax

2013-10-24 Thread MartinoSuperman
Hi,

I have a RefreshingView, which consists of TextFields, Labels and a
DownloadLink.

When a button is pressed, a new row should be added with the help of Ajax. 

Unfortunately, this does not work.

Can somebody tell me what I have to program to make adding and removing rows
in RefreshingView possible?

Thanks in advance!



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Add-or-remove-a-row-in-RefreshingView-with-Ajax-tp4661944.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: unwanted DefaultPageManagerProvider

2013-10-24 Thread uwe schaefer

On 22.10.2013 10:22, Sven Meier wrote:

Hi Sven,


currently there's no way to change the PageManager once it's fetched in
Application#internalGetPageManager().


agreed.


Do you have a stacktrace for the code triggering
Application.getPageManagerProvider().get() ? Besides devutils I don't
see any call to this from Wicket.


it is the sessionUnbound method that supposedly was triggered by the 
container doing its clustering while wicket still initializes;


Application:478
public void sessionUnbound(final String sessionId){
  internalGetPageManager().sessionExpired(sessionId);
  ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^
}

cu uwe

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



RE: Add or remove a row in RefreshingView with Ajax

2013-10-24 Thread Colin Rogers
Hi there,

Not sure what you mean by 'does not work'... so guessing the issue, and the 
solution.

Are you updating the whole RepeatingView? If so, you need to wrap the repeater 
in a WebMarkupContainer and refresh that (remembering to setOutputMarkupId to 
true etc.)

I don't know the reason why, but repeaters have to be updated via their parent 
container.

Cheers,
Col.

-Original Message-
From: MartinoSuperman [mailto:martinosuper...@live.nl]
Sent: Friday, October 25, 2013 3:36 AM
To: users@wicket.apache.org
Subject: Add or remove a row in RefreshingView with Ajax

Hi,

I have a RefreshingView, which consists of TextFields, Labels and a 
DownloadLink.

When a button is pressed, a new row should be added with the help of Ajax.

Unfortunately, this does not work.

Can somebody tell me what I have to program to make adding and removing rows in 
RefreshingView possible?

Thanks in advance!



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Add-or-remove-a-row-in-RefreshingView-with-Ajax-tp4661944.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

EMAIL DISCLAIMER This email message and its attachments are confidential and 
may also contain copyright or privileged material. If you are not the intended 
recipient, you may not forward the email or disclose or use the information 
contained in it. If you have received this email message in error, please 
advise the sender immediately by replying to this email and delete the message 
and any associated attachments. Any views, opinions, conclusions, advice or 
statements expressed in this email message are those of the individual sender 
and should not be relied upon as the considered view, opinion, conclusions, 
advice or statement of this company except where the sender expressly, and with 
authority, states them to be the considered view, opinion, conclusions, advice 
or statement of this company. Every care is taken but we recommend that you 
scan any attachments for viruses.

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



Re: AbstractColumn get row object

2013-10-24 Thread cosmindumy
Thanks for relies.
I saved the reference in newCellItem.
Cheers.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AbstractColumn-get-row-object-tp4661924p4661939.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: How Does Checkbox Know To Store To My Data Object

2013-10-24 Thread Paul Bors
Read section 10.2 Models and JavaBeans of the Wicket Guide at:
http://wicket.apache.org/guide/guide/chapter10.html#chapter10_2

From the code snipet you posted I take it your form or parent of your form
has a CompondPropertyModel which must be feeding your checkbox. Either that,
or you have a model tight to your checkbox.



-
~ Thank you,
p...@bors.ws
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-Does-Checkbox-Know-To-Store-To-My-Data-Object-tp4661879p4661947.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-bootstrap NoSuchMethodError: Url.parse

2013-10-24 Thread Paul Borș
Must be your maven build and how it pulls that wicket-request artifact into 
your project.

I suggest you exclude it in your dependency declaration for the bootstrap 
version you use in your POM.

Have a great day,
Paul Bors

 On Oct 22, 2013, at 10:36 AM, meduolis meduol...@gmail.com wrote:
 
 Hi, Martin,
 
 
 As we can see wicket-request.jar is different version then other wicket
 modules. So, I have downloaded wicket-request.jar of 6.11.0 version manually
 and replaced it in application AND IT WORKED :).
 
 So, I really do not know, why bootstrap download wrong version. Maybe I need
 to exclude wicket-request from bootstrap and add dependency of proper
 version myself?
 
 
 
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/wicket-bootstrap-NoSuchMethodError-Url-parse-tp4661909p4661923.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: AW: set session-timeout

2013-10-24 Thread Paul Borș
Right, you would have to do it on the Log In page during authentication as 
Martijn suggested.

We have a global Settings page where we let admins configure this duration in 
minutes and we enable it via our Log In page.

To do it for unauthorized users it won't really make sense. Why would you let 
them waste your servers resources and keep your servers busy longer than the 
web.xml descriptor already is configured for? What would be such a real 
use-case?

Have a great day,
Paul Bors

 On Oct 23, 2013, at 5:41 AM, Martin Grigorov mgrigo...@apache.org wrote:
 
 On Wed, Oct 23, 2013 at 12:35 PM, Martijn Dashorst 
 martijn.dasho...@gmail.com wrote:
 
 AFAIK you can specify the session timeout in your web.xml or in your
 container. I don't see why Wicket should get involved in that, other
 than change the session timeout for logged in users (i.e. after they
 successfully authenticated with your application), or special users
 (administrators with limited session time, etc). In those cases you
 already have a bound session, and you can use the previous call. If
 you want to specify session timeout for all users, then do it in your
 deployment descriptor.
 
 Christoph's first message says: Now I want to make the time until the
 application expires *configurable*
 
 
 
 http://stackoverflow.com/questions/15382895/session-timeout-in-web-xml
 
 Martijn
 
 On Wed, Oct 23, 2013 at 7:23 AM, Martin Grigorov mgrigo...@apache.org
 wrote:
 On Wed, Oct 23, 2013 at 2:36 AM, Joachim Schrod jsch...@acm.org wrote:
 
 On 10/22/13 15:32, Martin Grigorov wrote:
 On Tue, Oct 22, 2013 at 4:27 PM, Joachim Schrod jsch...@acm.org
 wrote:
 
 On 10/22/13 10:34, christoph.ma...@t-systems.com wrote:
 If I do this in my WicketApplication class, in the init()
 method I get java.lang.reflect.UndeclaredThrowableException.
 But if I add this to my base page it works. Is there any
 possibility to do this in the WicketApplication class?
 
 You have to redefine WebApplication#newSession().
 
 It can't be done in init(), as no session exists yet. And you must
 set the Session timeout for each new session anew.
 
 Without having tried it, code like
 
@Override
public Session newSession(Request request, Response response) {
Session session = super.newSession(request, response);
 ((ServletWebRequest)request).getContainerRequest().getSession().setMaxInactiveInterval(TIMEOUT);
 
 ALARM!
 getSession() is the same as getSession(true). I.e. it will create a
 new
 http session for each and every http request, even for static
 resources.
 
 Wicket creates Wicket Session when Session.get() is used, but creates
 Http
 Session only when wicketSession.bind() is called.
 
 Interesting to hear; I'd have thought that works. Tricky thing,
 that. As I wrote, I didn't try the code; I just copied the access
 to HttpSession from the posts below.
 
 But, since wicketSession.bind() is final, one cannot subclass
 Session and redefine it either, to set the timeout there. (Much too
 many methods of Wicket classes are final, without really good
 reason; I copy them to my applications making the methods non-final
 much too often. :-( )
 
 If you override bind() and do something wrong then the functionality will
 break completely.
 
 
 
 Martin, what would you propose to be the hook that allows to
 establish a different session timeout application-wide within your
 Java application? I hadn't had yet that case, web.xml suffices by
 now, but it would be good to know for the future.
 
 It is much better from framework point of view to give you a hook:
 org.apache.wicket.session.ISessionStore#getBindListeners().add(myListener)
 
 
 
 Cheers,
Joachim
 
return session;
}
 
 should work. Maybe check that request is really a
 ServletWebRequest. (This is also a good place to set the locale.)
 
 HTH,
Joachim
 
 
 -Ursprüngliche Nachricht-
 Von: francois meillet [mailto:francois.meil...@gmail.com]
 Gesendet: Montag, 21. Oktober 2013 16:34
 An: users@wicket.apache.org
 Betreff: Re: set session-timeout
 
 HttpSession httpSession = ((ServletWebRequest)
 RequestCycle.get().getRequest()).getContainerRequest().getSession();
 httpSession.setMaxInactiveInterval(timeOut);
 
 François
 
 
 On Mon, Oct 21, 2013 at 4:12 PM, Martin Grigorov 
 mgrigo...@apache.org
 wrote:
 
 http://docs.oracle.com/cd/E17802_01/webservices/webservices/docs/1.6/a
 pi/javax/servlet/http/HttpSession.html#setMaxInactiveInterval(int)
 
 
 On Mon, Oct 21, 2013 at 4:44 PM, christoph.ma...@t-systems.com
 wrote:
 
 Hello,
 
 in my application i have set the errorpage for expired pages
 like
 this:
 
 getApplicationSettings().setPageExpiredErrorPage(Timeout.class);
 
 Now I want to make the time until the application expires
 configurable.
 How can I do this? Can I set this in the
 WicketApplication.init()?
 --
 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 Joachim Schrod, Roedermark, Germany
 Email: jsch...@acm.org