RE: WebMarkupContainer Ajax update problem

2009-09-03 Thread Russell Simpkins

Have you tried:
content..add(new SimpleAttributeModifier(style, background-image=url(...)));
I haven't done this, but you might also be able to do:
content.add(new SimpleAttributeModifier(class, new-class-name));

 Date: Fri, 4 Sep 2009 01:57:36 +0300
 Subject: WebMarkupContainer Ajax update problem
 From: alt...@gmail.com
 To: users@wicket.apache.org
 
 Hi ;
 
 In Panel I have a  AjaxButton
 
 In that  AjaxButton, I tried to update the background (Parent Pages's
 WebMarkupContainer). Here is the simplified code :
 
  AjaxButton vote = new AjaxButton(Vote) {
 
 @Override
 protected void onSubmit(AjaxRequestTarget target,
 Form? form) {
 
 .
WebMarkupContainer content =  (WebMarkupContainer)
 super.findPage().get(Content);
content.add(new SimpleAttributeModifier(id,
 content_selected)) ;
target.addComponent(content);
 }
 
 
 Also I set WebMarkupContainer.setOutputMarkupId(true);  in my parent page
 
 Any suggestions ?
 
 Thanks.
 
 -- 
 Altuğ.

_
With Windows Live, you can organize, edit, and share your photos.
http://www.windowslive.com/Desktop/PhotoGallery

RE: Wicket behind proxy (AJP)

2009-07-02 Thread Russell Simpkins

 From: jcar...@carmanconsulting.com
 Date: Thu, 2 Jul 2009 14:43:59 -0400
 Subject: Re: Wicket behind proxy (AJP)
 To: users@wicket.apache.org
 
 I don't think ProxyPass supports the / path, does it?  At least, it didn't
 back when I wanted to set my site up like that.  What I had to do was put a
 dummy HTML page in there with a refresh directive to make it go to:
 http://mysite/mywicketapp

ProxyPass supports the /, but it doesn't pass to tomcat very well when you go 
to /. Tomcat will get the request for / through proxy pass, but it gets 
filtered through the default lookup which seems to only look at files and does 
NOT create a request to your servlet. In my case I want all requests to go 
through Spring at *.htm and there is no physical JSP mapped, so it only looks 
at files on disk.
I would love to hear an easy solution. I guess you could create a single JSP 
that forward the request.
Russ
_
Insert movie times and more without leaving Hotmail®. 
http://windowslive.com/Tutorial/Hotmail/QuickAdd?ocid=TXT_TAGLM_WL_HM_Tutorial_QuickAdd_062009

Radio button question

2009-07-06 Thread Russell Simpkins

All,
I want to display a radio button of options with an associated image e.g.
input type=radio name=selectone value=1img src=img_vala.gif 
..input type=radio name=selectone value=2img src=img_valb.gif 
..input type=radio name=selectone value=3img src=img_valc.gif ..
And have those values driven from my Model. I feel caught somewhere between 
RadioGroup and RadioList but I'm not sure how to pull this off because 
RadioGroup documentation seems to suggest that I have to have wicket:id= for 
each radio option, and I won't know how many options since its database driven. 
RadioList does the radio options fine, but I can't figure out how to render the 
image.
I am using a RadioList and an implementation of IChoiceRenderer. I tried adding 
the image html to the getDisplayValue method, but the image would not render.
I'm still new to Wicket so I may have missed this in the docs, if so feel free 
to paste link to any example or doc that I should have read closer :-)
Thanks in advance,
Russ
_
Windows Live™ SkyDrive™: Get 25 GB of free online storage.
http://windowslive.com/online/skydrive?ocid=TXT_TAGLM_WL_SD_25GB_062009

RE: Radio button question

2009-07-06 Thread Russell Simpkins



 From: igor.vaynb...@gmail.com
 Date: Mon, 6 Jul 2009 19:10:22 -0700
 Subject: Re: Radio button question
 To: users@wicket.apache.org
 
 the example of radiogroup in wicket-examples/component reference
 demonstrates a radio group with a variable amount of radios.
 
 -igor
 
Igor,
Thank you - this is the link I found and seems just what I was looking for
http://wicketstuff.org/wicket13/compref/;jsessionid=A9F9170F03765B6C9DEE45A31E5FA494?wicket:bookmarkablePage=:org.apache.wicket.examples.compref.RadioGroupPage

Thanks,
Russ
_
Hotmail® has ever-growing storage! Don’t worry about storage limits. 
http://windowslive.com/Tutorial/Hotmail/Storage?ocid=TXT_TAGLM_WL_HM_Tutorial_Storage_062009

RE: AjaxUpdate FeedbackPanel And window.open popup

2009-07-12 Thread Russell Simpkins

You could over-ride getAjaxCallDecorator() on your AjaxButton. e.g.
protected IAjaxCallDecorator getAjaxCallDecorator() { 
  return new AjaxCallDecorator() { 
public CharSequence decorateScript(CharSequence script) { return 
window.open('http://www.google.com','newwindow'); + script; }};}
 Date: Mon, 13 Jul 2009 01:17:18 +0300
 Subject: AjaxUpdate FeedbackPanel And window.open popup
 From: martin.maku...@koodaripalvelut.com
 To: users@wicket.apache.org
 
 Hi!
 
 Is it possible to simultaneously AjaxUpdate FeedbackPanel And
 window.open popup ?
 
 I need to open a popup (external site) and simultaneously give
 instructions on feedback panel. Anyone done this before?
 
 **
 Martin
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 

_
Windows Live™ SkyDrive™: Get 25 GB of free online storage.
http://windowslive.com/online/skydrive?ocid=TXT_TAGLM_WL_SD_25GB_062009

Odd behavior

2009-07-13 Thread Russell Simpkins

