Re: [Wicket-user] Binding the Enter key with a button

2007-06-22 Thread Joe Toth
Hope this helps

http://www.nabble.com/forum/ViewPost.jtp?post=10675702framed=y


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of David
Leangen
Sent: Friday, June 22, 2007 2:33 AM
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] Binding the Enter key with a button


I am indeed talking about the Go button in my form. It is providing
the correct behaviour.

Now, what I'm looking for is to allow the user to submit the form by
just hitting enter rather than having to click the Go button.

I thought that I would need to bind the enter key to the go button...
are you suggesting that there is a way of capturing the enter key and
binding it somehow to the form submission?


If there is, then that would be fine, too.

So I guess there's two ways of going about this:

 1. Bind enter to a button

 2. Capture enter and bind to form submission


Either way, I don't know how to do this. Can anybody provide any hints?


Thanks!
Dave





On Fri, 2007-06-22 at 10:05 +0530, Swaroop Belur wrote:
 Hi
 
 One solution but not the ideal one would be (assuming go is a submit
 button),
 to override the onSubmit of the form  and to perform the action which
 you would do in your Go.So when u hit enter form would be submitted 
 and action for go would be invoked.
 
 But may not what u r actally looking for
 
 
 
 On 6/22/07, David Leangen [EMAIL PROTECTED] wrote:
 
 I hope this isn't an obvious question again... I did try
 searching. ;-) 
 
 Could somebody kindly point me to some doc that explains how
 to bind a
 key to a form component?
 
 In this case, I want to bind the Enter key with my Go
 button.
 
 
 Thanks!
 
 
 
 

-
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and
 take
 control of your XML. No limits. Just data. Click to get it
 now. 
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___ Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Process Page After Redirect

2007-05-17 Thread Joe Toth

I have a Template class that each page extends. In the template it does...

*boolean* isSecure = ((WebRequest) WebRequestCycle.*get*().getRequest*()).*
getHttpServletRequest().isSecure();
String url = http://www.google-analytics.com/urchin.js;
*if* (isSecure) {
   url = https://ssl.google-analytics.com/urchin.js;
}
...to determine which url to use.

I'm using http://cwiki.apache.org/WICKET/how-to-switch-to-ssl-mode.html to
switch to SSL mode.

The problem I'm having is when I'm not in SSL mode and I click on a link to
a page that should be in SSL. I think the following happens:
1. The requested page get processed
2. The redirect to SSL mode occurs to the page that is has just been
processed.

I need it to process the page AFTER the redirect occurs so when I call
httpRequest.isSecure() it will return true.

How can I achieve this?

Thanks!
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] AjaxSubmitButton IE vs. FF Behavior

2007-05-16 Thread Joe Toth

Using Wicket 1.2.6

Using FF 2.0 when I click on the submit button or hit 'enter' on a field in
the form the ajax call is processed.

With IE 7.0 when I click on the submit button, the ajax class is processed,
BUT when I hit 'enter' the form submits normally.

Any idea what I can do to keep the same behavior all around and make IE 7
'enter' behave the same as the click?

Thanks
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Why I recommended Wicket...

2006-12-15 Thread Joe Toth

You want the session to be as lightweight as possible in order for it to be
easily replicated in a fault tolerant system.

With service/dao layer code I like to let the ORM (EJB/Hibernate) cache
whatever I need for performance.  By keeping a cache of these objects in the
application layer and a reference for how to retrieve them in the session
(via an object's id) I get the best of both worlds.

So lets say I have a Member object that I use heavily and want to cache it
on the web/application server for performance reasons. In the user's session
I set the memberId.  Now when the user requests something that needs the
Member object, I ask Hibernate to load the Member object and it will do so
from cache if it didn't expire.

If you have a cluster of servers and sticky sessions configured, the cached
items on a particular server will be tailored to those people on the server
because the sessions are sticky and they'll always be hitting the same
server. Now, if one of the servers go down, you can have your router or
whatever does the routing to the cluster redirect all requests for that
session to another server. If you were replicating the session to that other
server the user will fail over to that server and not notice an interuption
in the service.  When a request comes to the new server to load(Member,
memberId) it won't have that Member cached, but it will retrieve it from the
database and cache it again.

It would be nice if Wicket could do something similar to this.  I know you
can't do the same thing because in the example I shown the Model is just
an id pointing to a database record so it can be easily de/serialized from
anywhere, while a Model in Wicket is more complicated.




On 12/15/06, Nathan Hamblen [EMAIL PROTECTED] wrote:


Igor Vaynberg wrote:
 disadvantages being that fail over is harder unless the disk is shared
 between the cluster nodes. the disk can always be replaced by a database
 as well. the whole idea is relatively new and we have yet to explore its
 full potential.

Yes... that is kind of gutsy. I don't know how many people are actually
using replicated sessions across a cluster (my work uses cookie-stuck
sessions), but it's important to have that option. (The shared resource
cache is already a big hole in that support, right?) Seems like the best
thing would be for the servlet container to swap Serializable session
objects to disk on its own. Then we'd get the same benefit while using
the session normally. Do any servlet containers do that?

Nathan


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] JackRabbit and Wicket

