Re: How can i load my css

2009-08-20 Thread Per Newgro
Now i've upgraded to 1.4. I changed the resource ref from CompressedRR 
to ContextRelativeResource. Css is found now. But the images loaded with 
url(xy.gif) defined in css are not loaded. They always tried to be got 
from the Application scope 
(org.apachahe.wicket.Application/webresources/xy.gif). This is not 
existing and i get no image.


Is noone loading images from css? Do i realy have to split my css into 
multiple?


Thanks
Per

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



Re: swf into wicket page

2009-08-20 Thread Martijn Lindhout
You should forget about Bedrijf and Video. You can see from the code that
the video being displayed depends on the Bedrijf (dutch for company) passed
in. You are free to remove that and pass in your own domain objects (or just
a String if you need / like).

2009/8/20 Gerald Fernando gerald.anto.ferna...@gmail.com

 Hi martijin i have write what u gave me but it shows that

 Bedrijf cannot be resolved to a type
 Video cannot be resolved to a type

 create a class fo rBedrijf and Video
 As i new to wicket i dont know how to write it
 please tell me how to do it.

 ThanksRegards,
 Gerald A


 On Wed, Aug 19, 2009 at 5:01 PM, Martijn Lindhout
 mlindh...@jointeffort.nlwrote:

  Here's how I did it:
 
  Java
  public class VideoPlayer extends Panel {
 
 public VideoPlayer(String id, final Bedrijf bedrijf, final Video
  video) {
 super(id);
 add(new WebComponent(player){
 @Override
 protected void onComponentTagBody(MarkupStream
  markupStream,
  ComponentTag openTag) {
 String videoFile = /static/ +
  bedrijf.getProfiel().getId() +
  /videos/ + video.getNaam();
 StringBuilder script = new StringBuilder(
 var s1 = new
  SWFObject('/static/jobiq/player.swf','ply','328','200','9','#FF');
  +
 
   s1.addParam('allowfullscreen','true'); +
 
   s1.addParam('allowscriptaccess','always'); +
 s1.addParam('flashvars','file= +
  videoFile +
  image=/static/player/preview.jpg'); +
 s1.write('container');
 );
 
 replaceComponentTagBody(markupStream,
  openTag, script);
 }
 });
 }
 
  }
 
 
  And the HTML
 wicket:panel
 
 div id=containera
  href=http://www.macromedia.com/go/getflashplayer;Get the Flash
  Player/a to see this player./div
 script type=text/javascript
  src=/static/player/swfobject.js/script
 script wicket:id=player type=text/javascript/script
 /wicket:panel
 
  2009/8/19 Gerald Fernando gerald.anto.ferna...@gmail.com:
Hello Friends,
  
   Shall we have(embed) a swf in wicket component(Panel or in wicket
 page).
   I have swf that shows chart for dynamic data.
   i want to show my .swf file into wicket page or wicket panel
   if possible please give me modal code.
   I need urgent reply
  
  
  
  
   --
   Thanksregards,
   Gerald A
  
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 


 --
 Thanksregards,
 Gerald A




-- 
Martijn Lindhout
* 06 - 18 47 25 29
* mlindh...@jointeffort.nl
* http://www.jointeffort.nl


Re: AjaxTabbedPanel with different forms on each tab

2009-08-20 Thread Help System
Great, thanks Marcin.

It's a pitty that the panels have to be modified to work with ModalWindows
but hey, if it works...

Thanks again,
Tim

2009/8/19 Marcin Palka marcin.pa...@gmail.com


 Tim,

 You have to place your modal window within a form. It's mandatory if you
 want to use Forms on a modal.

 You have to write code similar to the following:

 form wicket:id=outerForm
 div wicket:id=modalWithTabsmodal placeholder/div
 /form

 Form outerForm =new Form(outerForm);
 ModalWindowmodalWithTabs  = new ModalWindow(modalWithTabs);
 ...
 outerForm.add(modalWithTabs);
 add(outerForm);

 cheers,
 Marcin


 Help System wrote:
 
  Hi,
 
  I have an AjaxTabbedPanel in a ModalWindow.  There are two tabs, each
  containing a panel with a simple form.
 
  Looking at the html produced, the AjaxTabbedPanel moves the form
 element
  from the place in the panel to near the top of the tabbed panel html
  hierarchy and changes the id.  All form elements are then part of the new
  tabbed panel form.
 
  The first tab works OK but the second tab fails to return from an
  AjaxSubmit.  The error shown in the debug window is
 
  *ERROR: *
  Wicket.Ajax.Call.submitFormById: Trying to submit form with id
  'form3f' that is not in document.
 
  The panels and forms work fine when not displayed in the tabbed panel.
 
  Can anyone tell me what I'm doing wrong please?
 
  Using Wicket 1.4
 
  Thanks,
  Tim
 
 

 --
 View this message in context:
 http://www.nabble.com/AjaxTabbedPanel-with-different-forms-on-each-tab-tp25044965p25049550.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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




Re: Session listener

2009-08-20 Thread Martijn Lindhout
I don't know why you want to access the deployment descriptor, but this is
how I did it (UsageStatistics is a selfmade class):

In WebApplication subclass:

@Override
protected ISessionStore newSessionStore() {
return new SecondLevelCacheSessionStore(this, new DiskPageStore()){
@Override
protected void onUnbind(String sessionId) {
getUsageStatistics().registerSessionDestroyed(sessionId);
super.onUnbind(sessionId);
}
@Override
protected void onBind(Request request, Session newSession) {
super.onBind(request, newSession);
getUsageStatistics().registerNewSession((WebRequest)request,
(JobIQSession)newSession);
}
};
}

You van use
((WebRequest)request).getHttpServletRequest().getSession().getMaxInactiveInterval()
to get the timeout interval

2009/8/20 David Leangen wic...@leangen.net



  What's the best way to get notified of a session timeout event from within
 a
 Wicket App when I don't have access to the deployment descriptor?


  I think overriding WebApplication#sessionDestroyed should do the trick.


 Perfect! Thank you.




-- 
Martijn Lindhout
* 06 - 18 47 25 29
* mlindh...@jointeffort.nl
* http://www.jointeffort.nl


Re: [announce] Wicket 1.4.1

2009-08-20 Thread Martin Funk
and leave clean underwear

don't think Martijn is up for another one of this:
http://www.nabble.com/SVN-URL-for-Wicket-1.4.0-sources--td24803875.html

mf

2009/8/20 Igor Vaynberg igor.vaynb...@gmail.com

 Apache Wicket 1.4.1 Released

 The Apache Wicket project is proud to announce the first maintenance
 release of Apache Wicket 1.4.

 Download Apache Wicket 1.4.1
 -
 You can download the release here:
 http://www.apache.org/dyn/closer.cgi/wicket/1.4.1

 Or use this in your Maven pom's to upgrade to the new version:

 dependency
  groupIdorg.apache.wicket/groupId
  artifactIdwicket/artifactId
  version1.4.1/version
 /dependency

 Changes
 -
 The most notable change in this release is the transparent support for
 multipart form submissions via Ajax. Wicket is now smart enough to
 submit a form using a hidden iframe rather then the standard
 XMLHttpRequest if the form contains file upload fields.

 A complete list of changes can be found in our Jira instance[0].

 --

 We thank you for your patience and support.

 The Wicket Team

 [0]
 https://issues.apache.org/jira/secure/IssueNavigator.jspa?reset=truemode=hidesorter/order=DESCsorter/field=prioritypid=12310561fixfor=12314113

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




Re: How do I get my DropDownChoice to refresh the list of choices with Ajax?

2009-08-20 Thread Linda van der Pal
Doh, I should have thought of that myself. That'll teach me to send a 
question at the end of the day. Thanks for taking the time to answer my 
question, Bas and Igor.


Regards,
Linda

Bas Gooren wrote:

Linda,

Without looking at your question very long I noticed that you supply 
your component with a static ListAuthor.


This means that this list is only retrieved once (at initialization). 
It sounds like you want it to be refreshed when other components 
change their input. This would mean you need to supply a Model which 
returns a ListAuthor; That way when you re-render the component 
through AJAX, it reloads the list of authors.


Regards,

Bas

- Original Message - From: Linda van der Pal 
lvd...@heritageagenturen.nl

To: users@wicket.apache.org
Sent: Wednesday, August 19, 2009 4:54 PM
Subject: How do I get my DropDownChoice to refresh the list of choices 
with Ajax?



I have a page with a dropdown list on it with authors. If I enter a 
new book I want my fields to be filled based on the ISBN. This works 
just fine. But now I want those fields to be filled with data  I 
collect from the internet, meaning that it isn't always already in my 
database, and therefor the author might not yet be in the list. I 
have already decided to save the new author so I can select it in the 
list, but the list isn't updated, and I can't figure out how to get 
it to update.


Here are some pieces of code I think are relevant:

This is how I create the authorfield:

authorField = new MultiSelectFieldSwitchPanel(authors, 
dataRetriever.fetchAuthors(), new PropertyModel(this, book.authors));



dataRetriever.fetchAuthors return a ListAuthor

Here's the constructor of MultiSelectFieldSwitchPanel which extends 
FormComponentPanel:


public MultiSelectFieldSwitchPanel(final String id, final List? 
extends DomainObject authors, final IModelListAuthor model) {

   super(id, model);
   lmc = new ListMultipleChoice(selectField, new 
PropertyModelListAuthor(this, selectedObjects), authors, new 
ChoiceRendererDomainObject(name, id));

   init(lmc);
}

The init method adds a link to swap the lmc for a textfield where new 
authors can be entered, which is not really relevant in this case.


I have of course already added authorField to the AjaxRequestTarget 
in the behavior that is triggered by updating the ISBN.


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.409 / Virus Database: 270.13.61/2314 - Release Date: 08/19/09 18:06:00


  



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



Re: Newbie question: fileupload AJAX progressbar ?

2009-08-20 Thread Robin Sander


Hi,

I'm using Firefox 3.5.2 and the strange thing is that the live demo  
works (progress bar shows progress)
and the same sources copied into my (wicket 1.4) app do not work  
properly. (no progress shown)


That's why I asked for further requirements on the server side. I'm  
using Glassfish V2, maybe the
container is messing things up? I will try it again with the new  
wicket 1.4.1 and then with Tomcat

as a container...


On 20.08.2009, at 03:58, Ashika Umanga Umagiliya wrote:


Hi Robin,

Are you using Safari , I saw in following threads that its not  
working properly with Safari .


http://www.nabble.com/UploadProgressBar-in-firefox-and-ie6-tp24166616p24205091.html
http://www.nabble.com/UploadProgressBar-does-not-work-in-Safari-browser--to21571997.html#a24322943

Regards

Robin Sander wrote:


I've just copied the example upload page from  
http://www.wicket-library.com/wicket-examples/upload/single
into my application with the same result: upload works but the  
progess bar is NOT updated.


So, anything else needed besides overriding 'newWebRequest()' ?
I'm using wicket, wicket-datetime and wicket-extensions, all in  
version 1.4.0.

Do I need another wicket module? Maybe some kind of wicket-ajax ??



On 19.08.2009, at 12:25, Robin Sander wrote:



Hi,

are there any further requirements? I use Wicket 1.4.0, defined  
'newWebRequest' in
my Application class and though I do see a progress bar and the  
upload works perfectly

I do not see any progress! (the bar never changes)
Is the progress automatically reported by the server side or do I  
have to implement

something or add/modify some Javascript?

Robin.


On 19.08.2009, at 09:19, Stefan Lindner wrote:


Hi Ashika,

I pointed yopu tot he documentation because I was not sure if  
using UploadWebRequest has any side effects. Does not seem so.


Stefan

-Ursprüngliche Nachricht-
Von: Ashika Umanga Umagiliya [mailto:auma...@biggjapan.com]
Gesendet: Mittwoch, 19. August 2009 09:10
An: users@wicket.apache.org
Betreff: Re: Newbie question: fileupload AJAX progressbar ?

Thanks Stefan,

That solved my problem.
Since UploadProgreeBar is a component of 'wicket-extensions', i  
refered
documentation at http://www.wicketframework.org/wicket- 
extensions/ which
is kind of updated (versoin 1.2) . I had to download  
documentation for

1.4 from the maven repository.

Thanks again.

Stefan Lindner wrote:

You need

   @Override
   protected WebRequest newWebRequest(HttpServletRequest  
servletRequest) {

   return new UploadWebRequest(servletRequest);
   }

In your Application's class. I think you should definitly read  
the APIdoc (see UploadProgressBar)!


Stefan

-Ursprüngliche Nachricht-
Von: Ashika Umanga Umagiliya [mailto:auma...@biggjapan.com]
Gesendet: Mittwoch, 19. August 2009 07:17
An: users@wicket.apache.org
Betreff: Newbie question: fileupload AJAX progressbar ?

Greetings all,

I am new to Wicket and I used 'UploadProgressBar' to create an  
AJAX
brogressbar for fileupload.(refered example at wicket- 
library.org )

But when uploading a file, eventhough progreebar showed,theres no
activity nor incrementation of the bar
I have posted my code, what could be the problem?

Thanks in advance.




public class UploadPage extends WebPage {

 ///fileupload form
 private class FileUploadForm extends FormVoid{

 private FileUploadField fileuploadField;
 public FileUploadForm(String name){
 super(name);
 setMultiPart(true);
 add(fileuploadField=new FileUploadField(fileInput));
 setMaxSize(Bytes.gigabytes(4));

 }
 @Override
 protected void onSubmit() {
  final FileUpload upload =  
fileuploadField.getFileUpload();

 if (upload != null)
 {

 File newFile = new File(getUploadFolder(),
upload.getClientFileName());

 try
 {
  newFile.createNewFile();
 upload.writeTo(newFile);

 UploadPage.this.info(saved file:  +
upload.getClientFileName());
 }
 catch (Exception e)
 {
 throw new IllegalStateException(Unable to  
write

file);
 }
 }
 }

 }


 public UploadPage(final PageParameters parameters) {
 final FeedbackPanel uploadFfeedback=new
FeedbackPanel(uploadFeedback);
 add(uploadFfeedback);

 final FileUploadForm fileUploadForm=new
FileUploadForm(ajaxupload);
 fileUploadForm.add(new UploadProgressBar(progress,
fileUploadForm));
 add(fileUploadForm);
 }


 private Folder getUploadFolder(){
 return
((SVRWebApplication)Application.get()).getUploadFolder();
 }


}


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


-
To 

Re: DropDown where (type of model property) != (type of choices)

2009-08-20 Thread eirik.ly...@gmail.com

I tried the code from that blog entry, but I don't think it will work. Or
maybe I'm wrong, but...

First, my understanding is that the code has two different types in the
model object and the choices object. In my case, the model object is a
string; and in any case the choices object will be an ArrayListMap.Entry.

Because of this, during render the ChoiceRenderer is called with different
types:

a) First, it is called with my model object (a string), from
AbstractSingleSelectChoice.getModelValue() 

