Re: Email template with css

2014-05-16 Thread Sandor Feher
Ok, thnx!

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Email-template-with-css-tp4665788p4665793.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



Extending Border

2014-05-16 Thread Nick Pratt
Ive got a class 'A' that extends Border, with the following markup:

wicket:border
div
 h1span wicket:id=header/spanspan
class=closeaX/a/span/h1
wicket:body/wicket:body
 /div
/wicket:border


This all works fine.  Can I extend class A? If so what should the markup of
class B look like (i.e. how do I get the child markup dropped in to the
wicket:body section)?

I'm currently hitting:

B.html: Unable to find wicket:border tag in associated markup file for
Border: [B [Component id = bPanel]] MarkupStream: [unknown]



Regards

Nick


Page rendering from quartz job

2014-05-16 Thread Sandor Feher
Hi,

I fired up some quartz jobs for sending notification emails at given time.
The job controller class is launched from my Application wget it get
initialized.
Almost everything works except of rendering mail's html body.
I would like to do it with wicket's pagerenderer but it throws the following
error:

org.apache.wicket.WicketRuntimeException: There is no application attached
to current thread DefaultQuartzScheduler_Worker-5

I know it has not happen by chance but my class knows nothing about page
rendering.
The question is how to achieve some elegant way ? 
I can choose different way but if possible I do it with wicket's page
renderer.
So please advice!

Regards., Sandor





--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Page-rendering-from-quartz-job-tp4665860.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 7 M1 different behaviour on button

2014-05-16 Thread Peter Henderson
Hi Wicket users.

It looks like Wicket 7 treats all button without a type attribute as
submit buttons (6.15 does not)

Would it be possible revert this? or at least add a warning log message
when button is missing the attribute?


I think the code should control if the button submits the form.
(AjaxSubmitLink or AjaxLink) not the type attribute.


I've attached a quick start




-- 
Peter Henderson


myproject.tar.gz
Description: GNU Zip compressed data

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

Re: DiskDataStore errors in production

2014-05-16 Thread Guillaume Smet
On Wed, May 14, 2014 at 9:59 PM, eaglei22 jchojnack...@gmail.com wrote:
 What can be causing these errors? is this more of a Tomcat thing or Wicket?

Hard to guess.

Get the pid of your Tomcat process and use lsof -p pid. You'll see
which files are opened by your Tomcat.

HTH

-- 
Guillaume

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



problem with resource lookup for css files

2014-05-16 Thread Patrick Davids
Hi all,
I have problems with resource look up for styles css... and I dont know, 
what I am doing wrong.

Can someone have a look, please...

myPackage.
BasePage.java
BasePage.html
myCss.css
myCss.blue.css
myCss.orange.css

As far as I know, the resource lookup for all kind of resources is the same.

I set the style to my Session via
Session.get().setStyle(blue);

and I can see the correct style string while debugging.


I tried to include my css into the BasePage via

BasePage.html
wicket:head
   wicket:link
 link rel=stylesheet type=text/css href=myCss.css /
   /wicket:link
/wicket:head

and also via