2006-10-17 Thread Joe Toth
Do you plan on using Spring?If so, spring modules support JCR.https://springmodules.dev.java.net/docs/reference/0.6/html/jcr.html
The sub projects wicket-spring and wicket-spring-annot make injecting spring managed beans into your pages EXTREMELY easy. If you ever used spring to manage anything before, this is no different.If you go this route you get so many features for free.
1. Session/Transaction management: spring will manage2. Simple Integration: In a Wicket Page annotate a field to be able to use your service on the page. @Spring MyService service;3. JCR configuration flexibility: Then your users can use spring to manage the creation and configuration of JCR rather than you provide 
I don't know exactly what a 'JCR Session' is, but if its serializable then you could store it in the session. So that would mean the connection to the repository is resolved before each use. If its not serializable that means it probably holds some kind of connection to non-serializable objects (probably the repository, whether it be local or remote). Also if its not serializable then you can't keep it in the session because it needs to be able to be replicated to another computer for load balancing/fail-over.
In either case, connecting to the repository on every request is trivial, especially if its local. From the documentation, it looks like spring does it this way.On 10/17/06, 
Ted Roeloffzen [EMAIL PROTECTED] wrote:
You're absolutely right Eelco, we are starting with the Design, so you'll see it soon.Than it can be judged by you all, LOL

-Using Tomcat but need to do more? Need to support web services, security?Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___Wicket-user mailing list
Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] OT: Dandelion Warriors

2006-10-12 Thread Joe Toth
Wicket Helping the humans is a perfect picture!We have to attract the younger crowd, before they turn to the darkside...or are we the darkside...On 10/12/06, 
Gwyn Evans [EMAIL PROTECTED] wrote:
Specifically, http://starwars.wikia.com/wiki/Wicket_W._WarrickOn 12/10/06, Joe Toth [EMAIL PROTECTED] wrote:
 Did you know Wicket can be used to get rid of pesky dandelions? http://starwars.wikia.com/wiki/Wicket_and_the_Dandelion_Warriors:_An_Ewok_Adventure
 Can he be Wicket's mascot, like Duke is to Java?=) - Using Tomcat but need to do more? Need to support web services, security?
 Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo 
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list 
Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user--Download Wicket 
1.2.2 now! - http://wicketframework.org-Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easierDownload IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___Wicket-user mailing list
Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user
-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] OT: Dandelion Warriors

2006-10-11 Thread Joe Toth
Did you know Wicket can be used to get rid of pesky dandelions?http://starwars.wikia.com/wiki/Wicket_and_the_Dandelion_Warriors:_An_Ewok_Adventure
Can he be Wicket's mascot, like Duke is to Java? =)
-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Override RatingPanel Property

2006-08-24 Thread Joe Toth
in MyApplication.propertiesOn 8/23/06, Eelco Hillenius [EMAIL PROTECTED] wrote:
In which properties file did you set that? MyRatingPanel.properties orsomething like that?
EelcoOn 8/22/06, Joe Toth [EMAIL PROTECTED] wrote: I can't seem override the resource value in the RatingPanel component. Addedrating.simple=Please
 Rateto my properties file, but its not picking it up.Is there something else I have to do? Thanks - Using Tomcat but need to do more? Need to support web services, security?
 Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo 
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list 
Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user-
Using Tomcat but need to do more? Need to support web services, security?Get stuff done quickly with pre-integrated technology to make your job easierDownload IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___
Wicket-user mailing listWicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Override RatingPanel Property

2006-08-22 Thread Joe Toth
I can't seem override the resource value in the RatingPanel component.Added rating.simple=Please Rate to my properties file, but its not picking it up. Is there something else I have to do?Thanks
-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] links in a DataTable

2006-08-04 Thread Joe Toth
Thats exactly what I did...here is how I implemented it.  I use this a lot, maybe slap it in extensions?wicket:panela href="" wicket:id=linkspan wicket:id=labellink/span/a
/wicket:panelpackage com.whatever;import wicket.extensions.markup.html.repeater.data.table.PropertyColumn;import wicket.extensions.markup.html.repeater.refreshing.Item;import wicket.markup.html.basic.Label
;import wicket.markup.html.link.Link;import wicket.markup.html.link.PopupSettings;import wicket.markup.html.panel.Panel;import wicket.model.IModel;abstract public class LinkPropertyColumn extends PropertyColumn {
	PopupSettings popupSettings;	IModel labelModel;	public LinkPropertyColumn(IModel displayModel, String sortProperty,			String propertyExpression, PopupSettings popupSettings) {		this(displayModel, sortProperty, propertyExpression);
		this.popupSettings = popupSettings;	}	public LinkPropertyColumn(IModel displayModel, IModel labelModel) {		super(displayModel, null);		this.labelModel = labelModel;	}	public LinkPropertyColumn(IModel displayModel, String sortProperty,
			String propertyExpression) {		super(displayModel, sortProperty, propertyExpression);	}	public LinkPropertyColumn(IModel displayModel, String propertyExpressions) {		super(displayModel, propertyExpressions);
	}	@Override	public void populateItem(Item item, String componentId, IModel model) {		item.add(new LinkPanel(item, componentId, model));	}	public abstract void onClick(Item item, String componentId, IModel model);
	public class LinkPanel extends Panel {		public LinkPanel(final Item item, final String componentId,final IModel model) {			super(componentId);			Link link = new Link(link) {
@Overridepublic void onClick() {	LinkPropertyColumn.this.onClick(item, componentId, model);}			};			link.setPopupSettings(popupSettings);			add(link);			IModel tmpLabelModel = labelModel;
			if (labelModel == null) {tmpLabelModel = createLabelModel(model);			}			link.add(new Label(label, tmpLabelModel));		}	}}
On 8/4/06, Igor Vaynberg [EMAIL PROTECTED] wrote:
instead of using a property column you have to implement your own column that creates a panel/fragment with the link and text-Igor
On 8/4/06, Decebal Suiu
 [EMAIL PROTECTED] wrote:

I created a table with wicket (1.2.1) using aDataTable (DefaultDataTable) and a DataProvider(SortableDataProvider).My table has one column like PropertyColumn(newModel(name'), name, name).Is it possible to have a linkable name instead of a
plain name?Here's the code: ListIColumn projectColumns = newArrayListIColumn(); projectColumns.add(new PropertyColumn(newModel(name), name, name));
 ProjectDataProvider projectDataProvider =getDataProvider(); DataTable projectDataTable = newDefaultDataTable(projects, projectColumns,projectDataProvider, 10); add(projectDataTable);
Here's my HTML:wicket:extendtable wicket:id=projects cellspacing=0cellpadding=2class=grid/table

/wicket:extendThanks,Decebal__Do You Yahoo!?Tired of spam?Yahoo! Mail has the best spam protection around

http://mail.yahoo.com-Take Surveys. Earn Cash. Influence the Future of ITJoin SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___Wicket-user mailing listWicket-user@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/wicket-user

-Take Surveys. Earn Cash. Influence the Future of ITJoin SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___Wicket-user mailing list
Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] SSL

2006-07-11 Thread Joe Toth
Using the ONE_PASS method rendering strategy everything works fine now. Did you have to do the same?ThanksOn 7/10/06, 
[EMAIL PROTECTED] Imam [EMAIL PROTECTED] wrote:
Hi,I had a similar problemI decided not to use that RequiredSSL method.Instead i maintain an array of page classes that require https and used the following code. It worked fine for me. Hope it helps you.
protected IResponseStrategy newResponseStrategy() {  return new IResponseStrategy() {   @SuppressWarnings(unchecked)   public void respond( RequestCycle requestCycle )
   {IRequestTarget requestTarget = requestCycle.getRequestTarget();if( requestTarget != null ) { Application.get().logResponseTarget( requestTarget );
 WebRequest webRequest = (WebRequest) requestCycle.getRequest(); WebResponse webResponse = (WebResponse) requestCycle   .getResponse();

 HttpServletRequest httpServletRequest = webRequest   .getHttpServletRequest(); Class pageClass = null; if( requestTarget instanceof IPageRequestTarget ) {
   IPageRequestTarget pageTarget = (IPageRequestTarget) requestTarget;  pageClass = pageTarget.getPage().getClass(); }
 else if( requestTarget instanceof IBookmarkablePageRequestTarget ) {  IBookmarkablePageRequestTarget bookmarkableTarget = (IBookmarkablePageRequestTarget) requestTarget;
  pageClass = bookmarkableTarget.getPageClass(); } boolean isSecurityRequired = false; if( pageClass != null ) {  for( int i = 0; i  
secureClasses.length !isSecurityRequired; i++ ) {   isSecurityRequired = secureClasses[i] .isAssignableFrom( pageClass );
  } }  if( pageClass != null  !httpServletRequest.isSecure()isSecurityRequired ) {
  StringBuffer url = "" StringBuffer( https://+ httpServletRequest.getServerName() );  url.append( : + getSslPortNumber() );
  String q = RequestCycle.get().urlFor( requestTarget ).toString();  url.append( q );  webResponse.redirect

( url.toString() ); } else if( httpServletRequest.isSecure()  !isSecurityRequired ) {  StringBuffer url = "" StringBuffer( http://
+ httpServletRequest.getServerName() );  url.append( : + getNormalPortNumber() );  String q = RequestCycle.get().urlFor( requestTarget )
.toString();  url.append( q );  webResponse.redirect( url.toString() ); } else {  
requestTarget.respond( requestCycle ); }   }  }; }Shams.
On 7/10/06, 
Johan Compagner [EMAIL PROTECTED] wrote:

then you are doing the redirect wrong.How and when do you do the redirect??On 7/7/06, 
Joe Toth [EMAIL PROTECTED]
 wrote:Weird...I'm only getting the error in Jetty 6 (Beta17). 


wicket.WicketRuntimeException: Internal Error: Could not render error page class wicket.markup.html.pages.InternalErrorPage at wicket.request.compound.DefaultExceptionResponseStrategy.respond
(DefaultExceptionResponseStrategy.java:109) at wicket.request.compound.AbstractCompoundRequestCycleProcessor.respond(AbstractCompoundRequestCycleProcessor.java:76) at wicket.RequestCycle.step(RequestCycle.java



:1000) at wicket.RequestCycle.steps(RequestCycle.java:1034) at wicket.RequestCycle.request(RequestCycle.java:453) at wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:215) at javax.servlet.http.HttpServlet.service



(HttpServlet.java:747) at javax.servlet.http.HttpServlet.service(HttpServlet.java:860) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:423) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter



(ServletHandler.java:966) at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:174) at org.springframework.web.filter.OncePerRequestFilter.doFilter



(OncePerRequestFilter.java:77) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:957) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:353) at 
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:226) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:567) at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java



:126) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:119) at org.mortbay.jetty.Server.handle(Server.java:248) at org.mortbay.jetty.HttpConnection.handlerRequest(HttpConnection.java



:360) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:614) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:487) at org.mortbay.jetty.HttpParser.parseAvailable



(HttpParser.java:197) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:288) at org.mortbay.jetty.nio.SelectChannelConnector$HttpChannelEndPoint.run(SelectChannelConnector.java:805) at org.mortbay.thread.BoundedThreadPool$PoolThread.run



(BoundedThreadPool.java:475)Caused by: wicket.WicketRuntimeException: Already r