int index = getChoices().indexOf(object);
return getChoiceRenderer().getIdValue(object, index);
// calls getIdValue(String,int);

b) Later, it is called many times with the Map.Entry-object from
AbstractChoice.appendOptionHtml():

T objectValue = (T)renderer.getDisplayValue(choice);
// calls getDisplayValue(Map.Entry)

It seems to me that it is a fairly hard requirement that the model and the
choice list have identical types. I'll investigate a bit further, to see if
I can build a generic mechanism for both a Map and a bean-style object.



igor.vaynberg wrote:
 
 http://steve-on-sakai.blogspot.com/2008/12/using-hashmap-with-dropdownchoice.html
 
 -igor
 
 On Wed, Aug 19, 2009 at 3:17 PM, Eirik Lygreeirik.ly...@gmail.com wrote:
 I'm looking for the best way to implement a drop-down, where the type of
 the
 model property is not the type of the lists:

 
 

-- 
View this message in context: 
http://www.nabble.com/DropDown-where-%28type-of-model-property%29-%21%3D-%28type-of-choices%29-tp25052893p25058595.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Modal window and SSL

2009-08-20 Thread Eyal Golan
Still have some problems.
we use Wicket 1.3.6
This is the JS for creating the modal:
if (Wicket.Browser.isIELessThan7() ||
!Wicket.Browser.isIE()) {
s+= iframe src='\/\/:' frameborder=\0\
id='+idContent+' allowtransparency=\false\ style=\height: 200px\+
/iframe;
} else {
s+= iframe src='about:blank' frameborder=\0\
id='+idContent+' allowtransparency=\false\ style=\height: 200px\+
/iframe;
}