All,
Every now and then my for ends up displaying 
[Ljava.lang.String;@7cd46bea

instead of displaying my string value. There is no rhyme or reason, just going 
back and forth through my application and eventually I see that value dumped 
out in lieu of my actual string value. 


ValueMap properties;add(new RequiredTextField(toStreetAddress1, new 
PropertyModel(properties, toStreetAddress1)));
The properties ValueMap is getting populated on posts and held during the 
session. Where should I look first to figure out why only sometimes do I see 
the reference of the string instead of the string value.
Thanks,
Russ
_
Hotmail® has ever-growing storage! Don’t worry about storage limits. 
http://windowslive.com/Tutorial/Hotmail/Storage?ocid=TXT_TAGLM_WL_HM_Tutorial_Storage_062009

RE: Odd behavior

2009-07-14 Thread Russell Simpkins

Thanks Igor.
I was using add() to add properties that were already set - if I really wanted 
to do that, I think I should be using put() instead.
Russ

 From: igor.vaynb...@gmail.com
 Date: Mon, 13 Jul 2009 20:43:56 -0700
 Subject: Re: Odd behavior
 To: users@wicket.apache.org
 
 its not a reference to a string, its a reference to a string *array*,
 notice the [ in the beginning. can happen if you add the same key
 twice to the valuemap - it will create an array.
 
 -igor
 
 On Mon, Jul 13, 2009 at 7:43 PM, Russell
 Simpkinsrussellsimpk...@hotmail.com wrote:
 
  All,
  Every now and then my for ends up displaying
  [Ljava.lang.String;@7cd46bea
 
  instead of displaying my string value. There is no rhyme or reason, just 
  going back and forth through my application and eventually I see that value 
  dumped out in lieu of my actual string value.
 
 
  ValueMap properties;add(new RequiredTextField(toStreetAddress1, new 
  PropertyModel(properties, toStreetAddress1)));
  The properties ValueMap is getting populated on posts and held during the 
  session. Where should I look first to figure out why only sometimes do I 
  see the reference of the string instead of the string value.
  Thanks,
  Russ
  _
  Hotmail® has ever-growing storage! Don’t worry about storage limits.
  http://windowslive.com/Tutorial/Hotmail/Storage?ocid=TXT_TAGLM_WL_HM_Tutorial_Storage_062009
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 

_
Windows Live™ SkyDrive™: Get 25 GB of free online storage.
http://windowslive.com/online/skydrive?ocid=TXT_TAGLM_WL_SD_25GB_062009

RE: Validation component feedback in table column

2009-07-17 Thread Russell Simpkins

Use the ComponentFeedbackPanel, 
ccFeedback = new ComponentFeedbackPanel(ccNumberError,ccNumber);
ccFeedback.setOutputMarkupId(true);
addOrReplace(ccFeedback);then you can do this:
input wicket:id=ccNumber  value= class= type=text /
span wicket:id=ccNumberError/span
From: rinoc...@live.se
To: users@wicket.apache.org
Subject: Validation component feedback in table column
Date: Fri, 17 Jul 2009 10:34:19 +0200








I have been experimenting with this for while more, but I can't seem to get it 
to work as I want.

I have attached a small quickstart.

I have a table with an input field on each row, where I want to validate that 
the entered input value should not be allowed to be more than the displayed 
value, in that case, a message should be displayed next to the field, in the 
table.

I have added an onblur event to the input field and also a validator.

If I enter a value above the limit and tab out of the field, the validation 
message is displayed next to the field. If I instead enter a errornous value an 
click the submit button, the error message(s) is displayed in the form feeback 
and not next to the field. How do I get the validation error to be displayed 
next to the field?

 

I have been reading alot of examples, javadoc and source now and can't get it 
to work the wy I want.
I wonder how I change my code to get it to work?

 

/Kenneth
 
 Date: Sat, 11 Jul 2009 22:09:32 -0500
 Subject: Re: Validation and component feedback for editable column component 
 in table/list
 From: jer...@wickettraining.com
 To: users@wicket.apache.org
 
 Seems like you might be missing the part where you have to add a
 feedback panel to display the error messages in a form. Since you
 mention that your previous application showed the message near the
 field, this page might help you:
 
 http://stuq.nl/weblog/2008-09-03/user-friendly-form-validation-with-wicket
 
 --
 Jeremy Thomerson
 http://www.wickettraining.com
 
 
 

Gör personlighetstestet på MSN Dejting, se vem du passar ihop med! MSN Dejting
_
Windows Live™ SkyDrive™: Get 25 GB of free online storage.
http://windowslive.com/online/skydrive?ocid=TXT_TAGLM_WL_SD_25GB_062009

RE: Not working AjaxFormSubmitBehavior in Tomcat behind HTTP Server

2009-07-17 Thread Russell Simpkins

Actually,
If you sub domain your apps, then they can all be ROOT.war e.g. 
app1.myhost.com vs myhost.com/app1 - look at doing virtual hosts in tomcat if 
interested.
Russ

 Date: Fri, 17 Jul 2009 13:29:35 +0800
 Subject: Re: Not working AjaxFormSubmitBehavior in Tomcat behind HTTP Server
 From: anton.veretenni...@gmail.com
 To: users@wicket.apache.org
 
 Igor, I have several applications working on one server. They can't
 all be ROOT.war.
 
 -- Tony
 
 On Fri, Jul 17, 2009 at 11:40 AM, Igor Vaynbergigor.vaynb...@gmail.com 
 wrote:
  rename it to ROOT.war
 
  -igor
 
  On Thu, Jul 16, 2009 at 7:00 PM, Anton Veretennikov 
  anton.veretenni...@gmail.com wrote:
 
  Thank you, Igor, for your suggestion.
 
  I need full hiding of app name. Renaming still creates additional path
  in url like http://sitename.com/AppName/
 
  May be there exists other way or my URL Rewriting is not correct:
 
  VirtualHost *:80
   ServerName www.sitename.com
   ServerAlias sitename.com
   ProxyPass / ajp://127.0.0.1:8009/AppName/
   ProxyPassReverse / ajp://127.0.0.1:8009/AppName/
   ProxyPassReverseCookieDomainlocalhost  sitename.com
   ProxyPassReverseCookiePath /AppName /
   RewriteEngine  on
   RewriteRule^/AppName/(.*)$  /$1  [R]
  /VirtualHost
 
  -- Tony
 
  On Fri, Jul 17, 2009 at 12:15 AM, Igor Vaynbergigor.vaynb...@gmail.com
  wrote:
   just rename your war to something else before deploying it.
  
   -igor
  
   On Thu, Jul 16, 2009 at 8:25 AM, Anton
   Veretennikovanton.veretenni...@gmail.com wrote:
   Hello, wicket users and developers,
  
   This is a problem I can't work out myself, I need your help.
  
   In a local environment (direct calls to Tomcat) AjaxFormSubmitBehavior
   works as expected.
   But in production I try to hide application name (let's say,
   AppNamePay-1.0-SNAPSHOT) from URL using RewriteRule.
  
   Logs show that somehow application name bobs up when I create a link
   with AjaxFormSubmitBehavior.
   This can be seen from httpd logs (302 status):
  
   xx.22.151.6 - - [16/Jul/2009:14:14:30 +] GET
   /AppNamePay-1.0-SNAPSHOT/?wicket:interface=:0:5::: HTTP/1.1 302 312
   http://sitename.com/?wicket:interface=:0:4:::; Mozilla/5.0 (Windows;
   U; Windows NT 5.1; ru; rv:1.9.0.6) Gecko/2009011913 Firefox/3.0.6
  
   And from catched calls using HttpFox:
  
   GET 302 Redirect to:
   http://sitename.com/AppNamePay-1.0-SNAPSHOT/?wicket:interface=:0:3:::
  http://sitename.com
  
  /?wicket:interface=:0:outterDiv:leftPanel:content:updatableDiv:hidableDiv:electronicUpdatable:list:0:item:border:switch:buttons2:acceptSum:2:ILinkListener::
   (Status-Line)   HTTP/1.1 302 Moved Temporarily
   GET 302 Redirect to:
   http://sitename.com/?wicket:interface=:0:3:::
  http://sitename.com/AppNamePay-1.0-SNAPSHOT/?wicket:interface=:0:3:::
   (Status-Line)   HTTP/1.1 302 Found
  
   How it could be that wicket knows about AppNamePay-1.0-SNAPSHOT?
   Other Ajax stuff seems working without problem.
  
   Wicket is 1.4-rc7
  
   --Tony
  
   -
   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
 

_
Windows Live™ SkyDrive™: Get 25 GB of free online storage.
http://windowslive.com/online/skydrive?ocid=TXT_TAGLM_WL_SD_25GB_062009

RE: Background-Thread blocking Wicket-App

2009-07-17 Thread Russell Simpkins

Running a thread should not block the entire application - are you using 
connection pooling with more than one max active connection? Maybe you should 
send the code you use to kick off the thread. If you have any code that is 
synchronized on a shared resource, that might block others.
Russ


 Date: Fri, 17 Jul 2009 09:24:10 +
 From: toka...@yahoo.de
 Subject: Background-Thread blocking Wicket-App
 To: users@wicket.apache.org
 
 Hi All,
 
 we've got a page which does time consuming tasks. 
 Because of that, every time a user calls the page a new background-thread is 
 started (only if not running already) and 
 the user is informed that the task is running and the page will be updated 
 with fresh data as quickly as the thread has finished.
 
 We've realized that the WHOLE application is blocked until the 
 background-thread finishes. That is no other page can be called
 by the user who has started the thraed. The app is also not responding to 
 other users as long as the thread is running.
 
 The background thread class i'm using is a simple thread extending the thread 
 class and retrieving data from a very very big database in its run method.
 
 I'm using Wicket 1.3.5 on Tomcat6.0.18
 
 Any ideas?
 
 
   

_
Hotmail® has ever-growing storage! Don’t worry about storage limits. 
http://windowslive.com/Tutorial/Hotmail/Storage?ocid=TXT_TAGLM_WL_HM_Tutorial_Storage_062009

RE: error(validatable)

2009-07-18 Thread Russell Simpkins

Kenneth, 
I over rode onError when I used the ComponentFeedbackPanel - when learning 
Wicket, I discovered that I had no idea my form errored out unless I did the 
following for my form. In this instance, I'm using the AjaxButton. I think the 
key is to add your feedback component to the target.

/** * Always, always add this - its much better to know there was an error. * 
@see 
org.apache.wicket.ajax.markup.html.form.AjaxButton#onError(org.apache.wicket.ajax.AjaxRequestTarget,
 org.apache.wicket.markup.html.form.Form) */@Overrideprotected void 
onError(AjaxRequestTarget target, Form tform) {super.onError(target, 
tform);form.error(Please make sure you have filled in all required 
fields.);// add the feedback - seems you have to do this to give 
feedback on errors.target.addComponent(emailFeedback);}

 From: rinoc...@live.se
 To: users@wicket.apache.org
 Subject: error(validatable)
 Date: Sat, 18 Jul 2009 12:32:46 +0200
 
 
  
 
 Let's rephrase my problem.
 
  
 
 I connect a validator to a TextField in a DataView (inside populateItem() and 
 connect a ComponentFeedbackPanel  to it.
 
 
 final TextField tf = new TextField(data, new 
 PropertyModel(row, data));
 final ComponentFeedbackPanel tfFeedback = new 
 ComponentFeedbackPanel(fb, tf);
 tfFeedback.setOutputMarkupId(true);
 item.add(tf);
 item.add(tfFeedback);
 
 And I also have both in the HTML markup
 
 
 
 
 
 
 
 Is this enough for the error reported in in onValidate() for the validator 
 connected to the field 
 
 with error(ivalidatable); should be displayed next to the field or does it 
 require something more?
 
  
 
 error(validatable, an_error_occured);
 
 
 Why I wonder is that it is not displayed next to the field, it is displayed 
 in the common feedback panel.
 
  
 
 /Kenneth
 
  
 
  
 
  
 
  
 
 _
 Med Windows Live kan du ordna, redigera och dela med dig av dina foton.
 http://www.microsoft.com/sverige/windows/windowslive/products/photo-gallery-edit.aspx

_
Bing™ brings you maps, menus, and reviews organized in one place. Try it now.
http://www.bing.com/search?q=restaurantsform=MLOGENpubl=WLHMTAGcrea=TXT_MLOGEN_Local_Local_Restaurants_1x1
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



RE: HashMap.Entry not serializable?

2009-07-18 Thread Russell Simpkins

hashMap.entrySet returns a  SetMap.Entry If you look at the javadocs, Set 
does not extend Serializable:
public interface Setextends Collection
All Superinterfaces:Collection, Iterable



 Date: Sat, 18 Jul 2009 13:06:32 +0300
 Subject: HashMap.Entry not serializable?
 From: martin.maku...@koodaripalvelut.com
 To: users@wicket.apache.org

 Hi!

 I am a bit onfused.. I have new ListView(id, new
 LinkedList(hashMap.entrySet())) and Wicket gives:

 org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException:
 Unable to serialize class: java.util.HashMap$Entry

 This does not make sense, I would expect hashmap entries to be fully
 serializable .. not? Any quick workarounds?

 **
 Martin

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


_
Windows Live™ Hotmail®: Celebrate the moment with your favorite sports pics. 
Check it out.
http://www.windowslive.com/Online/Hotmail/Campaign/QuickAdd?ocid=TXT_TAGLM_WL_QA_HM_sports_photos_072009cat=sports
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



RE: What already redirecting error?

2009-07-18 Thread Russell Simpkins

Martin,
You could try setting step debugging on your IDE and step through your code. 
However, this type of error is not specific to wicket. Just the other day I was 
securing my site with Acegi and caused this to happen when I secured all pages, 
including my login.htm page - so, when Acegi noticed the unsecure request for a 
page, it redirected to the login.htm page, but that was re-directing too.
Russ


 Date: Sat, 18 Jul 2009 07:58:26 +0300
 Subject: Re: What already redirecting error?
 From: martin.maku...@koodaripalvelut.com
 To: users@wicket.apache.org

 None lead to my code, that's my point. The only thing I have used is
 setResponsePage().

 **
 Martin

 2009/7/17 Igor Vaynberg :
 pull the call hierarchy on
 org.apache.wicket.protocol.http.BufferedWebResponse.redirect and see
 what paths lead to your code.

 -igor

 On Fri, Jul 17, 2009 at 11:05 AM, Martin
 Makundi wrote:
 I don't have a clue where that occured...

 **
 Martin

 2009/7/17 Alex Objelean :

 Show us your code.

 Alex Objelean


 MartinM wrote:

 At least I do not know of any such redirects...

 **
 Martin

 2009/7/17 Igor Vaynberg :
 you are triggering a redirect after something else has already done so.

 -igor

 On Fri, Jul 17, 2009 at 1:38 AM, Martin
 Makundi wrote:
 Hi!

 What is this error and how can I avoid it? Don't even know why it comes:

 2009-07-17 11:43:22,804 181242389 [btpool0-503] ERROR RequestCycle  -
 Already redirecting to '?wicket:interface=:0:9:::'. Cannot redirect
 more than once
 org.apache.wicket.WicketRuntimeException: Already redirecting to
 '?wicket:interface=:0:9:::'. Cannot redirect more than once
   at
 org.apache.wicket.protocol.http.BufferedWebResponse.redirect(BufferedWebResponse.java:101)
   at
 org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:257)
   at
 org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:105)
   at org.apache.wicket.RequestCycle.respond(RequestCycle.java:1258)
   at org.apache.wicket.RequestCycle.step(RequestCycle.java:1325)
   at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1419)
   at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
   at
 org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:456)
   at
 org.apache.wicket.protocol.http.WicketServlet.doPost(WicketServlet.java:160)

 -
 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




 --
 View this message in context: 
 http://www.nabble.com/What-already-redirecting-error--tp24530668p24538774.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



 -
 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


_
Windows Live™ Hotmail®: Search, add, and share the web’s latest sports videos. 
Check it out.
http://www.windowslive.com/Online/Hotmail/Campaign/QuickAdd?ocid=TXT_TAGLM_WL_QA_HM_sports_videos_072009cat=sports
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



RE: HashMap.Entry not serializable?

2009-07-18 Thread Russell Simpkins

True, but if he does not cast his reference to the underlying implementation, 
the jvm has no way to know that the underlying implementation is serializable 
does it, hence the error. All the calling method knows is that you passed a Set 
and Set does not extend Serializable.


 Date: Sat, 18 Jul 2009 18:11:17 +0530
 Subject: Re: HashMap.Entry not serializable?
 From: vineetsemwal1...@gmail.com
 To: users@wicket.apache.org

 Russell,
 Set,List,Map do not implement Serializable but their implementations do.
 In the case of Entry ,it's implemented in Map implementations like hashmap .
 the class which implements Entry there isn't Serializable.


 regards,
 Vineet Semwal




 On Sat, Jul 18, 2009 at 5:22 PM, Russell Simpkins 
 russellsimpk...@hotmail.com wrote:


 hashMap.entrySet returns a Set If you look at the javadocs, Set
 does not extend Serializable:
 public interface Setextends Collection
 All Superinterfaces:Collection, Iterable


 
 Date: Sat, 18 Jul 2009 13:06:32 +0300
 Subject: HashMap.Entry not serializable?
 From: martin.maku...@koodaripalvelut.com
 To: users@wicket.apache.org

 Hi!

 I am a bit onfused.. I have new ListView(id, new
 LinkedList(hashMap.entrySet())) and Wicket gives:


 org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException:
 Unable to serialize class: java.util.HashMap$Entry

 This does not make sense, I would expect hashmap entries to be fully
 serializable .. not? Any quick workarounds?

 **
 Martin

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


 _
 Windows Live™ Hotmail®: Celebrate the moment with your favorite sports
 pics. Check it out.

 http://www.windowslive.com/Online/Hotmail/Campaign/QuickAdd?ocid=TXT_TAGLM_WL_QA_HM_sports_photos_072009cat=sports
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org