Re: [Wicket-user] SSL

2006-07-06 Thread Joe Toth
Weird...I'm only getting the error in Jetty 6 (Beta17). wicket.WicketRuntimeException: Internal Error: Could not render error page class wicket.markup.html.pages.InternalErrorPage at wicket.request.compound.DefaultExceptionResponseStrategy.respond
(DefaultExceptionResponseStrategy.java:109) at wicket.request.compound.AbstractCompoundRequestCycleProcessor.respond(AbstractCompoundRequestCycleProcessor.java:76) at wicket.RequestCycle.step(RequestCycle.java
:1000) at wicket.RequestCycle.steps(RequestCycle.java:1034) at wicket.RequestCycle.request(RequestCycle.java:453) at wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:215) at javax.servlet.http.HttpServlet.service
(HttpServlet.java:747) at javax.servlet.http.HttpServlet.service(HttpServlet.java:860) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:423) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
(ServletHandler.java:966) at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:174) at org.springframework.web.filter.OncePerRequestFilter.doFilter
(OncePerRequestFilter.java:77) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:957) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:353) at 
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:226) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:567) at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java
:126) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:119) at org.mortbay.jetty.Server.handle(Server.java:248) at org.mortbay.jetty.HttpConnection.handlerRequest(HttpConnection.java
:360) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:614) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:487) at org.mortbay.jetty.HttpParser.parseAvailable
(HttpParser.java:197) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:288) at org.mortbay.jetty.nio.SelectChannelConnector$HttpChannelEndPoint.run(SelectChannelConnector.java:805) at org.mortbay.thread.BoundedThreadPool$PoolThread.run
(BoundedThreadPool.java:475)Caused by: wicket.WicketRuntimeException: Already redirecting to 'https://localhost:8443/app'. Cannot redirect more than once at wicket.protocol.http.BufferedWebResponse.redirect
(BufferedWebResponse.java:92) at wicket.protocol.http.WebRequestCycle.redirectTo(WebRequestCycle.java:225) at wicket.request.target.component.PageRequestTarget.respond(PageRequestTarget.java:60) at wicket.request.compound.DefaultResponseStrategy.respond
(DefaultResponseStrategy.java:49) at wicket.request.compound.AbstractCompoundRequestCycleProcessor.respond(AbstractCompoundRequestCycleProcessor.java:66) at wicket.RequestCycle.respond(RequestCycle.java:905)
 at wicket.RequestCycle.step(RequestCycle.java:975) ... 23 moreOn 7/6/06, Johan Compagner 
[EMAIL PROTECTED] wrote:Redirect to a full url or use an ExternalLink (pointing to your own site but then with 
ssl)Do that redirect with a IRequestTarget.I don't know how you do it now but doing a redirect should always be donethrough request targets. 
johanOn 7/6/06, Joe Toth 
[EMAIL PROTECTED] wrote:

How can I implement a way switch over to https?Depending on how the user navigates I need to swich over to https froma form submit.Every time I try a different way to implement thistransparently I receive Caused by: 
wicket.WicketRuntimeException:Already redirecting to '/app/Checkout'. Cannot redirect more thanonceAt first I tried to annotate a class with @RequiredSSL and created anew IResponseStrategy that would test if the request was secure, if
not, WebResponse.redirect to the https version of the requested url.Second I tried to do the same in the constructor of my Base Class forall my pages and throw an AbortException, but I had the same problem.
Any ideas?Also, are there any plans to add a https feature in 2.0 core or extensions?Thanks!Using Tomcat but need to do more? Need to support web services, security?Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___Wicket-user mailing listWicket-user@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/wicket-user

Using Tomcat but need to do more? Need to support web services, security?Get stuff done quickly with pre-integrated technology to make your job easierDownload IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Using Tomcat but need to do more? Need to support web

[Wicket-user] SSL

2006-07-05 Thread Joe Toth
How can I implement a way switch over to https?

Depending on how the user navigates I need to swich over to https from
a form submit.  Every time I try a different way to implement this
transparently I receive Caused by: wicket.WicketRuntimeException:
Already redirecting to '/app/Checkout'. Cannot redirect more than
once

At first I tried to annotate a class with @RequiredSSL and created a
new IResponseStrategy that would test if the request was secure, if
not, WebResponse.redirect to the https version of the requested url.

Second I tried to do the same in the constructor of my Base Class for
all my pages and throw an AbortException, but I had the same problem.

Any ideas?

Also, are there any plans to add a https feature in 2.0 core or extensions?

Thanks!

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Dynamically Creating Shared Resources

2006-05-19 Thread Joe Toth

I have images added to a database externally from wicket.

Is there a way wicket can serve these new images?  ...without running
a thread that will check if new images are available and adding them
to SharedResources.

Any ideas?

Thanks


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid0709bid3057dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] wicket-contrib-tinymce bug

2006-03-21 Thread Joe Toth
Tried to use wicket-contrib-tinymce expanded in the classpath (not
from jar), but when it would search for resources it didn't add the
folders for the package of the TinyMCEInitializer.class.

So I changed line 97 of TinyMCEInitializer.class to the following:

String classpath = TinyMCEInitializer.class.getName();
classpath = Strings.beforeLast(classpath, '.').replaceAll(\\.,
File.separator);

initResources(application, basePath + File.separator + 
classpath);

Can the owner of the project fix this?
http://sourceforge.net/tracker/index.php?func=detailaid=1455639group_id=134391atid=730668

Thanks


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid0944bid$1720dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] wiki in wicket?