I changed also the src to 0: without success. (after looking at
WICKET-855https://issues.apache.org/jira/browse/WICKET-855
)

Igor,
there is no call to any resource that is in an http:// path.

Please advice,


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


On Wed, Aug 19, 2009 at 11:49 PM, Eyal Golan egola...@gmail.com wrote:

 Thanks Igor and Peter.Peter,
 we did change the JS that builds the ModalWindow. I'll look into 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


 On Wed, Aug 19, 2009 at 8:56 PM, Peter Ertl pe...@gmx.org wrote:

 I remember this issue begin fixed already:
 https://issues.apache.org/jira/browse/WICKET-855

 did someone change ModalWindow in the meantime?

 Am 19.08.2009 um 17:13 schrieb Igor Vaynberg:


  it just means that you are on a https page but it links to some http
 resources, eg images or javascripts.

 so make sure when you are on a https page all your resources are
 brought in via relative urls and do not start with http://

 one specific example is that you can be on an https page but you
 include an website analytics script via an http url.

 -igor

 On Wed, Aug 19, 2009 at 4:51 AM, Eyal Golanegola...@gmail.com wrote:

 Hello all,
 We are having a problem when we work on an SSL environment.
 Whenever we open a modal popup window, there's this annoying message of
 IE
 that the user is trying to open both secure and non secure content.
 We changed the IE settings and the message is gone.
 But I want to understand what's causing it?

 I googled a bit about it and found some tips on changing the
 IREquestCycleProcessor:
 http://cwiki.apache.org/WICKET/how-to-switch-to-ssl-mode.html
 It this what we should do?

 BTW,
 does anyone know how to run the embedded Jetty with SSL?

 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


 -
 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





Nial Darbey: ClassCast exception when invoking MySession.get() from Maven test phase

2009-08-20 Thread Nial Darbey
Hi everyone,I have subclassed the WebSession class as recommended in Wicket
in Action and I override the public static get() method to return
Session.get() cast to MyWebSession as follows:
public static MyWebSession get() { return (MyWebSession) Session.get(); }

This of course works as expected but when I run my tests from maven against
code which uses this I get a ClassCastException
(org.apache.wicket.protocol.http.WebSession cannot be cast to
org.my.MyWebSession)
I'm guessing this must be a classloader issue.
Has anyone come across this?
Best regards,
Nial Darbey


Re: Nial Darbey: ClassCast exception when invoking MySession.get() from Maven test phase

2009-08-20 Thread Witold Czaplewski
Try

public static MyWebSession get() {
return (MyWebSession) WebSession.get();
}

Witold

Am Thu, 20 Aug 2009 12:09:00 +0200
schrieb Nial Darbey nialdar...@gmail.com:

 Hi everyone,I have subclassed the WebSession class as recommended in
 Wicket in Action and I override the public static get() method to
 return Session.get() cast to MyWebSession as follows:
 public static MyWebSession get() { return (MyWebSession)
 Session.get(); }
 
 This of course works as expected but when I run my tests from maven
 against code which uses this I get a ClassCastException
 (org.apache.wicket.protocol.http.WebSession cannot be cast to
 org.my.MyWebSession)
 I'm guessing this must be a classloader issue.
 Has anyone come across this?
 Best regards,
 Nial Darbey


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



Modal window shows raw HTML content

2009-08-20 Thread Jade
Hi,

 I am trying to add a HTML content into the modal window as string(within a
label component).

 And, its getting added as raw HTML content. Is it usually that way or am I
doing something wrong? Please clarify.

Thanks,
J


Truncating DataTable content

2009-08-20 Thread Linda van der Pal
I thought it would be a cool idea to truncate the data in my table, so 
the data isn't spread over several lines in the table row. It should 
then be possible to read the complete content in a tooltip. After 
digging into the code of the AjaxFallbackDefaultDataTable I found that 
to do this I would have to alter/copy the entire structure, as it seemed 
the code I need to alter is inside AbstractDataGridView.


This seems like an aweful lot of work for such a relatively small 
feature. So my question is, has anybody ever tried this before? And even 
if not, do you have a better idea how to tackle this?


So I want the content of a single field to go from this:

Struts: the
complete
reference

to

Struts: the... (with a tooltip listing the whole title)


Regards,
Linda

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



Prefix URL for skinnable site

2009-08-20 Thread Gianni
I have an app which needs to be skinnable, I know this can be done  
with Session styles but I need the correct skin to display when there  
is no session available e.g. on app entry or page expired ..


I thought the best way to do this would be to prefix every url with  
the skin ID

/context/skin identifier/wicket path, bookmarkable or otherwise
I could then user the skin ID to set the session style and the rest of  
the path would pass through the usual wicket decoding, minus the skin  
id.


Where would be the right place to implement this functionality?
I saw some old posts using WebRequestCodingStrategy urlPrefix() but  
this is no longer present in the api.

http://article.gmane.org/gmane.comp.java.wicket.user/20294

Or maybe I'm better off doing this in a servlet filter before it gets  
to Wicket?

-Gianni

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



Re: Prefix URL for skinnable site

2009-08-20 Thread Michael Mosmann

 Where would be the right place to implement this functionality?

I think, you should use MixedParamUrlCodingStrategy

mm:)



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



Re: Regarding datepicker popup when inputfield pressed

2009-08-20 Thread Troy Cauble
I'm doing this in 1.3.6.
-troy


import org.apache.wicket.extensions.markup.html.form.DateTextField;
import org.apache.wicket.extensions.yui.calendar.DatePicker;

...
DateTextField date = new DateTextField(date, MM/dd/);
date.add(new DatePicker());
form.add(date);


On Thu, Aug 20, 2009 at 7:52 AM, copenhag
copenhagencopenha...@gmail.com wrote:
 Hi,

 Has anyone made it possible to attached an input field to the datepicker,
 so that the calendar popup's when the input field is selected ?

 I have tried, but i could not make it work.

 Also searching did not provide any wicket examples.

 I want the calendar to work as the example in this link:
 http://www.ajaxbestiary.com/2008/10/19/yui-calendar-popup-from-text-input/

 Only difference is i want it to work in a Wicket environment.

 Please assist if anyone can help.

 Best Regards
 Cemil


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



Re: Regarding datepicker popup when inputfield pressed

2009-08-20 Thread copenhag copenhagen
Hi Troy,

Thanks for the swift answer.

I know that you can attach a TextField to a DatePicker, but how would i make
the
calendar popup by just pressing the text field.

As it is now i have to click the calendar icon, but i want to pop the
calendar, by clicking on the field also.

Just as in the example:
http://blog.davglass.com/files/yui/cal2/http://www.ajaxbestiary.com/2008/10/19/yui-calendar-popup-from-text-input/

Best Regards
Cemil

On Thu, Aug 20, 2009 at 2:52 PM, Troy Cauble troycau...@gmail.com wrote:

 I'm doing this in 1.3.6.
 -troy


 import org.apache.wicket.extensions.markup.html.form.DateTextField;
 import org.apache.wicket.extensions.yui.calendar.DatePicker;

 ...
DateTextField date = new DateTextField(date,
 MM/dd/);
date.add(new DatePicker());
form.add(date);


 On Thu, Aug 20, 2009 at 7:52 AM, copenhag
 copenhagencopenha...@gmail.com wrote:
  Hi,
 
  Has anyone made it possible to attached an input field to the datepicker,
  so that the calendar popup's when the input field is selected ?
 
  I have tried, but i could not make it work.
 
  Also searching did not provide any wicket examples.
 
  I want the calendar to work as the example in this link:
 
 http://www.ajaxbestiary.com/2008/10/19/yui-calendar-popup-from-text-input/
 
  Only difference is i want it to work in a Wicket environment.
 
  Please assist if anyone can help.
 
  Best Regards
  Cemil
 

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




