AjaxThrottling

2010-03-19 Thread Douglas Ferguson
I have a search box that is submitted via a behavior listening for onkeyup.

I set the throttle for the behavior and I'm seeing strange behavior.

If I type quickly a bunch of characters, it seems to queue up the requests.
I would expect it to wait for me to stop typing and then only issue the request 
once.

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



Easies way to set custom HTML

2010-03-19 Thread Sigmar Muuga
Hello,
which is the easiest way to set custom HTML page for a Page or Panel?
For example I have panel called HelloPanel, conventinally Wicket wants to
pair it with HelloPanel.html in the same package, but I want to
use HelloMyDearFriends.html with that panel...

Sigmar


Re: Tree with invisible Nodes

2010-03-19 Thread MattyDE

Thanks igor for your Contribution.

I did it now with my own TreeNode-Type and my own
AbstractTree-Implementation:

@Override
protected void populateTreeItem(WebMarkupContainer item, int level) {   

super.populateTreeItem(item, level);

//Is this Node visible or not?
item.add(
new AbstractBehavior() {
@Override
public void onComponentTag(Component component, 
ComponentTag tag) {
TreeNode node = 
(TreeNode)component.getDefaultModelObject();
if(!node.isVisible()){
tag.put(class, ( 
tag.getString(class) +  hidden) );
}
}
}
);
} 


igor.vaynberg wrote:
 
 filter them in your TreeModel, it should work. you also have to
 override getChildCount() to return a count without filtered children,
 and adjust TreeModel#getIndexOfChild() to skip over the filtered
 children.
 
 -igor
 
 On Thu, Mar 18, 2010 at 6:19 AM, Martin U ufer.mar...@googlemail.com
 wrote:
 Hi Folks,

 i've to implement a tree in which some node are exists under a parent
 node
 but they should not be visible to the user in browser at all.

 I tried to overwrite getChild from TreeNode. But it dont works for me.
 I
 need this node existens either they are not visible because the tree is
 my
 data(model)-holder too for further processing


 Any Ideas?

 Thanks a lot.

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

-- 
View this message in context: 
http://old.nabble.com/Tree-with-invisible-Nodes-tp27945428p27950906.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Wicketstuff versioning

2010-03-19 Thread nino martinez wael
I'll be happy to join in Boris.

2010/3/18 Boris Goldowsky bgoldow...@cast.org

 Thank you for your thoughts Jeremy -- and your previous work on
 WicketStuff.  I am certainly unhappy to hear that it felt like torture
 and that junk was being dumped on you rather than getting support from
 the community.

 I'd volunteer to put a bit of time into this, but I don't have time to
 be sole maintainer either.  Maybe there could be a small group who all
 helped out - anyone else on this list willing to step up?

 I already offered to fix and update the TinyMCE module, but that is
 currently stalled since the necessary dependency is not in the
 repository and I don't have permissions to add it.

 Bng


 On Wed, 2010-03-17 at 16:21 -0500, Jeremy Thomerson wrote:

 
  I tried.  I don't have the time it takes.  With the free-for-all access
 that
  is given to it, people consistently commit inconsistent junk that they
 don't
  ever intend on maintaining in there.  Feel free to take over - most of
 the
  reorganization work is already done for you - by me.  You can pick up
 where
  I left off and carry the torture stake as far as you want.


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




Re: StackOverflowError under serialization leaves pagemap locked

2010-03-19 Thread Nigel Parker
Thanks for all your help, Johan and Igor. Problem solved we think. One
of the pages was holding a reference to the session. With multiple
Ajax requests on the same page the session size was doubling each
time, eventually giving stack overflow.

Nigel


Or:

http://wicketstuff.org/maven/repository/org/apache/wicket/wicket/1.4-SNAPSHOT/

That should also have the latest fix

- Original message -

the fix is in 1.4.x branch and will be part of 1.4.8.

in the meantime you can build a fresh snapshot yourself and drop that
into your application

http://svn.apache.org/repos/asf/wicket/branches/wicket-1.4.x

-igor

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



Re: StackOverflowError under serialization leaves pagemap locked

2010-03-19 Thread Igor Vaynberg
we can modify serializable checker to check if anything is holding a
reference to session or application and catch the error right away.
please add a jira issue for this.

-igor

On Thu, Mar 18, 2010 at 11:17 PM, Nigel Parker nigel.par...@mazeppa.no wrote:
 Thanks for all your help, Johan and Igor. Problem solved we think. One
 of the pages was holding a reference to the session. With multiple
 Ajax requests on the same page the session size was doubling each
 time, eventually giving stack overflow.

 Nigel


 Or:

 http://wicketstuff.org/maven/repository/org/apache/wicket/wicket/1.4-SNAPSHOT/

 That should also have the latest fix

 - Original message -

 the fix is in 1.4.x branch and will be part of 1.4.8.

 in the meantime you can build a fresh snapshot yourself and drop that
 into your application

 http://svn.apache.org/repos/asf/wicket/branches/wicket-1.4.x

 -igor

 -
 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: Trailing / on parameter name/value pairs

2010-03-19 Thread Antoine van Wel
On Fri, Mar 19, 2010 at 6:43 AM, Chris Colman
chr...@stepaheadsoftware.com wrote:
 all servlet containers do that on first request. if you dont care
 about browsers with cookies disabled you can tweak tomcat to never
 append jsessionid to the url, afair there is a setting for that.

 -igor

 I wish I didn't have to care for browsers with cookies disabled but
 there's always some idiot who's preaching to the uninformed that
 'cookies are a security risk' which is bollocks if you ask me.

Having jsessionid's appended to your url can be a security risk...
Besides, it looks ugly and you don't want search engines to end up
displaying url's with jsessionid's in them.

Furthermore if people don't like cookies they can also have them
deleted after they close the browser, at least there's an option for
that in Firefox.

So I wouldn't worry about your preaching idiot and his uninformed followers ;-)


Antoine

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



Re: Easies way to set custom HTML

2010-03-19 Thread Martijn Dashorst
Why would you want that?

Martijn

On Fri, Mar 19, 2010 at 7:39 AM, Sigmar Muuga meedi...@gmail.com wrote:
 Hello,
 which is the easiest way to set custom HTML page for a Page or Panel?
 For example I have panel called HelloPanel, conventinally Wicket wants to
 pair it with HelloPanel.html in the same package, but I want to
 use HelloMyDearFriends.html with that panel...

 Sigmar




-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.4 increases type safety for web applications
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.4

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



Re: StackOverflowError under serialization leaves pagemap locked

2010-03-19 Thread Nigel Parker
OK, WICKET-2789 added.

Thanks again

Nigel

---

we can modify serializable checker to check if anything is holding a
reference to session or application and catch the error right away. please
add a jira issue for this.

-igor


RE: Wicketstuff versioning

2010-03-19 Thread Stefan Lindner
Perhaps we should define an island of stability (like the name wickststuff-core 
implies). Maybe under another name (e.g. wicketstuff-stable).
This place should only hold projects that are maintained and that are buildable 
with actual wicket versions. The rest of wicketstuff should be left as ist is: 
free for everyone and sometimes out of date.
Even if a project is not supported anymore t might be helpful to get some 
inspiration for my own work.

And: YES, I would help to maintain such a stable core of wicketstuff.

Stefan

-Ursprüngliche Nachricht-
Von: Martin Grigorov [mailto:mcgreg...@e-card.bg] 
Gesendet: Donnerstag, 18. März 2010 09:09
An: users@wicket.apache.org
Betreff: Re: Wicketstuff versioning

Here is how I understand wicketstuff hosting:

Someone makes something cool and decides to share it with the community.
Then this person asks in the mailing lists for commit permissions. After
that this person jumps into something else and don't have time to
support the project. Later on I need this cool feature and the first
place to look for it is wicketstuff.org (you know because of the
advertising in the mailing lists). Then I add or improve something to
this project and again share it with the community. After me someone
else does the same and the project lives. Otherwise some volunteer (like
Jeremy) decides that this project is not maintained and moves it to
attic.

About GoogleCode, github, bitbucket, ... yes, you can put your project
there. But there are two problems: 
1) it is less visible
it is not next to the other wicketstuff projects where everyone checks
first
2) when you don't have time to support it you need to give commit
permissions to the people who have time or they will start clone it all
over Internet. And this will just confuse further future
users/maintainers  