_
Windows Live™ Hotmail®: Celebrate the moment with your favorite sports pics. 
Check it out.
http://www.windowslive.com/Online/Hotmail/Campaign/QuickAdd?ocid=TXT_TAGLM_WL_QA_HM_sports_photos_072009cat=sports
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



RE: Redirect fails wicketTest in rc7 - is there a workaround?

2009-07-19 Thread Russell Simpkins

Martin,
Your button should just be an external like. I don't think you are supposed to 
be redirecting to an external url per the wiki guidelines here 
http://cwiki.apache.org/WICKET/how-to-redirect-to-an-external-non-wicket-page.html,
 its this text on the bottom of the page:
Note that if you just want to make standard anchor tag links to other pages, 
don't create a Link and use this method in the onClick() handler; instead use 
the ExternalLink class.

 Date: Sun, 19 Jul 2009 09:54:03 +0300
 Subject: Redirect fails wicketTest in rc7 - is there a workaround?
 From: martin.maku...@koodaripalvelut.com
 To: users@wicket.apache.org

 1. click ajaxButton
 2. redirect in button onSubmit
 3. verify redirect in test 

 Is there a workaround? https://issues.apache.org/jira/browse/WICKET-2379

 **
 Martin

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


_
Bing™ brings you maps, menus, and reviews organized in one place. Try it now.
http://www.bing.com/search?q=restaurantsform=MLOGENpubl=WLHMTAGcrea=TXT_MLOGEN_Local_Local_Restaurants_1x1
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



RE: Redirect fails wicketTest in rc7 - is there a workaround?

2009-07-19 Thread Russell Simpkins

Martin,
If you need the button to submit to do some logic, you can add a call decorator 
to do your redirect with javascript e.g.

protected IAjaxCallDecorator getAjaxCallDecorator() {   return new 
AjaxCallDecorator() {public CharSequence 
decorateScript(CharSequence script) {   return 
document.location.href='http://testurl'; + script; }   };}

 Date: Sun, 19 Jul 2009 09:54:03 +0300
 Subject: Redirect fails wicketTest in rc7 - is there a workaround?
 From: martin.maku...@koodaripalvelut.com
 To: users@wicket.apache.org

 1. click ajaxButton
 2. redirect in button onSubmit
 3. verify redirect in test 

 Is there a workaround? https://issues.apache.org/jira/browse/WICKET-2379

 **
 Martin

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


_
Windows Live™ Hotmail®: Search, add, and share the web’s latest sports videos. 
Check it out.
http://www.windowslive.com/Online/Hotmail/Campaign/QuickAdd?ocid=TXT_TAGLM_WL_QA_HM_sports_videos_072009cat=sports
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



RE: Save CSS/StyleSheet in Database ?

2009-07-22 Thread Russell Simpkins

I have not done this myself, but I think you might get what you want using the 
SimpleAttributeModifier. Say you were doing a css style:
link rel=stylesheet type=text/css href=css/standard.css 
wicket:id=userStyles:/
Then in your javacode you can have:
userCss.add(new SimpleAttributeModifier(href, css/ + 
LOGGEDINUSER.getUserId() + .css));
You could always do something similar in javascript with cookies.
Russ

 Date: Wed, 22 Jul 2009 05:12:45 -0700
 From: farhan.ba...@ymail.com
 Subject: Re: Save CSS/StyleSheet in Database ?
 To: users@wicket.apache.org
 
 Thanks for quick response.
 Obviously, styles can be loaded from database after Login. But i want to make 
 a separate css file and dont want ot add it in the java code, for sake of 
 simplicity. 
 
 Is there any way to store css styles directly from css file for a specific 
 user, and then load styles directly to css file after user Login ?
 
 Or can we make css file dynamic by introducing variables in it (like in PHP) ?
 
 Thanks...
 
 
 
 From: Mathias Nilsson wicket.program...@gmail.com
 To: users@wicket.apache.org
 Sent: Wednesday, July 22, 2009 4:59:53 PM
 Subject: Re: Save CSS/StyleSheet in Database ?
 
 
 You would probably have to use cookies to save which style the users would
 have. There is no way knowing this without login or cookie.
 
 There are probably a better way of doing this but if you save style and
 classes in a database like this
 
 *{ font-family: verdana; } // a row in the database
 a{ color: red; } // a row in the database
 
 you could implement the IHeaderContributor and override the renderHead
 
 public void renderHead(IHeaderResponse response) {
   StringBuffer buf = new StringBuffer();
   buf.append( style type=\text/css\ ); 
   buf.append( *{ font-size: 9px; } );
   buf.append( /style );
   response.renderString(buf);
 }
 
 of couse you should the get it from a service or directly from a dao.
 
 public void renderHead(IHeaderResponse response) {
BradningService service = getBrandingService(); // get this using
 @SpringBean or whatever
ListString styles = service.getStyles( user ); // get the style for a
 user
iterate here and add the style
 
 }
 
 
 -- 
 View this message in context: 
 http://www.nabble.com/Save-CSS-StyleSheet-in-Database---tp24604324p24604928.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
 
 
   

_
Windows Live™ SkyDrive™: Store, access, and share your photos. See how.
http://windowslive.com/Online/SkyDrive?ocid=TXT_TAGLM_WL_CS_SD_photos_072009

RE: Spring and Wicket - is it worth it?

2009-07-23 Thread Russell Simpkins


 On Wed, Jul 22, 2009 at 8:40 PM, Dane Lavertydanelave...@gmail.com wrote:
  Due to the fact that nearly every substantial sample Wicket app is
  Spring-based, I imagine that there's something awesome about using Spring.
  In fact, Wicket is what has finally gotten me to start learning Spring.
 
  I think I understand the basics of dependency injection -- configure your
  objects in xml files and then inject them into your classes -- but I'm still
  not clear on the advantage of it. I've read quite a ways into Spring in
  Action, and the author seems to assume that the reader will automatically
  see why xml-based dependency injection is great thing. I must just be
  missing something here. What I love about Wicket is being free from xml
  files. Can anyone give me a concise explanation of how the advantages of
  Spring are worth introducing a new layer into my applications?
 
  Dane

Personally, I have found Spring to be very beneficial and pretty easy to learn. 
I really don't mind xml and as a framework it does offer a lot of nice features 
that are really easy to tie into your application. Spring has very well written 
documentation that I found very easy to follow. I really like the message 
driven beans, helper classes for stuff like Hibernate and IBatis, Email is 
SUPER easy, Cron scheduling is cake and if you need MVC, theirs is well written 
and easy to use. Aceigi integration with Spring is very nice - switching 
http/https is easy and you can apply very fine grained access control (though 
these docs aren't very fun to read.) I'm new to Wicket, but we've used Spring 
to configure our service layer and made use of annotations so that our XML file 
isn't all that big.
You don't need to use Spring, but once you start to use it, you may find at 
least some features are really cool.
Russ
_
Windows Live™ SkyDrive™: Store, access, and share your photos. See how.
http://windowslive.com/Online/SkyDrive?ocid=TXT_TAGLM_WL_CS_SD_photos_072009

RE: Problem with Required component message

2009-08-02 Thread Russell Simpkins

Martin,
I did this by creating a properties file MyPanel.properties and then setting
creditCardForm.ccNumber.Required=Please enter your credit card number.
Did you try setting form.componentId.Required? Or even 
panel.form.componentId.Required
Russ
 Date: Sun, 2 Aug 2009 12:19:40 +0300
 Subject: Problem with Required component message
 From: martin.maku...@koodaripalvelut.com
 To: users@wicket.apache.org
 
 Hi!
 
 I have a page with some required fields among which there is one
 specific field I want to return a specific required validation error
 message, if value not given.
 
 I have tried to put componentId.Required=Unique error message into
 Application.properties but it does not work. Instead Wicket always
 returns the standard Required error.
 
 Debugging deeper into the problem shows that Wicket constructs a
 dot-notation component path of the requied component:
 page.panel.form.nested_panel.listview.index.componentId.Required and
 tries to look for a property with such name. If not found, it next
 tries to look for Required alone and if it is found, it returns that
 (if Required was not found, it would continue dropping one prefix at a
 time until it would reach the assumed componentId.Required).
 
 This code is in:
 ComponentStringResourceLoader.loadStringResource(final Component
 component, final String key)
 
 Is there a flaw in the logic or am I doing something wrong here?
 
 **
 Martin
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 

_
Get back to school stuff for them and cashback for you.
http://www.bing.com/cashback?form=MSHYCBpubl=WLHMTAGcrea=TEXT_MSHYCB_BackToSchool_Cashback_BTSCashback_1x1

RE: Handle file uploads in Behavior and respond using AjaxRequestTarget

2009-08-05 Thread Russell Simpkins

i've done this with php and ajax. the form posts, using target, to a hidden 
iframe. the response rendered back to the iframe is javascript. The only thing 
the iframe renders is javascript.





In your page you have javascript functions for the onSuccess() or onFailure() 
that are specific to that page. Or since you are rendering javascript you can 
render any javascript you like. This is very ajax like in that you are simply 
rendering callbacks. I suppose you could take it one step further and post the 
names of your callback functions. 
I'm not sure if this is any cleaner or any help at all, but I do hope it helps.
Russ

 From: igor.vaynb...@gmail.com
 Date: Wed, 5 Aug 2009 15:51:44 -0700
 Subject: Re: Handle file uploads in Behavior and respond using 
 AjaxRequestTarget
 To: users@wicket.apache.org

 well, its complex because you have to hack this in, browser's built in
 ajax support doesnt handle multipart requests yet.

 sounds like you are overcomplicating it by prerendering the iframe in
 the output. i think it would be easier to create the iframe on the fly
 via javascript, and give it style='display:none' so you wouldnt need
 to do any sizing.

 if upload fails the response in the iframe can write out some
 javascript to notify the main script that is managing the upload -
 which can then somehow show an error - maybe by doing an ajax request
 to wicket and rerendering the feedbackpanel.

 if upload is successful do the same thing, have iframe write out a bit
 of js that notifies the main script that the upload is done - which
 can then issue an ajax callback to wicket.

 makes sense? btw, there have to be libs that do all this for you on
 the js side of things.

 -igor


 On Wed, Aug 5, 2009 at 3:42 PM, Bas Gooren wrote:
 Hi all,

 Since I've seen many great answers on this list it's time to ask one of my 
 questions ;-)

 The thing that strikes me as odd is how hard it is right now to handle file 
 uploads and respond as if it were an AJAX request.
 I've built (based on various sources) a solution which uses a Panel which 
 contains an IFRAME. After the upload, some AJAX javascript is rendered which 
 calls an abstract function on the Panel so the implementor can replace or 
 re-render components. This works great, although it took some extra effort 
 since the frame and panel cannot easily share state (different 
 pages/pagemaps/...?). The examples on the web store the uploaded file, and 
 then pass it's filename through the AJAX request for access. I changed it to 
 store uploads in temporary storage, identified by UUIDs.

 Now I have to say I really don't like this solution, since the IFRAME has to 
 be sized to fit, or I have to use some not-so-nice javascript to 
 automatically resize the IFRAME when an upload error occurs.

 Since I have had great fun with swfupload + PHP before, I decided to try and 
 make an easier solution. I wondered if it would be possible to:

 1) extend AbstractBehavior (works)
 2) render the swf which will upload the file (works)
 3) give the swf the URL of the behavior (works)
 4) handle the upload(s) in onRequest() (does not work)
 5) and then, just like AbstractDefaultAjaxBehavior.onRequest(), build an 
 AjaxRequestTarget and handle the request (like it came in over xmlhttp) 
 (works)
 6) use javascript (Wicket.Ajax.Call.loadedCallback) to parse the (fake) AJAX 
 response

 Sounds possible, right? It just seems overkill to run a POST request _and_ 
 an AJAX request for every upload. It seems more complex than it should be. 
 Actually, with the IFRAME it's three requests: IFRAME GET, IFRAME POST, AJAX 
 GET

 What is not working right now is:
 - POST request not directed to the Behavior (I'm assuming there is 
 special-case handling for POST somewhere?)

 Anyway, I'd like to known if any of the devs think the above is possible. If 
 not, I'll stick to the solution I'm building right now (swfupload to a 
 mounted URIRequestTargetUrlCodingStrategy + UUID in the URL, AJAX request 
 with this UUID after successful upload).

 Ofcourse it's also possible something like this is possible but needs a 
 completely different angle.

 Kind regards,

 Bas

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