2006-03-14 Thread Joe Toth
Here are a list of features I came up with...

Resource Management (File Manager) - Folders - Files
Themes (per site/page/panel) Layout/CSS/Border (Header/Sidebar/Footer) (minimal)
I18N (Defer)
Links/URLs
User Management / ACL
Menu - Navigation Bread Crumb (Defer)
WYSIWYG editing / Wiki Engine / Dis/allow javascript
Backup (Defer)
Versioning
Preview
Migrate / Publish / Synchronize - different servers (Defer)

Since I would like this to be as reusable as possible there are a few
issues we need to flush out first:

Table Naming Strategy - should the table names just be prepended with
wicket-cms-? I don't know if there is a way with Hibernate to make
this configurable and still use Annotations?

User Management / Authentication - The user should implement the
required interfaces to allow the CMS to grab information it needs. 
(something like an IUserContext with methods: getUsername,
getIsAuthenticated, etc)

Panel Management - If possible, it would be nice if there was no
concept of a page, only panels.  For example, everything will be a
panel, but have a special IndexedParam Page that would take a few
parameters like, parent panel to wrap the requested panel in and
that would make a page.

Navigation / Content Creation - Wiki's use the convention of WikiPage
to automatically link to a new page called WikiPage.  We can have some
kind of Panel that supports Wiki rules.  Also, if you link to a page
that is not created it should be able to create that panel with the
parameters you specified in the url.

Any thoughts on these ideas?



On 3/13/06, David Leangen [EMAIL PROTECTED] wrote:

 Cool! I'm very interested. I'm also interested in any blogging impl that
 may be availabled based on wicket.

 Now... try to get some normal sleep! ;-)


 On Fri, 2006-03-10 at 01:05 -0800, Igor Vaynberg wrote:
  there was some talk about building a wiki/cms with wicket in ##wicket
  and i had a bit of insomnia tonight, so i built a basic wiki in an
  hour or so. wel its more of a skeleton really. you can add/edit/link
  pages. it uses radeox (which you will need to compile the attached
  source) for wiki syntax rendering. im attaching the code for anyone
  who is curious. if anyone is interested in working on an ASL licensed
  wiki/cms let me know or come to ##wicket. if enough people want to do
  it we can make it a wicket-stuff project.
 
  -Igor
 
  PS. the code is a mess, as i said it was a result of insomnia, so
  caveat emptor



 ---
 This SF.Net email is sponsored by xPML, a groundbreaking scripting language
 that extends applications into web and mobile media. Attend the live webcast
 and join the prime developer group breaking into this new coding territory!
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid0944bid$1720dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Validation of SingleSelectChoice components

2006-03-09 Thread Joe Toth
I was having similiar trouble - using 1.2beta.

In FormInput example by default something is always selected for the
RadioChoice because of this in the FormInputModel

line 91...
private String numberRadioChoice = (String)FormInput.NUMBERS.get(0);

If you change it to private String numberRadioChoice; so there is no
default, and submit the form, it still says its valid.

Is there something else that has to be done?


On 3/9/06, Johan Compagner [EMAIL PROTECTED] wrote:
 what does a choicerenderer have to do with a required validator?


 johan

 On 3/9/06, Bennett, Timothy (JIS - Applications) 
 [EMAIL PROTECTED] wrote:
 
 
  I wonder if mine are blowing up because I've added ChoiceRenderers...
 
 
  
  From: Johan Compagner [mailto:[EMAIL PROTECTED]
  Sent: Thursday, March 09, 2006 9:06 AM
  To: wicket-user@lists.sourceforge.net
  Subject: Re: [Wicket-user] Validation of SingleSelectChoice components
 
 
 
  If you add a required validator to the radiochoice doesn't that work if
 you don't select anything?
 
  A dropdown is can be tricky because there is most of the time a selection.
  So if the value of that is  then required should also work fine. And by
 default our nothing selected
  values are  so then the required check should work.
 
  This area is changed in 1.2 now required is a formcomponent property and
 we really have 3 defined steps:
 
  requiredCheck()
  typeConversion()
  valdiation()
 
  So a validator now always have the real converted object
 (getConvertedInput on FormComponent)
 
  johan
 
 
 
  On 3/9/06, Bennett, Timothy (JIS - Applications)
 [EMAIL PROTECTED] wrote:
  
  
   I'm using Wicket 1.1.1 and I'm stumped on how to apply RequiredValidator
 (or equivalent validation) to components like DropDownChoice and
 RadioChoice?
  
   Regards,
  
   Timothy
 
 
 




---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid0944bid$1720dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Fwd: [ wicket-Bugs-1442757 ] Ajax errors in a Border

2006-03-07 Thread Joe Toth
Ah, that explains it.  In my incorrect case, shouldn't wicket throw an
error since the hierarchy is incorrect?

On 3/7/06, Juergen Donnerstag [EMAIL PROTECTED] wrote:
 Joseph,

 you change is wrong. You did
add(new MyBorder(border)); // Made MyBorder public

// add the clock component
Clock clock = new Clock(clock,
 TimeZone.getTimeZone(America/Los_Angeles));
add(clock);

 but you must add the clock to the border like
Border myBorder = new MyBorder(border;
add(myBorder);

Clock clock = new Clock(clock,
 TimeZone.getTimeZone(America/Los_Angeles));
border.add(clock);


 Juergen

 -- Forwarded message --
 From: SourceForge.net [EMAIL PROTECTED]
 Date: Mar 7, 2006 5:55 PM
 Subject: [ wicket-Bugs-1442757 ] Ajax errors in a Border
 To: [EMAIL PROTECTED]


 Bugs item #1442757, was opened at 2006-03-03 17:10
 Message generated for change (Comment added) made by weazelb0y
 You can respond by visiting:
 https://sourceforge.net/tracker/?func=detailatid=684975aid=1442757group_id=119783

 Please note that this message will contain a full copy of the comment thread,
 including the initial issue submission, for this request,
 not just the latest update.
 Category: core
 Group: 1.2
 Status: Closed
 Resolution: Fixed
 Priority: 5
 Submitted By: Joseph Toth (weazelb0y)
 Assigned to: Juergen Donnerstag (jdonnerstag)
 Summary: Ajax errors in a Border

 Initial Comment:
 If you wrap the Clock example in a Border you get the
 following error.


 SEVERE: wicket.ajax.AjaxRequestTarget$EncodingResponse
 java.lang.ClassCastException



 Mar 3, 2006 5:00:38 PM wicket.RequestCycle step
 SEVERE: Unable to determine markup for component:
 [Component id = clock, page =
 wicket.examples.ajax.builtin.ClockPage, path =
 1:clock.Clock, isVisible = true, isVersioned = true]
 wicket.WicketRuntimeException: Unable to determine
 markup for component: [Component id = clock, page =
 wicket.examples.ajax.builtin.ClockPage, path =
 1:clock.Clock, isVisible = true, isVersioned = true]
at
 wicket.Component.initializeMarkupStream(Component.java:2839)
at wicket.Component.doRender(Component.java:709)
at
 wicket.ajax.AjaxRequestTarget.respondComponent(AjaxRequestTarget.java:217)
at
 wicket.ajax.AjaxRequestTarget.respond(AjaxRequestTarget.java:144)
at
 wicket.request.compound.DefaultResponseStrategy.respond(DefaultResponseStrategy.java:47)
at
 wicket.request.compound.AbstractCompoundRequestCycleProcessor.respond(AbstractCompoundRequestCycleProcessor.java:66)
at
 wicket.RequestCycle.doProcessEventsAndRespond(RequestCycle.java:824)
at
 wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:851)
at wicket.RequestCycle.step(RequestCycle.java:931)
at wicket.RequestCycle.steps(RequestCycle.java:1005)
at wicket.RequestCycle.request(RequestCycle.java:451)
at
 wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:208)