BasePage.java:
@Override
public void renderHead(HtmlHeaderContainer container) {
   super.renderHead(container);
   IHeaderResponse response = container.getHeaderResponse();
   response.render(CssHeaderItem.forReference(new 
CssResourceReference(BasePage.class, myCss.css, getLocale(), 
getStyle(), getVariation(;
}

Both ways always look up the normal myCss.css and not myCss.blue.css.
Whats wrong with my code?
Help please...

Thanx a lot.
kind regards
Patrick
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Include Files form Filesystem

2014-05-16 Thread Mikulicic, Vladimir
Hello,

im using Wicket 6.15

Does someone know how to  include a static HTML file from the filesystem in my 
Wicket-App.

I have a folder on my machine like /local/wtr/   with two files  header.html   
and footer.html in it.
The files are not in the docroot of my server, but somewhere in the filesystem.

I would like to include these Files with:

new Include(include, header.html);

My approach is:

getSharedResources().add(extern, new FolderContentResource(new 
File(/local/wtr)));
mountResource(/resource/, new SharedResourceReference(extern));

But I don’t know how to use it  with  new Include()?
How to get the correct path to the header.html?

Any help would be fine. Thanks a lot!

Vladi



--
Bayerischer Rundfunk; Rundfunkplatz 1; 80335 München
Telefon: +49 89 590001; E-Mail: i...@br.de; Website: http://www.BR.de


Re: Wicket AJAX Google Chrome: Strange DOMException in Wicket.Ajax.Request.doGet

2014-05-16 Thread Tobias Gierke

Hi,

Considering the mess with the Apache foundation's mailserver outage, I'm 
not sure my message got through ... anyway , I found out what was 
causing me trouble:


Seems like Chrome's handling of synchronous AJAX requests is broken, 
switching to asynchronous mode fixed it.


Cheers,
Tobias


Hi,

I'm stumped by an error (DOMException #19, A network error occurred) 
that seems to have started with Chrome version =31. In our Wicket 
1.5.11 application I have some Javascript that issues an synchronous 
AJAX call like this:


888888
var successHandler = null;
var failureHandler = null;
var channel = null; // use default channel
var call = new Wicket.Ajax.Call(url, successHandler, 
failureHandler, channel);

call.request.async = false;
call.call();
888888

The URL I'm passing is a callback URL returned from 
AbstractAjaxBehavior#getCallbackUrl(). The code works perfectly fine 
with Firefox, Opera and IE but fails at least in Chrome 31 and Chrome 
34.0.1847.137


Here are some (hopefully helpful) screenshots:

AJAX request: http://www.tiikoni.com/tis/view/?id=cd02752
AJAX response: http://www.tiikoni.com/tis/view/?id=525a2c2
Exception: http://www.tiikoni.com/tis/view/?id=4e5e42b
Wicket AJAX debug panel: http://www.tiikoni.com/tis/view/?id=ce33a01

What's really making me scratch my head is the fact that the Wicket 
debug panel clearly shows the server's response/seems to have parsed 
it correctly ... maybe the exception is not the actual root cause but 
triggered by some error in a JS callback function ?


Cheers,
Tobias

P.S. I'm a Javascript novice so please have mercy if I did/overlooked 
something stupid ;)http://www.tiikoni.com/tis/view/?id=cd02752





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



Re: Question / Best Practise / (List)Model vs. (List)DataProvider

2014-05-16 Thread Paul Bors
Models:
http://wicket.apache.org/guide/guide/modelsforms.html

Data Providers (ie: Repeaters):
http://wicket.apache.org/guide/guide/repeaters.html

Long story short, a repeater's DataProvider gives you a single items model.
A model who wraps a collection, gives you a collection of items for a
single component.

On Thursday, May 8, 2014, Patrick Davids patrick.dav...@nubologic.com
wrote:

 Hi all,

 what I often think about, and I cannot really say is; when to use Model
 or DataProvider as data providing object for components they repeat some
 thing?

 Javadoc says, DataProvider are (good) for DataViews.
 Hmm... ok, and they allow easer iterating (first index, count).

 I also can achieve this by using a LoadableDetachableModelList
 combined with a ModelIteratorAdapater.

 Both have detaching logic... both featuring extension, both have a sort
 of load-method (getObject() vs. getData()).

 Sometimes I think, they are so similar to each other... where is the key
 difference?

 Would be cool if some of yours just reply his two cents of daily
 programming experience... so I can get some new point of views.

 When do you use DataProvider or ModelList?
 Did you experienced the same, not to exactly know which one you will use
 for your new page/panel/component?
 And often think about pro and cons using it with RepeatingViews? And
 later on, you see... I could have used both... hmm...

 thanx a lot for feedback and kind regards
 Patrick
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org javascript:;
 For additional commands, e-mail: users-h...@wicket.apache.orgjavascript:;




Re: DiskDataStore errors in production

2014-05-16 Thread Andrea Del Bene

Hi,

which version of Wicket are you using?

Hi, my application in production often gets this error:
May 14 09:12:27 ERROR
DiskDataStore-/opt/ssa/tomcat/apache-tomcat-7.0.29/work/Catalina/localhost/SSA/wicket.ssa-webapp-filestore/4729/2939/909EAC3343856968BA7B1864B71CEA85/data
(Too many open files)
java.io.FileNotFoundException:
/opt/ssa/tomcat/apache-tomcat-7.0.29/work/Catalina/localhost/SSA/wicket.ssa-webapp-filestore/4729/2939/909EAC3343856968BA7B1864B71CEA85/data
(Too many open files)
 at java.io.RandomAccessFile.open(Native Method)
 at java.io.RandomAccessFile.init(RandomAccessFile.java:233)
 at
org.apache.wicket.pageStore.DiskDataStore$SessionEntry.getFileChannel(DiskDataStore.java:425)
 at
org.apache.wicket.pageStore.DiskDataStore$SessionEntry.savePage(DiskDataStore.java:343)
 at
org.apache.wicket.pageStore.DiskDataStore.storeData(DiskDataStore.java:181)
 at
org.apache.wicket.pageStore.AsynchronousDataStore.storeData(AsynchronousDataStore.java:228)
 at
org.apache.wicket.pageStore.DefaultPageStore.storePageData(DefaultPageStore.java:120)
 at
org.apache.wicket.pageStore.DefaultPageStore.storePage(DefaultPageStore.java:154)
 at
org.apache.wicket.page.PageStoreManager$PersistentRequestAdapter.storeTouchedPages(PageStoreManager.java:412)
 at
org.apache.wicket.page.RequestAdapter.commitRequest(RequestAdapter.java:181)




and now I am getting this error for every page opened making the log file
extremely large:

May 14 11:36:31 WARN  DiskDataStore-Cannot save page with id '866' because
the data file cannot be opened.
May 14 11:36:31 ERROR
DiskDataStore-/opt/ssa/tomcat/apache-tomcat-7.0.29/work/Catalina/localhost/SSA/wicket.ssa-webapp-filestore/3943/9005/A851AC58C741B566C0E40BE1791649E1/data
(Permission denied)
java.io.FileNotFoundException:
/opt/ssa/tomcat/apache-tomcat-7.0.29/work/Catalina/localhost/SSA/wicket.ssa-webapp-filestore/3943/9005/A851AC58C741B566C0E40BE1791649E1/data
(Permission denied)
 at java.io.RandomAccessFile.open(Native Method)
 at java.io.RandomAccessFile.init(RandomAccessFile.java:233)
 at
org.apache.wicket.pageStore.DiskDataStore$SessionEntry.getFileChannel(DiskDataStore.java:425)
 at
org.apache.wicket.pageStore.DiskDataStore$SessionEntry.savePage(DiskDataStore.java:343)
 at
org.apache.wicket.pageStore.DiskDataStore.storeData(DiskDataStore.java:181)
 at
org.apache.wicket.pageStore.AsynchronousDataStore$PageSavingRunnable.run(AsynchronousDataStore.java:355)
 at java.lang.Thread.run(Thread.java:722)
May 14 11:36:31 WARN  DiskDataStore-Cannot save page with id '0' because the
data file cannot be opened.
May 14 11:36:32 ERROR
DiskDataStore-/opt/ssa/tomcat/apache-tomcat-7.0.29/work/Catalina/localhost/SSA/wicket.ssa-webapp-filestore/3943/9005/A851AC58C741B566C0E40BE1791649E1/data
(Permission denied)
java.io.FileNotFoundException:
/opt/ssa/tomcat/apache-tomcat-7.0.29/work/Catalina/localhost/SSA/wicket.ssa-webapp-filestore/3943/9005/A851AC58C741B566C0E40BE1791649E1/data
(Permission denied)
 at java.io.RandomAccessFile.open(Native Method)
 at java.io.RandomAccessFile.init(RandomAccessFile.java:233)
 at
org.apache.wicket.pageStore.DiskDataStore$SessionEntry.getFileChannel(DiskDataStore.java:425)
 at
org.apache.wicket.pageStore.DiskDataStore$SessionEntry.savePage(DiskDataStore.java:343)
 at
org.apache.wicket.pageStore.DiskDataStore.storeData(DiskDataStore.java:181)
 at
org.apache.wicket.pageStore.AsynchronousDataStore$PageSavingRunnable.run(AsynchronousDataStore.java:355)
 at java.lang.Thread.run(Thread.java:722)
May 14 11:36:32 WARN  DiskDataStore-Cannot save page with id '0' because the
data file cannot be opened.





What can be causing these errors? is this more of a Tomcat thing or Wicket?

Thanks!

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/DiskDataStore-errors-in-production-tp4665841.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: Behavior rendering

2014-05-16 Thread Sven Meier

Hi,

read IAjaxRegionMarkupIdProvider's javadoc.

Regards
Sven

On 05/09/2014 08:34 PM, Nick Pratt wrote:

I have a Behavior attached to a WebMarkupContainer with a bind() method as
follows:

@Override
public void bind( Component component )
  {
this.boundComponent = component;

component.setOutputMarkupId( true );
  component.setOutputMarkupPlaceholderTag( true );

//

//
component.add( new BorderBehaviour() );

//
//

this.borderMarkupId = component.getMarkupId() + _brd;
}




class BorderBehaviour extends Behavior
{
@Override
  public void beforeRender( Component component )
{
Response response = component.getResponse();

response.write( div id=\ );
response.write( borderMarkupId ); // Generated from the bound component
above
  response.write( \ class=\popup\ style=\display:none;\h1span );
response.write( headerTextModel.getObject() );
  response.write( /spanspan class=\close\aX/a/span/h1 );
}

@Override
public void afterRender( Component component )
{
  component.getResponse().write( /div );
}
}


When a page is initially loaded, beforeRender() and afterRender() get
executed just fine.  If the user hits the browser reload button, everything
still works (these two functions get executed).  However, during an Ajax
triggered event, I end up with duplicate markup being appended to the bound
component (since these two methods above run again, but the Component
hierarchy isn't re-generated, thus multiple copies of the additional markup
are written to the stream).

I tried making the behavior temporary, and while that fixes the Ajax case,
it breaks in the user-presses-reload-button case - since the behavior,
now temporary, gets detached from the request after the initial render and
doesnt get rerun when the user requests a page that is already
generated/cached.

How can I make this work for all three cases -
1. Page load
2. Page reload (same page ID)
3. Ajax

I noticed that the response in (3) is an AbstractAjaxResponse - is the only
way to fix this to run an instanceof check on the response type or is there
an alternate way?

N




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



Change name of session cookie

2014-05-16 Thread Tom Götz
Hi,

might be slightly offtopic, but: does someone know how to change to name of the 
session cookie from „JSESSIONID“ to something else (in Tomcat 7.0.42 and Jetty 
6.1.26)?. Background: we have a Wicket app that runs inside an iFrame of 
another Wicket app, so we have two cookies named „JESSESIONID“ …

Cheers,
   -Tom


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



Re: # in URL

2014-05-16 Thread Maxim Solodovnik
It is definitely not,

We are using https://github.com/wicketstuff/core/wiki/UrlFragment to work
with URL hashes


On Tue, May 13, 2014 at 4:22 PM, Sven Meier s...@meiers.net wrote:

 Hi,

 AFAIK everything after the hashbang is not sent to the server:

 http://stackoverflow.com/questions/6745993/how-to-get-
 the-anchor-name-in-http-get

 Regards
 Sven

 On 05/13/2014 03:36 AM, infiniter wrote:

 Wicket version: 6.7.0

 I need to get the url parameters even if there is a #, because I have an
 AngularJS app running inside my Wicket page, which requires it. E.g.:
 mysite.com/myapp/#/john. John is shown by Wicket and AngularJS.
 However if there is a # in the url, the PageParemeters object comes in
 null.

 Is there a way to preprocess the url parameters before converting it to a
 PageParemeters object? Or is there another way?

 Thx,
 Carlos.

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




-- 
WBR
Maxim aka solomax


Re: problem with AbstractEntityModel from Igor Vaynberg

2014-05-16 Thread Piratenvisier

If I include the folowing lines :

if(NachweiseForm.this.getModelObject().getKunde()!=null) {
Kunde kunde = 
kundeManager.get(NachweiseForm.this.getModelObject().getKunde().getId());

NachweiseForm.this.getModelObject().setKunde(kunde);
kunde.addNachweis(NachweiseForm.this.getModelObject());
System.err.println(Kunde);
}

before the save

 everything is fine

But I hoped to avoid such lines by AbstractEntityModel.

My idea was to implant Kunde through the form.

But how could you do it only  by a Label.

Am 05.05.2014 20:40, schrieb mscoon:

​Actually what I said below is wrong because this line is after the line
that throws the exception. But my explanation still holds. Something before
the line that is throwing the exception is causing an object with a
reference to a new ​Nachweise
to be saved while the Nachweise is still unsaved. You need to search at
what is happening before the line with the exception, maybe even before the
page is created.




Now, a wild guess (I may well be wrong) is that the following line:
nachweiseform.getModelObject().getKunde().addNachweis(nachwe
iseform.getModelObject());

may be causing the problem if hibernate tries to save kunde with 
nachweiseform.getModelObject()
which is a new object with a null id.

You  may try to move this line to saveNachweise().


On Mon, May 5, 2014 at 2:54 PM, Yahoo hansheinrichbr...@yahoo.de wrote:


Am 05.05.2014 11:05, schrieb mscoon:

  In a previous message you sent the following snippets:

//@XmlTransient
@ManyToOne(cascade = CascadeType.MERGE,fetch=FetchType.LAZY)
@JoinColumn(name=NachKundNr,insertable=false, updatable=false)
  public Kunde getKunde(){
 return this.kunde;
  }

recursive Part for Kunde


@XmlTransient
@OneToMany(cascade={CascadeType.MERGE},fetch=FetchType.LAZY)
@JoinColumn(name=NachKundNr,insertable=false, updatable=false )


when I remove this I get the error :
org.hibernate.TransientObjectException: object references an unsaved
transient instance - save the transient instance before flushing:
braunimmobilien.model.Nachweise
  at org.hibernate.engine.internal.ForeignKeys.
getEntityIdentifierIfNotUnsaved(ForeignKeys.java:249)
  at org.hibernate.type.EntityType.getIdentifier(EntityType.java:459)
  at org.hibernate.type.ManyToOneType.nullSafeSet(
ManyToOneType.java:132)
  at org.hibernate.persister.collection.AbstractCollectionPersister.
writeElement(AbstractCollectionPersister.java:867)
  at org.hibernate.persister.collection.AbstractCollectionPersister.
insertRows(AbstractCollectionPersister.java:1475)
  at org.hibernate.action.internal.CollectionUpdateAction.execute(
CollectionUpdateAction.java:86)
  at org.hibernate.engine.spi.ActionQueue.execute(
ActionQueue.java:362)
  at org.hibernate.engine.spi.ActionQueue.executeActions(
ActionQueue.java:354)
  at org.hibernate.engine.spi.ActionQueue.executeActions(
ActionQueue.java:278)
  at org.hibernate.event.internal.AbstractFlushingEventListener.
performExecutions(AbstractFlushingEventListener.java:326)
  at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(
DefaultFlushEventListener.java:52)
  at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1213)
  at org.hibernate.internal.SessionImpl.managedFlush(
SessionImpl.java:402)
  at org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.
beforeTransactionCommit(JdbcTransaction.java:101)
  at org.hibernate.engine.transaction.spi.AbstractTransactionImpl.
commit(AbstractTransactionImpl.java:175)
  at org.springframework.orm.hibernate4.HibernateTransactionManager.
doCommit(HibernateTransactionManager.java:554)
  at org.springframework.transaction.support.
AbstractPlatformTransactionManager.processCommit(
AbstractPlatformTransactionManager.java:755)
  at org.springframework.transaction.support.
AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionMan
ager.java:724)
  at org.springframework.transaction.interceptor.
TransactionAspectSupport.commitTransactionAfterReturnin
g(TransactionAspectSupport.java:475)
  at org.springframework.transaction.interceptor.
TransactionAspectSupport.invokeWithinTransaction(
TransactionAspectSupport.java:270)
  at org.springframework.transaction.interceptor.
TransactionInterceptor.invoke(TransactionInterceptor.java:94)
  at org.springframework.aop.framework.ReflectiveMethodInvocation.
proceed(ReflectiveMethodInvocation.java:172)
  at org.springframework.aop.interceptor.ExposeInvocationInterceptor.
invoke(ExposeInvocationInterceptor.java:91)
  at org.springframework.aop.framework.ReflectiveMethodInvocation.
proceed(ReflectiveMethodInvocation.java:172)
  at org.springframework.aop.framework.JdkDynamicAopProxy.
invoke(JdkDynamicAopProxy.java:204)
  at com.sun.proxy.$Proxy112.get(Unknown Source)
  at java.lang.reflect.Method.invoke(Method.java:606)
  at 

Re: DiskDataStore errors in production

2014-05-16 Thread Richard W. Adams
Hard to know without seeing code, but the message seems to indicate app is 
failing to close files after it's finished with them. In other words, an 
operating system problem, rather than Tomcat or Wicket.




From:   eaglei22 jchojnack...@gmail.com
To: users@wicket.apache.org
Date:   05/15/2014 02:02 AM
Subject:DiskDataStore errors in production



Hi, my application in production often gets this error:
May 14 09:12:27 ERROR
DiskDataStore-/opt/ssa/tomcat/apache-tomcat-7.0.29/work/Catalina/localhost/SSA/wicket.ssa-webapp-filestore/4729/2939/909EAC3343856968BA7B1864B71CEA85/data
(Too many open files)
java.io.FileNotFoundException:
/opt/ssa/tomcat/apache-tomcat-7.0.29/work/Catalina/localhost/SSA/wicket.ssa-webapp-filestore/4729/2939/909EAC3343856968BA7B1864B71CEA85/data
(Too many open files)
at java.io.RandomAccessFile.open(Native Method)
at java.io.RandomAccessFile.init(RandomAccessFile.java:233)
at
org.apache.wicket.pageStore.DiskDataStore$SessionEntry.getFileChannel(DiskDataStore.java:425)
at
org.apache.wicket.pageStore.DiskDataStore$SessionEntry.savePage(DiskDataStore.java:343)
at
org.apache.wicket.pageStore.DiskDataStore.storeData(DiskDataStore.java:181)
at
org.apache.wicket.pageStore.AsynchronousDataStore.storeData(AsynchronousDataStore.java:228)
at
org.apache.wicket.pageStore.DefaultPageStore.storePageData(DefaultPageStore.java:120)
at
org.apache.wicket.pageStore.DefaultPageStore.storePage(DefaultPageStore.java:154)
at
org.apache.wicket.page.PageStoreManager$PersistentRequestAdapter.storeTouchedPages(PageStoreManager.java:412)
at
org.apache.wicket.page.RequestAdapter.commitRequest(RequestAdapter.java:181)




and now I am getting this error for every page opened making the log file
extremely large:

May 14 11:36:31 WARN  DiskDataStore-Cannot save page with id '866' because
the data file cannot be opened.
May 14 11:36:31 ERROR
DiskDataStore-/opt/ssa/tomcat/apache-tomcat-7.0.29/work/Catalina/localhost/SSA/wicket.ssa-webapp-filestore/3943/9005/A851AC58C741B566C0E40BE1791649E1/data
(Permission denied)
java.io.FileNotFoundException:
/opt/ssa/tomcat/apache-tomcat-7.0.29/work/Catalina/localhost/SSA/wicket.ssa-webapp-filestore/3943/9005/A851AC58C741B566C0E40BE1791649E1/data
(Permission denied)
at java.io.RandomAccessFile.open(Native Method)
at java.io.RandomAccessFile.init(RandomAccessFile.java:233)
at
org.apache.wicket.pageStore.DiskDataStore$SessionEntry.getFileChannel(DiskDataStore.java:425)
at
org.apache.wicket.pageStore.DiskDataStore$SessionEntry.savePage(DiskDataStore.java:343)
at
org.apache.wicket.pageStore.DiskDataStore.storeData(DiskDataStore.java:181)
at
org.apache.wicket.pageStore.AsynchronousDataStore$PageSavingRunnable.run(AsynchronousDataStore.java:355)
at java.lang.Thread.run(Thread.java:722)
May 14 11:36:31 WARN  DiskDataStore-Cannot save page with id '0' because 
the
data file cannot be opened.
May 14 11:36:32 ERROR
DiskDataStore-/opt/ssa/tomcat/apache-tomcat-7.0.29/work/Catalina/localhost/SSA/wicket.ssa-webapp-filestore/3943/9005/A851AC58C741B566C0E40BE1791649E1/data
(Permission denied)
java.io.FileNotFoundException:
/opt/ssa/tomcat/apache-tomcat-7.0.29/work/Catalina/localhost/SSA/wicket.ssa-webapp-filestore/3943/9005/A851AC58C741B566C0E40BE1791649E1/data
(Permission denied)
at java.io.RandomAccessFile.open(Native Method)
at java.io.RandomAccessFile.init(RandomAccessFile.java:233)
at
org.apache.wicket.pageStore.DiskDataStore$SessionEntry.getFileChannel(DiskDataStore.java:425)
at
org.apache.wicket.pageStore.DiskDataStore$SessionEntry.savePage(DiskDataStore.java:343)
at
org.apache.wicket.pageStore.DiskDataStore.storeData(DiskDataStore.java:181)
at
org.apache.wicket.pageStore.AsynchronousDataStore$PageSavingRunnable.run(AsynchronousDataStore.java:355)
at java.lang.Thread.run(Thread.java:722)
May 14 11:36:32 WARN  DiskDataStore-Cannot save page with id '0' because 
the
data file cannot be opened.





What can be causing these errors? is this more of a Tomcat thing or 
Wicket?

Thanks!

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/DiskDataStore-errors-in-production-tp4665839.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




**

This email and any attachments may contain information that is confidential 
and/or privileged for the sole use of the intended recipient.  Any use, review, 
disclosure, copying, distribution or reliance by others, and any forwarding of 
this email or its contents, without the express permission of the sender is 
strictly prohibited by law.  If you are not the intended recipient, please 
contact the sender immediately, delete 

Re: Lots of Images slowing rendering in DataView?

2014-05-16 Thread Sven Meier

Have you tried using CSS to style your images instead?

Perhaps this will help the browser to speed up rendering.

Sven

On 05/07/2014 04:05 PM, ashindler wrote:

Hi,

I have a page with a fairly large DataView table ~2000 rows of information.
In each row I have 5 small icons (images) - a total of around 92kb each row.
The icons are also links.

There is some significant delay in rendering the page and I believe it must
be to do with the icons.

If the icons are the cause - could anyone suggest a smarter way perhaps to
add the images to the page?
I currently simply do the following:

final DataView dataView = new DataView(rows, new
ListDataProvider(displayList)){
@Override
public void populateItem(final Item item) {

final Invoice i = (Invoice) 
item.getModelObject();

if(i.getStatus().equals(CANCELLED) || 
i.getStatus().equals(STORNO)){
item.add(new AttributeModifier(class, 
red));
}
else{
if(odd){
   item.add(new 
AttributeModifier(class,
odd));
   odd = false;
}
else{
  item.add(new 
AttributeModifier(class,
even));
  odd = true;
}
}

 

 AjaxFallbackLink lnk = new
AjaxFallbackLink(email){
@Override
public void onClick(AjaxRequestTarget 
target){
 setSelectedInvoice(i);
 emailScreen.show(target);
}
 };
 lnk.add(new Image(emailIcon, new
Model(images/email.png)));
 item.add(lnk);


 

   }
 };
 dataView.setOutputMarkupId(true);
 wmc.add(dataView);
 wmc.setOutputMarkupId(true);

Thanks,

Alex

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Lots-of-Images-slowing-rendering-in-DataView-tp4665733.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: Change name of session cookie

2014-05-16 Thread Don Ferguson
In Jetty 7.3.0, I do this by:
a) Deploying using a context xml file (in the jetty/contexts directory)
b) Supplying an overrideDescriptor
c) In the override descriptor, specifying:
  context-param