_
Get free photo software from Windows Live
http://www.windowslive.com/online/photos?ocid=PID23393::T:WLMTAGL:ON:WL:en-US:SI_PH_software:082009
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



RE: jetty hot deployment

2009-08-09 Thread Russell Simpkins

What do you use for a dev environment? I tried to get that working in a jboss 
env with no luck. JavaRebel sounded pretty cool. I was bummed it didn't work.
Russ


 Date: Sun, 9 Aug 2009 09:17:06 -0700
 Subject: Re: jetty hot deployment
 From: siber...@siberian.org
 To: users@wicket.apache.org

 I use JavaRebel in my dev environment and its solved almost all of my
 hot-swap issues. I recommend it highly.

 John-

 On Sun, Aug 9, 2009 at 2:45 AM, Martijn
 Dashorst wrote:
 You need to start the Start class using the debugger. Then it works
 with hot swap.

 Martijn

 On Sat, Aug 8, 2009 at 8:26 PM, Anantha Kumaran wrote:
 hi johannes
 i tried using mvn jetty:run

 but i am getting the following error

 Configuring Jetty for project: jqms
 Webapp source directory = E:\Netbeans\MyProjects\maven\jqms\src\main\webapp
 Reload Mechanic: automatic
 web.xml file =
 E:\Netbeans\MyProjects\maven\jqms\src\main\webapp\WEB-INF\web.xml
 Classes = E:\Netbeans\MyProjects\maven\jqms\target\classes
 2009-08-08 23:51:47.251::INFO:  Logging to STDERR via
 org.mortbay.log.StdErrLog
 Context path = /jqms
 Tmp directory =  determined at runtime
 Web defaults = org/mortbay/jetty/webapp/webdefault.xml
 Web overrides =  none
 Webapp directory = E:\Netbeans\MyProjects\maven\jqms\src\main\webapp
 Starting jetty 6.1.14 ...
 2009-08-08 23:51:47.581::INFO:  jetty-6.1.14
 2009-08-08 23:51:48.145::INFO:  No Transaction manager found - if your
 webapp requires one, please configure one.
 2009-08-08 23:51:48.196::WARN:  Failed startup of context
 org.mortbay.jetty.plugin.jetty6pluginwebappcont...@1270107
 {/jqms,E:\Netbeans\MyProjects\maven\jqms\src\main\webapp}
 java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.(ZipFile.java:114)
at java.util.jar.JarFile.(JarFile.java:133)
at java.util.jar.JarFile.(JarFile.java:97)
at
 org.mortbay.jetty.webapp.TagLibConfiguration.configureWebApp(TagLibConfiguration.java:168)
at
 org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1231)
at
 org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
at
 org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:460)
at
 org.mortbay.jetty.plugin.Jetty6PluginWebAppContext.doStart(Jetty6PluginWebAppContext.java:124)
at
 org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at
 org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
at
 org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156)
at
 org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at
 org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)

  But when i run the application using the start.java file i works perfectly
  and as i stated earlier hot deployment is not working

 On Sat, Aug 8, 2009 at 10:30 PM, Johannes Schneider
 wrote:

 Hi,

 I strongly suggest starting Jetty using Maven

 mvn jetty:run

 I add the following configuration


  

  
org.mortbay.jetty
maven-jetty-plugin

  1
  manual

  

  


 Reloading is triggered manually from the console. I like that behviour
 (so I can recompile/copy resources without restarting).


 Regards,

 Johannes Schneider


 Anantha Kumaran wrote:
 hi
 currently i am using ant and tomcat server (netbeans) to build my wicket
 application.
 The deployment and testing is taking lot of time.so i created a wicket
 project using
 the wicket-quickstart archetype.The problem is that i cannot view the
 changes
 made by me without restarting the jetty server.

 then i googled the net and found that i have to add   scanIntervals and
 some
 other settings.
 but i donn't know where to add this in the start.java file.


 it will be helpful if anyone post the modified start.java file which
 support
 the hot deployment



 thanks
 Anantha Kumaran


 -
 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.0

 -
 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


_
Get free photo software 

RE: Output to input stream for streaming?

2009-08-10 Thread Russell Simpkins

Martin,

I don't think you can do this in a thread because that lets the 
HttpServletResponse end and close your ServletOutputStream.

Russ

 Date: Mon, 10 Aug 2009 14:49:58 +0300
 Subject: Output to input stream for streaming?
 From: martin.maku...@koodaripalvelut.com
 To: users@wicket.apache.org
 
 Hi!
 
 I have a HSSF document which can be written to an output stream.
 However, I want to stream it to the website visitor, which requires an
 inputstream... I have tried the following, but it somehow doesn't seem
 to work.
 
 Anybody know what can be done to fix it?
 
 final PipedInputStream inputStream = new PipedInputStream();
 final PipedOutputStream out;
 try {
   out = new PipedOutputStream(inputStream);
 } catch (IOException e) {
   throw new RuntimeException(e);
 }
 Executors.newSingleThreadExecutor().execute(new Runnable() {
   @Override
   public void run() {
 try {
   wb.write(out);
 } catch (IOException e) {
   MarkupUtils.handleUnexpectedException(e);
 }
   }
 });
 
 IResourceStream resourceStream = new IResourceStream() {
   /**
* @see org.apache.wicket.util.resource.IResourceStream#close()
*/
   public void close() throws IOException {
 inputStream.close();
   }
 
   /**
* @see org.apache.wicket.util.resource.IResourceStream#getContentType()
*/
   public String getContentType() {
 return getAlternateContentType();
   }
 
   /**
* @see org.apache.wicket.util.resource.IResourceStream#getInputStream()
*/
   public InputStream getInputStream()
   throws ResourceStreamNotFoundException {
 return inputStream;
   }
 
   /**
* @see org.apache.wicket.util.resource.IResourceStream#getLocale()
*/
   public Locale getLocale() {
 throw new IllegalAccessError(Method not implemented.);
   }
 
   /**
* @see org.apache.wicket.util.resource.IResourceStream#length()
*/
   public long length() {
 try {
   return inputStream.available();
 } catch (IOException e) {
   MarkupUtils.handleUnexpectedException(e);
 }
 return 0;
   }
 
   /**
* @see 
 org.apache.wicket.util.resource.IResourceStream#setLocale(java.util.Locale)
*/
   public void setLocale(Locale locale) {
 throw new IllegalAccessError(Method not implemented.);
   }
 
   /**
* @see org.apache.wicket.util.watch.IModifiable#lastModifiedTime()
*/
   public Time lastModifiedTime() {
 return 
 Time.milliseconds(DatabaseServices.getCurrentTimestamp().getTime());
   }
 
 };
 
 java.io.IOException: Pipe closed
   at java.io.PipedInputStream.checkStateForReceive(Unknown Source)
   at java.io.PipedInputStream.receive(Unknown Source)
   at java.io.PipedOutputStream.write(Unknown Source)
   at java.io.OutputStream.write(Unknown Source)
   at org.apache.poi.poifs.storage.BigBlock.doWriteData(BigBlock.java:55)
   at 
 org.apache.poi.poifs.storage.DocumentBlock.writeData(DocumentBlock.java:220)
   at org.apache.poi.poifs.storage.BigBlock.writeBlocks(BigBlock.java:86)
   at 
 org.apache.poi.poifs.filesystem.POIFSDocument$BigBlockStore.writeBlocks(POIFSDocument.java:603)
   at 
 org.apache.poi.poifs.filesystem.POIFSDocument.writeBlocks(POIFSDocument.java:275)
   at 
 org.apache.poi.poifs.filesystem.POIFSFileSystem.writeFilesystem(POIFSFileSystem.java:390)
   at 
 org.apache.poi.hssf.usermodel.HSSFWorkbook.write(HSSFWorkbook.java:1168)
 
 
 
 **
 Martin
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 

_
Get back to school stuff for them and cashback for you.
http://www.bing.com/cashback?form=MSHYCBpubl=WLHMTAGcrea=TEXT_MSHYCB_BackToSchool_Cashback_BTSCashback_1x1

RE: Output to input stream for streaming?

2009-08-10 Thread Russell Simpkins

Its not that anything is missing per se, but if you run your output writer in a 
separate thread, then the rest of your processing is free to continue and in 
your case I'm guessing that the processing has finished before your output 
writing has completed. When your servlet finishes, the last thing that happens 
is the output stream gets closed. Try doing the write outside of a thread and 
see if you get the same exception.

Russ

 Date: Mon, 10 Aug 2009 15:03:13 +0300
 Subject: Re: Output to input stream for streaming?
 From: martin.maku...@koodaripalvelut.com
 To: users@wicket.apache.org
 
 Well well.. I do not understand why it is not possible, in principle.
 The input is there. The output is there... what's missing?
 
 **
 Martin
 
 2009/8/10 Russell Simpkins russellsimpk...@hotmail.com:
 
  Martin,
 
  I don't think you can do this in a thread because that lets the 
  HttpServletResponse end and close your ServletOutputStream.
 
  Russ
 
  Date: Mon, 10 Aug 2009 14:49:58 +0300
  Subject: Output to input stream for streaming?
  From: martin.maku...@koodaripalvelut.com
  To: users@wicket.apache.org
 
  Hi!
 
  I have a HSSF document which can be written to an output stream.
  However, I want to stream it to the website visitor, which requires an
  inputstream... I have tried the following, but it somehow doesn't seem
  to work.
 
  Anybody know what can be done to fix it?
 
  final PipedInputStream inputStream = new PipedInputStream();
  final PipedOutputStream out;
  try {
out = new PipedOutputStream(inputStream);
  } catch (IOException e) {
throw new RuntimeException(e);
  }
  Executors.newSingleThreadExecutor().execute(new Runnable() {
@Override
public void run() {
  try {
wb.write(out);
  } catch (IOException e) {
MarkupUtils.handleUnexpectedException(e);
  }
}
  });
 
  IResourceStream resourceStream = new IResourceStream() {
/**
 * @see org.apache.wicket.util.resource.IResourceStream#close()
 */
public void close() throws IOException {
  inputStream.close();
}
 
/**
 * @see 
  org.apache.wicket.util.resource.IResourceStream#getContentType()
 */
public String getContentType() {
  return getAlternateContentType();
}
 
/**
 * @see 
  org.apache.wicket.util.resource.IResourceStream#getInputStream()
 */
public InputStream getInputStream()
throws ResourceStreamNotFoundException {
  return inputStream;
}
 
/**
 * @see org.apache.wicket.util.resource.IResourceStream#getLocale()
 */
public Locale getLocale() {
  throw new IllegalAccessError(Method not implemented.);
}
 
/**
 * @see org.apache.wicket.util.resource.IResourceStream#length()
 */
public long length() {
  try {
return inputStream.available();
  } catch (IOException e) {
MarkupUtils.handleUnexpectedException(e);
  }
  return 0;
}
 
/**
 * @see 
  org.apache.wicket.util.resource.IResourceStream#setLocale(java.util.Locale)
 */
public void setLocale(Locale locale) {
  throw new IllegalAccessError(Method not implemented.);
}
 
/**
 * @see org.apache.wicket.util.watch.IModifiable#lastModifiedTime()
 */
public Time lastModifiedTime() {
  return 
  Time.milliseconds(DatabaseServices.getCurrentTimestamp().getTime());
}
 
  };
 
  java.io.IOException: Pipe closed