at
 javax.servlet.http.HttpServlet.service(HttpServlet.java:596)
at
 javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at
 org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428)
at
 org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:473)
at
 org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:568)
at
 org.mortbay.http.HttpContext.handle(HttpContext.java:1530)
at
 org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:633)
at
 org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
at
 org.mortbay.http.HttpServer.service(HttpServer.java:909)
at
 org.mortbay.http.HttpConnection.service(HttpConnection.java:816)
at
 org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:982)
at
 org.mortbay.http.HttpConnection.handle(HttpConnection.java:833)
at
 org.mortbay.http.SocketListener.handleConnection(SocketListener.java:244)
at
 org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
at
 org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
 Mar 3, 2006 5:00:38 PM
 wicket.util.resource.UrlResourceStream init
 INFO: cannot convert url:
 jar:file:/home/jtoth/workspace-test/k/lib/wicket-1.2-SNAPSHOT.jar!/wicket/markup/html/pages/ExceptionErrorPage.html
 to file (URI is not hierarchical), falling back to the
 inputstream for polling
 Mar 3, 2006 5:00:38 PM wicket.markup.MarkupCache
 loadMarkupAndWatchForChanges
 INFO: Loading markup from
 jar:file:/home/jtoth/workspace-test/k/lib/wicket-1.2-SNAPSHOT.jar!/wicket/markup/html/pages/ExceptionErrorPage.html
 Mar 3, 2006 5:00:38 PM wicket.RequestCycle step
 SEVERE: wicket.ajax.AjaxRequestTarget$EncodingResponse
 java.lang.ClassCastException:
 wicket.ajax.AjaxRequestTarget$EncodingResponse
at
 

Re: [Wicket-user] setResponsePage question

2006-02-22 Thread Joe Toth
god bless america

On 2/22/06, Eelco Hillenius [EMAIL PROTECTED] wrote:
 No we don't. So in general you can say it is better to just pass in
 what you need. But Ayodeji is free to choose and so are we :)

 Eelco


 On 2/22/06, Igor Vaynberg [EMAIL PROTECTED] wrote:
  do we really need to have this argument? we dont know anything about the
  usecase.
 
  -Igor
 
 
 
  On 2/22/06, Eelco Hillenius  [EMAIL PROTECTED] wrote:
  
   Though I think you have a better defined contract when you just pass
   in the property you need instead of the page. Will also work better
   when you decide to call that page from other places.
  
   Eelco
  
  
   On 2/22/06, Igor Vaynberg  [EMAIL PROTECTED] wrote:
its just java. pass in the previous page object into constructor of the
  new
page.
   
setResponsePage(new NextPage(this));
   
-Igor
   
   
On 2/22/06, Ayodeji Aladejebi [EMAIL PROTECTED] wrote:


 Please i little question:

 When You setResponsePage() to another WebPage instance and then from
  the
next WebPage instance, you want to reference a property or method of the
Previous Web Page instance, what is the safest thing to do?

 Thank you
   
   
  
  
   ---
   This SF.net email is sponsored by: Splunk Inc. Do you grep through log
  files
   for problems?  Stop!  Download the new AJAX search engine that makes
   searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
  
  http://sel.as-us.falkag.net/sel?cmdlnkkid3432bid#0486dat1642
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
   https://lists.sourceforge.net/lists/listinfo/wicket-user
  
 
 


 ---
 This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
 for problems?  Stop!  Download the new AJAX search engine that makes
 searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
 http://sel.as-us.falkag.net/sel?cmdlnkkid3432bid#0486dat1642
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid3432bid#0486dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] VOTE