On Wed, 2010-03-17 at 15:25 -0400, Boris Goldowsky wrote:
 It sounds like whoever is responsible for wicketstuff needs to make a 
 clear choice here.
 
 Is Wicketstuff going to be maintained as a place where lots of useful 
 add-ons will live?  If so, it needs someone to take a slightly more 
 active role as curator; make sure the releases are done in parallel with 
 wicket releases, make sure modules don't get dumped there without at 
 least some documentation; and weed out modules that are abandoned, where 
 no one volunteers to take on maintenance, or whose function has been 
 absorbed into wicket's core.
 
 Alternatively, make it clear that wicketstuff is NOT going to be 
 maintained, and people like me who would like to share modules will 
 share them in some other way - on Google code, a personal website, or 
 whatever.
 
 Either way is ok I think, it just would be useful for those of us who 
 are interested in contributing modules to know.
 
 Thanks
 Bng
 
 
 Jeremy Thomerson wrote:
  Really, it should match what's at trunk of Wicket, which should be
  1.5-SNAPSHOT.  There should be a branch for 1.4.x that is 1.4-SNAPSHOT.
   But, nobody is really maintaining it any more, so it's a free-for-all.
   That's always been the problem with WicketStuff.
 
  --
  Jeremy Thomerson
  http://www.wickettraining.com
 
 
 
  On Tue, Mar 16, 2010 at 1:00 PM, Boris Goldowsky bgoldow...@cast.orgwrote:
 

  The wicketstuff-core is calling itself version 1.4.2 in the HEAD of SVN.
  Shouldn't this be updated to 1.4.7 now to keep in sync with Wicket?
 
  Bng
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
  
 

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




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



TypeNotPresentException

2010-03-19 Thread Svante Reutland

Hi! 

Im working on a project and I'm getting a weird exception in which I don't 
understand how to resolve. My application resides in two modules. 

One server side module where all business logic are. On the server side I user 
spring and restful webservices. Than I have a web module which interact with 
the server side. The web tier is written in Wicket framework. 

Now to the problem. When I try to access my restful webservices everything 
works great until I try to access a webservice that handles more than one 
entity. For example trying to access a users roles by entering userID. 

this is the exception being thrown: 
Code: 
ERROR - RequestCycle.logRuntimeException(1521) | Method onFormSubmitted of 
interface org.apache.wicket.markup.html.form.IFormSubmitListener targeted at 
component [MarkupContainer [Component id = form]] threw an exception 
org.apache.wicket.WicketRuntimeException: Method onFormSubmitted of interface 
org.apache.wicket.markup.html.form.IFormSubmitListener targeted at component 
[MarkupContainer [Component id = form]] threw an exception 
at 
org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:193)
 
at 
org.apache.wicket.request.target.component.listener.ListenerInterfaceRequestTarget.processEvents(ListenerInterfaceRequestTarget.java:73)
 
at 
org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92)
 
at 
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1250) 
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1329) 
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1428) 
at org.apache.wicket.RequestCycle.request(RequestCycle.java:545) 
at 
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:468) 
at 
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:301) 
at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
 
at 
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388) 
at 
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) 
at 
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182) 
at 
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765) 
at 
org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418) 
at 
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
 
at 
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114) 
at 
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) 
at org.mortbay.jetty.Server.handle(Server.java:326) 
at 
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:536) 
at 
org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:930)
 
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:747) 
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212) 
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:405) 
at 
org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228) 
at 
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582) 
Caused by: java.lang.reflect.InvocationTargetException 
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 
at java.lang.reflect.Method.invoke(Method.java:597) 
at 
org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:182)
 
... 25 more 
Caused by: org.jboss.resteasy.spi.ReaderException: 
java.lang.TypeNotPresentException: Type se.**.core.domain.KmsUser not present 
at 
org.jboss.resteasy.core.messagebody.ReaderUtility.doRead(ReaderUtility.java:123)
 
at 
org.jboss.resteasy.client.core.BaseClientResponse.readFrom(BaseClientResponse.java:246)
 
at 
org.jboss.resteasy.client.core.BaseClientResponse.getEntity(BaseClientResponse.java:210)
 
at 
org.jboss.resteasy.client.core.BaseClientResponse.getEntity(BaseClientResponse.java:171)
 
at 
org.jboss.resteasy.client.core.ClientInvoker.extractEntity(ClientInvoker.java:170)
 
at 
org.jboss.resteasy.client.core.ClientInvoker.invoke(ClientInvoker.java:112) 
at 
org.jboss.resteasy.client.core.ClientProxy.invoke(ClientProxy.java:59) 
at $Proxy353.getRoles(Unknown Source) 
at 
se.**.core.client.impl.KmsUserClientImpl.getRoles(KmsUserClientImpl.java:89) 
at se.**.ui.pages.Index$2.onSubmit(Index.java:83) 
at 
org.apache.wicket.markup.html.form.Form.delegateSubmit(Form.java:1514) 
 

Looking for an experienced Wicket developer in Germany

2010-03-19 Thread geissbock
Hi,

My company is currently looking for an experienced Wicket developer. Three new 
products will be developed from scratch, so there is a lot of room for your 
talent and creativity :-) We offer a contract for (at least) three months here 
in Germany.

If you are interested or know anyone who might be interested please get in 
touch with me and I will tell you some more details.

And no, I'm neither a headhunter nor from the HR department - I'm just one of 
the developers you would work with. ;-)

Cheers,

Michael

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



Re: Wicketstuff versioning

2010-03-19 Thread Boris Goldowsky

nino martinez wael wrote:

I'll be happy to join in Boris.
  

That would be awesome, thanks Nino.

I'm thinking the first thing would be to bump the wicket dependency to 
v1.4.7 and do a maven release of the current state of wicketstuff-core 
as version 1.4.7.  Make sense?  Is that something you could do?


Stefan Lindner wrote:
Perhaps we should define an island of stability (like the name wickststuff-core implies). 
I agree with that  the rest of your message.  Jeremy put together a 
nice framework under wicketstuff-core, and there are a decent set of 
modules in there.  How about calling those the stable set.  Anyone can 
put something into core - as long as it works and they're willing to 
make some effort to keep it working.  If one of the core modules breaks 
with a future wicket version, and no one steps up to fix it, then it 
gets dropped out of wicketstuff-core.



And: YES, I would help to maintain such a stable core of wicketstuff.
Great!!  I think with 4 or 5 people it shouldn't be a terrible task.  
(of course I could be wrong...)


Bng


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



How to return a result value for wicketAjaxGet

2010-03-19 Thread Stefan Lindner
If I place a call to wicketAjaxGet(...) into a eg.g onclick attribute
with the help of an AjaxBehavior, the method respond(final
AjaxRequestTarget target) is called on the Java side.

Is it possible to build a call to wicketAjaxGet like

var result = wicketAjaxGet(...);

and provid the result value in the respond method on the Java side?

Does anobody know the trick?

Stefan

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



Re: Easies way to set custom HTML

2010-03-19 Thread Boris Goldowsky
Do you mean you have HelloPanel with one markup, and HelloMyDearFriends 
with the same functionality but different markup?


In that case define a trivial class HelloMyDearFriends.java extending 
HelloPanel but not changing the function.  Drop in your 
HelloMyDearFriends.html next to it, and you should be set.  Each version 
will use its own markup.


Bng




On Fri, Mar 19, 2010 at 7:39 AM, Sigmar Muuga meedi...@gmail.com wrote:
  

Hello,
which is the easiest way to set custom HTML page for a Page or Panel?
For example I have panel called HelloPanel, conventinally Wicket wants to
pair it with HelloPanel.html in the same package, but I want to
use HelloMyDearFriends.html with that panel...

Sigmar






  


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



How to construct/generate AjaxRequestTarget for a WebPage, without explicitly being fired from AjaxButton/AjaxLink/AjaxSelfUpdatingTimerBehavior

2010-03-19 Thread Martin Asenov
To me modalWindow.close(new AjaxRequestTarget(containerPage)) doesn't work...
And RequestCycle.get().getRequestTarget() returns null;

Please help...

Best,
Martin

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



Re: How to construct/generate AjaxRequestTarget for a WebPage, without explicitly being fired from AjaxButton/AjaxLink/AjaxSelfUpdatingTimerBehavior

2010-03-19 Thread Martin Makundi
Yes .. don't do new AjaxTarget... use the one you are given, why not?
It is an ajax event, no?

**
Martin

2010/3/19 Martin Asenov mase...@velti.com:
 To me modalWindow.close(new AjaxRequestTarget(containerPage)) doesn't work...
 And RequestCycle.get().getRequestTarget() returns null;

 Please help...

 Best,
 Martin

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



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



RE: How to construct/generate AjaxRequestTarget for a WebPage, without explicitly being fired from AjaxButton/AjaxLink/AjaxSelfUpdatingTimerBehavior

2010-03-19 Thread Martin Asenov
No, it's something like:

new Timer().schedule(new TimerTask() {
public void run() {
modal.close(the target);
}
}, 12);

Best,
Martin


-Original Message-
From: Martin Makundi [mailto:martin.maku...@koodaripalvelut.com] 
Sent: Friday, March 19, 2010 5:23 PM
To: users@wicket.apache.org
Subject: Re: How to construct/generate AjaxRequestTarget for a WebPage, without 
explicitly being fired from AjaxButton/AjaxLink/AjaxSelfUpdatingTimerBehavior

Yes .. don't do new AjaxTarget... use the one you are given, why not?
It is an ajax event, no?

**
Martin

2010/3/19 Martin Asenov mase...@velti.com:
 To me modalWindow.close(new AjaxRequestTarget(containerPage)) doesn't work...
 And RequestCycle.get().getRequestTarget() returns null;

 Please help...

 Best,
 Martin

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



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


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



Re: How to return a result value for wicketAjaxGet

2010-03-19 Thread vineet semwal
Hi,
take a look at
http://cwiki.apache.org/WICKET/calling-wicket-from-javascript.html