Re: Regarding datepicker popup when inputfield pressed

2009-08-20 Thread Eyal Golan
without looking into code, you probably need to add a behavior with onclick
to the text field.
look how it's done in the click on icon.

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


On Thu, Aug 20, 2009 at 4:19 PM, copenhag copenhagen
copenha...@gmail.comwrote:

 Hi Troy,

 Thanks for the swift answer.

 I know that you can attach a TextField to a DatePicker, but how would i
 make
 the
 calendar popup by just pressing the text field.

 As it is now i have to click the calendar icon, but i want to pop the
 calendar, by clicking on the field also.

 Just as in the example:
 http://blog.davglass.com/files/yui/cal2/
 http://www.ajaxbestiary.com/2008/10/19/yui-calendar-popup-from-text-input/
 

 Best Regards
 Cemil

 On Thu, Aug 20, 2009 at 2:52 PM, Troy Cauble troycau...@gmail.com wrote:

  I'm doing this in 1.3.6.
  -troy
 
 
  import org.apache.wicket.extensions.markup.html.form.DateTextField;
  import org.apache.wicket.extensions.yui.calendar.DatePicker;
 
  ...
 DateTextField date = new DateTextField(date,
  MM/dd/);
 date.add(new DatePicker());
 form.add(date);
 
 
  On Thu, Aug 20, 2009 at 7:52 AM, copenhag
  copenhagencopenha...@gmail.com wrote:
   Hi,
  
   Has anyone made it possible to attached an input field to the
 datepicker,
   so that the calendar popup's when the input field is selected ?
  
   I have tried, but i could not make it work.
  
   Also searching did not provide any wicket examples.
  
   I want the calendar to work as the example in this link:
  
 
 http://www.ajaxbestiary.com/2008/10/19/yui-calendar-popup-from-text-input/
  
   Only difference is i want it to work in a Wicket environment.
  
   Please assist if anyone can help.
  
   Best Regards
   Cemil
  
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 



Re: Prefix URL for skinnable site

2009-08-20 Thread Gianni

On 20/ago/09, at 14:47, Michael Mosmann wrote:




Where would be the right place to implement this functionality?


I think, you should use MixedParamUrlCodingStrategy

mm:)


That's only going to work with  bookmarkable pages though.

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



Re: Regarding datepicker popup when inputfield pressed

2009-08-20 Thread copenhag copenhagen
Maybe it's because i am a new Wicket user, but i tried that, without any
luck.

I can't figure out how the calendar is called when clicked on the icon, it's
pretty tricky for me how
it's done.

Best Regards
Cemil

On Thu, Aug 20, 2009 at 3:33 PM, Eyal Golan egola...@gmail.com wrote:

 without looking into code, you probably need to add a behavior with onclick
 to the text field.
 look how it's done in the click on icon.

 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


 On Thu, Aug 20, 2009 at 4:19 PM, copenhag copenhagen
 copenha...@gmail.comwrote:

  Hi Troy,
 
  Thanks for the swift answer.
 
  I know that you can attach a TextField to a DatePicker, but how would i
  make
  the
  calendar popup by just pressing the text field.
 
  As it is now i have to click the calendar icon, but i want to pop the
  calendar, by clicking on the field also.
 
  Just as in the example:
  http://blog.davglass.com/files/yui/cal2/
 
 http://www.ajaxbestiary.com/2008/10/19/yui-calendar-popup-from-text-input/
  
 
  Best Regards
  Cemil
 
  On Thu, Aug 20, 2009 at 2:52 PM, Troy Cauble troycau...@gmail.com
 wrote:
 
   I'm doing this in 1.3.6.
   -troy
  
  
   import org.apache.wicket.extensions.markup.html.form.DateTextField;
   import org.apache.wicket.extensions.yui.calendar.DatePicker;
  
   ...
  DateTextField date = new DateTextField(date,
   MM/dd/);
  date.add(new DatePicker());
  form.add(date);
  
  
   On Thu, Aug 20, 2009 at 7:52 AM, copenhag
   copenhagencopenha...@gmail.com wrote:
Hi,
   
Has anyone made it possible to attached an input field to the
  datepicker,
so that the calendar popup's when the input field is selected ?
   
I have tried, but i could not make it work.
   
Also searching did not provide any wicket examples.
   
I want the calendar to work as the example in this link:
   
  
 
 http://www.ajaxbestiary.com/2008/10/19/yui-calendar-popup-from-text-input/
   
Only difference is i want it to work in a Wicket environment.
   
Please assist if anyone can help.
   
Best Regards
Cemil
   
  
   -
   To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
   For additional commands, e-mail: users-h...@wicket.apache.org
  
  
 



Re: Question about threads inside wicket pages

2009-08-20 Thread Jeremy Thomerson
Right - the session, etc, is available via a ThreadLocal.  So, it's
not available in a new thread.

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




On Wed, Aug 19, 2009 at 11:42 PM, Ashika Umanga
Umagiliyaauma...@biggjapan.com wrote:
 Hi Jeremy,
 I tried to call Page.info() inside the new thread created by axis2client ,
 then it gives the message :
 EXCEPTION        :you can only locate or create sessions in the context of
 a request cycle
 I guess,this means I must change the page data inside the same thread right?

 Thanks in advance,
 umanga


 Jeremy Thomerson wrote:

 I'm not 100% sure, but I'm pretty sure that it would depend on your
 servlet container more than Wicket.  The threads for handling requests
 are spun up by the servlet container before Wicket is ever handed the
 request.  And typically these threads are pooled - so it wouldn't be
 *destroyed*.  But you'll definitely need to do some testing on it to
 be sure.

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




 On Wed, Aug 19, 2009 at 3:03 AM, Ashika Umanga
 Umagiliyaauma...@biggjapan.com wrote:


 Greetings all,

 Please refer to image at :
 http://i26.tinypic.com/11qi6o7.jpg

 I am going to invoke a webservice using Axis2 Client,asynchronically.To
 getback the results, I am using a Callback handler in axis2.

 Within my page, I am going to create the Callback object
 (axisCallbackHandler in picture) and call the axis2client which will
 create
 a seperate thread for async access.
 My concern is that what would happen if the user close the browser while
 still axis2client-thread consuming the service?does the wicket-thread
 get
 destroyed?
 If thats the case,I want to send the results in an email ,if not display
 the
 results in the wicket page.

 Thanks in advance


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




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





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



Re: Prefix URL for skinnable site

2009-08-20 Thread Michael Mosmann
Am Donnerstag, den 20.08.2009, 15:55 +0200 schrieb Gianni:
 On 20/ago/09, at 14:47, Michael Mosmann wrote:
 
 
  Where would be the right place to implement this functionality?
 
  I think, you should use MixedParamUrlCodingStrategy
 
  mm:)
 
 That's only going to work with  bookmarkable pages though.

Ok..
maybe HybridUrlCodingStrategy should help.. 
maybe i missed the point..

mm:)


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



Re: [announce] Wicket 1.4.1

2009-08-20 Thread Jeremy Thomerson
1.4.1 is now available as source in the releases dir.

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




On Thu, Aug 20, 2009 at 2:40 AM, Martin Funkmafulaf...@googlemail.com wrote:
 and leave clean underwear

 don't think Martijn is up for another one of this:
 http://www.nabble.com/SVN-URL-for-Wicket-1.4.0-sources--td24803875.html

 mf

 2009/8/20 Igor Vaynberg igor.vaynb...@gmail.com

 Apache Wicket 1.4.1 Released

 The Apache Wicket project is proud to announce the first maintenance
 release of Apache Wicket 1.4.

 Download Apache Wicket 1.4.1
 -
 You can download the release here:
 http://www.apache.org/dyn/closer.cgi/wicket/1.4.1

 Or use this in your Maven pom's to upgrade to the new version:

 dependency
  groupIdorg.apache.wicket/groupId
  artifactIdwicket/artifactId
  version1.4.1/version
 /dependency

 Changes
 -
 The most notable change in this release is the transparent support for
 multipart form submissions via Ajax. Wicket is now smart enough to
 submit a form using a hidden iframe rather then the standard
 XMLHttpRequest if the form contains file upload fields.

 A complete list of changes can be found in our Jira instance[0].

 --

 We thank you for your patience and support.

 The Wicket Team

 [0]
 https://issues.apache.org/jira/secure/IssueNavigator.jspa?reset=truemode=hidesorter/order=DESCsorter/field=prioritypid=12310561fixfor=12314113

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




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