2006-02-16 Thread Joe Toth
I can't speak for everyone else, but if you have to upgrade your
application for the constructor changes, why not upgrade to java5
while your at it?  - Don't answer that :) ... I prefer both in one
shot.

Vote #1


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid3432bid#0486dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] 2 Transactions Per Request Strategy

2006-02-02 Thread Joe Toth
JBoss Seam uses 2 transactions for every request.  1 for the data
processing and 1 for the rendering.  I think this is a good strategy
to reduce the amount of time locks are held for.  is there a way to do
something like this transparently in wicket?   Currently I lazily open
a session, begin a transaction and I commit/close by overriding the
onEndRequest.

Thanks


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid3432bid#0486dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] WebPage.checkAccess 1.2.013106 bug

2006-02-02 Thread Joe Toth
I would of posted this to sourceforge but, it currently won't load and
I'm about to hit the hay.

Using the 1.2.013106 release.  Basically if I have a WebPage that
overrides checkAccess it won't call it on the first request.  With the
signin example, just create a TestPage that extends
AuthenticatedWebPage, add a link to TestPage on the SignIn page.  When
you click on it it should  goto SignIn again, right?  Well it doesn't
call the checkAccess and shows TestPage.  This does work as expected
in 1.1.

Thanks


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid3432bid#0486dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] wicket-contrib-database extend Session

2006-02-01 Thread Joe Toth
DatabaseWebRequestCycle is currently a final class.
I would like to extend DatabaseWebSession to include security
features, basically access to permissions and roles granted. 
(Similiar to the SignIn example)

Can this class not be final or is there another way?

Thanks


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid3432bid#0486dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Required validation not working - others work

2006-02-01 Thread Joe Toth
I'm working on a simple registration...
The User database object doesn't have 'confirmEmailAddress' or
'confirmPassword' fields so I extended the object and used that
object.  This is fine, but is there a 'better' way?

My problem is if I goto the form and submit it I get no errors.  But
if I type anything a field or and it doesn't meet the validation, like
EmailAddressPatternValidator it will give me an error.

How come its not adding errors when nothing is typed?  I'm using 1.2-0131

Thanks


public ConsumerRegistrationPanel(final String id) {
super(id);

final FeedbackPanel feedback = new FeedbackPanel(feedback);
add(feedback);

add(new ConsumerRegistrationForm(form));
}

public final class ConsumerRegistrationForm extends Form {

public ConsumerRegistrationForm(final String id) {
super(id, new CompoundPropertyModel(new UserForm()));

add(new RequiredTextField(emailAddress)
.add(LengthValidator.min(1)));
add(new RequiredTextField(confirmEmailAddress)

.add(EmailAddressPatternValidator.getInstance()));
add(new 
PasswordTextField(password).add(LengthValidator.min(6)));
add(new 
PasswordTextField(confirmPassword).add(LengthValidator
.min(6)));
}

public final void onSubmit() {
User user = new User();
BeanUtils.copyProperties(user, getModelObject());
session.save(user);
}
}

public class UserForm extends User {

String confirmEmailAddress;

String confirmPassword;

public String getConfirmEmailAddress() {
return confirmEmailAddress;
}

public void setConfirmEmailAddress(String confirmEmailAddress) {
this.confirmEmailAddress = confirmEmailAddress;
}

public String getConfirmPassword() {
return confirmPassword;
}

public void setConfirmPassword(String confirmPassword) {
this.confirmPassword = confirmPassword;
}

}

}


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid3432bid#0486dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Re: Required validation not working - others work

2006-02-01 Thread Joe Toth
Well it only took forever to figure out, but turns out it was a Jetty problem.
If you are getting weird results with Jetty 6 - test it out with Jetty 5.

On 2/1/06, Joe Toth [EMAIL PROTECTED] wrote:
 I'm working on a simple registration...
 The User database object doesn't have 'confirmEmailAddress' or
 'confirmPassword' fields so I extended the object and used that
 object.  This is fine, but is there a 'better' way?

 My problem is if I goto the form and submit it I get no errors.  But
 if I type anything a field or and it doesn't meet the validation, like
 EmailAddressPatternValidator it will give me an error.

 How come its not adding errors when nothing is typed?  I'm using 1.2-0131

 Thanks


 public ConsumerRegistrationPanel(final String id) {
 super(id);

 final FeedbackPanel feedback = new FeedbackPanel(feedback);
 add(feedback);

 add(new ConsumerRegistrationForm(form));
 }

 public final class ConsumerRegistrationForm extends Form {

 public ConsumerRegistrationForm(final String id) {
 super(id, new CompoundPropertyModel(new UserForm()));

 add(new RequiredTextField(emailAddress)
 .add(LengthValidator.min(1)));
 add(new RequiredTextField(confirmEmailAddress)
 
 .add(EmailAddressPatternValidator.getInstance()));
 add(new 
 PasswordTextField(password).add(LengthValidator.min(6)));
 add(new 
 PasswordTextField(confirmPassword).add(LengthValidator
 .min(6)));
 }

 public final void onSubmit() {
 User user = new User();
 BeanUtils.copyProperties(user, getModelObject());
 session.save(user);
 }
 }

 public class UserForm extends User {

 String confirmEmailAddress;

 String confirmPassword;

 public String getConfirmEmailAddress() {
 return confirmEmailAddress;
 }

 public void setConfirmEmailAddress(String 
 confirmEmailAddress) {
 this.confirmEmailAddress = confirmEmailAddress;
 }

 public String getConfirmPassword() {
 return confirmPassword;
 }

 public void setConfirmPassword(String confirmPassword) {
 this.confirmPassword = confirmPassword;
 }

 }

 }