param-nameorg.eclipse.jetty.servlet.SessionCookie/param-name
param-valueXSESSIONID/param-value
  /context-param

Sample context file:

?xml version=1.0  encoding=ISO-8859-1?
!DOCTYPE Configure PUBLIC -//Mort Bay Consulting//DTD Configure//EN 
http://jetty.mortbay.org/configure.dtd;

Configure class=org.eclipse.jetty.webapp.WebAppContext
  Set name=contextPath/foo/Set
  Set name=warSystemProperty name=jetty.home 
default=.//wars/foo.war/Set
  Set name=overrideDescriptorSystemProperty name=jetty.home 
default=.//contexts/override/foo_web.xml/Set

  !-- DON'T KNOW IF THE BELOW SETTINGS ARE RELEVANT TO OVERRIDING THE SESSION 
COOKIE --
  Set name=extractWARfalse/Set
  Set name=copyWebDirfalse/Set
  Set name=defaultsDescriptorSystemProperty name=jetty.home 
default=.//etc/webdefault.xml/Set
  Set name=sessionHandler
   New class=org.eclipse.jetty.server.session.SessionHandler
 Arg
   New class=org.eclipse.jetty.server.session.HashSessionManager
   /New
 /Arg
   /New
 /Set
 
  Get name=sessionHandler