Re: Regarding datepicker popup when inputfield pressed

2009-08-20 Thread Michael Mosmann
Am Donnerstag, den 20.08.2009, 16:00 +0200 schrieb copenhag copenhagen:
 Maybe it's because i am a new Wicket user, but i tried that, without any
 luck.
 
 I can't figure out how the calendar is called when clicked on the icon, it's
 pretty tricky for me how
 it's done.

IMHO yui is doing some magic stuff...

maybe this will work

DatePicker render something like
---
initStart3 = function() {
 Wicket.DateTime.init( {

---

to header..
where Start3 is the WicketID of the input

you should extend the input tag with
--
onfocus=initStart3.showCalendar()
--

not testet..
mm:)


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



Re: Nial Darbey: ClassCast exception when invoking MySession.get() from Maven test phase

2009-08-20 Thread Igor Vaynberg
are you making wicket tester instantiate your own application class?

-igor

On Thu, Aug 20, 2009 at 3:09 AM, Nial Darbeynialdar...@gmail.com wrote:
 Hi everyone,I have subclassed the WebSession class as recommended in Wicket
 in Action and I override the public static get() method to return
 Session.get() cast to MyWebSession as follows:
 public static MyWebSession get() { return (MyWebSession) Session.get(); }

 This of course works as expected but when I run my tests from maven against
 code which uses this I get a ClassCastException
 (org.apache.wicket.protocol.http.WebSession cannot be cast to
 org.my.MyWebSession)
 I'm guessing this must be a classloader issue.
 Has anyone come across this?
 Best regards,
 Nial Darbey


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



Custom WebSession and bind()

2009-08-20 Thread T Ames
I have read several posts about how to manually bind stateless pages in a
custom WebSession object to the http session.  In my custom WebSession, I
would like to create some objects, but only if and when the WebSession
actually binds as normal when a stateful page is called up.

Is there a method I can do this in?   The bind() method is final, so I
cannot do it there.  I only want to create these objects once just as if
they were in the constructor. I am assuming that the bind() method is only
called once.


Re: Prefix URL for skinnable site

2009-08-20 Thread Igor Vaynberg
as long as you always set the right skin based on whatever it is
(domain name, etc) it will always be used. wicket always creates an
instance of Session object and uses that even if it does not persist
that into http session.

-igor

On Thu, Aug 20, 2009 at 5:25 AM, Giannigdoe6...@yahoo.it wrote:
 I have an app which needs to be skinnable, I know this can be done with
 Session styles but I need the correct skin to display when there is no
 session available e.g. on app entry or page expired ..

 I thought the best way to do this would be to prefix every url with the skin
 ID
 /context/skin identifier/wicket path, bookmarkable or otherwise
 I could then user the skin ID to set the session style and the rest of the
 path would pass through the usual wicket decoding, minus the skin id.

 Where would be the right place to implement this functionality?
 I saw some old posts using WebRequestCodingStrategy urlPrefix() but this is
 no longer present in the api.
 http://article.gmane.org/gmane.comp.java.wicket.user/20294

 Or maybe I'm better off doing this in a servlet filter before it gets to
 Wicket?
 -Gianni

 -
 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



My panel is being rendered twice

2009-08-20 Thread Jeremy Colton
I have a panel which has a form.  The corresponding html has a input element
of type 'submit'.  When clicked the form's onsubmit() method is triggered as
expected.  If i have a business logic exception (eg dependent fields were
not completed) then I call the relevant component's error() method.  The
current page is then reloaded.  But my error panel does not display
anything.  Putting breakpoints in my code revealed that my panel's
onBeforeRender() was being called twice!  Ie the page was being rendered
twice!  Once via WebRequestCycle.redirectTo() and once via
PageRequestTarget.respond().

The 1st time around, my form has error messages attached, but the 2nd time
they are null.

Here is my code:

registrationForm = new Form(registrationForm, new
CompoundPropertyModel(resume)) {

@Override
protected void onBeforeRender() {
// TODO Auto-generated method stub
super.onBeforeRender();
LOGGER.info(rendering resume panel...);
}

@Override
protected void onSubmit() {
if (resume.isJob1() || resume.isJob2() || resume.isJob3()) {


this.info(thanks for your resume);
setResponsePage(BrandedAppHomePage.class);

/* need to remember validation errors from this
request so that the 2nd (AJAX)
 * request can add them back against each component
*/
//collectValidationMessages(this);
this.error(Please select a suitable file to
upload);

} else {
this.error(Please make a job selection);
}

}

/* called when there's a form validaton error */
@Override
protected void onError() {
LOGGER.warn(in onError...);

}

};

add(registrationForm);
add(new FeedbackLabel(validation_form, registrationForm));

job1CheckBox = new CheckBox(job1Choice, new PropertyModel(resume,
job1));
job2CheckBox = new CheckBox(job2Choice, new PropertyModel(resume,
job2));
job3CheckBox = new CheckBox(job3Choice, new PropertyModel(resume,
job3));

registrationForm.add(job1CheckBox);
registrationForm.add(job2CheckBox);
registrationForm.add(job3CheckBox);
}

Could this be somehow facebook-related?  I dont' think the 2nd
PageRequestTarget.respond() should be called.  I don't see it being called
in non-facebook form submits...

Thanks
Jeremy


[announce] wicket 1.4.x branched

2009-08-20 Thread Igor Vaynberg
Wicket 1.4.x has been branched and now lives in
https://svn.apache.org/repos/asf/wicket/branches/wicket-1.4.x
Trunk is now what will become 1.5.0.

Trunk may be broken in the early days of development and contain a lot
of API breaks, so if you are following bleeding edge you may want to
do so on the 1.4.x branch for a while.

-igor

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



Re: Custom WebSession and bind()

2009-08-20 Thread T Ames
Yes, I had done that. I was hoping there may be a more efficient place to do
this since the attach() method appears to be called several times during the
session life-cycle.

Thanks!



On Thu, Aug 20, 2009 at 11:00 AM, Igor Vaynberg igor.vaynb...@gmail.comwrote:

 maybe something like this...

 class mysession {
  Object object;

   attach() {
 super.attach();
 if
 (object==nullgetsessionstore().lookup(requestcycle.get().getrequest())!=null)
 {
   object=...
 }}}

 -igor

 On Thu, Aug 20, 2009 at 7:53 AM, T Amestamesw...@gmail.com wrote:
  I have read several posts about how to manually bind stateless pages in a
  custom WebSession object to the http session.  In my custom WebSession, I
  would like to create some objects, but only if and when the WebSession
  actually binds as normal when a stateful page is called up.
 
  Is there a method I can do this in?   The bind() method is final, so I
  cannot do it there.  I only want to create these objects once just as if
  they were in the constructor. I am assuming that the bind() method is
 only
  called once.
 

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




Re: Custom WebSession and bind()

2009-08-20 Thread Igor Vaynberg
maybe something like this...

class mysession {
  Object object;

   attach() {
 super.attach();
 if 
(object==nullgetsessionstore().lookup(requestcycle.get().getrequest())!=null)
{
   object=...
 }}}

-igor

On Thu, Aug 20, 2009 at 7:53 AM, T Amestamesw...@gmail.com wrote:
 I have read several posts about how to manually bind stateless pages in a
 custom WebSession object to the http session.  In my custom WebSession, I
 would like to create some objects, but only if and when the WebSession
 actually binds as normal when a stateful page is called up.

 Is there a method I can do this in?   The bind() method is final, so I
 cannot do it there.  I only want to create these objects once just as if
 they were in the constructor. I am assuming that the bind() method is only
 called once.


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



Re: Wicket and RSS

2009-08-20 Thread Roman Zechner

you can simply use rome itself, it's easy to use.

-roman

VGJ wrote:

I've got a simple RSS feed I'm trying to display on a page.  Is
wicketstuff-rome dead?  Is there a better way?  I'm not a maven user (not
even familar with it) - so are there any jars I can download somewhere for
wicketstuff-rome, if it's not dead?