following is what you need to do ..

you can concatenate the value you want to return as paramter  in
callbackurl,we will read this back as request
 parameter from java.

it should look like  callbackurl++component markupid+=+args;

then in your respond method you can easily read request parameter from url .
String paramFoo = RequestCycle.get().getRequest().getParameter(component
markupid);


On Fri, Mar 19, 2010 at 7:51 PM, Stefan Lindner lind...@visionet.de wrote:

 If I place a call to wicketAjaxGet(...) into a eg.g onclick attribute
 with the help of an AjaxBehavior, the method respond(final
 AjaxRequestTarget target) is called on the Java side.

 Is it possible to build a call to wicketAjaxGet like

var result = wicketAjaxGet(...);

 and provid the result value in the respond method on the Java side?

 Does anobody know the trick?

 Stefan

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




-- 
regards,
Vineet Semwal


Re: How to return a result value for wicketAjaxGet

2010-03-19 Thread vineet semwal
forgot to add  the concatenation result has to be passed as argument to
wicketajaxget as you already know..

On Fri, Mar 19, 2010 at 9:03 PM, vineet semwal
vineetsemwal1...@gmail.comwrote:

 Hi,
 take a look at
 http://cwiki.apache.org/WICKET/calling-wicket-from-javascript.html

 following is what you need to do ..

 you can concatenate the value you want to return as paramter  in
 callbackurl,we will read this back as request
  parameter from java.

 it should look like  callbackurl++component markupid+=+args;

 then in your respond method you can easily read request parameter from url
 .
 String paramFoo = RequestCycle.get().getRequest().getParameter(component
 markupid);



 On Fri, Mar 19, 2010 at 7:51 PM, Stefan Lindner lind...@visionet.dewrote:

 If I place a call to wicketAjaxGet(...) into a eg.g onclick attribute
 with the help of an AjaxBehavior, the method respond(final
 AjaxRequestTarget target) is called on the Java side.

 Is it possible to build a call to wicketAjaxGet like

var result = wicketAjaxGet(...);

 and provid the result value in the respond method on the Java side?

 Does anobody know the trick?

 Stefan

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




 --
 regards,
 Vineet Semwal




-- 
regards,
Vineet Semwal


Re: How to construct/generate AjaxRequestTarget for a WebPage, without explicitly being fired from AjaxButton/AjaxLink/AjaxSelfUpdatingTimerBehavior

2010-03-19 Thread Martijn Dashorst
So how does the server communicate the close call to the client?

Martijn

On Fri, Mar 19, 2010 at 4:29 PM, Martin Asenov mase...@velti.com wrote:
 No, it's something like:

 new Timer().schedule(new TimerTask() {
        public void run() {
                modal.close(the target);
        }
 }, 12);

 Best,
 Martin


 -Original Message-
 From: Martin Makundi [mailto:martin.maku...@koodaripalvelut.com]
 Sent: Friday, March 19, 2010 5:23 PM
 To: users@wicket.apache.org
 Subject: Re: How to construct/generate AjaxRequestTarget for a WebPage, 
 without explicitly being fired from 
 AjaxButton/AjaxLink/AjaxSelfUpdatingTimerBehavior

 Yes .. don't do new AjaxTarget... use the one you are given, why not?
 It is an ajax event, no?

 **
 Martin

 2010/3/19 Martin Asenov mase...@velti.com:
 To me modalWindow.close(new AjaxRequestTarget(containerPage)) doesn't work...
 And RequestCycle.get().getRequestTarget() returns null;

 Please help...

 Best,
 Martin

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



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


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





-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.4 increases type safety for web applications
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.4

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



Wicket JavaScript Library Integration - A Common Base

2010-03-19 Thread Cemal Bayramoglu
There's been plenty of encouraging feedback about wiQuery [1] and how
cleanly it integrates jQuery and makes it easy to use in a Wicket app.
We also get lots of questions, sometimes unrelated to wiQuery, about
how to integrate other JavaScript libraries.

I was thinking that it could possibly be sensible to have another
project where we abstract out the mechanisms wiQuery provides for
resources and JavaScript statements. People could then build on this
base to integrate their preferred JavaScript libraries (eg YUI, extJS,
Prototype ...). I would even see wiQuery being potentially refactored
to use such a base framework.

Any thoughts?

Regards - Cemal
jWeekend
OO  Java Technologies, Wicket
Consulting, Development, Training
http://jWeekend.com

[1] http://code.google.com/p/wiquery/

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



RE: How to construct/generate AjaxRequestTarget for a WebPage, without explicitly being fired from AjaxButton/AjaxLink/AjaxSelfUpdatingTimerBehavior

2010-03-19 Thread Martin Asenov
Here's the issue: 

Modal window is displayed. The user gets idle for a while. I've registered the 
modal by its session ID.

When the user clicks on some AjaxLink/AjaxButton and I want to see if session 
is invalid, so I've overridden sessionDestroyed() in the webapp, which calls a 
method that should close the modal, just like this:

modal.close((AjaxRequestTarget) RequestCycle.get().getRequestTarget());

but it doesn't work.

Best,
Martin

-Original Message-
From: Martijn Dashorst [mailto:martijn.dasho...@gmail.com] 
Sent: Friday, March 19, 2010 5:42 PM
To: users@wicket.apache.org
Subject: Re: How to construct/generate AjaxRequestTarget for a WebPage, without 
explicitly being fired from AjaxButton/AjaxLink/AjaxSelfUpdatingTimerBehavior

So how does the server communicate the close call to the client?

Martijn

On Fri, Mar 19, 2010 at 4:29 PM, Martin Asenov mase...@velti.com wrote:
 No, it's something like:

 new Timer().schedule(new TimerTask() {
        public void run() {
                modal.close(the target);
        }
 }, 12);

 Best,
 Martin


 -Original Message-
 From: Martin Makundi [mailto:martin.maku...@koodaripalvelut.com]
 Sent: Friday, March 19, 2010 5:23 PM
 To: users@wicket.apache.org
 Subject: Re: How to construct/generate AjaxRequestTarget for a WebPage, 
 without explicitly being fired from 
 AjaxButton/AjaxLink/AjaxSelfUpdatingTimerBehavior

 Yes .. don't do new AjaxTarget... use the one you are given, why not?
 It is an ajax event, no?

 **
 Martin

 2010/3/19 Martin Asenov mase...@velti.com:
 To me modalWindow.close(new AjaxRequestTarget(containerPage)) doesn't work...
 And RequestCycle.get().getRequestTarget() returns null;

 Please help...

 Best,
 Martin

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



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


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





-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.4 increases type safety for web applications
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.4

-
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: AjaxThrottling

2010-03-19 Thread Igor Vaynberg
are you sure the throttle is being applied? check the js generated, etc...

-igor

On Thu, Mar 18, 2010 at 11:39 PM, Douglas Ferguson
doug...@douglasferguson.us wrote:
 I have a search box that is submitted via a behavior listening for onkeyup.

 I set the throttle for the behavior and I'm seeing strange behavior.

 If I type quickly a bunch of characters, it seems to queue up the requests.
 I would expect it to wait for me to stop typing and then only issue the 
 request once.

 D/
 -
 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



AW: How to return a result value for wicketAjaxGet

2010-03-19 Thread Stefan Lindner
Hi Vineet,

that's true. I already know this but this is not what I need. I need the 
opposite thing. What you explained is something like an input parameter to 
wicketAjaxGet. This input parameters can easily be fetches from the Request.

But what I need is a return value for wicketAjaxGet. That is visible in the 
javascript code AFTER doing something in respond.

This means


Have some javascript on the page like

var result = wicketAjaxGet(...)someParameter...;
// do the respond() mehtod processing on the javaside and return a value
alert('result of respond processing' = result);

Stefan

-Ursprüngliche Nachricht-
Von: vineet semwal [mailto:vineetsemwal1...@gmail.com] 
Gesendet: Freitag, 19. März 2010 16:34
An: users@wicket.apache.org
Betreff: Re: How to return a result value for wicketAjaxGet

Hi,
take a look at
http://cwiki.apache.org/WICKET/calling-wicket-from-javascript.html

following is what you need to do ..

you can concatenate the value you want to return as paramter  in
callbackurl,we will read this back as request
 parameter from java.

it should look like  callbackurl++component markupid+=+args;

then in your respond method you can easily read request parameter from url .
String paramFoo = RequestCycle.get().getRequest().getParameter(component
markupid);


On Fri, Mar 19, 2010 at 7:51 PM, Stefan Lindner lind...@visionet.de wrote:

 If I place a call to wicketAjaxGet(...) into a eg.g onclick attribute
 with the help of an AjaxBehavior, the method respond(final
 AjaxRequestTarget target) is called on the Java side.

 Is it possible to build a call to wicketAjaxGet like

var result = wicketAjaxGet(...);

 and provid the result value in the respond method on the Java side?

 Does anobody know the trick?

 Stefan

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




-- 
regards,
Vineet Semwal

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



Re: wicket and javascript

2010-03-19 Thread JonnyL

