Where is code for ActionPanel used in repeater examples?

2008-11-04 Thread palun

Where is the code for ActionPanel used in the examples on
http://wicketstuff.org/wicket13/repeater/?wicket:bookmarkablePage=sources:org.apache.wicket.examples.repeater.Index
?

I'm using Wicket vers. 1.3.4. (Is that the problem?)

Thanks,
/ulf

-- 
View this message in context: 
http://www.nabble.com/Where-is-code-for-ActionPanel-used-in-repeater-examples--tp20319149p20319149.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How do I find the referring page?

2008-10-19 Thread palun

I understand this is not the recommended way to get the referring page:

HttpServletRequest request =
getWebRequestCycle().getWebRequest().getHttpServletRequest();
String referringURL = request.getHeader(Referer);

-- But what then is the recommended way? (Sorry for such an elementary
question. I have searched, but I don´t seem to find it. And now I´m running
out of time..)

Thanks
/ulf

-- 
View this message in context: 
http://www.nabble.com/How-do-I-find-the-referring-page--tp20055273p20055273.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



ant-based example project?

2008-02-22 Thread palun

Hi all,

I just downloaded Wicket 1.3.1 and now I want to use Ant for building my app
and deploying it to Tomcat.  I thought it would be easy to find a good
example of an Ant-based project. But no. Everything seems to be all Maven...  

My question is: Is there a good example of an ant-based wicket project for
wicket-newbies? (If someone has such a project lying around, would you
consider making it available?)  

Many thanks!
/ulf