Appreciate the help, thanks.

  


--
Liland ...does IT better

Liland IT GmbH
Creative Master
email: roman.zech...@liland.at
http://www.Liland.at 

office: +43 (0)463 220-111  | fax: +43 463 220-111 DW 33 
mobil: +43 (0) 699 122 011 28



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



Re: [announce] Wicket 1.4.1

2009-08-20 Thread Anton Veretennikov
Thank you! Great news!

On Thu, Aug 20, 2009 at 10:14 PM, Jeremy
Thomersonjer...@wickettraining.com wrote:
 1.4.1 is now available as source in the releases dir.

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




 On Thu, Aug 20, 2009 at 2:40 AM, Martin Funkmafulaf...@googlemail.com wrote:
 and leave clean underwear

 don't think Martijn is up for another one of this:
 http://www.nabble.com/SVN-URL-for-Wicket-1.4.0-sources--td24803875.html

 mf

 2009/8/20 Igor Vaynberg igor.vaynb...@gmail.com

 Apache Wicket 1.4.1 Released

 The Apache Wicket project is proud to announce the first maintenance
 release of Apache Wicket 1.4.

 Download Apache Wicket 1.4.1
 -
 You can download the release here:
 http://www.apache.org/dyn/closer.cgi/wicket/1.4.1

 Or use this in your Maven pom's to upgrade to the new version:

 dependency
  groupIdorg.apache.wicket/groupId
  artifactIdwicket/artifactId
  version1.4.1/version
 /dependency

 Changes
 -
 The most notable change in this release is the transparent support for
 multipart form submissions via Ajax. Wicket is now smart enough to
 submit a form using a hidden iframe rather then the standard
 XMLHttpRequest if the form contains file upload fields.

 A complete list of changes can be found in our Jira instance[0].

 --

 We thank you for your patience and support.

 The Wicket Team

 [0]
 https://issues.apache.org/jira/secure/IssueNavigator.jspa?reset=truemode=hidesorter/order=DESCsorter/field=prioritypid=12310561fixfor=12314113

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




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



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



Re: Prefix URL for skinnable site

2009-08-20 Thread Gianni
problem is all skins need to be under the same fqdn so I can't look up  
a skin based on the domain name when no other clues are available,  
which is why I was thinking the only way to do this is a prefix  
parameter before the wicket part of the url.. which I imagine Wicket  
needs to see as part of the servlet context in order for it to work.

-Gianni

On 20/ago/09, at 16:55, Igor Vaynberg wrote:


as long as you always set the right skin based on whatever it is
(domain name, etc) it will always be used. wicket always creates an
instance of Session object and uses that even if it does not persist
that into http session.

-igor

On Thu, Aug 20, 2009 at 5:25 AM, Giannigdoe6...@yahoo.it wrote:
I have an app which needs to be skinnable, I know this can be done  
with
Session styles but I need the correct skin to display when there is  
no

session available e.g. on app entry or page expired ..

I thought the best way to do this would be to prefix every url with  
the skin

ID
/context/skin identifier/wicket path, bookmarkable or otherwise
I could then user the skin ID to set the session style and the rest  
of the

path would pass through the usual wicket decoding, minus the skin id.

Where would be the right place to implement this functionality?
I saw some old posts using WebRequestCodingStrategy urlPrefix() but  
this is

no longer present in the api.
http://article.gmane.org/gmane.comp.java.wicket.user/20294

Or maybe I'm better off doing this in a servlet filter before it  
gets to

Wicket?
-Gianni

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




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




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



Re: Shall we have(embed) a swf in wicket component(Panel or in wicket page).

2009-08-20 Thread nino martinez wael
Fernando remenber that the modal window are built with a div and
javascript so if something does not take that in account it won't
work, it could be something todo with the order of rendering dom.

2009/8/19 Fernando Wermus fernando.wer...@gmail.com:
 You can use SWFObject that is in the wiki. You also can use LightWindow to
 show SWFObject.

 Look for SwfObject Javascript to make it to run and the examples.
 Take care that this panel cannot be put in a modal Window, I tried and
 failed.


 Anyway I pasted below

 public class SWFObject extends AbstractBehavior implements
 IHeaderContributor {

  private static final CompressedResourceReference SWFOBJECT_JS =
      new CompressedResourceReference(SWFObject.class, swfobject-2.1.js);

  private static final long serialVersionUID = 1L;

  private MapString, String parameters = new HashMapString, String();

  private MapString, String attributes = new HashMapString, String();

  private String version;
  private String flashUrl;
  private String width;
  private String height;
  private Component component;

 �...@override
    public void bind(Component component) {
        this.component = component;
        component.setOutputMarkupId(true);
  }

  public void renderHead(IHeaderResponse response) {
    response.renderJavascriptReference(SWFOBJECT_JS);

    final String id = component.getMarkupId();
    String parObj = buildDataObject(getParameters());
    String attObj = buildDataObject(getAttributes());

    // embedSWF: function(swfUrlStr, replaceElemIdStr, widthStr, heightStr,
 swfVersionStr, xiSwfUrlStr, flashvarsObj, parObj, attObj)

    String js = String.format(swfobject.embedSWF('%s','%s', '%s', '%s',
 '%s', '%s', %s, %s );,
        flashUrl, id, width, height, version, expressInstall.swf, parObj,
 attObj);

    response.renderJavascript(js, null);
  }

  /**
   * Construct.
   * p/
   * version can be a string in the format of
 'majorVersion.minorVersion.revision'.
   * An example would be: 6.0.65. Or you can just require the major
 version, such as 6.
   *
   * @param flashUrl        The url of your swf file.
   * @param width           width of swf
   * @param height          height of movie
   * @param version         Flash version to support
   */
  public SWFObject(final String flashUrl, final int width, final int height,
 final String version) {
    this(flashUrl, String.valueOf(width), String.valueOf(height), version);
  }

  /**
   * Construct.
   * @param flashUrl        URL to load up for swf
   * @param width           width of swf
   * @param height          height of movie
   * @param version         Flash version to support
   */
  public SWFObject(final String flashUrl, final String width, final String
 height, final String version) {
    if (flashUrl == null) {
      throw new IllegalArgumentException(Argument [flashUrl] cannot be
 null);
    }
    this.flashUrl = flashUrl;
    this.width = width;
    this.height = height;
    this.version = version;
  }

  private String buildDataObject(MapString,String data) {
    final String quote = ';
    final String comma=,;
    if (data != null  !data.isEmpty()) {
      StringBuilder result = new StringBuilder();
      result.append({);
      for (Map.EntryString, String e : getParameters().entrySet()) {
        result.append(quote).append(e.getKey()).append(quote + : +
 quote).append(e.getValue()).append(quote).append(comma);
      }
      result.deleteCharAt(result.length() - 1);
      result.append(});
      return result.toString();
    }
    return {};
  }

 �...@override
  public void onComponentTag(final Component component, final ComponentTag
 tag) {
  }

  protected MapString, String getParameters() {
    return parameters;
  }

  public void addParameter(String name, String value) {
    parameters.put(name, value);
  }

  protected MapString, String getAttributes() {
    return attributes;
  }

  public void addAttribute(String name, String value) {
    attributes.put(name, value);
  }

 }


 Here is a use of it

 public class PanelforSwf extends Panel implements IResourceListener {

    private static final long serialVersionUID = 14614407827489706L;
    static final ResourceReference SWF_RESOURCE = new
 ResourceReference(PanelPartido.class, stadistic.swf );
    final SWFObject swf;
    private String idInscripcion;

    public PanelForSwf(String id, String width, String height) {
        super(id);
        String swfURL = RequestUtils.toAbsolutePath(
 urlFor(SWF_RESOURCE).toString() );
        add(swf = new SWFObject( swfURL, width, height, 9.0.0));
    }
    public PanelForSwf(String id, IModel modeloInscripcion) {
        this(id,800,500);
    }
     �...@override protected void onBeforeRender() {
        swf.addParameter(param2, someparameter);
        swf.addParameter(param1, someparameter);
        super.onBeforeRender();
      }

    public void onResourceRequested() {

    }

 }



 On Tue, Aug 18, 2009 at 10:41 PM, Gerald Fernando 
 gerald.anto.ferna...@gmail.com wrote:

 