Get name=sessionManager
  Set name=idManager
New class=org.eclipse.jetty.server.session.HashSessionIdManager
   Set name=workerNameSystemProperty name=jetty.port 
default=8080//Set
/New
  /Set
/Get
  /Get
/Configure


Sample Override XML:

?xml version=1.0 encoding=ISO-8859-1?
web-app 
   xmlns=http://java.sun.com/xml/ns/javaee; 
   xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
   xsi:schemaLocation=http://java.sun.com/xml/ns/javaee 
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd; 
   version=2.5 

  context-param
param-nameorg.eclipse.jetty.servlet.SessionPath/param-name
param-value/foo/param-value
  /context-param
  context-param
param-nameorg.eclipse.jetty.servlet.SessionCookie/param-name
param-valueXSESSIONID/param-value
  /context-param
  context-param
param-nameorg.eclipse.jetty.servlet.SessionDomain/param-name
param-value.foo.com/param-value
  /context-param
/web-app


On May 16, 2014, at 6:13 AM, Tom Götz t...@decoded.de wrote:

 Hi,
 
 might be slightly offtopic, but: does someone know how to change to name of 
 the session cookie from „JSESSIONID“ to something else (in Tomcat 7.0.42 and 
 Jetty 6.1.26)?. Background: we have a Wicket app that runs inside an iFrame 
 of another Wicket app, so we have two cookies named „JESSESIONID“ …
 
 Cheers,
   -Tom
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 



Lots of Images slowing rendering in DataView?

2014-05-16 Thread ashindler
Hi,

I have a page with a fairly large DataView table ~2000 rows of information.
In each row I have 5 small icons (images) - a total of around 92kb each row.
The icons are also links.

There is some significant delay in rendering the page and I believe it must
be to do with the icons. 

If the icons are the cause - could anyone suggest a smarter way perhaps to
add the images to the page?
I currently simply do the following:

final DataView dataView = new DataView(rows, new
ListDataProvider(displayList)){
@Override
public void populateItem(final Item item) {

final Invoice i = (Invoice) 
item.getModelObject();

if(i.getStatus().equals(CANCELLED) || 
i.getStatus().equals(STORNO)){
item.add(new AttributeModifier(class, 
red));
}
else{
if(odd){
   item.add(new 
AttributeModifier(class,
odd));
   odd = false;
}
else{
  item.add(new 
AttributeModifier(class,
even));
  odd = true;
}
}



AjaxFallbackLink lnk = new
AjaxFallbackLink(email){
@Override
public void onClick(AjaxRequestTarget 
target){
 setSelectedInvoice(i);
 emailScreen.show(target);
}
};
lnk.add(new Image(emailIcon, new
Model(images/email.png)));
item.add(lnk);




  }
};
dataView.setOutputMarkupId(true);
wmc.add(dataView);
wmc.setOutputMarkupId(true);

Thanks,

Alex

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Lots-of-Images-slowing-rendering-in-DataView-tp4665733.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: Change name of session cookie

2014-05-16 Thread Tom Götz
Ah, wrong. It seems that there’s only one cookie. But both apps seem to have 
the same session id (running in the same container) …

   -Tom

On 16.05.2014, at 15:13, Tom Götz t...@decoded.de wrote:

 Hi,
 
 might be slightly offtopic, but: does someone know how to change to name of 
 the session cookie from „JSESSIONID“ to something else (in Tomcat 7.0.42 and 
 Jetty 6.1.26)?. Background: we have a Wicket app that runs inside an iFrame 
 of another Wicket app, so we have two cookies named „JESSESIONID“ …
 
 Cheers,
   -Tom
 
 
 -
 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: problem with resource lookup for css files

2014-05-16 Thread Sven Meier

Try with myCss_blue.css

Regards
Sven


On 05/16/2014 03:51 PM, Patrick Davids wrote:

Hi all,
I have problems with resource look up for styles css... and I dont know,
what I am doing wrong.

Can someone have a look, please...