---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid3432bid#0486dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] OT: Upgrading Web Applications

2005-09-28 Thread Joe Toth
A bit off topic, but maybe someone here will have better suggestions
than what I previously found.

I have a web application I want to keep up 100% and not lose any
sessions when I update it.

The only solution I came up with so far is to have 2 load balanced
application servers, shutdown one update the application (sessions get
replicated to 2nd), bring it back up and shutdown 2nd (sessions get
replicated to 1st) update application and bring it back up.

Sometimes I have web applications that are only run on one server and
to achieve this I would have to run Apache (as a load balancer) and 2
instances of Tomcat.

Thanks for your suggestions.


---
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] feedback wicket:panel

2005-04-29 Thread Joe Toth
Latest problem...trying to display error messages from validation I get them wrapped in wicket:panel and they are not displayed.span
 wicket:id=feedbackwicket:panel  ulli
 class=feedbackPanelERROR wicket:id=messages
  span class=feedbackPanelERROR wicket:id=
messageRequired Postal code is required/span/li  /ul/
wicket:panel/spanThanks


[Wicket-user] Custom id and displayValue

2005-04-28 Thread Joe Toth
How do I create a dropdown list and pick what to use for an id and displayValue?
I want to create a dropdown with the first item to be index=0,
displayValue=Please Select then the rest to be the last 100 years.
I know I'll have the same problem when I want to create dropdowns of database objects.
Is there an easy solution?

This is what I have so far, but the id is the index.

ChoiceList years = new ChoiceList();
int currentYear = Calendar.getInstance().get(Calendar.YEAR);
years.add(Please Select);
for (int i = 0; i = 100; i++) {
 Integer year = currentYear - i;
 years.add(year);
}


DropDownChoice yearDropDown = new DropDownChoice(year, model, years);



Thanks


Re: [Wicket-user] Custom id and displayValue

2005-04-28 Thread Joe Toth
Thanks, I understood that, but my mind keeps having flashbacks of
struts. I don't have to worry about the index now, but what about
the displayName?

Is there an easy way to use a custom displayName instead of using the default toString()?
For instance my database object's toString() prints out all the values
of the columns, when I just want to display a 'name' column in the
dropdown. I know I can do approach #2, but that would entail me
selecting the objects from the database, iterating through them to
create new pseudo objects. I would like to just create a
ChoiceList passing it an interface to render getDisplayValue.
On 4/28/05, Christopher Turner [EMAIL PROTECTED] wrote:







Hi 
Joe,
I think the problem 
you are having is that you are still worrying about the index value that is used 
when the form containing the rendered select element is submitted. This is one 
of the areas that you have to change your mindset when using Wicket - it takes a 
while to getyour head around it.

What you have to 
remember is that from a conceptual point of view a drop down choice isjust 
a list of objects that you can pick from. The fact that HTML requires them to 
have a submit value and a display value is kind of irrelevant. If you 
giveWicket the list of possible objects it will manage its own indexing. 
When the page is rendered, thelist option that matches the current object 
in your model will be selected.When the form is submittedWicket will 
do all of the index resolution for you and then set the object corresponding to 
the dropdown option that was selected back in your model. 

Thus, in your 
example, after the form is submitted, the model object that you supplied to the 
drop down list will have the Integer object representing the year that the user 
picked - you need do nothing more than use this value. When you start thinking 
about dropdowns of database values, all you need to do is create a list of 
objects, where each object represents one of the values from the database. Once 
your form is submitted the model will contain the object that represents the 
value that the user selected. There are two approaches: 1) The objects you use 
could be real business objects represented by a row in the database OR 2) The 
objects could be pseudo objects containing a primary key and display value when 
you don't want to instantiate actual business object instances in order to 
present the dropdown list.

Try to detach 
yourself from the underlying name=value parameter mechanism of HTTP and think in 
terms of models and objects. This is where Wicket saves you all of the 
work.

p.s. The 
DropDownChoice component has built-in support for a Please Select option - so 
you don't need to build this yourself. Have a look at the code/examples to see 
how it works.

regards,
Chris


  How do I create a dropdown list and pick what to 
  use for an id and displayValue?I want to create a dropdown with the first 
  item to be index=0, displayValue=Please Select then the rest to be the last 
  100 years.I know I'll have the same problem when I want to create 
  dropdowns of database objects.Is there an easy solution?This is 
  what I have so far, but the id is the index.ChoiceList years = new 
  ChoiceList();int currentYear = 
  Calendar.getInstance().get(Calendar.YEAR);years.add(Please 
  Select);for (int i = 0; i = 100; i++) { Integer 
  year = currentYear - i; 
  years.add(year);}DropDownChoice yearDropDown = new 
  DropDownChoice(year, model, 
years);Thanks



[Wicket-user] Prepopulated Choice

2005-04-28 Thread Joe Toth
Is there anyway to use what is already in a drop down box?
Instead of creating one with a IChoiceList, I would like the
IChoiceList to be populated by what is already in the html.

If not, is there a way to just have a DropDown act like a TextField?

Thanks