I have a JS file that has a function to return a node value from an XML file.
The JS file is referenced in the head section of the page and the function
is called from the page body. The JS function runs but does not return the
XML node. How do I reference the XML file?

Hope you can help



jthomerson wrote:
 
 If you're rendering JS that shouldn't be executed until the page is
 loaded,
 call this method in your renderHead method:
 
 http://wicket.apache.org/docs/wicket-1.3.2/wicket/apidocs/org/apache/wicket/markup/html/IHeaderResponse.html#renderOnDomReadyJavascript%28java.lang.String%29
 
 --
 Jeremy Thomerson
 http://www.wickettraining.com
 
 
 
 On Tue, Feb 16, 2010 at 8:12 AM, exceptionist bad.ad...@arcor.de wrote:
 



 igor.vaynberg wrote:
 
  allow your component to implement IHeaderContributor and output both
  your base js and string js from the renderhread() method
  -igor
 

 du u have a code-example(link oder something like that) for this way of
 solving my prob?
 i tried several times to do it, but i always got the same result...
 the script, which was generated dynamically was rendered into the head
 before the ressource-implementation, instead of behind that block of
 code.
 --
 View this message in context:
 http://old.nabble.com/wicket-and-javascript-tp27590908p27608918.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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


 
 

-- 
View this message in context: 
http://old.nabble.com/wicket-and-javascript-tp27590908p27950990.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Wicket JavaScript Library Integration - A Common Base

2010-03-19 Thread Uwe Schäfer

Cemal Bayramoglu schrieb:

dear Cemal,


I was thinking that it could possibly be sensible to have another
project where we abstract out the mechanisms wiQuery provides for
resources and JavaScript statements. 


i have no idea of how wiQuery does it, but i strongly agree to the 
urgent need of a standard base for JS-lib integration.


 People could then build on this
 base to integrate their preferred JavaScript libraries (eg YUI, extJS,
 Prototype ...). I would even see wiQuery being potentially refactored
 to use such a base framework.

 Any thoughts?

the problem arises quickly when you try to use two components using 
different (because of being bundled) versions of jquery (or anything 
else) on the same page.


i think the responsibility of that lib would be to act as a mediator to 
which version of the javascript to use as well as making sure, there is 
only one reference within a page.


there has to be a standard within wicket, that every component-author 
can agree on.


from my pov wicketstuff-core/jslib could have been such a thing (even 
though it violates open/close principle as sven nicely put), but 
whatever approach reaches consensus, i´d be more than happy to help.


cu uwe

--
THOMAS DAILY GmbH
Adlerstraße 19
79098 Freiburg
Deutschland
T  + 49 761 3 85 59 0
F  + 49 761 3 85 59 550
E  schae...@thomas-daily.de
www.thomas-daily.de

Geschäftsführer/Managing Directors:
Wendy Thomas, Susanne Larbig
Handelsregister Freiburg i.Br., HRB 3947

Registrieren Sie sich unter http://www.signin.thomas-daily.de für die 
kostenfreien TD Morning News, eine  Auswahl aktueller Themen des Tages 
morgens um 9:00 in Ihrer Mailbox.


Hinweis: Der Redaktionsschluss für unsere TD Morning News ist täglich um 
8:30 Uhr. Es werden vorrangig Informationen berücksichtigt, die nach 
16:00 Uhr des Vortages eingegangen sind. Die Email-Adresse unserer 
Redaktion lautet redakt...@thomas-daily.de.


To receive the free TD News International – a selection of the day’s top 
issues delivered to your mail box every day – please register at 
www.signin.thomas-daily.de


Please note: Information received for our TD News International after 4 
p.m. will be given priority for publication the following day. The daily 
editorial deadline is 8:30 a.m. You can reach our editorial staff at 
redakt...@thomas-daily.de.



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



Re: Wicket JavaScript Library Integration - A Common Base

2010-03-19 Thread Jeremy Thomerson
I like it!  Where do I sign up?  :)

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



On Fri, Mar 19, 2010 at 10:45 AM, Cemal Bayramoglu 
jweekend_for...@cabouge.com wrote:

 There's been plenty of encouraging feedback about wiQuery [1] and how
 cleanly it integrates jQuery and makes it easy to use in a Wicket app.
 We also get lots of questions, sometimes unrelated to wiQuery, about
 how to integrate other JavaScript libraries.

 I was thinking that it could possibly be sensible to have another
 project where we abstract out the mechanisms wiQuery provides for
 resources and JavaScript statements. People could then build on this
 base to integrate their preferred JavaScript libraries (eg YUI, extJS,
 Prototype ...). I would even see wiQuery being potentially refactored
 to use such a base framework.

 Any thoughts?

 Regards - Cemal
 jWeekend
 OO  Java Technologies, Wicket
 Consulting, Development, Training
 http://jWeekend.com

 [1] http://code.google.com/p/wiquery/

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




wicket:message inside a script tag

2010-03-19 Thread Istvan Soos
Hi,

I'd like to localize a simple javascript alert, e.g like this:
alert('hello world'); However wicket:message key=helloWorld is not
parsed inside the script tag. What is is the suggested solution to
overcome this issue?

Thanks,
   Istvan

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



Re: Wicket JavaScript Library Integration - A Common Base

2010-03-19 Thread Lionel Armanet
Hi,

This would be great, but I think we can only provide an implementation to
JavaScript frameworks designed in an unobtrusive way. When I tried to bind
ExtJs within Wicket, I had some pain to adapt ExtJs components to Wicket.

For the refactoring part, I don't see any problem to achieve this. Generated
JavaScript is based on statements (we just need to abstract this a little
bit) and on listening instantiation of components to render their associated
resources.

Lionel

On Fri, Mar 19, 2010 at 4:45 PM, Cemal Bayramoglu 
jweekend_for...@cabouge.com wrote:

 There's been plenty of encouraging feedback about wiQuery [1] and how
 cleanly it integrates jQuery and makes it easy to use in a Wicket app.
 We also get lots of questions, sometimes unrelated to wiQuery, about
 how to integrate other JavaScript libraries.

 I was thinking that it could possibly be sensible to have another
 project where we abstract out the mechanisms wiQuery provides for
 resources and JavaScript statements. People could then build on this
 base to integrate their preferred JavaScript libraries (eg YUI, extJS,
 Prototype ...). I would even see wiQuery being potentially refactored
 to use such a base framework.

 Any thoughts?

 Regards - Cemal
 jWeekend
 OO  Java Technologies, Wicket
 Consulting, Development, Training
 http://jWeekend.com

 [1] http://code.google.com/p/wiquery/




-- 
__

Lionel Armanet
WickeXt becomes WiQuery ! http://code.google.com/p/wiquery
gmail: lionel.armanet*at*gmail.com


Re: How to return a result value for wicketAjaxGet

2010-03-19 Thread Igor Vaynberg
append the name of the variable to the url, in target generate js that
sets the variable to the value. after wicketajaxget processes the
result the value should be set

-igor

On Fri, Mar 19, 2010 at 8:52 AM, Stefan Lindner lind...@visionet.de wrote:
 Hi Vineet,

 that's true. I already know this but this is not what I need. I need the 
 opposite thing. What you explained is something like an input parameter to 
 wicketAjaxGet. This input parameters can easily be fetches from the Request.

 But what I need is a return value for wicketAjaxGet. That is visible in the 
 javascript code AFTER doing something in respond.

 This means


 Have some javascript on the page like

        var result = wicketAjaxGet(...)someParameter...;
        // do the respond() mehtod processing on the javaside and return a 
 value
        alert('result of respond processing' = result);

 Stefan

 -Ursprüngliche Nachricht-
 Von: vineet semwal [mailto:vineetsemwal1...@gmail.com]
 Gesendet: Freitag, 19. März 2010 16:34
 An: users@wicket.apache.org
 Betreff: Re: How to return a result value for wicketAjaxGet

 Hi,
 take a look at
 http://cwiki.apache.org/WICKET/calling-wicket-from-javascript.html

 following is what you need to do ..

 you can concatenate the value you want to return as paramter  in
 callbackurl,we will read this back as request
  parameter from java.

 it should look like  callbackurl++component markupid+=+args;

 then in your respond method you can easily read request parameter from url .
 String paramFoo = RequestCycle.get().getRequest().getParameter(component
 markupid);


 On Fri, Mar 19, 2010 at 7:51 PM, Stefan Lindner lind...@visionet.de wrote:

 If I place a call to wicketAjaxGet(...) into a eg.g onclick attribute
 with the help of an AjaxBehavior, the method respond(final
 AjaxRequestTarget target) is called on the Java side.

 Is it possible to build a call to wicketAjaxGet like

        var result = wicketAjaxGet(...);

 and provid the result value in the respond method on the Java side?

 Does anobody know the trick?

 Stefan

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




 --
 regards,
 Vineet Semwal

 -
 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:message inside a script tag

2010-03-19 Thread Igor Vaynberg
output the javascript using the texttemplatecontributor

-igor

On Fri, Mar 19, 2010 at 9:12 AM, Istvan Soos istvan.s...@gmail.com wrote:
 Hi,

 I'd like to localize a simple javascript alert, e.g like this:
 alert('hello world'); However wicket:message key=helloWorld is not
 parsed inside the script tag. What is is the suggested solution to
 overcome this issue?

 Thanks,
   Istvan

 -
 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