Re: OT: Wicket + Blazeds debugger doesnt stop in breakpoints

2009-08-20 Thread Fernando Wermus
Ryan,
 I follow your article about it. I stripped off the spring part. Because
I dont like spring yet. Anyway, it is the setup according to your article.
It happened to me that the java debug mode works time to time. I cannot
figure it out why some times it doesnt want to stop at the breakpoints.

Any idea?



On Tue, Aug 18, 2009 at 3:44 PM, Ryan Gravener r...@ryangravener.comwrote:

 Check out wicket-flex-blazeds on google code.

 On Tuesday, August 18, 2009, Fernando Wermus fernando.wer...@gmail.com
 wrote:
  Hello all,
I am using jetty to launch my app, which is developed with wicket +
  blazeds. Some days ago I found that the breakpoints I mark in blazeds
  services are useless. I mean the debugger doesn't stop in them. Do you
 have
  any idea what could it be?
 
  I am trying to install wtp just for testing blazeds services with jetty.
 I
  am not happy at all with this aproach. I would like to run/debug with
 jetty
  in only one way.
 
  Thanks in advance.
 
  --
  Fernando Wermus.
 
  http://www.linkedin.com/in/fernandowermus
 

 --
 Ryan Gravener
 http://bit.ly/no_word_docs

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




-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: OT: Wicket + Blazeds debugger doesnt stop in breakpoints

2009-08-20 Thread Fernando Wermus
Ryan,
I realized what's going on. I download a java 1.5 jdk for my project,
but I cant run an applet that my project use. Then I went to java.com to
make applet works. The page installs a jre. Despite all my set up is
pointing to the jdk (m2eclipse, etc), i got this strange behavior. I have to
figure it out how to make the applet work and have just one jre-jdk install.

thanks


On Thu, Aug 20, 2009 at 12:32 PM, Fernando Wermus fernando.wer...@gmail.com
 wrote:

 Ryan,
  I follow your article about it. I stripped off the spring part.
 Because I dont like spring yet. Anyway, it is the setup according to your
 article. It happened to me that the java debug mode works time to time. I
 cannot figure it out why some times it doesnt want to stop at the
 breakpoints.

 Any idea?




 On Tue, Aug 18, 2009 at 3:44 PM, Ryan Gravener r...@ryangravener.comwrote:

 Check out wicket-flex-blazeds on google code.

 On Tuesday, August 18, 2009, Fernando Wermus fernando.wer...@gmail.com
 wrote:
  Hello all,
I am using jetty to launch my app, which is developed with wicket
 +
  blazeds. Some days ago I found that the breakpoints I mark in blazeds
  services are useless. I mean the debugger doesn't stop in them. Do you
 have
  any idea what could it be?
 
  I am trying to install wtp just for testing blazeds services with jetty.
 I
  am not happy at all with this aproach. I would like to run/debug with
 jetty
  in only one way.
 
  Thanks in advance.
 
  --
  Fernando Wermus.
 
  http://www.linkedin.com/in/fernandowermus
 

 --
 Ryan Gravener
 http://bit.ly/no_word_docs

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




 --
 Fernando Wermus.


 www.linkedin.com/in/fernandowermus




-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Wicket Quickstart for Ant

2009-08-20 Thread Christian Beil

Hi all,

I'm currently reading 'Wicket in Action' and I also like the bonus 
chapter where the Wicket QuickStart build script is set up.
Now that I want to try coding some Wicket applications myself, I'd like 
to use Wicket QuickStart.
I saw that the Quickstart project on the homepage uses Maven: 
http://wicket.apache.org/quickstart.html

I tried it out and everything works nicely.
But I don't like Maven very much and  would prefer to use Ant.
The SourceForge page for wicket-quickstart using Ant seems to end with 
version 1.2.7:

http://sourceforge.net/projects/wicket/files/wicket-quickstart/
There is also Qwicket which does a little more than QuickStart.
The most recent version of Qwicket contains an Ant build script and 
seems to use Wicket 1.3.0.


At the moment I would like to use the latest version of Wicket, 1.4, and 
an Ant based QuickStart project.
I can build it myself, but I wanted to ask if the Ant version of the 
QuickStart project is still updated somewhere.



Thanks,

Christian

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



Re: Wicket Quickstart for Ant

2009-08-20 Thread Martijn Dashorst
There's no updated ant version available, though the build.xml should
be compatible, provided you modify the compiler source and target
versions to at least 1.5 compatibility for Wicket 1.4 onwards.

Martijn

On Thu, Aug 20, 2009 at 11:34 PM, Christian Beilchristian.b...@web.de wrote:
 Hi all,

 I'm currently reading 'Wicket in Action' and I also like the bonus chapter
 where the Wicket QuickStart build script is set up.
 Now that I want to try coding some Wicket applications myself, I'd like to
 use Wicket QuickStart.
 I saw that the Quickstart project on the homepage uses Maven:
 http://wicket.apache.org/quickstart.html
 I tried it out and everything works nicely.
 But I don't like Maven very much and  would prefer to use Ant.
 The SourceForge page for wicket-quickstart using Ant seems to end with
 version 1.2.7:
 http://sourceforge.net/projects/wicket/files/wicket-quickstart/
 There is also Qwicket which does a little more than QuickStart.
 The most recent version of Qwicket contains an Ant build script and seems to
 use Wicket 1.3.0.

 At the moment I would like to use the latest version of Wicket, 1.4, and an
 Ant based QuickStart project.
 I can build it myself, but I wanted to ask if the Ant version of the
 QuickStart project is still updated somewhere.


 Thanks,

 Christian

 -
 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



Re: Wicket Quickstart for Ant

2009-08-20 Thread Christian Beil

Ok, then I'll do that.
Thanks for the quick help.
And thanks for WIA by the way :)

Christian



Martijn Dashorst schrieb:

There's no updated ant version available, though the build.xml should
be compatible, provided you modify the compiler source and target
versions to at least 1.5 compatibility for Wicket 1.4 onwards.

Martijn

On Thu, Aug 20, 2009 at 11:34 PM, Christian Beilchristian.b...@web.de wrote:
  

Hi all,

I'm currently reading 'Wicket in Action' and I also like the bonus chapter
where the Wicket QuickStart build script is set up.
Now that I want to try coding some Wicket applications myself, I'd like to
use Wicket QuickStart.
I saw that the Quickstart project on the homepage uses Maven:
http://wicket.apache.org/quickstart.html
I tried it out and everything works nicely.
But I don't like Maven very much and  would prefer to use Ant.
The SourceForge page for wicket-quickstart using Ant seems to end with
version 1.2.7:
http://sourceforge.net/projects/wicket/files/wicket-quickstart/
There is also Qwicket which does a little more than QuickStart.
The most recent version of Qwicket contains an Ant build script and seems to
use Wicket 1.3.0.

At the moment I would like to use the latest version of Wicket, 1.4, and an
Ant based QuickStart project.
I can build it myself, but I wanted to ask if the Ant version of the
QuickStart project is still updated somewhere.


Thanks,

Christian

-
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



using hibernate pojo as model instead of dto

2009-08-20 Thread tubin gen
I am wondering If it is write to use hibernate pojo entities as model
objects for wicket components , or should I create a DTO and use them as
model objects , Is there any disadvantages of using entities POJO's as model
?


Re: using hibernate pojo as model instead of dto

2009-08-20 Thread Mathias Nilsson

You can use entities as models. Just use LoadableDetachableModels to avoid
LazyLoadingExceptions
-- 
View this message in context: 
http://www.nabble.com/using-hibernate-pojo-as-model-instead-of-dto-tp25071549p25072411.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: using hibernate pojo as model instead of dto

2009-08-20 Thread fachhoch

Is this is a good design or using DTO is a good desing ?



Mathias Nilsson wrote:
 
 You can use entities as models. Just use LoadableDetachableModels to avoid
 LazyLoadingExceptions
 