PS. I love Wicket, it's excellent! But I am afraid many potential users are
probably lost simply due to its tight connection to Maven, and that is a
shame... The point is: Wicket is so easy to use that it is within reach
also for less experienced programmers. -- Why ruin that with Maven? (Just
look at all the threads about Maven-related problems. We should be talking
Wicket here, not Maven. (Ohh, I know I'm in deep now...))


-- 
View this message in context: 
http://www.nabble.com/ant-based-example-project--tp15632894p15632894.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Scrollbar in popup window?

2008-01-30 Thread palun

How do I get vertical scrollbar in a popup window with (too) long content? 
Popup is created like so: 

add(new BookmarkablePageLink(instrLink, InstructionsPopupPage.class,
params).setPopupSettings(popupSettings));

The purpose is to show a rather long information text in a separate window
whenever user clicks an info icon. Content is static html. If anyone has
comments / suggestions on how to best do this from a wicket app, please let
me know. 

Many thanks
/ulf  
-- 
View this message in context: 
http://www.nabble.com/Scrollbar-in-popup-window--tp15182160p15182160.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Scrollbar in popup window?

2008-01-30 Thread palun

That's exactly what I needed! Works fine now. (Should have spotted that one
myself, sorry.)
Thanks.
/ulf

Don't know if this is what you want...

add(new BookmarkablePageLink(instrLink, InstructionsPopupPage.class,
params).setPopupSettings(PopupSettings.SCROLLBARS));



-- 
View this message in context: 
http://www.nabble.com/Scrollbar-in-popup-window--tp15182160p15191400.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



PageParameters mess up my strings

2008-01-22 Thread palun

(I´m sorry if this is the wrong forum for this kind of question. If so,
please direct me.)

Here´s my problem:
I set a page parameter for the page MyPage like this:

PageParameters params = new PageParameters();
params.put(str, åäö);
setResponsePage(MyPage.class, params);

I retrieve the value on MyPage like this:

public BYNPage(PageParameters p) {
add(new Label(test,  + p.getString(str)));
}

div wicket:id=test/

But on MyPage the string is displayed as åäö !!? 

Any idea why? 
(The problem seems to occur only when sending strings via PageParameters.) 

/ulf 


-- 
View this message in context: 
http://www.nabble.com/PageParameters-mess-up-my-strings-tp15030410p15030410.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



popup problem

2008-01-09 Thread palun

Hi all,

I am trying to open a popup window from a page. Code looks like so:

PopupSettings popupSettings = new PopupSettings(PageMap
.forName(popuppagemap)).setHeight(300).setWidth(200);
PageParameters params = new PageParameters();
params.add(header, Answer);
params.add(text, [answer is shown here]);
item.add(new BookmarkablePageLink(popupButtonLink,
MyPopupPage.class, params).setPopupSettings(popupSettings));

The constructor of my popup window looks like:

public MyPopupPage() {
add(new Label(header,(String) getPageParameters().get(header)));
add(new Label(text,(String) getPageParameters().get(text)));
  add(new PopupCloseLink(return));
}

When I run it, the popup window pops up alright, but it displays a
NullPointerException. Apparently getPageParameters() returns null. Anyone
knows why?

(Sorry if this is elementary wicket stuff. I'm a beginner.)

Thanks
/ulf


-- 
View this message in context: 
http://www.nabble.com/popup-problem-tp14710176p14710176.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: popup problem

2008-01-09 Thread palun

But how do I change this part if I want to use a constructor with arguments?

 item.add(new BookmarkablePageLink(popupButtonLink,
 MyPopupPage.class,
 params).setPopupSettings(popupSettings));

/ulf


use the  public MyPopupPage(PageParameters params) constructor

-igor


-- 
View this message in context: 
http://www.nabble.com/popup-problem-tp14710176p14721301.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: popup problem

2008-01-09 Thread palun

WicketMessage: Can't instantiate page using constructor public
com.mycompany.pages.wicketutils.MyPopupPage(org.apache.wicket.PageParameters)
and argument text = [answer...] header = [Answer]

Root cause:

java.lang.ClassCastException: [Ljava.lang.String; cannot be cast to
java.lang.String
at com.mycompany.pages.wicketutils.MyPopupPage.init(MyPopupPage.java:12)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at
org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:154)
at
org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:96)
at org.apache.wicket.request.target.component.BookmarkablePageRequestTa



igor.vaynberg wrote:
 
 huh?
 
 -igor
 
 
 On Jan 9, 2008 12:50 PM, palun [EMAIL PROTECTED] wrote:

 But how do I change this part if I want to use a constructor with
 arguments?

  item.add(new BookmarkablePageLink(popupButtonLink,
  MyPopupPage.class,
  params).setPopupSettings(popupSettings));

 /ulf


 use the  public MyPopupPage(PageParameters params) constructor

 -igor


 --
 View this message in context:
 http://www.nabble.com/popup-problem-tp14710176p14721301.html

 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/popup-problem-tp14710176p14721705.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: popup problem

2008-01-09 Thread palun

That would be the first line in the constructor:

public MyPopupPage(PageParameters params) {
add(new Label(header, (String) params.get(header)));   --- 
line 12
add(new Label(text, (String) params.get(text)));
add(new PopupCloseLink(return));
}

/ulf


igor.vaynberg wrote:
 
 exception is happening in your code...what is on line MyPopupPage.java:12
 ?
 
 -igor
 
 
 On Jan 9, 2008 1:11 PM, palun [EMAIL PROTECTED] wrote:

 WicketMessage: Can't instantiate page using constructor public
 com.mycompany.pages.wicketutils.MyPopupPage(org.apache.wicket.PageParameters)
 and argument text = [answer...] header = [Answer]

 Root cause:

 java.lang.ClassCastException: [Ljava.lang.String; cannot be cast to
 java.lang.String
 at
 com.mycompany.pages.wicketutils.MyPopupPage.init(MyPopupPage.java:12)
 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
 at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
 at
 org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:154)
 at
 org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:96)
 at org.apache.wicket.request.target.component.BookmarkablePageRequestTa




 igor.vaynberg wrote:
 
  huh?
 
  -igor
 
 
  On Jan 9, 2008 12:50 PM, palun [EMAIL PROTECTED] wrote:
 
  But how do I change this part if I want to use a constructor with
  arguments?
 
   item.add(new BookmarkablePageLink(popupButtonLink,
   MyPopupPage.class,
   params).setPopupSettings(popupSettings));
 
  /ulf
 
 
  use the  public MyPopupPage(PageParameters params) constructor
 
  -igor
 
 
  --
  View this message in context:
  http://www.nabble.com/popup-problem-tp14710176p14721301.html
 
  Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

 --
 View this message in context:
 http://www.nabble.com/popup-problem-tp14710176p14721705.html

 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/popup-problem-tp14710176p14722766.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]