Responding to JSON request

2010-03-19 Thread Boris Goldowsky
I'm trying to make the spellcheck part of the wicketstuff tinymce module 
work.  I think the protocol used by the spellchecking plugin may have 
changed since this module was written.


TinyMCE sends a POST request to the server; the post data looks 
something like this (this is JSON format, right?)


|{id:c0,method:checkWords,params:[en,[text,to,check||]]}|


a Resource is trying to respond to this, but how does it get access to 
the post data?  The previous version used getParameters(), but 
getParamters() does not seem to see this post data.


Bng


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



Re: Responding to JSON request

2010-03-19 Thread Igor Vaynberg
there is no parameter name that it sends it under? the {} string has
to be assigned to something

-igor

On Fri, Mar 19, 2010 at 9:17 AM, Boris Goldowsky bgoldow...@cast.org wrote:
 I'm trying to make the spellcheck part of the wicketstuff tinymce module
 work.  I think the protocol used by the spellchecking plugin may have
 changed since this module was written.

 TinyMCE sends a POST request to the server; the post data looks something
 like this (this is JSON format, right?)

 |{id:c0,method:checkWords,params:[en,[text,to,check||]]}|


 a Resource is trying to respond to this, but how does it get access to the
 post data?  The previous version used getParameters(), but getParamters()
 does not seem to see this post data.

 Bng


 -
 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: Wicketstuff versioning

2010-03-19 Thread Major Péter
Hi,

count me in. I would like to help maintain wicketstuff-core too. ;)
When I came to build wicketstuff-core, sometimes I end up fixing
dependency issues and other stuff in others projects, but I don't commit
them, because I don't want to modify someone else's code without her/his
knowledge, and finding out who is the current maintainer of the project
is not that simple... Am I the only one with this? Or if I catch for
example a maven config bug, should I just fix and commit them to make
the repo right?

Regards,
Peter

2010-03-19 15:04 keltezéssel, Boris Goldowsky írta:
 nino martinez wael wrote:
 I'll be happy to join in Boris.
   
 That would be awesome, thanks Nino.
 
 I'm thinking the first thing would be to bump the wicket dependency to
 v1.4.7 and do a maven release of the current state of wicketstuff-core
 as version 1.4.7.  Make sense?  Is that something you could do?
 
 Stefan Lindner wrote:
 Perhaps we should define an island of stability (like the name
 wickststuff-core implies). 
 I agree with that  the rest of your message.  Jeremy put together a
 nice framework under wicketstuff-core, and there are a decent set of
 modules in there.  How about calling those the stable set.  Anyone can
 put something into core - as long as it works and they're willing to
 make some effort to keep it working.  If one of the core modules breaks
 with a future wicket version, and no one steps up to fix it, then it
 gets dropped out of wicketstuff-core.
 
 And: YES, I would help to maintain such a stable core of wicketstuff.
 Great!!  I think with 4 or 5 people it shouldn't be a terrible task. 
 (of course I could be wrong...)
 
 Bng

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



Re: Dynamic Image (aka Barcode) based on user input not refreshed via Ajax

2010-03-19 Thread Xavier López
Found a similar issue not long ago. There is a class that does just what you
mentioned, appends a timestamp as a request parameter of the img tag's
url. I think the class was NonCachingImage.

Cheers,
Xavier

2010/3/19 Doug Leeper douglee...@yahoo.com

 I am trying to create a barcode image from a user entered value.  The image
 is to be updated while the user types.  Hence I am using Ajax (onChange
 event) on the text field to regenerate the image.  However, the image is not
 getting refreshed.  It appears that the browser is not recognizing that the
 image has been updated.  Is there a way to append a timestamp on the image
 url just for this image?

 or should I use a different type of resource?

 Note: the value entered has not be persisted so I don't believe I can a
 ResourceReference.  Please correct me if I am wrong.


 Thanks
 - Doug



 BTW...Here is my code that I am using to generate the bar code:

 barCodeValueContainer = new WebMarkupContainer(barCodeValueContainer) {
@Override
public void onBeforeRender() {
if (coupon.getObject().getBarCodeType() == null) {
codeContainer.replace(new
 WebMarkupContainer(barCode));
} else if (barCodeErrorMessage == null) {
codeContainer.replace(new BarCodeFragment(barCode,
 this));
} else {
codeContainer.replace(new ErrorFragment(barCode, this,
barCodeErrorMessage));
}
super.onBeforeRender();
}

public boolean isVisible() {
return coupon.getObject().getBarCodeType() != null;
}
};

 private class BarCodeFragment extends Fragment {
public BarCodeFragment(String id, MarkupContainer markupProvider) {
super(id, barCodeFragment, markupProvider);
setRenderBodyOnly(true);

// Create the barcode bean

String barCodeType = coupon.getObject().getBarCodeType();
String barCodeValue = coupon.getObject().getBarCodeValue();

AbstractBarcodeBean bean = null;

if (barCodeType.equals(BarCodeType.CODE_39.id())) {
bean = new Code39Bean();
// bar width exactly one pixel
((Code39Bean) bean).setWideFactor(3);
} else if (barCodeType.equals(BarCodeType.CODE_128.id())) {
bean = new Code128Bean();
} else if (barCodeType.equals(BarCodeType.UPC_A.id())) {
bean = new UPCABean();
}

if (bean == null || barCodeValue == null) {
add(new ErrorFragment(barCode, CouponDetailEditPanel.this,
Bar code value not set));
} else {
final int dpi = 150;

// Configure the barcode generator
bean.setModuleWidth(UnitConv.in2mm(1.0f / dpi)); // makes
 the
// narrow

bean.doQuietZone(false);

// Open output file
ByteArrayOutputStream out = new ByteArrayOutputStream();

try {
// Set up the canvas provider for monochrome PNG output
BitmapCanvasProvider canvas = new
 BitmapCanvasProvider(out,
image/png, dpi,
 BufferedImage.TYPE_BYTE_BINARY,
false, 0);

// Generate the barcode
bean.generateBarcode(canvas, barCodeValue);

System.out.println(VALUE:  + barCodeValue);

// Signal end of generation
canvas.finish();
out.close();
final byte[] content = out.toByteArray();
Image img = new Image(barCode, new
 BarCodeImageResource(
content));
add(img);
} catch (Exception e) {
add(new ErrorFragment(barCode,
CouponDetailEditPanel.this, e.getMessage()));
}
}

}
}


 private class BarCodeImageResource extends DynamicImageResource {
private byte[] content;

public BarCodeImageResource(byte[] content) {
super(image/png);
this.content = content;
this.setLastModifiedTime(Time.now());
}

@Override
protected byte[] getImageData() {
return content;
}

}



Re: Dynamic Image (aka Barcode) based on user input not refreshed via Ajax

2010-03-19 Thread Igor Vaynberg
use NonCachingImage

-igor

On Fri, Mar 19, 2010 at 9:47 AM, Doug Leeper douglee...@yahoo.com wrote:
 I am trying to create a barcode image from a user entered value.  The image 
 is to be updated while the user types.  Hence I am using Ajax (onChange 
 event) on the text field to regenerate the image.  However, the image is not 
 getting refreshed.  It appears that the browser is not recognizing that the 
 image has been updated.  Is there a way to append a timestamp on the image 
 url just for this image?

 or should I use a different type of resource?

 Note: the value entered has not be persisted so I don't believe I can a 
 ResourceReference.  Please correct me if I am wrong.


 Thanks
 - Doug



 BTW...Here is my code that I am using to generate the bar code:

 barCodeValueContainer = new WebMarkupContainer(barCodeValueContainer) {
           �...@override
            public void onBeforeRender() {
                if (coupon.getObject().getBarCodeType() == null) {
                    codeContainer.replace(new WebMarkupContainer(barCode));
                } else if (barCodeErrorMessage == null) {
                    codeContainer.replace(new BarCodeFragment(barCode, 
 this));
                } else {
                    codeContainer.replace(new ErrorFragment(barCode, this,
                            barCodeErrorMessage));
                }
                super.onBeforeRender();
            }

            public boolean isVisible() {
                return coupon.getObject().getBarCodeType() != null;
            }
        };

 private class BarCodeFragment extends Fragment {
        public BarCodeFragment(String id, MarkupContainer markupProvider) {
            super(id, barCodeFragment, markupProvider);
            setRenderBodyOnly(true);

            // Create the barcode bean

            String barCodeType = coupon.getObject().getBarCodeType();
            String barCodeValue = coupon.getObject().getBarCodeValue();

            AbstractBarcodeBean bean = null;

            if (barCodeType.equals(BarCodeType.CODE_39.id())) {
                bean = new Code39Bean();
                // bar width exactly one pixel
                ((Code39Bean) bean).setWideFactor(3);
            } else if (barCodeType.equals(BarCodeType.CODE_128.id())) {
                bean = new Code128Bean();
            } else if (barCodeType.equals(BarCodeType.UPC_A.id())) {
                bean = new UPCABean();
            }

            if (bean == null || barCodeValue == null) {
                add(new ErrorFragment(barCode, CouponDetailEditPanel.this,
                        Bar code value not set));
            } else {
                final int dpi = 150;

                // Configure the barcode generator
                bean.setModuleWidth(UnitConv.in2mm(1.0f / dpi)); // makes the
                // narrow

                bean.doQuietZone(false);

                // Open output file
                ByteArrayOutputStream out = new ByteArrayOutputStream();

                try {
                    // Set up the canvas provider for monochrome PNG output
                    BitmapCanvasProvider canvas = new BitmapCanvasProvider(out,
                            image/png, dpi, BufferedImage.TYPE_BYTE_BINARY,
                            false, 0);

                    // Generate the barcode
                    bean.generateBarcode(canvas, barCodeValue);

                    System.out.println(VALUE:  + barCodeValue);

                    // Signal end of generation
                    canvas.finish();
                    out.close();
                    final byte[] content = out.toByteArray();
                    Image img = new Image(barCode, new BarCodeImageResource(
                            content));
                    add(img);
                } catch (Exception e) {
                    add(new ErrorFragment(barCode,
                            CouponDetailEditPanel.this, e.getMessage()));
                }
            }

        }
    }


 private class BarCodeImageResource extends DynamicImageResource {
        private byte[] content;

        public BarCodeImageResource(byte[] content) {
            super(image/png);
            this.content = content;
            this.setLastModifiedTime(Time.now());
        }

       �...@override
        protected byte[] getImageData() {
            return content;
        }

    }


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