at java.io.PipedInputStream.checkStateForReceive(Unknown Source)
at java.io.PipedInputStream.receive(Unknown Source)
at java.io.PipedOutputStream.write(Unknown Source)
at java.io.OutputStream.write(Unknown Source)
at 
  org.apache.poi.poifs.storage.BigBlock.doWriteData(BigBlock.java:55)
at 
  org.apache.poi.poifs.storage.DocumentBlock.writeData(DocumentBlock.java:220)
at 
  org.apache.poi.poifs.storage.BigBlock.writeBlocks(BigBlock.java:86)
at 
  org.apache.poi.poifs.filesystem.POIFSDocument$BigBlockStore.writeBlocks(POIFSDocument.java:603)
at 
  org.apache.poi.poifs.filesystem.POIFSDocument.writeBlocks(POIFSDocument.java:275)
at 
  org.apache.poi.poifs.filesystem.POIFSFileSystem.writeFilesystem(POIFSFileSystem.java:390)
at 
  org.apache.poi.hssf.usermodel.HSSFWorkbook.write(HSSFWorkbook.java:1168)
 
 
 
  **
  Martin
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
  _
  Get back to school stuff for them and cashback for you.
  http://www.bing.com/cashback?form=MSHYCBpubl

RE: Output to input stream for streaming?

2009-08-10 Thread Russell Simpkins