myPackage.
BasePage.java
BasePage.html
myCss.css
myCss.blue.css
myCss.orange.css

As far as I know, the resource lookup for all kind of resources is the same.

I set the style to my Session via
Session.get().setStyle(blue);

and I can see the correct style string while debugging.


I tried to include my css into the BasePage via

BasePage.html
wicket:head
wicket:link
  link rel=stylesheet type=text/css href=myCss.css /
/wicket:link
/wicket:head

and also via

BasePage.java:
@Override
public void renderHead(HtmlHeaderContainer container) {
super.renderHead(container);
IHeaderResponse response = container.getHeaderResponse();
response.render(CssHeaderItem.forReference(new
CssResourceReference(BasePage.class, myCss.css, getLocale(),
getStyle(), getVariation(;
}

Both ways always look up the normal myCss.css and not myCss.blue.css.
Whats wrong with my code?
Help please...

Thanx a lot.
kind regards
Patrick
-
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: Question / Best Practise / (List)Model vs. (List)DataProvider

2014-05-16 Thread Sven Meier
IDataProvider is all about efficiency, it provides efficient access to a 
subset of the data.


Perhaps we can make it even more efficient with the recent proposal on 
the @dev list.


Regards
Sven


On 05/08/2014 01:37 PM, Patrick Davids wrote:

Hi all,

what I often think about, and I cannot really say is; when to use Model
or DataProvider as data providing object for components they repeat some
thing?

Javadoc says, DataProvider are (good) for DataViews.
Hmm... ok, and they allow easer iterating (first index, count).

I also can achieve this by using a LoadableDetachableModelList
combined with a ModelIteratorAdapater.

Both have detaching logic... both featuring extension, both have a sort
of load-method (getObject() vs. getData()).

Sometimes I think, they are so similar to each other... where is the key
difference?

Would be cool if some of yours just reply his two cents of daily
programming experience... so I can get some new point of views.

When do you use DataProvider or ModelList?
Did you experienced the same, not to exactly know which one you will use
for your new page/panel/component?
And often think about pro and cons using it with RepeatingViews? And
later on, you see... I could have used both... hmm...

thanx a lot for feedback and kind regards
Patrick
-
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 rest and retrofit rest client

2014-05-16 Thread Sven Meier

Hi,

Retrofit callbacks are invoked asynchronously. Once #success() is 
called, the Wicket response is probably written already.


You can't/shouldn't do anything related to Wicket in a non-request thread.

Regards
Sven

On 05/07/2014 07:49 PM, Noven wrote:

Hi all,

I am experimenting with retrofit (http://square.github.io/retrofit/) rest 
client and have issue that I can't fix.

I have a form that on submit will call the wicket-rest service.

form.add(new AjaxButton(submit) {
 @Override
 protected void onSubmit(final AjaxRequestTarget target, Form? 
form) {
 getWicketApplication().getPersonService().createPerson((PersonPojo) 
form.getModelObject(), new CallbackPersonPojo() {

 @Override
 public void success(PersonPojo t, Response rspns) {
 info(Success creating person);
 
 target.add(feedback); // error from here

 }

 @Override
 public void failure(RetrofitError re) {
 error(Error creating person);
 target.add(feedback);
 }
 });
 }
 });


I am able to submit the form successfully..  but unable to call the 
target.add(feedback);

Here is the logs :

INFO  - PersonForm - Success creating person
Exception in thread Retrofit-Idle org.apache.wicket.WicketRuntimeException: 
No RequestCycle is currently set!
at org.apache.wicket.Component.getRequest(Component.java:1818)
at org.apache.wicket.markup.html.WebPage.dirty(WebPage.java:318)
at org.apache.wicket.Page.dirty(Page.java:248)
at org.apache.wicket.Page.componentStateChanging(Page.java:937)
at org.apache.wicket.Component.addStateChange(Component.java:3542)
at org.apache.wicket.Component.info(Component.java:2008)
at com.restclient.form.PersonForm$1$1.success(PersonForm.java:62)
at com.restclient.form.PersonForm$1$1.success(PersonForm.java:57)
at retrofit.CallbackRunnable$1.run(CallbackRunnable.java:45)
at retrofit.Utils$SynchronousExecutor.execute(Utils.java:114)
at retrofit.CallbackRunnable.run(CallbackRunnable.java:43)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at retrofit.Platform$Base$2$1.run(Platform.java:94)
at java.lang.Thread.run(Thread.java:744)

I guess there's something I missed here, The RequestCycle. I just don't know 
what to do next.

Please help.

Regards,
Noven



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



Re: Wicket 7 M1 different behaviour on button

2014-05-16 Thread Sven Meier

Hi Peter,

in Wicket 7.x the default event handling is no longer prevented by default.
Thus the browser submits the form (submit is the default type) *after* 
the Ajax request has been processed.


I agree that AjaxLink should not submit in any case: We might decide to 
alter the tag to always have type=button.


Please open a Jira issue.

Thanks
Sven


On 05/16/2014 11:12 AM, Peter Henderson wrote:

Hi Wicket users.

It looks like Wicket 7 treats all button without a type attribute as 
submit buttons (6.15 does not)


Would it be possible revert this? or at least add a warning log 
message when button is missing the attribute?



I think the code should control if the button submits the form. 
(AjaxSubmitLink or AjaxLink) not the type attribute.



I've attached a quick start




--
Peter Henderson



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




Question / Best Practise / (List)Model vs. (List)DataProvider

2014-05-16 Thread Patrick Davids
Hi all,

what I often think about, and I cannot really say is; when to use Model 
or DataProvider as data providing object for components they repeat some 
thing?

Javadoc says, DataProvider are (good) for DataViews.
Hmm... ok, and they allow easer iterating (first index, count).

I also can achieve this by using a LoadableDetachableModelList 
combined with a ModelIteratorAdapater.

Both have detaching logic... both featuring extension, both have a sort 
of load-method (getObject() vs. getData()).

Sometimes I think, they are so similar to each other... where is the key 
difference?

Would be cool if some of yours just reply his two cents of daily 
programming experience... so I can get some new point of views.

When do you use DataProvider or ModelList?
Did you experienced the same, not to exactly know which one you will use 
for your new page/panel/component?
And often think about pro and cons using it with RepeatingViews? And 
later on, you see... I could have used both... hmm...

thanx a lot for feedback and kind regards
Patrick
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



RE: Ajax timer not counting when tab doesn't have focus?

2014-05-16 Thread Bruce Lombardi
Thanks Ernesto  that would be great!

-Original Message-
From: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com] 
Sent: Friday, May 16, 2014 2:42 PM
To: users@wicket.apache.org
Subject: Re: Ajax timer not counting when tab doesn't have focus?

Bruce.

Let me see if I can find some time during weekend to play a bit with the links 
your provided and come up with a more robust solution.


On Fri, May 16, 2014 at 3:57 PM, Bruce Lombardi brlom...@gmail.com wrote:

 First, thank you  for your continuing interest. This is the best 
 support group experience  I've ever had. I hope the message come in 
 the right sequence. Lke Ernesto and other A saw the sequencing problem 
 cause by the apache server problem.

 I ran the test that Martin suggestion with  6.16.0-SNAPSHOTand got the 
 same behavior, which is what Ernesto and I suspected would happen.

 I'm sorry, but I don't know a lot about JavaScript so I'm having with 
 certain things.  I read this article in stackoverflow:


 https://stackoverflow.com/questions/6032429/chrome-timeouts-interval-s
 uspended-in-background-tabs

 Which lead to this:


 http://stackoverflow.com/questions/5927284/how-can-i-make-setinterval-
 also-work-when-a-tab-is-inactive-in-chrome


 Which contained an example of a script that doesn’t work correctly (if 
 you go to it, you will see that  it walks the word test  across the screen.
 If you go to another  tab and come back test hasn’t moved)

 http://jsfiddle.net/7f6DX/3/


 and this example that works (does the same thing but you can see that 
 test  moves even when you go to another  tab - but don't go away too 
 long it will reach the end and disappear).

 http://jsfiddle.net/7f6DX/31/

 Do you think the last (working) script  could be adapted  for our timeout?

 Regards,
 Bruce



 -Original Message-
 From: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com]
 Sent: Tuesday, May 13, 2014 1:59 AM
 To: users@wicket.apache.org
 Subject: Re: Ajax timer not counting when tab doesn't have focus?

 Martin,

 Thanks for pointing out this. The exact JavaScript enabling this 
 feature can be found here


 https://github.com/reiern70/antilia-bits/blob/master/client-sign-out-p
 arent/client-sign-out/src/main/java/com/antilia/signout/InactivitySign
 OutPanel.js

 Maybe there is a memory leak in here as well... but I do not see the 
 relation with WICKET-5570 as I do not use any of the AJAX timer 
 behavior, see


 https://github.com/reiern70/antilia-bits/blob/master/client-sign-out-p
 arent/client-sign-out/src/main/java/com/antilia/signout/InactivitySign
 OutPanel.java

 As Bruce describes the problem it sounds like if by switching to other 
 tab browser give less priority to the execution of JavaScript in 
 inactive tabs.



 On Mon, May 12, 2014 at 9:28 PM, Martin Grigorov mgrigo...@apache.org
 wrote:

  It could be that https://issues.apache.org/jira/browse/WICKET-5570 
  is the issue.
  Please try with 6.16.0-SNAPSHOT if you can.
 
  Martin Grigorov
  Wicket Training and Consulting
 
 
  On Mon, May 12, 2014 at 8:02 PM, Bruce Lombardi brlom...@gmail.com
  wrote:
 
   Thanks Ernesto.
  
   Yes, I do mean another browser tab. I have some new information. 
   The
  timer
   seems to slow way down, but not stop counting down when the user 
   switches focus to another tab, either opening a new tab, or just 
   clicking on
  another
   tab. This is happening in both Chrome and Firefox.
  
   I thought that my code was never timing out, but further 
   experimentation with a shorter timeout period shows that it is 
   doing the same thing as
  the
   demo. That is, timing out in about 10 second when you stay on the 
   tab,
  but
   taking 3 minutes or longer to timeout when if you change focus to 
   a different tab.
  
   I would appreciate it if you could look at your demo and see the 
   behavior and then see if you have any ideas.
  
   As for my code, I really feel they difference with your code are 
   insignificant especially now that I know the behavior is the same.
  
   See below for the differences.
  
   Thanks again,
  
   Bruce
  
  
   Code.
  
   I have your InactivitySignOutPanel.java, 
   InactivitySignOutPanel.html and InactivitySignOutPanel.js from the 
   GitHub site with one slight
  modification
   in InactivitySignOutPanel.java (see below).
  
I setup my panel in  a base class that serves as a superclass for 
   all
  the
   Web pages in the application (extends WebPage)  I have a method 
   that is called to setup the timeout. Here is the method.
  
   public void setupTimeout() {
  
   // Change the following value to change the 
   session timeout.
   int numberOfMinutesUntilTimeout = 15;
  
   int secondsPerMinute = 60;
   int secondsToTimeout =numberOfMinutesUntilTimeout 
   * secondsPerMinute;
  
   add(new InactivitySignOutPanel(timeout,
   Duration.seconds(secondsToTimeout)) {
  
   

Request.getClientUrl() usage when using reverse proxy

2014-05-16 Thread Rakesh A
Hi,
I've little trouble finding the correct method to use, to get the host name
when using reverse proxy. I tried to use
org.apache.wicket.request.Request.getClientUrl(), but when I use
Url#getHost() on the return value, I get the actual host name instead of
the proxy url.

Is there any other method I can use in this case?

Thanks,
Rakesh.A

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Request-getClientUrl-usage-when-using-reverse-proxy-tp4665750.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: DiskDataStore errors in production

2014-05-16 Thread Paul Bors
Or simply know that Wicket has a page data store which can't update on your
disk due to your file system permissions hence:
java.io.FileNotFoundException:
/opt/ssa/tomcat/apache-tomcat-7.0.29/work/Catalina/localhost/SSA/wicket.ssa-webapp-filestore/3943/9005/A851AC58C741B566C0E40BE1791649E1/data
(Permission denied)

Also see:
http://wicket.apache.org/guide/guide/versioningCaching.html

On Wednesday, May 14, 2014, eaglei22 jchojnack...@gmail.com wrote:

 Hi, my application in production often gets this error:
 May 14 09:12:27 ERROR

 DiskDataStore-/opt/ssa/tomcat/apache-tomcat-7.0.29/work/Catalina/localhost/SSA/wicket.ssa-webapp-filestore/4729/2939/909EAC3343856968BA7B1864B71CEA85/data
 (Too many open files)
 java.io.FileNotFoundException:

 /opt/ssa/tomcat/apache-tomcat-7.0.29/work/Catalina/localhost/SSA/wicket.ssa-webapp-filestore/4729/2939/909EAC3343856968BA7B1864B71CEA85/data
 (Too many open files)
 at java.io.RandomAccessFile.open(Native Method)
 at java.io.RandomAccessFile.init(RandomAccessFile.java:233)
 at

 org.apache.wicket.pageStore.DiskDataStore$SessionEntry.getFileChannel(DiskDataStore.java:425)
 at

 org.apache.wicket.pageStore.DiskDataStore$SessionEntry.savePage(DiskDataStore.java:343)
 at
 org.apache.wicket.pageStore.DiskDataStore.storeData(DiskDataStore.java:181)
 at

 org.apache.wicket.pageStore.AsynchronousDataStore.storeData(AsynchronousDataStore.java:228)
 at

 org.apache.wicket.pageStore.DefaultPageStore.storePageData(DefaultPageStore.java:120)
 at

 org.apache.wicket.pageStore.DefaultPageStore.storePage(DefaultPageStore.java:154)
 at

 org.apache.wicket.page.PageStoreManager$PersistentRequestAdapter.storeTouchedPages(PageStoreManager.java:412)
 at

 org.apache.wicket.page.RequestAdapter.commitRequest(RequestAdapter.java:181)




 and now I am getting this error for every page opened making the log file
 extremely large:

 May 14 11:36:31 WARN  DiskDataStore-Cannot save page with id '866' because
 the data file cannot be opened.
 May 14 11:36:31 ERROR

 DiskDataStore-/opt/ssa/tomcat/apache-tomcat-7.0.29/work/Catalina/localhost/SSA/wicket.ssa-webapp-filestore/3943/9005/A851AC58C741B566C0E40BE1791649E1/data
 (Permission denied)
 java.io.FileNotFoundException:

 /opt/ssa/tomcat/apache-tomcat-7.0.29/work/Catalina/localhost/SSA/wicket.ssa-webapp-filestore/3943/9005/A851AC58C741B566C0E40BE1791649E1/data
 (Permission denied)
 at java.io.RandomAccessFile.open(Native Method)
 at java.io.RandomAccessFile.init(RandomAccessFile.java:233)
 at

 org.apache.wicket.pageStore.DiskDataStore$SessionEntry.getFileChannel(DiskDataStore.java:425)
 at

 org.apache.wicket.pageStore.DiskDataStore$SessionEntry.savePage(DiskDataStore.java:343)
 at
 org.apache.wicket.pageStore.DiskDataStore.storeData(DiskDataStore.java:181)
 at

 org.apache.wicket.pageStore.AsynchronousDataStore$PageSavingRunnable.run(AsynchronousDataStore.java:355)
 at java.lang.Thread.run(Thread.java:722)
 May 14 11:36:31 WARN  DiskDataStore-Cannot save page with id '0' because
 the
 data file cannot be opened.
 May 14 11:36:32 ERROR

 DiskDataStore-/opt/ssa/tomcat/apache-tomcat-7.0.29/work/Catalina/localhost/SSA/wicket.ssa-webapp-filestore/3943/9005/A851AC58C741B566C0E40BE1791649E1/data
 (Permission denied)
 java.io.FileNotFoundException:

 /opt/ssa/tomcat/apache-tomcat-7.0.29/work/Catalina/localhost/SSA/wicket.ssa-webapp-filestore/3943/9005/A851AC58C741B566C0E40BE1791649E1/data
 (Permission denied)
 at java.io.RandomAccessFile.open(Native Method)
 at java.io.RandomAccessFile.init(RandomAccessFile.java:233)
 at

 org.apache.wicket.pageStore.DiskDataStore$SessionEntry.getFileChannel(DiskDataStore.java:425)
 at

 org.apache.wicket.pageStore.DiskDataStore$SessionEntry.savePage(DiskDataStore.java:343)
 at
 org.apache.wicket.pageStore.DiskDataStore.storeData(DiskDataStore.java:181)
 at

 org.apache.wicket.pageStore.AsynchronousDataStore$PageSavingRunnable.run(AsynchronousDataStore.java:355)
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/DiskDataStore-errors-in-production-tp4665839.html
 Sent from the Users forum mailing list archive at Nabble.com.

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




RE: Ajax timer not counting when tab doesn't have focus?

2014-05-16 Thread Bruce Lombardi
First, thank you  for your continuing interest. This is the best support group 
experience  I've ever had. I hope the message come in the right sequence. Lke 
Ernesto and other A saw the sequencing problem cause by the apache server 
problem.

I ran the test that Martin suggestion with  6.16.0-SNAPSHOTand got the same 
behavior, which is what Ernesto and I suspected would happen.

I'm sorry, but I don't know a lot about JavaScript so I'm having with certain 
things.  I read this article in stackoverflow:

https://stackoverflow.com/questions/6032429/chrome-timeouts-interval-suspended-in-background-tabs

Which lead to this:

http://stackoverflow.com/questions/5927284/how-can-i-make-setinterval-also-work-when-a-tab-is-inactive-in-chrome


Which contained an example of a script that doesn’t work correctly (if you go 
to it, you will see that  it walks the word test  across the screen. If you 
go to another  tab and come back test hasn’t moved)

http://jsfiddle.net/7f6DX/3/


and this example that works (does the same thing but you can see that test  
moves even when you go to another  tab - but don't go away too long it will 
reach the end and disappear).

http://jsfiddle.net/7f6DX/31/

Do you think the last (working) script  could be adapted  for our timeout?

Regards,
Bruce



-Original Message-
From: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com] 
Sent: Tuesday, May 13, 2014 1:59 AM
To: users@wicket.apache.org
Subject: Re: Ajax timer not counting when tab doesn't have focus?

Martin,

Thanks for pointing out this. The exact JavaScript enabling this feature can be 
found here

https://github.com/reiern70/antilia-bits/blob/master/client-sign-out-parent/client-sign-out/src/main/java/com/antilia/signout/InactivitySignOutPanel.js

Maybe there is a memory leak in here as well... but I do not see the relation 
with WICKET-5570 as I do not use any of the AJAX timer behavior, see

https://github.com/reiern70/antilia-bits/blob/master/client-sign-out-parent/client-sign-out/src/main/java/com/antilia/signout/InactivitySignOutPanel.java

As Bruce describes the problem it sounds like if by switching to other tab 
browser give less priority to the execution of JavaScript in inactive tabs.



On Mon, May 12, 2014 at 9:28 PM, Martin Grigorov mgrigo...@apache.orgwrote:

 It could be that https://issues.apache.org/jira/browse/WICKET-5570 is 
 the issue.
 Please try with 6.16.0-SNAPSHOT if you can.

 Martin Grigorov
 Wicket Training and Consulting


 On Mon, May 12, 2014 at 8:02 PM, Bruce Lombardi brlom...@gmail.com
 wrote:

  Thanks Ernesto.
 
  Yes, I do mean another browser tab. I have some new information. The
 timer
  seems to slow way down, but not stop counting down when the user 
  switches focus to another tab, either opening a new tab, or just 
  clicking on
 another
  tab. This is happening in both Chrome and Firefox.
 
  I thought that my code was never timing out, but further 
  experimentation with a shorter timeout period shows that it is doing 
  the same thing as
 the
  demo. That is, timing out in about 10 second when you stay on the 
  tab,
 but
  taking 3 minutes or longer to timeout when if you change focus to a 
  different tab.
 
  I would appreciate it if you could look at your demo and see the 
  behavior and then see if you have any ideas.
 
  As for my code, I really feel they difference with your code are 
  insignificant especially now that I know the behavior is the same.
 
  See below for the differences.
 
  Thanks again,
 
  Bruce
 
 
  Code.
 
  I have your InactivitySignOutPanel.java, InactivitySignOutPanel.html 
  and InactivitySignOutPanel.js from the GitHub site with one slight
 modification
  in InactivitySignOutPanel.java (see below).
 
   I setup my panel in  a base class that serves as a superclass for 
  all
 the
  Web pages in the application (extends WebPage)  I have a method that 
  is called to setup the timeout. Here is the method.
 
  public void setupTimeout() {
 
  // Change the following value to change the session 
  timeout.
  int numberOfMinutesUntilTimeout = 15;
 
  int secondsPerMinute = 60;
  int secondsToTimeout =numberOfMinutesUntilTimeout * 
  secondsPerMinute;
 
  add(new InactivitySignOutPanel(timeout,
  Duration.seconds(secondsToTimeout)) {
 
  private static final long serialVersionUID = 1L;
 
  protected String getOnTimeChangedFunction() {
  return 
  function(timeRemaining){if(!window.countDown) { window.countDown = 
  $('#countDown'); }  $(window.countDown).html(timeRemaining);};
  }
  });
 
  add( new AjaxLinkVoid(link) {
 
  private static final long serialVersionUID = 
  1L;
 
  @Override
  public void onClick(AjaxRequestTarget target) {
  // do nothing
  }
  });
  }
 
  

Re: Wicket atmosphere

2014-05-16 Thread Emond Papegaaij
I replied to your mail already, but it seems my message was lost in the mail 
outage. Atmosphere and the JS are upgraded on the wicket-6.x and 
master branches. I've also fixed the filter.

https://issues.apache.org/jira/browse/WICKET-5589

Best regards,
Emond

On Monday 05 May 2014 14:08:20 Olivier Dutrieux wrote:
 Could you please update the wicket-atmosphere with the last release 
2.1.4 :
 I know that this version depend of jquery 2.0.3+ but there is a pure
 javascript version (no jquery depend) :
 
 https://github.com/Atmosphere/atmosphere-javascript
 
 And I notice that's your version of TrackMessageSizeFilter don't extend 
the
 org.atmosphere.client.TrackMessageSizeFilter but it's necessary to be 
use
 everywhere my atmosphere : check line 72 of this JavaScriptProtocol file 
for
 why :
 
 https://github.com/Atmosphere/atmosphere/blob/atmosphere-project-2.1.4/modul
 
es/cpr/src/main/java/org/atmosphere/interceptor/JavaScriptProtocol.java#L
72
 
 I can pull a request if you want.
 
 Duto
 
 -
 Duto
 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Wicket-atmosphere-tp4665687.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: AjaxTabbedPanel and validation for all tabs

2014-05-16 Thread Paul Bors
My recommendation would be to use bean validation and Ajax to update the UI.

On Tuesday, May 6, 2014, mscoon msc...@gmail.com wrote:

 Hi all,

 I have a complex form for editing existing objects. I am planning to use
 AjaxTabbedPanel with adapted ajax links for the tabs to submit the current
 tab when the user switches tabs.

 There will be a save button under the tabbed panel that will save the
 entire object.

 For new objects, I could force the user to visit all tabs before allowing
 them to save, to guarantee that the validators have ran for all form
 components and all tabs.

 The twist here is that the object, when loaded, may be invalid. But I don't
 want to force the user to visit all tabs when editing an existing object
 because it will very unfriendly (imagine the user wanting to update just
 one field in the first tab and being forced to visit all five tabs before
 saving).

 So I am looking for a way to make sure that all validators run when the
 user clicks save. As far as I understand there is no way to force all
 wicket validators to execute because the request will only contain post
 data for the active tab.

 Is there a way to solve this? Client side tabs are a solution I guess but
 one I'd like to avoid if possible.

 I did consider moving my validation logic to a server side validation
 method. The problem here is that you cannot leverage wicket's existing
 validators and error messages and also it becomes considerably harder to
 provide visual feedback for errors (e.g. highlight the components with
 errors). On the plus side, you do have a validation method that can be
 reused if you have alternate methods for updating the same data (e.g. via a
 REST service).

 Are there any pointers on using server side validation with wicket forms?

 Thanks in advance,
 Marios



Re: Delete version number in url

2014-05-16 Thread Pierre Goupil
Thanks. I figured it out.


On Fri, May 16, 2014 at 3:08 PM, Prag pragprog...@gmail.com wrote:

 @Maxim, your solution works fine, thanks!

 @Pierre
 The link does work, but you have to remove the (NoVersionMapper class)
 suffix:


 https://svn.apache.org/repos/asf/openmeetings/trunk/singlewebapp/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application.java

 See also here:
 http://stackoverflow.com/a/23695514/1039774

 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Delete-version-number-in-url-tp4665752p4665874.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




-- 
La vie est source de joie, la mort est source de paix, seule la transition
est difficile.


Re: problem with message order delivered to wicket users list

2014-05-16 Thread Bruce Lombardi
Yes, I have been seeing the same thing. I also saw a reply that didn't include 
someone else's previous response.

Bruce

Sent from my iPad

 On May 14, 2014, at 12:21 AM, Ernesto Reinaldo Barreiro reier...@gmail.com 
 wrote:
 
 Hi,
 
 I the last couple of days I have been experiencing problems with the order
 of messages delivered to wicket users list: sometimes I receive an answer
 and then a few minutes after the original message. Is someone else
 experiencing this behavior?
 
 -- 
 Regards - Ernesto Reinaldo Barreiro

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



Re: Delete version number in url

2014-05-16 Thread Prag
@Maxim, your solution works fine, thanks!

@Pierre
The link does work, but you have to remove the (NoVersionMapper class)
suffix:

https://svn.apache.org/repos/asf/openmeetings/trunk/singlewebapp/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application.java

See also here:
http://stackoverflow.com/a/23695514/1039774

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Delete-version-number-in-url-tp4665752p4665874.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: Ajax timer not counting when tab doesn't have focus?

2014-05-16 Thread Ernesto Reinaldo Barreiro
Bruce.

Let me see if I can find some time during weekend to play a bit with the
links your provided and come up with a more robust solution.


On Fri, May 16, 2014 at 3:57 PM, Bruce Lombardi brlom...@gmail.com wrote:

 First, thank you  for your continuing interest. This is the best support
 group experience  I've ever had. I hope the message come in the right
 sequence. Lke Ernesto and other A saw the sequencing problem cause by the
 apache server problem.

 I ran the test that Martin suggestion with  6.16.0-SNAPSHOTand got the
 same behavior, which is what Ernesto and I suspected would happen.

 I'm sorry, but I don't know a lot about JavaScript so I'm having with
 certain things.  I read this article in stackoverflow:


 https://stackoverflow.com/questions/6032429/chrome-timeouts-interval-suspended-in-background-tabs

 Which lead to this:


 http://stackoverflow.com/questions/5927284/how-can-i-make-setinterval-also-work-when-a-tab-is-inactive-in-chrome


 Which contained an example of a script that doesn’t work correctly (if you
 go to it, you will see that  it walks the word test  across the screen.
 If you go to another  tab and come back test hasn’t moved)

 http://jsfiddle.net/7f6DX/3/


 and this example that works (does the same thing but you can see that
 test  moves even when you go to another  tab - but don't go away too long
 it will reach the end and disappear).

 http://jsfiddle.net/7f6DX/31/

 Do you think the last (working) script  could be adapted  for our timeout?

 Regards,
 Bruce



 -Original Message-
 From: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com]
 Sent: Tuesday, May 13, 2014 1:59 AM
 To: users@wicket.apache.org
 Subject: Re: Ajax timer not counting when tab doesn't have focus?

 Martin,

 Thanks for pointing out this. The exact JavaScript enabling this feature
 can be found here


 https://github.com/reiern70/antilia-bits/blob/master/client-sign-out-parent/client-sign-out/src/main/java/com/antilia/signout/InactivitySignOutPanel.js

 Maybe there is a memory leak in here as well... but I do not see the
 relation with WICKET-5570 as I do not use any of the AJAX timer behavior,
 see


 https://github.com/reiern70/antilia-bits/blob/master/client-sign-out-parent/client-sign-out/src/main/java/com/antilia/signout/InactivitySignOutPanel.java

 As Bruce describes the problem it sounds like if by switching to other tab
 browser give less priority to the execution of JavaScript in inactive
 tabs.



 On Mon, May 12, 2014 at 9:28 PM, Martin Grigorov mgrigo...@apache.org
 wrote:

  It could be that https://issues.apache.org/jira/browse/WICKET-5570 is
  the issue.
  Please try with 6.16.0-SNAPSHOT if you can.
 
  Martin Grigorov
  Wicket Training and Consulting
 
 
  On Mon, May 12, 2014 at 8:02 PM, Bruce Lombardi brlom...@gmail.com
  wrote:
 
   Thanks Ernesto.
  
   Yes, I do mean another browser tab. I have some new information. The
  timer
   seems to slow way down, but not stop counting down when the user
   switches focus to another tab, either opening a new tab, or just
   clicking on
  another
   tab. This is happening in both Chrome and Firefox.
  
   I thought that my code was never timing out, but further
   experimentation with a shorter timeout period shows that it is doing
   the same thing as
  the
   demo. That is, timing out in about 10 second when you stay on the
   tab,
  but
   taking 3 minutes or longer to timeout when if you change focus to a
   different tab.
  
   I would appreciate it if you could look at your demo and see the
   behavior and then see if you have any ideas.
  
   As for my code, I really feel they difference with your code are
   insignificant especially now that I know the behavior is the same.
  
   See below for the differences.
  
   Thanks again,
  
   Bruce
  
  
   Code.
  
   I have your InactivitySignOutPanel.java, InactivitySignOutPanel.html
   and InactivitySignOutPanel.js from the GitHub site with one slight
  modification
   in InactivitySignOutPanel.java (see below).
  
I setup my panel in  a base class that serves as a superclass for
   all
  the
   Web pages in the application (extends WebPage)  I have a method that
   is called to setup the timeout. Here is the method.
  
   public void setupTimeout() {
  
   // Change the following value to change the session
   timeout.
   int numberOfMinutesUntilTimeout = 15;
  
   int secondsPerMinute = 60;
   int secondsToTimeout =numberOfMinutesUntilTimeout *
   secondsPerMinute;
  
   add(new InactivitySignOutPanel(timeout,
   Duration.seconds(secondsToTimeout)) {
  
   private static final long serialVersionUID = 1L;
  
   protected String getOnTimeChangedFunction() {
   return
   function(timeRemaining){if(!window.countDown) { window.countDown =
   $('#countDown'); }  $(window.countDown).html(timeRemaining);};
   }
   

Re: Include Files form Filesystem

2014-05-16 Thread Paul Bors
Wicket is just Java, so you can also have your Base class be the page
template and have other pages extend it ;)

On Sunday, May 11, 2014, Martin Grigorov mgrigo...@apache.org wrote:

 Hi,

 See http://wicketinaction.com/2011/07/wicket-1-5-mounting-resources/
 Create a custom ResourceReference and mount it. Then use
 RequestCycle#urlFor() to get the relative url to it and pass it to Include

 Martin Grigorov
 Wicket Training and Consulting


 On Fri, May 9, 2014 at 5:12 PM, Mikulicic, Vladimir 
 vladimir.mikuli...@br.de javascript:; wrote:

  Hello,
 
  im using Wicket 6.15
 
  Does someone know how to  include a static HTML file from the filesystem
  in my Wicket-App.
 
  I have a folder on my machine like /local/wtr/   with two files
   header.html   and footer.html in it.
  The files are not in the docroot of my server, but somewhere in the
  filesystem.
 
  I would like to include these Files with:
 
  new Include(include, header.html);
 
  My approach is:
 
  getSharedResources().add(extern, new FolderContentResource(new
  File(/local/wtr)));
  mountResource(/resource/, new SharedResourceReference(extern));
 
  But I don’t know how to use it  with  new Include()?
  How to get the correct path to the header.html?
 
  Any help would be fine. Thanks a lot!
 
  Vladi
 
 
 
 
 
 --
  Bayerischer Rundfunk; Rundfunkplatz 1; 80335 München
  Telefon: +49 89 590001; E-Mail: i...@br.de; Website: http://www.BR.de
 



Please help explain the script below, what's the 'className';'unloadConfirmation','mask' stand for? Is there relative docs could be refered to?

2014-05-16 Thread 003210
 
Hi,
Please help explain the script below, what's the 
'className';'unloadConfirmation','mask' stand for?
Is there relative docs could be refered to?

'var element=document.getElementById('container'); 
var settings = new Object();
settings.minWidth=200;
settings.minHeight=200;
settings.className='w_blue';
settings.width=700;
settings.height=500;
settings.resizable=true;
settings.element=element;
settings.title='网元2机箱1槽位5板卡1.1端口1';
settings.mask='semi-transparent';
settings.autoSize=false;
settings.unloadConfirmation=true;
Wicket.Window.create(settings).show();'









软件七部 孙雅斌
分机:58963399-5244