Re: Dynamic Image (aka Barcode) based on user input not refreshed via Ajax

2010-03-19 Thread David Chang
Exactly. That is what eventually I found out after quite some time fruitless 
research and test in other areas.

--- On Fri, 3/19/10, Igor Vaynberg igor.vaynb...@gmail.com wrote:

 From: Igor Vaynberg igor.vaynb...@gmail.com
 Subject: Re: Dynamic Image (aka Barcode) based on user input not refreshed 
 via  Ajax
 To: users@wicket.apache.org, Doug Leeper douglee...@yahoo.com
 Date: Friday, March 19, 2010, 12:56 PM
 use NonCachingImage
 
 -igor
 
 On Fri, Mar 19, 2010 at 9:47 AM, Doug Leeper douglee...@yahoo.com
 wrote:
  I am trying to create a barcode image from a user
 entered value.  The image is to be updated while the user
 types.  Hence I am using Ajax (onChange event) on the text
 field to regenerate the image.  However, the image is not
 getting refreshed.  It appears that the browser is not
 recognizing that the image has been updated.  Is there a
 way to append a timestamp on the image url just for this
 image?
 
  or should I use a different type of resource?
 
  Note: the value entered has not be persisted so I
 don't believe I can a ResourceReference.  Please correct me
 if I am wrong.
 
 
  Thanks
  - Doug
 
 
 
  BTW...Here is my code that I am using to generate the
 bar code:
 
  barCodeValueContainer = new
 WebMarkupContainer(barCodeValueContainer) {
            �...@override
             public void onBeforeRender() {
                 if
 (coupon.getObject().getBarCodeType() == null) {
                     codeContainer.replace(new
 WebMarkupContainer(barCode));
                 } else if (barCodeErrorMessage
 == null) {
                     codeContainer.replace(new
 BarCodeFragment(barCode, this));
                 } else {
                     codeContainer.replace(new
 ErrorFragment(barCode, this,
                           
  barCodeErrorMessage));
                 }
                 super.onBeforeRender();
             }
 
             public boolean isVisible() {
                 return
 coupon.getObject().getBarCodeType() != null;
             }
         };
 
  private class BarCodeFragment extends Fragment {
         public BarCodeFragment(String id,
 MarkupContainer markupProvider) {
             super(id, barCodeFragment,
 markupProvider);
             setRenderBodyOnly(true);
 
             // Create the barcode bean
 
             String barCodeType =
 coupon.getObject().getBarCodeType();
             String barCodeValue =
 coupon.getObject().getBarCodeValue();
 
             AbstractBarcodeBean bean = null;
 
             if
 (barCodeType.equals(BarCodeType.CODE_39.id())) {
                 bean = new Code39Bean();
                 // bar width exactly one pixel
                 ((Code39Bean)
 bean).setWideFactor(3);
             } else if
 (barCodeType.equals(BarCodeType.CODE_128.id())) {
                 bean = new Code128Bean();
             } else if
 (barCodeType.equals(BarCodeType.UPC_A.id())) {
                 bean = new UPCABean();
             }
 
             if (bean == null || barCodeValue ==
 null) {
                 add(new
 ErrorFragment(barCode, CouponDetailEditPanel.this,
                         Bar code value not
 set));
             } else {
                 final int dpi = 150;
 
                 // Configure the barcode
 generator
               
  bean.setModuleWidth(UnitConv.in2mm(1.0f / dpi)); // makes
 the
                 // narrow
 
                 bean.doQuietZone(false);
 
                 // Open output file
                 ByteArrayOutputStream out = new
 ByteArrayOutputStream();
 
                 try {
                     // Set up the canvas
 provider for monochrome PNG output
                     BitmapCanvasProvider
 canvas = new BitmapCanvasProvider(out,
                             image/png,
 dpi, BufferedImage.TYPE_BYTE_BINARY,
                             false, 0);
 
                     // Generate the barcode
                   
  bean.generateBarcode(canvas, barCodeValue);
 
                   
  System.out.println(VALUE:  + barCodeValue);
 
                     // Signal end of
 generation
                     canvas.finish();
                     out.close();
                     final byte[] content =
 out.toByteArray();
                     Image img = new
 Image(barCode, new BarCodeImageResource(
                             content));
                     add(img);
                 } catch (Exception e) {
                     add(new
 ErrorFragment(barCode,
                           
  CouponDetailEditPanel.this, e.getMessage()));
                 }
             }
 
         }
     }
 
 
  private class BarCodeImageResource extends
 DynamicImageResource {
         private byte[] content;
 
         public BarCodeImageResource(byte[] content)
 {
             super(image/png);
             this.content = content;
           
  this.setLastModifiedTime(Time.now());
         }
 
        �...@override
         protected byte[] getImageData() {
             return content;
         }
 
     }
 
 
 

Add JS files

2010-03-19 Thread Martin Phee

I there a way I can add a js file and make sure it's after others?

I'm using wiQuery and want to add the block ui, but when I add the js  
file it's the first one so it's throwing an error when it tries to  
init since jquery core is after it.


Is there something I can do with the wiQuery extension to make it also  
load the ui.block (without changing code).


Thanks,

Marty

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



Re: Responding to JSON request

2010-03-19 Thread Boris Goldowsky
It doesn't seem to have any parameter name - I'm looking at the request 
in Firebug and it had just that string.  In the getResourceStream() 
method getParameters().entrySet() always appears to be empty.


The PHP backend that they provide goes through some shenanigans to get 
the raw POST data and parse it.  So perhaps TinyMCE is doing this in a 
non-standard way?


Bng


Igor Vaynberg wrote:

there is no parameter name that it sends it under? the {} string has
to be assigned to something

-igor

On Fri, Mar 19, 2010 at 9:17 AM, Boris Goldowsky bgoldow...@cast.org wrote:
  

I'm trying to make the spellcheck part of the wicketstuff tinymce module
work.  I think the protocol used by the spellchecking plugin may have
changed since this module was written.

TinyMCE sends a POST request to the server; the post data looks something
like this (this is JSON format, right?)

|{id:c0,method:checkWords,params:[en,[text,to,check||]]}|


a Resource is trying to respond to this, but how does it get access to the
post data?  The previous version used getParameters(), but getParamters()
does not seem to see this post data.

Bng


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





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

  


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



Re: Responding to JSON request

2010-03-19 Thread Igor Vaynberg
sounds weird. you will have to pull out httpservletrequest out of
webrequest and see how to get that info.

-igor

On Fri, Mar 19, 2010 at 10:09 AM, Boris Goldowsky bgoldow...@cast.org wrote:
 It doesn't seem to have any parameter name - I'm looking at the request in
 Firebug and it had just that string.  In the getResourceStream() method
 getParameters().entrySet() always appears to be empty.

 The PHP backend that they provide goes through some shenanigans to get the
 raw POST data and parse it.  So perhaps TinyMCE is doing this in a
 non-standard way?

 Bng


 Igor Vaynberg wrote:

 there is no parameter name that it sends it under? the {} string has
 to be assigned to something

 -igor

 On Fri, Mar 19, 2010 at 9:17 AM, Boris Goldowsky bgoldow...@cast.org
 wrote:


 I'm trying to make the spellcheck part of the wicketstuff tinymce module
 work.  I think the protocol used by the spellchecking plugin may have
 changed since this module was written.

 TinyMCE sends a POST request to the server; the post data looks something
 like this (this is JSON format, right?)


 |{id:c0,method:checkWords,params:[en,[text,to,check||]]}|


 a Resource is trying to respond to this, but how does it get access to
 the
 post data?  The previous version used getParameters(), but getParamters()
 does not seem to see this post data.

 Bng


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




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



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



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