I'm new to wicket, but if I wanted to send down file data, I would use a 
servlet, get the output stream and write the data.
a simple example: 
writeData(InputStream in, HttpServletResponse resp) {   out = 
resp.getOutputStream();   byte[] data = new byte[1024];   int size = 0;   while 
( (size=in.read(data,1024))=0) {  out.write(data,0,size);   }}
If the file is on disk, then there is no need to do this, but if it's in the db 
you would do something like this. You can't do something like this in JSP, 
because JSP adds a new line to all responses. You may run into issues of wicket 
adds anything to the output stream.
russ

 Date: Mon, 10 Aug 2009 18:10:13 +0300
 Subject: Re: Output to input stream for streaming?
 From: martin.maku...@koodaripalvelut.com
 To: users@wicket.apache.org
 
 Ouch.. Could I make the READ a blocking one... thus it would wait
 until the source is really depleted?
 
 **
 Martin
 
 2009/8/10 Russell Simpkins russellsimpk...@hotmail.com:
 
  Yes. That is exactly the point i was trying to make erik.
 
  Date: Mon, 10 Aug 2009 14:30:59 +0200
  From: e.vanoos...@grons.nl
  To: users@wicket.apache.org
  Subject: Re: Output to input stream for streaming?
 
  That won't work. Servlets are synchronous; they don't expect anyone
  writing the output once the servlet finished.
 
  Regards,
  Erik.
 
 
  Russell Simpkins wrote:
   Its not that anything is missing per se, but if you run your output 
   writer in a separate thread, then the rest of your processing is free to 
   continue and in your case I'm guessing that the processing has finished 
   before your output writing has completed. When your servlet finishes, 
   the last thing that happens is the output stream gets closed. Try doing 
   the write outside of a thread and see if you get the same exception.
  
   Russ
  
  
   Date: Mon, 10 Aug 2009 15:03:13 +0300
   Subject: Re: Output to input stream for streaming?
   From: martin.maku...@koodaripalvelut.com
   To: users@wicket.apache.org
  
   Well well.. I do not understand why it is not possible, in principle.
   The input is there. The output is there... what's missing?
  
   **
   Martin
  
   2009/8/10 Russell Simpkins russellsimpk...@hotmail.com:
  
   Martin,
  
   I don't think you can do this in a thread because that lets the 
   HttpServletResponse end and close your ServletOutputStream.
  
   Russ
  
  
   Date: Mon, 10 Aug 2009 14:49:58 +0300
   Subject: Output to input stream for streaming?
   From: martin.maku...@koodaripalvelut.com
   To: users@wicket.apache.org
  
   Hi!
  
   I have a HSSF document which can be written to an output stream.
   However, I want to stream it to the website visitor, which requires an
   inputstream... I have tried the following, but it somehow doesn't seem
   to work.
  
   Anybody know what can be done to fix it?
  
   final PipedInputStream inputStream = new PipedInputStream();
   final PipedOutputStream out;
   try {
 out = new PipedOutputStream(inputStream);
   } catch (IOException e) {
 throw new RuntimeException(e);
   }
   Executors.newSingleThreadExecutor().execute(new Runnable() {
 @Override
 public void run() {
   try {
 wb.write(out);
   } catch (IOException e) {
 MarkupUtils.handleUnexpectedException(e);
   }
 }
   });
  
   IResourceStream resourceStream = new IResourceStream() {
 /**
  * @see org.apache.wicket.util.resource.IResourceStream#close()
  */
 public void close() throws IOException {
   inputStream.close();
 }
  
 /**
  * @see 
   org.apache.wicket.util.resource.IResourceStream#getContentType()
  */
 public String getContentType() {
   return getAlternateContentType();
 }
  
 /**
  * @see 
   org.apache.wicket.util.resource.IResourceStream#getInputStream()
  */
 public InputStream getInputStream()
 throws ResourceStreamNotFoundException {
   return inputStream;
 }
  
 /**
  * @see 
   org.apache.wicket.util.resource.IResourceStream#getLocale()
  */
 public Locale getLocale() {
   throw new IllegalAccessError(Method not implemented.);
 }
  
 /**
  * @see org.apache.wicket.util.resource.IResourceStream#length()
  */
 public long length() {
   try {
 return inputStream.available();
   } catch (IOException e) {
 MarkupUtils.handleUnexpectedException(e);
   }
   return 0;
 }
  
 /**
  * @see 
   org.apache.wicket.util.resource.IResourceStream#setLocale(java.util.Locale)
  */
 public void setLocale(Locale locale) {
   throw new IllegalAccessError(Method not implemented.);
 }
  
 /**
  * @see 
   org.apache.wicket.util.watch.IModifiable

RE: submit a form using ajax

2009-08-11 Thread Russell Simpkins

I haven't done this, but if I were trying to post every 30 seconds, i would use 
the setInterval ( expression, interval ) function. One way to add javascript in 
your form is to implement: protected IAjaxCallDecorator getAjaxCallDecorator(). 
I think the suggestion was to look at the code in ajaxsubmitlink to learn how 
wicket submits the form.


 Date: Mon, 10 Aug 2009 20:50:24 -0700
 From: koki...@gmail.com
 To: users@wicket.apache.org
 Subject: Re: submit a form using ajax


 Any luck with this one?
 I can't figure out how to do it...


 igor.vaynberg wrote:

 you have to wire a bit of javascript to do this from the timer, see
 how ajaxsubmitlink does it...

 -igor

 On Tue, Jun 9, 2009 at 6:39 AM, Juri Prokofiev wrote:
 I'm trying to save form values every 30 seconds and for this purpose
 I use AbstractAjaxTimerBehavior class, but can't figure out how to
 get the form values if submit button wasn't pressed?

 Thank you
 --
 http://www.autoladu.ee  - kõik varuosad ühes kohas


 -
 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://www.nabble.com/submit-a-form-using-ajax-tp23943077p24911252.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


_
Get your vacation photos on your phone!
http://windowsliveformobile.com/en-us/photos/default.aspx?OCID=0809TL-HM
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



RE: Prevent Wicket from creating a new user session while user clicks back button

2009-08-12 Thread Russell Simpkins

You can't prevent a new session from being created, but I'm thinking you still 
have session data after you logged them out, so don't forget to invalidate the 
session.
e.g. 
HttpSession session = ((ServletWebRequest) 
getPage().getRequest()).getHttpServletRequest().getSession()session.invalidate();



 From: bona...@hispeed.ch
 To: users@wicket.apache.org
 Subject: Prevent Wicket from creating a new user session while user clicks 
 back button
 Date: Wed, 12 Aug 2009 19:17:01 +0200
 
 Hi all
 How can i prevent Wicket from creating a new user session while user has
 been logged out and clicks back button on browser
 
 Thx for any help
 Andre
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 

_
Express your personality in color! Preview and select themes for Hotmail®. 
http://www.windowslive-hotmail.com/LearnMore/personalize.aspx?ocid=PID23391::T:WLMTAGL:ON:WL:en-US:WM_HYGN_express:082009
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



RE: Ajax based filling of form

2009-08-12 Thread Russell Simpkins

All,
I'm still green with Wicket and even greener on Facebook, so I had a hard time 
adding Facebook connect to my wicket app. I think this is due in large part to 
Facebook changing so often. Any ways, I have written up a new page for anyone 
else trying to do Facebook connect with Wicket. If I get some more time I would 
like to come up with a quick start, for now the wiki entry is all I had time to 
squeeze in.
http://cwiki.apache.org/confluence/display/WICKET/Adding+Facebook+connect


Russ
_
Windows Live™: Keep your life in sync.
http://windowslive.com/explore?ocid=PID23384::T:WLMTAGL:ON:WL:en-US:NF_BR_sync:082009

wiki link

2009-08-12 Thread Russell Simpkins

Sorry, the link should be
http://cwiki.apache.org/WICKET/adding-facebook-connect.html

 From: russellsimpk...@hotmail.com
 To: users@wicket.apache.org
 Subject: RE: Ajax based filling of form
 Date: Wed, 12 Aug 2009 21:12:38 -0400
 
 
 All,
 I'm still green with Wicket and even greener on Facebook, so I had a hard 
 time adding Facebook connect to my wicket app. I think this is due in large 
 part to Facebook changing so often. Any ways, I have written up a new page 
 for anyone else trying to do Facebook connect with Wicket. If I get some more 
 time I would like to come up with a quick start, for now the wiki entry is 
 all I had time to squeeze in.
 http://cwiki.apache.org/confluence/display/WICKET/Adding+Facebook+connect
 
 
 Russ
 _
 Windows Live™: Keep your life in sync.
 http://windowslive.com/explore?ocid=PID23384::T:WLMTAGL:ON:WL:en-US:NF_BR_sync:082009

_
Get free photo software from Windows Live
http://www.windowslive.com/online/photos?ocid=PID23393::T:WLMTAGL:ON:WL:en-US:SI_PH_software:082009

RE: wiki link

2009-08-13 Thread Russell Simpkins

It describes how to authenticate with Facebook using Facebook Connect. Once you 
have an authenticated user, you can get information about that user and display 
Facebook information in your application. Our app, pigspigot.com is a user 
generated greeting card site, so we want get your friends upcoming birthdays or 
other events and make it easier to send cards. 
I wrote this up because the example on the wicket does not work with the most 
recent api.
Russ

 Date: Thu, 13 Aug 2009 14:10:46 +0200
 Subject: Re: wiki link
 From: nino.martinez.w...@gmail.com
 To: users@wicket.apache.org
 
 Hi Russel
 
 Thanks for the documentation! But im not sure what it describes. Does
 your document describe howto make a wicket application as a facebook
 application or just to use facebook as authentication provider?
 
 By facebook application I mean the little apps that are passed around
 in facebook?
 
 2009/8/13 Russell Simpkins russellsimpk...@hotmail.com:
 
  Sorry, the link should be
  http://cwiki.apache.org/WICKET/adding-facebook-connect.html
 
  From: russellsimpk...@hotmail.com
  To: users@wicket.apache.org
  Subject: RE: Ajax based filling of form
  Date: Wed, 12 Aug 2009 21:12:38 -0400
 
 
  All,
  I'm still green with Wicket and even greener on Facebook, so I had a hard 
  time adding Facebook connect to my wicket app. I think this is due in 
  large part to Facebook changing so often. Any ways, I have written up a 
  new page for anyone else trying to do Facebook connect with Wicket. If I 
  get some more time I would like to come up with a quick start, for now the 
  wiki entry is all I had time to squeeze in.
  http://cwiki.apache.org/confluence/display/WICKET/Adding+Facebook+connect
 
 
  Russ
  _
  Windows Live™: Keep your life in sync.
  http://windowslive.com/explore?ocid=PID23384::T:WLMTAGL:ON:WL:en-US:NF_BR_sync:082009
 
  _
  Get free photo software from Windows Live
  http://www.windowslive.com/online/photos?ocid=PID23393::T:WLMTAGL:ON:WL:en-US:SI_PH_software:082009
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 

_
Windows Live™: Keep your life in sync.
http://windowslive.com/explore?ocid=PID23384::T:WLMTAGL:ON:WL:en-US:NF_BR_sync:082009

RE: Ajax based filling of form

2009-08-13 Thread Russell Simpkins

I believe this is a variable reference issue.
// instead of this
isbnField.add(new AjaxFormComponentUpdatingBehavior(onchange) {...@override
protected void onUpdate(final AjaxRequestTarget target) {try {book = 
bookRetriever.getBook(isbnField.getInput());
// try this@overrideprotected void onUpdate(final AjaxRequestTarget target) 
{try {book = bookRetriever.getBook(isbnField.getInput());setDefaultModel(new 
CompoundPropertyModelBook(book));modelChanged();
When you passed in book to the constructor, it now has a reference to your book 
object, when you execute this line:
book = bookRetriever.getBook(isbnField.getInput());

you are only changing the value of the variable book, but not the reference 
stored in new CompoundPropertyModelBook(book). You should be able pull that 
off in C++ by changing the value of the pointer, but you can't do that in java.
It is similar to this short code
String y = example;java.util.HashMap h = new 
java.util.HashMap();h.put(y,y);// changing the value of y y=not you;// see 
that the value of y is not the same as the reference we stored in the 
hashmapSystem.out.println(h.get(y));System.out.println(y);
I hope that helps.

Russ
 Date: Thu, 13 Aug 2009 09:15:50 +0200
 From: lvd...@heritageagenturen.nl
 To: users@wicket.apache.org
 Subject: Re: Ajax based filling of form
 
 Well the model doesn't update. (Not that I'd expect it to.)
 
 Here's some pieces of my code I deem relevant to the problem.
 
 
 if (key == null || key.getIsbn() == null) {
 book = new Book();
 } else {
 book = bookRetriever.getBook(key.getIsbn(), key.getCollectionId());
 }   
 
 setDefaultModel(new CompoundPropertyModelBook(book));
 
 // ...
 
 isbnField.add(new AjaxFormComponentUpdatingBehavior(onchange) {
 private static final long serialVersionUID = 1L;
 
 @Override
 protected void onUpdate(final AjaxRequestTarget target) {
 try {
 book = bookRetriever.getBook(isbnField.getInput());
 modelChanged();

 target.addComponent(titleField);
 //...
 target.addComponent(genrefield);
 } catch (SQLException e) {
 //...
 }
 }
 });
 
 John Krasnay wrote:
  Sounds like you're on the right track. What's the problem?
 
  jk
 
  On Wed, Aug 12, 2009 at 04:27:41PM +0200, Linda van der Pal wrote:

  I have a panel with a form. This form has several fields, one of which 
  is the ISBN of a book. The fields are filled by a CompoundPropertyModel 
  if the user is editing his previous entry, and they are empty if the 
  user is adding a new book. Simply entering data or updating it and then 
  submitting already works. But now I want to fetch the data for the other 
  fields if the ISBN is already in the database. It is a multi-user 
  system, so it is in fact possible that the ISBN is already in there.
 
  I was thinking of achieving this with AJAX, but I'm not really sure how 
  to do it. I was thinking of adding an AjaxFormComponentUpdatingBeavior, 
  where all the related fields are added to the target. But as the ISBN is 
  part of the model, I don't really now how to get this working. Any hints 
  on what direction I should be searching in?
 
  Regards,
  Linda
 
  -
  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

  
 
 
  No virus found in this incoming message.
  Checked by AVG - www.avg.com 
  Version: 8.5.392 / Virus Database: 270.13.53/2299 - Release Date: 08/12/09 
  18:12:00
 

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

_
Get back to school stuff for them and cashback for you.
http://www.bing.com/cashback?form=MSHYCBpubl=WLHMTAGcrea=TEXT_MSHYCB_BackToSchool_Cashback_BTSCashback_1x1

RE: JS libraries with Wicket

2009-08-13 Thread Russell Simpkins

Eyal,
There was a post just today to this url:

http://www.dzone.com/links/wicket_tutorial_yui_autocomplete_using_json_and_a.html

Russ

 From: egola...@gmail.com
 Date: Thu, 13 Aug 2009 17:22:48 +0300
 Subject: JS libraries with Wicket
 To: users@wicket.apache.org
 
 There was once a nice explanation on how to create a module in wicket that
 uses a JS library (like JQuery).
 I checked out wicketstuf core to look into it.
 I want to try to create my own module of wicket and JS library (and of
 course to contribute it).
 
 Does anyone remember any post / blog / article about it?
 Or can someone give some pin points on how to do it?
 
 Thanks,
 
 
 Eyal Golan
 egola...@gmail.com
 
 Visit: http://jvdrums.sourceforge.net/
 LinkedIn: http://www.linkedin.com/in/egolan74
 
 P  Save a tree. Please don't print this e-mail unless it's really necessary

_
Get free photo software from Windows Live
http://www.windowslive.com/online/photos?ocid=PID23393::T:WLMTAGL:ON:WL:en-US:SI_PH_software:082009

RE: CORRECT portlet+spring+hibernate configuration (Two options, what's right?)

2009-08-14 Thread Russell Simpkins

Errors like those are caused when the hibernate session is closed too soon.
https://www.hibernate.org/43.html
Russ

 Subject: Re: CORRECT portlet+spring+hibernate configuration (Two options, 
 what's right?)
 From: g...@aguilardelgado.com
 To: users@wicket.apache.org
 Date: Fri, 14 Aug 2009 11:01:05 +0200
 
 About the error I mentioned the exception it throws is:
 
 Caused by: org.hibernate.LazyInitializationException: failed to lazily
 initialize a collection of role:
 com.level2crm.hibernate.generated.User.contactBasicDetails, no session
 or session was closed
   at
 org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:358)
   at
 org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationExceptionIfNotConnected(AbstractPersistentCollection.java:350)
   at
 org.hibernate.collection.AbstractPersistentCollection.readSize(AbstractPersistentCollection.java:97)
   at
 org.hibernate.collection.PersistentSet.isEmpty(PersistentSet.java:146)
   at com.level2crm.portals.crm.wicket.customerdetail.pages.ViewModePage
 $1.load(ViewModePage.java:54)
   at
 org.apache.wicket.model.LoadableDetachableModel.getObject(LoadableDetachableModel.java:122)
   at
 org.apache.wicket.Component.getDefaultModelObject(Component.java:1664)
   at
 org.apache.wicket.markup.html.list.ListView.getViewSize(ListView.java:221)
   at
 org.apache.wicket.markup.html.list.ListView.onPopulate(ListView.java:525)
   at
 org.apache.wicket.markup.repeater.AbstractRepeater.onBeforeRender(AbstractRepeater.java:131)
   at
 org.apache.wicket.Component.internalBeforeRender(Component.java:1061)
   at org.apache.wicket.Component.beforeRender(Component.java:1095)
   at
 org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1751)
   ... 109 more
 
 
 May this have something to do with selected configuration?
 
 Thank you again.
 
 
 El vie, 14-08-2009 a las 10:53 +0200, Gonzalo Aguilar Delgado escribió:
 
  Hi again, 
  
  For a shake of completeness y will provide two of the working
  configurations I've found to work. I would know what's the one 
  correct and why. Someone can throw a little bit light on this issue,
  please?
  
  -=[ First Choice ]=-
  
  
  -
  web.xml
  -
  ?xml version=1.0 encoding=UTF-8?
  !--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache License, Version 2.0 (the
License); you may not use this file except in compliance
with the License.  You may obtain a copy of the License at

 http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License.
  --
  web-app xmlns=http://java.sun.com/xml/ns/j2ee;
  xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; version=2.4
  xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee
  http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;
  display-nameMy Portlet Application/display-name
  
  !-- For deploying on Websphere: disable WebSphere default
  portletcontainer
   However: if you actually want to deploy on WebSphere Portal,
  comment the following out --
  
  context-param
  
  param-namecom.ibm.websphere.portletcontainer.PortletDeploymentEnabled/param-name
  param-valuefalse/param-value
  /context-param
  
  !-- This is for Spring self configuration --
  context-param
  param-namecontextConfigLocation/param-name
  param-value/WEB-INF/applicationContext.xml/param-value
  /context-param
  
  listener
  
  listener-classorg.springframework.web.context.ContextLoaderListener/listener-class
  /listener
  
  !-- Enable the filters for Hibernate (How to check it's working?)--
  
  filter
  filter-nameopensessioninview/filter-name
  
  filter-classorg.springframework.orm.hibernate3.support.OpenSessionInViewFilter/filter-class
  /filter
  filter-mapping
  filter-nameopensessioninview/filter-name
  url-pattern/hibernate/*/url-pattern
  /filter-mapping
  !-- END hibernate filters --
  
  
  !-- Wicket filters -- 
  filter 
  filter-nameCustomerListPortlet/filter-name 
  
  filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class 
  init-param
  param-nameapplicationClassName/param-name
  
  

RE: how to monitor session memory usage

2009-08-15 Thread Russell Simpkins

Try this program, its free and very well written:
http://www.eclipse.org/mat/
You can configure to take heap dumps a couple of different ways. 
I haven't done any profiling in a while, but I googled and found this article 
for you.
http://www.eclipse.org/articles/Article-TPTP-Profiling-Tool/tptpProfilingArticle.html
Russ

 From: nhsoft@gmail.com
 Date: Sat, 15 Aug 2009 09:20:45 +0800
 Subject: Re: how to monitor session memory usage
 To: users@wicket.apache.org
 
 thanks alot for your reply, but i can not resolve my problem.
 
 Monitor Wicket page request using JAMon,
 http://blog.xebia.com/2008/02/02/monitor-wicket-page-request-using-jamon/
 
 it only trace the request time, but i mainly want to know why the
 application session occupy so many memory.
 
 try RequestLogger at first.
 i add code in application init method
 
 if(DEVELOPMENT.equalsIgnoreCase(getConfigurationType())){
 //Get the logger
 IRequestLoggerSettings reqLogger =
 Application.get().getRequestLoggerSettings();
 
 //Enable the logger
 reqLogger.setRequestLoggerEnabled(true);
 
 /**
  * Set the window of all the requests that is kept in memory for
 viewing. Default is 2000, You
  * can set this to 0 then only Sessions data is recorded (number
 of request, total time, latest
  * size)
  */
 reqLogger.setRequestsWindowSize(3000);
 }
 
 and add log4j configure as:
 
 
 log4j.category.org.apache.wicket.protocol.http.RequestLogger
 =debug,reqLogger
 log4j.additivity.org.apache.wicket.protocol.http.RequestLogger=false
 log4j.appender.reqLogger=org.apache.log4j.RollingFileAppender
 
 log4j.appender.reqLogger.File=D:/517wm_data/logs/wicketRequestLogger.log
 log4j.appender.reqLogger.MaxFileSize=10MB
 log4j.appender.reqLogger.MaxBackupIndex=10
 log4j.appender.reqLogger.layout=org.apache.log4j.PatternLayout
 log4j.appender.reqLogger.layout.ConversionPattern=%d %-5p -
 %-26.26c{1} - %m\n
 
 here is result:
 
 2009-08-14 22:17:47,421 INFO  - RequestLogger  -
 time=78,event=null,response=[resourcestreamrequesttarget[resourcestream=org.apache.wicket.markup.html.dynamicwebresourc...@14d11bd,fileName=null],sessionid=15iahjrthemeq,sessionsize=258022,sessionstart=Fri
 Aug 14 21:38:50 CST
 2009,requests=129,totaltime=28780,activerequests=1,maxmem=266M,total=133M,used=113M
 2009-08-14 22:17:48,546 INFO  - RequestLogger  -
 time=109,event=Interface[target:ShareShopPage$LastestShopPanel$1$1(wmcNavigator:searchBox:panel:wmcLastestShopPanel:lastestShops:65:cols:68:shop),
 page: wm.wicket.pages.shareshop.ShareShopPage(2), interface:
 IBehaviorListener.onRequest],response=PageRequest[wm.wicket.pages.shareshop.ShareShopPage(2)],sessionid=15iahjrthemeq,sessionsize=240557,sessionstart=Fri
 Aug 14 21:38:50 CST
 2009,requests=130,totaltime=28889,activerequests=1,maxmem=266M,total=133M,used=118M
 2009-08-14 22:17:48,734 INFO  - RequestLogger  -
 time=63,event=null,response=[resourcestreamrequesttarget[resourcestream=org.apache.wicket.markup.html.dynamicwebresourc...@b9af2c,fileName=null],sessionid=15iahjrthemeq,sessionsize=240789,sessionstart=Fri
 Aug 14 21:38:50 CST
 2009,requests=131,totaltime=28952,activerequests=1,maxmem=266M,total=133M,used=120M
 2009-08-14 22:17:50,484 INFO  - RequestLogger  -
 time=141,event=Interface[target:ShareShopPage$LastestShopPanel$1$1(wmcNavigator:searchBox:panel:wmcLastestShopPanel:lastestShops:73:cols:75:shop),
 page: wm.wicket.pages.shareshop.ShareShopPage(2), interface:
 IBehaviorListener.onRequest],response=PageRequest[wm.wicket.pages.shareshop.ShareShopPage(2)],sessionid=15iahjrthemeq,sessionsize=269258,sessionstart=Fri
 Aug 14 21:38:50 CST
 2009,requests=132,totaltime=29093,activerequests=1,maxmem=266M,total=133M,used=119M
 2009-08-14 22:17:50,953 INFO  - RequestLogger  -
 time=141,event=null,response=[resourcestreamrequesttarget[resourcestream=org.apache.wicket.markup.html.dynamicwebresourc...@1f8f606,fileName=null],sessionid=15iahjrthemeq,sessionsize=269490,sessionstart=Fri
 Aug 14 21:38:50 CST
 2009,requests=133,totaltime=29234,activerequests=1,maxmem=266M,total=133M,used=121M
 2009-08-14 22:17:52,250 INFO  - RequestLogger  -
 time=125,event=Interface[target:ShareShopPage$LastestShopPanel$1$1(wmcNavigator:searchBox:panel:wmcLastestShopPanel:lastestShops:69:cols:71:shop),
 page: wm.wicket.pages.shareshop.ShareShopPage(2), interface:
 IBehaviorListener.onRequest],response=PageRequest[wm.wicket.pages.shareshop.ShareShopPage(2)],sessionid=15iahjrthemeq,sessionsize=252607,sessionstart=Fri
 Aug 14 21:38:50 CST
 2009,requests=134,totaltime=29359,activerequests=1,maxmem=266M,total=133M,used=118M
 2009-08-14 22:17:52,468 INFO  - RequestLogger  -
 

how to implement multiple forms on a single page

2010-06-02 Thread Russell Simpkins

All,
I've been looking around the wiki and the mailing list, but can't seem to 
figure out what I'm doing wrong, or if I am even allowed to do multiple forms 
on one page with wicket. I'm using 1.4.8 and I would like to have three forms. 
Each of the forms work, but I noticed that one of my forms does not get its 
data correctly. For simplicity sake, I am doing:
div wicket:id=formPanelAform wicket:id=form1input 
wicket:id=name/form
/divdiv wicket:id=formPanelBform wicket:id=form2input 
wicket:id=name/form/divdiv wicket:id=formPanelCform 
wicket:id=form1input wicket:id=searchField/form/div
Form2 and Form3 are using fields of the same name because both are addresses 
fields but are targeted for different purposes. Everything compiles, builds and 
runs, but here is the issue:
Form1 DOES get its dataForm2 does NOT get its data, and the form validation 
fails.Form3 DOES get its data
Should I be able to have 3 or more forms on a single page (there's nothing in 
HTML to prevent this...?) Is there a good example on how to do 3 or more forms 
on a page if I can do this? Its entirely possible that I muffed up somewhere, 
but I've spent a few hours and haven't found a good answer, so I here I am.
I apologize if this is covered on the wiki, I looked but could not find 
anything similar. The closest I could find was nested forms, but these are not 
nested - three separate forms.
Hoping for help,
Russ



  
_
The New Busy think 9 to 5 is a cute idea. Combine multiple calendars with 
Hotmail. 
http://www.windowslive.com/campaign/thenewbusy?tile=multicalendarocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_5

RE: how to implement multiple forms on a single page

2010-06-03 Thread Russell Simpkins

Thanks for the response - after further digging I discovered the error was one 
of my own creation.

 From: igor.vaynb...@gmail.com
 Date: Wed, 2 Jun 2010 20:07:51 -0700
 Subject: Re: how to implement multiple forms on a single page
 To: users@wicket.apache.org
 
 you should be able to have as many forms as you want. create a
 quickstart and send it to the list or attach it to jira, there is
 probably a bug in your code somewhere.
 

  
_
The New Busy is not the old busy. Search, chat and e-mail from your inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_3

RE: Can I develop without recompiling/restarting after every change?

2010-06-06 Thread Russell Simpkins


I have to thank Martijn for pointing out the Start.java file. I am trying hard 
not to beat myself up for not using this sooner. I have not gone through the 
works just yet to move my HTML files to another location. I've left them in 
with the class files. So, for eclipse love in this situation, I added the HTML 
files to the eclipse build so that anytime I save a file eclipse moves them to 
the target folder. I changed the build output location to be 
target/MY_APPLICATION/WEB-INF/classes and I added the same path to the runtime 
configuration classpath. So far, I love it! Just as Martijn pointed out 
earlier, run in debug mode and every time you edit/save a java file or html 
file the changes are immediately picked up. SO much better than hot deploy for 
laptop development. This will save me hours, and it has no impact on my current 
maven project. Its just what I needed. THANK YOU.
If you don't want to use the quickstart, here is the Start.java source I use.

import org.mortbay.jetty.Connector;import org.mortbay.jetty.Server;import 
org.mortbay.jetty.bio.SocketConnector;import 
org.mortbay.jetty.webapp.WebAppContext;import 
org.mortbay.jetty.webapp.WebInfConfiguration;import 
org.mortbay.jetty.webapp.WebXmlConfiguration;

public class Start {
public static void main(String[] args) throws Exception {   
Server server = new Server();   SocketConnector connector = new 
SocketConnector();  // Set some timeout options to 
make debugging easier.   connector.setMaxIdleTime(1000 * 60 * 60);  
 connector.setSoLingerTime(-1);  connector.setPort(8080);   
 server.setConnectors(new Connector[] { connector });
WebAppContext bb = new WebAppContext(); 
bb.setServer(server);   bb.setContextPath(/);// 
CHANGE ME - point to your project path
bb.setWar(target/YOUR_APP);   bb.setConfigurationClasses(new String[] 
{ WebInfConfiguration.class.getName(), WebXmlConfiguration.class.getName() });  
bb.setParentLoaderPriority(true);   // START JMX SERVER 
// MBeanServer mBeanServer = 
ManagementFactory.getPlatformMBeanServer();// MBeanContainer 
mBeanContainer = new MBeanContainer(mBeanServer); // 
server.getContainer().addEventListener(mBeanContainer);  // 
mBeanContainer.start();  server.addHandler(bb);
try {   System.out.println( STARTING 
EMBEDDED JETTY SERVER, PRESS [ENTER] TO STOP);
server.start(); System.in.read();   
System.out.println( STOPPING EMBEDDED JETTY SERVER);   
server.stop();  server.join();  } catch (Exception e) { 
e.printStackTrace();System.exit(100);   
}   }}
_
The New Busy is not the too busy. Combine all your e-mail accounts with Hotmail.
http://www.windowslive.com/campaign/thenewbusy?tile=multiaccountocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_4

RE: Can I develop without recompiling/restarting after every change?

2010-06-06 Thread Russell Simpkins

hotmail just destroyed my last post. I apologize. I will try one more time to 
share my source
import org.mortbay.jetty.Connector;import org.mortbay.jetty.Server;import 
org.mortbay.jetty.bio.SocketConnector;import 
org.mortbay.jetty.webapp.WebAppContext;import 
org.mortbay.jetty.webapp.WebInfConfiguration;import 
org.mortbay.jetty.webapp.WebXmlConfiguration;
public class Start {
  public static void main(String[] args) throws Exception {    Server server = 
new Server();    SocketConnector connector = new SocketConnector();     // 
Set some timeout options to make debugging easier.    
connector.setMaxIdleTime(1000 * 60 * 60);    connector.setSoLingerTime(-1);    
connector.setPort(8080);    server.setConnectors(new Connector[] { connector 
});     WebAppContext bb = new WebAppContext();    bb.setServer(server);    
bb.setContextPath(/);    bb.setWar(target/MY_APPLICATION);    
bb.setConfigurationClasses(new String[] { WebInfConfiguration.class.getName(), 
WebXmlConfiguration.class.getName() });    bb.setParentLoaderPriority(true);    
     // START JMX SERVER    // MBeanServer mBeanServer = 
ManagementFactory.getPlatformMBeanServer();    // MBeanContainer mBeanContainer 
= new MBeanContainer(mBeanServer);    // 
server.getContainer().addEventListener(mBeanContainer);    // 
mBeanContainer.start();     server.addHandler(bb);
    try {      System.out.println( STARTING EMBEDDED JETTY SERVER, PRESS 
[ENTER] TO STOP);      server.start();      System.in.read();      
System.out.println( STOPPING EMBEDDED JETTY SERVER);       
server.stop();      server.join();    } catch (Exception e) {      
e.printStackTrace();      System.exit(100);    }  }}
  
_
The New Busy is not the old busy. Search, chat and e-mail from your inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_3
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



RE: radiochoice values

2010-06-11 Thread Russell Simpkins

I created a HashMapChoiceRenderer which extends ChoiceRenderer. I'm not sure if 
this is the best way to go about it, but it worked for me to specifically set 
the value with a set of checkboxes.
disclaimer : hotmail munches code, so you will want to throw this code into an 
ide and format it.
Here is how I add my new component:
###
DropDownChoice groupSelect = new DropDownChoice(selectGroup, new 
PropertyModel(this, selectGroup), userGroups, new HashMapChoiceRenderer()) 
{  /**   * Every object will be a HashMap that has just one item. So, it   * is 
safe to grab the first item from the keySet iterator and   * test with the 
value persisted.   *    * @see 
org.apache.wicket.markup.html.form.AbstractSingleSelectChoice#isSelected(java.lang.Object,  
 *      int, java.lang.String)   */�...@override  protected boolean 
isSelected(Object object, int index, String selected) {      HashMapString, 
String testee = (HashMapString, String) object;      String id = 
testee.keySet().iterator().next();      return 
(id.equals(getSelectGroup()));  }};
###
When Wicket calls your setter, it gives you a string that has both the id and 
the value - a serialized view of the hashmap, so I did this with the setter

###/** * Added logic to look for the occurance of { 
since the dropdown list * will usually supply {id=value} as a string. *  * 
@param sortListBy *            the sortListBy to set */public void 
setSortListBy(String sortListBy) {    if (sortListBy != null  
sortListBy.contains({))        this.sortListBy = 
HashMapChoiceRenderer.getListSelectionValue(sortListBy);    else        
this.sortListBy = sortListBy;}
Here is the component
###

import java.util.HashMap;
import org.apache.commons.logging.Log;import 
org.apache.commons.logging.LogFactory;import 
org.apache.wicket.markup.html.form.ChoiceRenderer;
/** * This class will let you use a HashMapString,String as an IModel for 
your * DropDownChoice. *  * @author a 
href=mailto:russellsimpk...@hotmail.com;Russell Simpkins/a */public class 
HashMapChoiceRendererT extends ChoiceRendererT {
    private static final long serialVersionUID = 1904209513899620301L;    
public static final Log log = LogFactory.getLog(HashMapChoiceRenderer.class);
    /**     * A utility method for getting back the value of a list selection 
value     * where the input is a String wiht a format of {id=value} where we 
want the     * id part     *      * @param selection     * @return String the 
value= part of an HTML select field     */    public static final String 
getListSelectionValue(String selection) {        String[] parts = ((String) 
selection).replaceAll(([{]|[}]), ).split([=]);        return parts[0];    
}
    /**     * A utility method for getting back the value of a list selection 
value     * where the input is a String wiht a format of {id=value} where we 
want the     * value part     *      * @param selection     * @return String 
- the display value a user would have seen     */    public static final String 
getListSelectionDisplay(String selection) {        String[] parts = ((String) 
selection).replaceAll(([{]|[}]), ).split([=]);        return parts[1];    
}
    /*     * (non-Javadoc)     *      * @see     * 
org.apache.wicket.markup.html.form.ChoiceRenderer#getDisplayValue(java     * 
.lang.Object)     */   �...@suppresswarnings(unchecked)   �...@override    
public Object getDisplayValue(T object) {        try {            
HashMapString, String item = (HashMapString, String) object;            
return item.values().iterator().next();        } catch (ClassCastException cce) 
{            log.debug(getDisplayValue was passed something other than a 
HashMap, cce);        } catch (Exception e) {            log.error(There was 
an unforseen error. , e);        }        return 
super.getDisplayValue(object);    }
    /*     * (non-Javadoc)     *      * @see     * 
org.apache.wicket.markup.html.form.ChoiceRenderer#getIdValue(java.lang     * 
.Object, int)     */   �...@suppresswarnings(unchecked)   �...@override    
public String getIdValue(T object, int index) {        try {            if 
(object instanceof String) {                return 
HashMapChoiceRenderer.getListSelectionValue((String) object);            } else 
{                HashMapString, String item = (HashMapString, String) 
object;                return item.keySet().iterator().next();            }     
   } catch (ClassCastException cce) {            log.debug(getIdValue was 
passed something other than a HashMap:  + object +  index:  + index, cce);   
     } catch (Exception e) {            log.error(There was an unforseen 
error. , e);        }        return super.getIdValue(object, index);    }
}
###
Russ

 I have a bean with enum field.
 When I implements radiochoice model by this enum field in html radiochoise
 code i see:

 
 type=radioYES

 
 type=radioNO



 Labels contents enum

RE: How to support multiple themes in Wicket application.

2010-06-15 Thread Russell Simpkins

 I would like to support multiple themes in Wicket application like 
 Wordpress, Drupal. Could you please give me suggestion?
I would make sure that every element has class set. I would also recommend 
always setting component.setMarkupId(String id) for your components so that you 
can style on ID and Class. Then you can play around with setting the name of 
the selected stylesheet in the application session store.
Russ

 

  
_
The New Busy is not the too busy. Combine all your e-mail accounts with Hotmail.
http://www.windowslive.com/campaign/thenewbusy?tile=multiaccountocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_4

RE: Dropdownchoice selection to trigger change of form

2010-07-06 Thread Russell Simpkins

I think you are neglecting to do any changes in your onupdate() method. When 
onupdate is called, the user should have selected a vehicle, which would 
populate selectedVehicle - you need to then populate your other dropdown menu 
or whatever else you wanted to populate before you addOrReplace to your 
container and finally addComponent to the target. You made no changes before 
calling: target.addComponent(addVehicleFormPanel); 
I would think that if you tried:
setup();target.addComponent(addVehicleFormPanel);
You may get the results you are after. Also, given that you plan on refreshing 
elements, I think you should consider using addOrReplace().
Russ

 Date: Tue, 6 Jul 2010 18:44:46 -0700
 From: matt...@spidertracks.co.nz
 To: users@wicket.apache.org
 Subject: Dropdownchoice selection to trigger change of form
 
 
 Hi, I would of thought that this would be fairly basic to figure out but I
 just can't get it to work. I have a dropdownchoice in one form and then
 another form below it. Based on the selection of the dropdown I want the
 contents of the other form to change. I have an ajax listener that add the
 form to be rendered on a selection change.
 Anyone know what I am doing wrong or has any examples?
 
 Thanks!   
 
 
 @Override
   protected void setup() {
 
   vehicleIndex = -1;
   user = new UserDetachableModel();
 
   Fragment fragment = null;
 
   if (user.getObject().getVehicles() != null) {
   this.vehicleIndex = 0;
   }
   final AddVehicleFormPanel addVehicleFormPanel = new
 AddVehicleFormPanel(addVehiclePanel, new PropertyModelVehicle(this,
 selectedVehicle));
   addVehicleFormPanel.setOutputMarkupId(true);
 
   // final AddVehicleForm form = new AddVehicleForm(addVehicle,
   // getSelectedVehicle());
 
   CompoundPropertyModelMyVehiclesPanel formModel = new
 CompoundPropertyModelMyVehiclesPanel(
   this);
 
   // form.setDefaultModel(formModel);
 
   setDefaultModel(formModel);
 
   // check if user has vehicles
   if (user.getObject().getVehicles() != null) {
   fragment = new Fragment(dropDown, vehiclesExist, 
 this);
 
   DropDownChoiceVehicle vehiclesDropDown = new 
 DropDownChoiceVehicle(
   vehicleSelect, new 
 PropertyModelVehicle(this,
   selectedVehicle),
   new PropertyModelListVehicle(user, 
 vehicles),
   new 
 WebOptionStringChoiceRenderVehicle());
 
   vehiclesDropDown.add(new 
 AjaxFormComponentUpdatingBehavior(onchange) {
 
   private static final long serialVersionUID = 1L;
 
   @Override
   protected void onUpdate(AjaxRequestTarget 
 target) {
   
   
 target.addComponent(addVehicleFormPanel);
   }
 
   });
   fragment.add(vehiclesDropDown);
 
   } else {
   fragment = new Fragment(dropDown, noVehicles, this);
   }
 
   add(fragment);
   // addVehicleFormPanel.add(form);
   add(addVehicleFormPanel);
   }
 
   public void setSelectedVehicle(Vehicle selectedVehicle) {
   vehicleIndex = 
 user.getObject().getVehicles().indexOf(selectedVehicle);
   }
 
   /**
* 
* @return Vehicle The selected vehicle
*/
   public Vehicle getSelectedVehicle() {
 
   Vehicle returned = null;
 
   if (vehicleIndex == -1) {
 
   ListVehicle vehicles = 
 this.user.getObject().getVehicles();
 
   if (vehicles != null  vehicles.size()  0) {
   vehicleIndex = 0;
   returned = vehicles.get(0);
   }
   } else {
   returned = 
 user.getObject().getVehicles().get(vehicleIndex);
   }
 
   return returned;
   }
 -- 
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Dropdownchoice-selection-to-trigger-change-of-form-tp2280387p2280387.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
 
  
_
The New Busy is not the old busy. Search, chat and e-mail from your inbox.

RE: HttpsRequestCycleProcessor Configuration

2010-07-27 Thread Russell Simpkins

 
 My problem is not specific to wicket but I'm hoping that someone in the
 community has fought this battle before and is willing to lend a helping
 hand. I am using the HttpsRequestCycleProcessor and I only have the
 @RequireHttps annotation on one page, the registration page. I have apache
 httpd and tomcat talking to each other with a virtual host using proxypass
 and proxypassreverse on port 80 and all that is working fine. The problem
 becomes when I try to configure everything for SSL. I'm unsure whether I
 need SSL to be configured in tomcat and apache httpd or just one of them and
 not the other. I have generated a self signed certificate and key file for
 apache httpd and tried it with just that. When that did not work I pointed
 tomcat to the same files. Still nothing.

It sounds like you have your SSL for apache incorrectly configured. First start 
by getting SSL configured and working correctly for your apache. Create a test 
page and make sure you can see it over HTTPS. Then verify that you've added 
your tomcat connector to your HTTPS server e.g.
VirtualHost _default_:443#   General setup for the virtual hostDocumentRoot 
/usr/local/www/webapps/ROOTServerName www.example.com:443ErrorLog 
/usr/apache/apache-2.2.11/logs/error_logTransferLog 
/usr/apache/apache-2.2.11/logs/access_logJkMount  /app/* worker1JkMount 
/asyncService/* worker1JkMount /*.jsp worker1
#   SSL Engine Switch:#   Enable/Disable SSL for this virtual host.SSLEngine 
on.../VirtualHost
If you want to use proxy pass instead of mod_jk, that shouldn't be an issue.
Russ  
_
The New Busy think 9 to 5 is a cute idea. Combine multiple calendars with 
Hotmail. 
http://www.windowslive.com/campaign/thenewbusy?tile=multicalendarocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_5