-- 
View this message in context: 
http://www.nabble.com/using-hibernate-pojo-as-model-instead-of-dto-tp25071549p25072993.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: confused about wicket Tree component with panel swapping

2009-08-20 Thread Haulyn R. Jason
can anybody help me? thanks.

On Wed, Aug 19, 2009 at 11:15 PM, Haulyn R. Jason saharab...@gmail.comwrote:

 Hi, all
 I refactor my pages from inheritance to panel swapping with a tree for
 navigation. But I can not make the tree work.

 I add some links like this:
 add(new Link(settingPageLink) {
 @Override
 public void onClick() {
 currentPanel.replaceWith(settingPanel);
 currentPanel = settingPanel;
 }
 });
 these links works well, but the following code does not work:
  Tree tree = new Tree(tree, treeModel) {
 @Override
 protected void onNodeLinkClicked(AjaxRequestTarget target,
 TreeNode node) {
 DefaultMutableTreeNode treeNode = (DefaultMutableTreeNode)
 node;
 NavigationTreeNode navigationTreeNode =
 (NavigationTreeNode) treeNode.getUserObject();
 if (navigationTreeNode.isURL) {
 Panel clickedPanel =
 navigationTreeNode.getClickedPanel();
 currentPanel.replaceWith(clickedPanel);
 currentPanel = clickedPanel;
 } else {
 super.onNodeLinkClicked(target, node);
 }
 }
 };

 I do not know how to make this tree work. Do I  lose something?

 --
 --
 Enjoy. Thanks!

 Haulyn Microproduction

 Mobile: +086-15864011231
 email: saharab...@gmail.com,
  hmp.hau...@foxmail.com
 website: http://haulynjason.net
 gtalk: saharab...@gmail.com
 yahoo: jia_hao...@yahoo.com
 msn: saharab...@gmail.com
 skype: saharabear
 QQ: 378606292

 Haulyn Jason





-- 
--
Enjoy. Thanks!

Haulyn Microproduction

Mobile: +086-15864011231
email: saharab...@gmail.com,
 hmp.hau...@foxmail.com
website: http://haulynjason.net
gtalk: saharab...@gmail.com
yahoo: jia_hao...@yahoo.com
msn: saharab...@gmail.com
skype: saharabear
QQ: 378606292

Haulyn Jason


Re: using hibernate pojo as model instead of dto

2009-08-20 Thread Michael Mosmann
Am Donnerstag, den 20.08.2009, 18:59 -0700 schrieb fachhoch:
 Is this is a good design or using DTO is a good desing ?

it depends.. (IMHO there are only some situations where you can see some
benefit in DTO) ..

but you have to use LoadableDetachableModels or custom Model
implementations to avoid LazyLoadingExceptions

for short:
---
request comes in
  { open session for hibernate in OSV }
  render compontent
ask model for data
  model get it from hibernate with primary key
  render finished
throw temporary data away
  call detach() on model
model clears any reference to the hibernate object
  { close session for hibernate in OSV }
response goes out
---

mm:)

 
 
 Mathias Nilsson wrote:
  
  You can use entities as models. Just use LoadableDetachableModels to avoid
  LazyLoadingExceptions
  
 


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



Re: Shall we have(embed) a swf in wicket component(Panel or in wicket page).

2009-08-20 Thread Gerald Fernando
Hi nino i used the code in following link

http://cwiki.apache.org/WICKET/object-container-adding-flash-to-a-wicket-application.html

 wicket:panel
object wicket:id=swf data=res/test.swf width=700
height=70style=float:
right; margin: 15px 0 0 0;/object
  /wicket:panel

in this code what is meant by data?
my swf is residing in http://localhost:8080/charts/bin/chart.swf which is in
tomcat.

but am workig wicket in Eclipse
shall i provide this link to data=?
I dont know about modal window what is that
give me some detailed Explanation

ThanksRegards,
Gerald A



On Fri, Aug 21, 2009 at 12:52 AM, nino martinez wael 
nino.martinez.w...@gmail.com wrote:

 Fernando remenber that the modal window are built with a div and
 javascript so if something does not take that in account it won't
 work, it could be something todo with the order of rendering dom.

 2009/8/19 Fernando Wermus fernando.wer...@gmail.com:
   You can use SWFObject that is in the wiki. You also can use LightWindow
 to
  show SWFObject.
 
  Look for SwfObject Javascript to make it to run and the examples.
  Take care that this panel cannot be put in a modal Window, I tried and
  failed.
 
 
  Anyway I pasted below
 
  public class SWFObject extends AbstractBehavior implements
  IHeaderContributor {
 
   private static final CompressedResourceReference SWFOBJECT_JS =
   new CompressedResourceReference(SWFObject.class,
 swfobject-2.1.js);
 
   private static final long serialVersionUID = 1L;
 
   private MapString, String parameters = new HashMapString, String();
 
   private MapString, String attributes = new HashMapString, String();
 
   private String version;
   private String flashUrl;
   private String width;
   private String height;
   private Component component;
 
   @Override
 public void bind(Component component) {
 this.component = component;
 component.setOutputMarkupId(true);
   }
 
   public void renderHead(IHeaderResponse response) {
 response.renderJavascriptReference(SWFOBJECT_JS);
 
 final String id = component.getMarkupId();
 String parObj = buildDataObject(getParameters());
 String attObj = buildDataObject(getAttributes());
 
 // embedSWF: function(swfUrlStr, replaceElemIdStr, widthStr,
 heightStr,
  swfVersionStr, xiSwfUrlStr, flashvarsObj, parObj, attObj)
 
 String js = String.format(swfobject.embedSWF('%s','%s', '%s', '%s',
  '%s', '%s', %s, %s );,
 flashUrl, id, width, height, version, expressInstall.swf,
 parObj,
  attObj);
 
 response.renderJavascript(js, null);
   }
 
   /**
* Construct.
* p/
* version can be a string in the format of
  'majorVersion.minorVersion.revision'.
* An example would be: 6.0.65. Or you can just require the major
  version, such as 6.
*
* @param flashUrlThe url of your swf file.
* @param width   width of swf
* @param height  height of movie
* @param version Flash version to support
*/
   public SWFObject(final String flashUrl, final int width, final int
 height,
  final String version) {
 this(flashUrl, String.valueOf(width), String.valueOf(height),
 version);
   }
 
   /**
* Construct.
* @param flashUrlURL to load up for swf
* @param width   width of swf
* @param height  height of movie
* @param version Flash version to support
*/
   public SWFObject(final String flashUrl, final String width, final String
  height, final String version) {
 if (flashUrl == null) {
   throw new IllegalArgumentException(Argument [flashUrl] cannot be
  null);
 }
 this.flashUrl = flashUrl;
 this.width = width;
 this.height = height;
 this.version = version;
   }
 
   private String buildDataObject(MapString,String data) {
 final String quote = ';
 final String comma=,;
 if (data != null  !data.isEmpty()) {
   StringBuilder result = new StringBuilder();
   result.append({);
   for (Map.EntryString, String e : getParameters().entrySet()) {
 result.append(quote).append(e.getKey()).append(quote + : +
  quote).append(e.getValue()).append(quote).append(comma);
   }
   result.deleteCharAt(result.length() - 1);
   result.append(});
   return result.toString();
 }
 return {};
   }
 
   @Override
   public void onComponentTag(final Component component, final ComponentTag
  tag) {
   }
 
   protected MapString, String getParameters() {
 return parameters;
   }
 
   public void addParameter(String name, String value) {
 parameters.put(name, value);
   }
 
   protected MapString, String getAttributes() {
 return attributes;
   }
 
   public void addAttribute(String name, String value) {
 attributes.put(name, value);
   }
 
  }
 
 
  Here is a use of it
 
  public class PanelforSwf extends Panel implements IResourceListener {
 
 private static final long serialVersionUID = 14614407827489706L;
 static final ResourceReference 

what is modal window

2009-08-20 Thread Gerald Fernando
hi friends,
what is modal window what is the difference between this and Panel
what are the uses

ThanksRegards,
Gerald A

-- 
Thanksregards,
Gerald A