AW: How to return a result value for wicketAjaxGet

2010-03-19 Thread Stefan Lindner
Hi Igor,

you mean

onclick=
myVar = 'some value';
wicketAjaxGet(this.getCallbackUrl()+variableName='myVar');
/*start of java processing in the backend*/
protected void respond(final AjaxRequestTarget target) {
Component component = getComponent();
Request request;
if (component != null  (request = component.getRequest()) != 
null) {
String variableName = 
request.getParameter(variableName);
target.appendJavascript(variableName='some OTHER 
value';);
}
//should now be 'some OTHER value' but is still 'some value'
alert('myVar = ' + myvar);


This does not work. The javascript that was appended to the target gets 
evaluated AFTER the alert call.
Or did I miss something?

Stefan

-Ursprüngliche Nachricht-
Von: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] 
Gesendet: Freitag, 19. März 2010 17:16
An: users@wicket.apache.org
Betreff: Re: How to return a result value for wicketAjaxGet

append the name of the variable to the url, in target generate js that
sets the variable to the value. after wicketajaxget processes the
result the value should be set

-igor

On Fri, Mar 19, 2010 at 8:52 AM, Stefan Lindner lind...@visionet.de wrote:
 Hi Vineet,

 that's true. I already know this but this is not what I need. I need the 
 opposite thing. What you explained is something like an input parameter to 
 wicketAjaxGet. This input parameters can easily be fetches from the Request.

 But what I need is a return value for wicketAjaxGet. That is visible in the 
 javascript code AFTER doing something in respond.

 This means


 Have some javascript on the page like

        var result = wicketAjaxGet(...)someParameter...;
        // do the respond() mehtod processing on the javaside and return a 
 value
        alert('result of respond processing' = result);

 Stefan

 -Ursprüngliche Nachricht-
 Von: vineet semwal [mailto:vineetsemwal1...@gmail.com]
 Gesendet: Freitag, 19. März 2010 16:34
 An: users@wicket.apache.org
 Betreff: Re: How to return a result value for wicketAjaxGet

 Hi,
 take a look at
 http://cwiki.apache.org/WICKET/calling-wicket-from-javascript.html

 following is what you need to do ..

 you can concatenate the value you want to return as paramter  in
 callbackurl,we will read this back as request
  parameter from java.

 it should look like  callbackurl++component markupid+=+args;

 then in your respond method you can easily read request parameter from url .
 String paramFoo = RequestCycle.get().getRequest().getParameter(component
 markupid);


 On Fri, Mar 19, 2010 at 7:51 PM, Stefan Lindner lind...@visionet.de wrote:

 If I place a call to wicketAjaxGet(...) into a eg.g onclick attribute
 with the help of an AjaxBehavior, the method respond(final
 AjaxRequestTarget target) is called on the Java side.

 Is it possible to build a call to wicketAjaxGet like

        var result = wicketAjaxGet(...);

 and provid the result value in the respond method on the Java side?

 Does anobody know the trick?

 Stefan

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




 --
 regards,
 Vineet Semwal

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



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


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



Re: JCaptcha sound with Wicket?

2010-03-19 Thread David Chang

Anybody ever got this working?

Thanks for any info or ponter.

Regards.

--- On Thu, 3/18/10, David Chang david_q_zh...@yahoo.com wrote:

 From: David Chang david_q_zh...@yahoo.com
 Subject: JCaptcha sound with Wicket?
 To: users@wicket.apache.org
 Date: Thursday, March 18, 2010, 11:31 PM
 Based on the WIA book, I am able to
 have a working example of JCaptcha image.
 
 I am hoping to get JCaptcha sound working too. I tried
 different ways, but unable to get it working.
 
 Did anyone get JCaptcha sound working with Wicket? Could
 you please share your config and code?
 
 Thanks for any input!
 
 Best.
 
 
       
 
 -
 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: Add JS files

2010-03-19 Thread Richard Wilkinson
Hi Marty,

Since you are using wiQuery, this should be taken care of for you, (wiQuery
makes sure that the core jQuery js file is first).  I would guess that you
are contributing the javascript file in the normal wicket way (adding header
contributor or adding it directly to the html file) and not with the wiQuery
contribute method.

With wiQuery you should add all your references in the contribute method
defined by  IWiQueryPlugin (the interface you should implement if you
component is a wiQuery component) eg:

public void contribute(WiQueryResourceManager wiQueryResourceManager) {
wiQueryResourceManager.addJavaScriptResource(new
JavascriptResourceReference(MyClass.class, myFile.js));
}

-- 
Regards - Richard Wilkinson
Developer,
jWeekend: OO  Java Technologies - Development and Training
http://jWeekend.com

On 19 March 2010 17:08, Martin Phee mp...@objectivearts.com wrote:

 I there a way I can add a js file and make sure it's after others?

 I'm using wiQuery and want to add the block ui, but when I add the js file
 it's the first one so it's throwing an error when it tries to init since
 jquery core is after it.

 Is there something I can do with the wiQuery extension to make it also load
 the ui.block (without changing code).

 Thanks,

 Marty

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




Re: How to return a result value for wicketAjaxGet

2010-03-19 Thread Igor Vaynberg
you have to put your alert code into the success handler. this is all
happening asynchronously

-igor

On Fri, Mar 19, 2010 at 10:20 AM, Stefan Lindner lind...@visionet.de wrote:
 Hi Igor,

 you mean

        onclick=
        myVar = 'some value';
        wicketAjaxGet(this.getCallbackUrl()+variableName='myVar');
        /*start of java processing in the backend*/
        protected void respond(final AjaxRequestTarget target) {
                Component component = getComponent();
                Request request;
                if (component != null  (request = component.getRequest()) != 
 null) {
                        String variableName = 
 request.getParameter(variableName);
                        target.appendJavascript(variableName='some OTHER 
 value';);
                }
        //should now be 'some OTHER value' but is still 'some value'
        alert('myVar = ' + myvar);
        

 This does not work. The javascript that was appended to the target gets 
 evaluated AFTER the alert call.
 Or did I miss something?

 Stefan

 -Ursprüngliche Nachricht-
 Von: Igor Vaynberg [mailto:igor.vaynb...@gmail.com]
 Gesendet: Freitag, 19. März 2010 17:16
 An: users@wicket.apache.org
 Betreff: Re: How to return a result value for wicketAjaxGet

 append the name of the variable to the url, in target generate js that
 sets the variable to the value. after wicketajaxget processes the
 result the value should be set

 -igor

 On Fri, Mar 19, 2010 at 8:52 AM, Stefan Lindner lind...@visionet.de wrote:
 Hi Vineet,

 that's true. I already know this but this is not what I need. I need the 
 opposite thing. What you explained is something like an input parameter to 
 wicketAjaxGet. This input parameters can easily be fetches from the Request.

 But what I need is a return value for wicketAjaxGet. That is visible in the 
 javascript code AFTER doing something in respond.

 This means


 Have some javascript on the page like

        var result = wicketAjaxGet(...)someParameter...;
        // do the respond() mehtod processing on the javaside and return a 
 value
        alert('result of respond processing' = result);

 Stefan

 -Ursprüngliche Nachricht-
 Von: vineet semwal [mailto:vineetsemwal1...@gmail.com]
 Gesendet: Freitag, 19. März 2010 16:34
 An: users@wicket.apache.org
 Betreff: Re: How to return a result value for wicketAjaxGet

 Hi,
 take a look at
 http://cwiki.apache.org/WICKET/calling-wicket-from-javascript.html

 following is what you need to do ..

 you can concatenate the value you want to return as paramter  in
 callbackurl,we will read this back as request
  parameter from java.

 it should look like  callbackurl++component markupid+=+args;

 then in your respond method you can easily read request parameter from url .
 String paramFoo = RequestCycle.get().getRequest().getParameter(component
 markupid);


 On Fri, Mar 19, 2010 at 7:51 PM, Stefan Lindner lind...@visionet.de wrote:

 If I place a call to wicketAjaxGet(...) into a eg.g onclick attribute
 with the help of an AjaxBehavior, the method respond(final
 AjaxRequestTarget target) is called on the Java side.

 Is it possible to build a call to wicketAjaxGet like

        var result = wicketAjaxGet(...);

 and provid the result value in the respond method on the Java side?

 Does anobody know the trick?

 Stefan

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




 --
 regards,
 Vineet Semwal

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



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


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



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



Re: Wicketstuff versioning

2010-03-19 Thread Jeremy Thomerson
2010/3/19 Major Péter majorpe...@sch.bme.hu

 Hi,

 count me in. I would like to help maintain wicketstuff-core too. ;)
 When I came to build wicketstuff-core, sometimes I end up fixing
 dependency issues and other stuff in others projects, but I don't commit
 them, because I don't want to modify someone else's code without her/his
 knowledge, and finding out who is the current maintainer of the project
 is not that simple... Am I the only one with this? Or if I catch for
 example a maven config bug, should I just fix and commit them to make
 the repo right?


I have hit the same problem in the past.  Before, I never did like changing
someone else's project without their permission.  But, then I decided that
if I was trying to build a release, and it was just a Maven config or a
simple compile issue, I fixed it and committed it - without asking.  And if
it wasn't simple to fix, I commented out that module (in the
wicketstuff-core pom) and then built without that piece.

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


How to specify different log4j.properties for production and WicketTester servlet container?

2010-03-19 Thread Alec Swan
We have WEB-INF/classes/log4j.properties file which instructs log4j to log
to ${catalina.home}/logs/${logFileName}.log file. This works great when I
deploy the web app in Tomcat.

However, I would like the logs to be written to a different file when I run
my tests that use WicketTester and start their own servlet containers. How
can I instruct my tests to log to a different location or even use a
different log4j.properties file altogether?

Thanks.


Re: How to specify different log4j.properties for production and WicketTester servlet container?

2010-03-19 Thread James Carman
You can look at how I set up configuration stuff in my Advanced Wicket
example code:

http://svn.carmanconsulting.com/public/wicket-advanced/trunk

Basically, I use maven profiles to point to different configuration
directories for each environment (dev, test, prod).  Perhaps that
would help.

On Fri, Mar 19, 2010 at 3:01 PM, Alec Swan alecs...@gmail.com wrote:
 We have WEB-INF/classes/log4j.properties file which instructs log4j to log
 to ${catalina.home}/logs/${logFileName}.log file. This works great when I
 deploy the web app in Tomcat.

 However, I would like the logs to be written to a different file when I run
 my tests that use WicketTester and start their own servlet containers. How
 can I instruct my tests to log to a different location or even use a
 different log4j.properties file altogether?

 Thanks.


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



Re: How to specify different log4j.properties for production and WicketTester servlet container?

2010-03-19 Thread Alec Swan
Hi,

It looks like the link you provided is temporarily down, but I am assuming
that your idea was to replace log4j.properties file with the one specific to
each maven profile.

This is definitely an option, but I am have limited control over the build
file because it is generated by my NetBeans IDE.

I wonder if there is a way to specify log4j.properties location
programmatically in the test code. Maybe somehow override the classpath of
Wicket Tester's servlet container?

Thanks.

Alec

On Fri, Mar 19, 2010 at 1:17 PM, James Carman
jcar...@carmanconsulting.comwrote:

 You can look at how I set up configuration stuff in my Advanced Wicket
 example code:

 http://svn.carmanconsulting.com/public/wicket-advanced/trunk

 Basically, I use maven profiles to point to different configuration
 directories for each environment (dev, test, prod).  Perhaps that
 would help.

 On Fri, Mar 19, 2010 at 3:01 PM, Alec Swan alecs...@gmail.com wrote:
  We have WEB-INF/classes/log4j.properties file which instructs log4j to
 log
  to ${catalina.home}/logs/${logFileName}.log file. This works great when I
  deploy the web app in Tomcat.
 
  However, I would like the logs to be written to a different file when I
 run
  my tests that use WicketTester and start their own servlet containers.
 How
  can I instruct my tests to log to a different location or even use a
  different log4j.properties file altogether?
 
  Thanks.
 

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




Re: How to specify different log4j.properties for production and WicketTester servlet container?

2010-03-19 Thread Igor Vaynberg
put another log4j.properties into your src/test/resources or
src/test/java. since the test dirs are before the main dirs when tests
run they will override log4j.properties in your src/main/resources or
src/main/java

-igor

On Fri, Mar 19, 2010 at 12:59 PM, Alec Swan alecs...@gmail.com wrote:
 Hi,

 It looks like the link you provided is temporarily down, but I am assuming
 that your idea was to replace log4j.properties file with the one specific to
 each maven profile.

 This is definitely an option, but I am have limited control over the build
 file because it is generated by my NetBeans IDE.

 I wonder if there is a way to specify log4j.properties location
 programmatically in the test code. Maybe somehow override the classpath of
 Wicket Tester's servlet container?

 Thanks.

 Alec

 On Fri, Mar 19, 2010 at 1:17 PM, James Carman
 jcar...@carmanconsulting.comwrote:

 You can look at how I set up configuration stuff in my Advanced Wicket
 example code:

 http://svn.carmanconsulting.com/public/wicket-advanced/trunk

 Basically, I use maven profiles to point to different configuration
 directories for each environment (dev, test, prod).  Perhaps that
 would help.

 On Fri, Mar 19, 2010 at 3:01 PM, Alec Swan alecs...@gmail.com wrote:
  We have WEB-INF/classes/log4j.properties file which instructs log4j to
 log
  to ${catalina.home}/logs/${logFileName}.log file. This works great when I
  deploy the web app in Tomcat.
 
  However, I would like the logs to be written to a different file when I
 run
  my tests that use WicketTester and start their own servlet containers.
 How
  can I instruct my tests to log to a different location or even use a
  different log4j.properties file altogether?
 
  Thanks.
 

 -
 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



Help with integrating NTLM in wicket application

2010-03-19 Thread Bryan Montgomery
Hello,
I have two applications, one a stand alone web app and one wicket based.
Currently they both use form authentication however I am trying to add NTLM
authentication for SSO from our windows intranet.

Leveraging jcifs, I've been able to do this pretty easily with the stand
alone web app. However I've been struggling over the last couple of days
with the wicket app.

I'll preface this with the caveat that I have only done some very simple
stuff with wicket to date.

The flow is that the user makes a request and the program flow is redirected
to LoginPage, and in turn to LoginPanel. In LoginPanel the first thing it
does is check if there is an authentication header, if not which is the
case, it sets the status to SC_UNAUTHORIZED and adds a header of
WWW-Authenticate: NTLM. I then started with flushing the response and not
adding anything else.

In theory this response should tell the browser to resubmit the same request
with the authentication information. However, from our log files I can see
that the request second time around only has the Login in the request cycle,
compared to the startup page being in the request cycle initally.

After looking on the web I've tried various combinations including trying
continueToOriginalDestination in the onBeforeRender method.

One thing I've noticed is that it seems that setting the status and header
on the
((WebResponse)response).getHttpServletResponse() only takes effect when I do
not call flushBuffer() on it. This subseqently throws an exception in the
wicket processing because the response has already been closed.

I feel that I am so close - but can't quite get it right!

I was hoping to integrate this with minimal changes to the code but am
thinking that maybe I should start from scratch? I've found a few posts
online of similar situations but I haven't been able to put all the pieces
together yet.

Appreciate the help in getting this sorted out.

Thanks,
Bryan.

http://markmail.org/message/cjy4o4ndtigius55#query:+page:1+mid:t3foamferfh2twwj+state:results
http://old.nabble.com/Wicket-NTLM-Single-sign-on-integration-Question-td17868669.html


jWicket 0.5.1

2010-03-19 Thread Stefan Lindner
I have checked in jWicket 0.5.1 with a first implementation of
jQuery-ui-datepicker. A few things around the datepicker are still
missing:
- beforeShowDay callback ist not a simple task to integrate into wicket
Ajax roundtrip
- a few options are missing
- show/hide options that depend upon ui-effects are not settable

Enjoy!

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



Re: How to specify different log4j.properties for production and WicketTester servlet container?

2010-03-19 Thread Alec Swan
Changes to the test classpath suggested by Igor worked. I was under the
wrong impression that Wicket Tester was deploying my web app the same way it
is deployed in Tomcat in production and hence was always reading
WEB-INF/classes/log4j.properties.

On Fri, Mar 19, 2010 at 2:11 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote:

 put another log4j.properties into your src/test/resources or
 src/test/java. since the test dirs are before the main dirs when tests
 run they will override log4j.properties in your src/main/resources or
 src/main/java

 -igor

 On Fri, Mar 19, 2010 at 12:59 PM, Alec Swan alecs...@gmail.com wrote:
  Hi,
 
  It looks like the link you provided is temporarily down, but I am
 assuming
  that your idea was to replace log4j.properties file with the one specific
 to
  each maven profile.
 
  This is definitely an option, but I am have limited control over the
 build
  file because it is generated by my NetBeans IDE.
 
  I wonder if there is a way to specify log4j.properties location
  programmatically in the test code. Maybe somehow override the classpath
 of
  Wicket Tester's servlet container?
 
  Thanks.
 
  Alec
 
  On Fri, Mar 19, 2010 at 1:17 PM, James Carman
  jcar...@carmanconsulting.comwrote:
 
  You can look at how I set up configuration stuff in my Advanced Wicket
  example code:
 
  http://svn.carmanconsulting.com/public/wicket-advanced/trunk
 
  Basically, I use maven profiles to point to different configuration
  directories for each environment (dev, test, prod).  Perhaps that
  would help.
 
  On Fri, Mar 19, 2010 at 3:01 PM, Alec Swan alecs...@gmail.com wrote:
   We have WEB-INF/classes/log4j.properties file which instructs log4j to
  log
   to ${catalina.home}/logs/${logFileName}.log file. This works great
 when I
   deploy the web app in Tomcat.
  
   However, I would like the logs to be written to a different file when
 I
  run
   my tests that use WicketTester and start their own servlet containers.
  How
   can I instruct my tests to log to a different location or even use a
   different log4j.properties file altogether?
  
   Thanks.
  
 
  -
  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