Re: [Wicket-user] Howto determine what objects are part of session state

2007-06-12 Thread Eelco Hillenius
On 6/11/07, Ryan [EMAIL PROTECTED] wrote:
 I just found terracotta provides a nice dump of an object graph if it finds
 problems in your clustering configuration. This should work for me however
 if it does not I will definitely take a look at the code you wrote to create
 a wicket session debug tool. Either way I will open a jira issue.

Yeah, forgot about that. Another nice reason to play with Terracotta.

There is also just the debugger btw. Set a breakpoint in
org.apache.wicket.protocol.http.HttpSessionStore#setAttribute(Request,
String, Object) and see what the incoming object holds. The default
store, SecondLevelCacheSessionStore, extends from HttpSessionStore.

Eelco

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


[Wicket-user] nice url for DownloadLink

2007-06-12 Thread Jan Van Besien
Hi all

I have a page with a list of DownloadLinks that allow the user to 
download a bunch of text (csv) files. This works, but clients want to 
access these files with a script, without having to click trough the 
gui. This also works, but the url's that point to the files are somewhat 
cryptic ofcourse.

I know of the feature to mount bookmarkable pages etc to give them nicer 
url's, and now I'm looking for a solution to do something similar for 
DownloadLinks.

Currently on my page the files (e.g. report1.csv, report2.csv, ...) have 
url's like

http://somehost/mycontextroot/?wicket:interface=:1:reports:0:fileLink::ILinkListener
http://somehost/mycontextroot/?wicket:interface=:1:reports:1:fileLink::ILinkListener

I would like this to be something like

http://somehost/mycontextroot/reports/report1.csv
http://somehost/mycontextroot/reports/report2.csv

Thanks in advance
Jan

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


[Wicket-user] Highlight current menu using Generics

2007-06-12 Thread Bruno Borges

I made a post on my blog about how to do a conditional current menu using
Generics and Page Inheritance. Take a look!

http://bborges.blogspot.com/2007/06/wicket-current-menu-with-generics.html

[]'s!
--
Bruno Borges
Summa Technologies Inc.
www.summa-tech.com
(11) 8565-7739
(11) 3055-2060
(48) 8404-1300
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Accessing HttpSession attributes

2007-06-12 Thread Kees de Kooter
Thanks Eelco, this is the kind of solution I was looking for.

Kees

On 6/11/07, Eelco Hillenius [EMAIL PROTECTED] wrote:

 public class MySession extends WebSession {
   ...

   public User getUser() {
 return (User)getAttribute(my.user.key);
   }
   ...
 }


 Eelco


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


Re: [Wicket-user] AjaxFormComponentUpdatingBehavior for DropDownChoice not working in IE

2007-06-12 Thread Javed

Follwing code snippet adds dropdown. 

private DropDownChoice getDropDown1(final Label image){
DropDownChoice dropDown1 = new DropDownChoice(selectUser,new
PropertyModel(model,user1),Arrays.asList(options),choiceRenderer);

favsDropDown.add(new AjaxFormComponentUpdatingBehavior(onchange){

/**
 * When Specified event took place this method gets called
 * @param target
 */
@Override
protected void onUpdate(AjaxRequestTarget target) {
String imageUrl = null;
String user = model.getUser1(); // selected user object from
drop down
imageUrl = getImage(user);
imageUrl = imageUrl == null?  : imageUrl;
model.setImageUrl(imageUrl); // sets new image model 
image.add(new AttributeModifier(src,new
PropertyModel(model,imageUrl))); // sets image src
target.addComponent(image);
}

});

return dropDown1;
}

When dropdown selection changes I need to modify image related to it.



Frank Bille wrote:
 
 Hi
 
 I haven't got experience with that error. Can you please post the code
 that
 is not working?
 
 Frank
 
 
 On 6/11/07, Javed [EMAIL PROTECTED] wrote:


 I need to change image according the selection made in dropdown.
 It is working fine Firefox but not in IE

 I tried it with onchange and onclick. It worked in Firefox but some
 how
 it is not working IE.

 Is there anything I am missing?
 Is there any other approach to achieve the same functionality with Ajax
 effect?

 --
 View this message in context:
 http://www.nabble.com/AjaxFormComponentUpdatingBehavior-for-DropDownChoice-not-working-in-IE-tf3901202.html#a11059387
 Sent from the Wicket - User mailing list archive at Nabble.com.


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

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

-- 
View this message in context: 
http://www.nabble.com/AjaxFormComponentUpdatingBehavior-for-DropDownChoice-not-working-in-IE-tf3901202.html#a11075468
Sent from the Wicket - User mailing list archive at Nabble.com.


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


Re: [Wicket-user] Prototype scoped Spring beans

2007-06-12 Thread Rüdiger Schulz

Here is a post on the spring forum on that matter:
http://forum.springframework.org/showthread.php?t=35968

And one on the myfaces list (JSF has the same problem):
http://mail-archives.apache.org/mod_mbox/myfaces-users/200609.mbox/[EMAIL 
PROTECTED]

What I read there are two ways to go:
1) Convert the bean to a stateless service, and keep the state in another
bean.
2) Make the bean references transient, and re-fetch them manually (i.e.
without DI from spring) after de-serialization.

There is nothing wrong with 1), I use it in other parts of my app. It sure
would be nice to have stateful beans with DI-ed application logic, but 2)
seems very clumsy. However, later in the above thread, someone mentions the
dialog feature of Shale:
http://mail-archives.apache.org/mod_mbox/myfaces-users/200609.mbox/[EMAIL 
PROTECTED]

Maybe something like that could be applied to wicket as well?


2007/6/11, Rüdiger Schulz [EMAIL PROTECTED]:


I read on the wiki that serializing spring beans is a problem because
of injected references. So what I want is something from spring which
it probably cannot give me. But I will try to clear this up on the
spring forum.

2007/6/7, Igor Vaynberg [EMAIL PROTECTED]:
 hrm. you say you will have a serialization problem if you lookup the
bean
 directly and hold on to it. but isnt that exactly what you want? to pull
out
 a prototype bean and keep it inside the form's scope? the form is in
 httpsession and so the bean will be serialized. so if that is what you
want
 to do you have to make sure the bean is serializable and do the lookup
 yourself.

 we can probably add @SpringBean(transient=false) or something like that
to
 keep the reference instead of discarding it, but that wont solve your
 serialization problem, it will just save you doing the lookup yourself.

 so what exactly do you want?

 -igor

 On 6/3/07, Rüdiger Schulz [EMAIL PROTECTED] wrote:
 
  I put a breakpoint in the constructor of my Form, which has the
  @SpringBean annotation on ia property named logic.
 
  Before the super() call, logic is null.
 
  After that, it is set to $Proxy39, with a h-attribute to a
  org.apache.wicket.proxy.LazyInitProxyFactory$JdkHandler. The target
  property of the handler is null.
 
  After the next line, where I call a method from logic, the target
  property is set to the bean instance.
 
  So it seems that the reference gets lost in the first call.
 
 
  But, as you said that the bean is transient anyway, I think that
  prototype beans could not be used that way for holding state of wicket
  components, because that state should certainly also be kept when
  using the back button.
 
  I'm not sure what is best then. I could get a reference to the spring
  bean directly from ApplicationContext, and just keep it. But then I
  would face the problem of serialization.
 
  The best thing would be IMHO if the proxy could somehow do an
  automatic re-lookup from Spring for prototype beans, so that not a new
  instance is fetched from the container, but the same as before. But I
  don't know enough about Spring to say if that is even possible.
 
 
 
  2007/6/3, Eelco Hillenius [EMAIL PROTECTED]:
   I'm not that familiar with the code, but the interesting thing is
that
   LazyInitProxyFactory$JdkHandler does cache the bean it located:
  
   if (target == null)
   {
   target = locator.locateProxyTarget();
   }
   return proxy.invoke(target, args);
  
   The target is a transient member of JdkHandler and judging from the
   code, once the bean is located it should just be reused until the
page
   is serialized/ deserialized (for backbutton support or when
   clustered).
  
   Can you use you debugger to find out what exactly happens?
  
   Eelco
  
   On 6/1/07, Rüdiger Schulz [EMAIL PROTECTED] wrote:
Right, forgot the Stacktraces:
   
The first when calling super():
at KitManagementBean.init(KitManagementBean.java:34)
at
 sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
  Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(
  NativeConstructorAccessorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(
  DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(
Constructor.java
  :513)
at org.springframework.beans.BeanUtils.instantiateClass(
  BeanUtils.java:85)
at
 

org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate
  (SimpleInstantiationStrategy.java:61)
at
 

org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean
  (AbstractAutowireCapableBeanFactory.java:732)
at
 

org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance
  (AbstractAutowireCapableBeanFactory.java:720)
at
 


Re: [Wicket-user] Bug in 1.3? HeaderContributor.forCss(String)

2007-06-12 Thread Gwyn Evans




I don't know, but surely that's not relevent? 

Jeremy's after accessing an 'external' style-sheet in a 'static' folder in a different context
but on the same webserver - the question is, how does he do that in 1.3 without
having to also supply his domain name?

/Gwyn

On Monday, June 4, 2007, 9:09:01 AM, Johan [EMAIL PROTECTED] wrote:







But what about this

my page is in a package org.wicket.
in that page i have this:

foo/bar.css

where does that css resides then?
in
/context/org/wicket//foo/bar.css?
or
/context/foo/bar.css?

I must admit that i don't know exactly how the src urls are interpreted at the moment
(are the all context specific or page/html specific)

becaues if they are page specific how can i then say that they must be context specific?
normally i would do that with / (the root of the webapplication so context must be prepended).

johan



On 6/4/07,Jeremy Thomerson[EMAIL PROTECTED] wrote:
It's what was done in 1.2.6, but no longer in 1.3. 1.3 converts it to a path relative to your context. 

Sorry, my last post was probably confusing. If I put "/foo/bar.css" - foo is NOT my context. My context for the app could be anything (but not foo). Foo would be the root folder off of my domain that I want the request to be sent for. ( i.e..www.mydomain.com/app/SomeWicketPageincludes the style sheet atwww.mydomain.com/foo/bar.css). I do this and pair it with an Apache alias that directs "/foo" to that folder within my webapp so that Apache (not my servlet container) will serve static resources.

As of 1.2.6, it works fine. As of 1.3, I can no longer do that without adding my domain name (add(HeaderContributor.forCss("http://www.mydomain.com/resources/styles/global.css"));), which is NOT desirable - I should not have to add my domain name to be able to add the resource relative to my domain root.

I opened JIRAhttps://issues.apache.org/jira/browse/WICKET-612for this. I will attach a patch to it as soon as I can get my environment set up to work on Wicket.


Jeremy Thomerson


On 6/3/07,Eelco Hillenius[EMAIL PROTECTED] wrote:
 Sort of - but Wicket doesn't have to handle the prepending of it. If I use
 "/foo/bar.css", Wicket should generate my link tag using exactly that
 string, without modifying it in any way.

I actually think this is what we do now. Dunno, should look at it.
However, I think it is a bad idea to hard-code your context patch in
your applications.

Eelco



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









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


[Wicket-user] label - input

2007-06-12 Thread Pieter Cogghe
Hi,

(I'm new to Wicket and relatively new to Java so beware of stupid
questions and bad code)
I've got a form with a text input. I want it rendered like this:

form (...)
(...)
p
  label for=input_nameName/label
  input type=text id=input_name name=name /
/p
(...)
/form

I want to write my own component, so I only have to write this
template html-code:

form wicket:id=input
(...)
p
  input type=text wicket:id=name  /
/p
(...)
/form

The java code to add this to a page (TextFieldWithIdLabel of the
custom component)

add(new TextFieldWithIdLabel(name).setLabel(new Model(Name)));


I'm not sure how to this, I started by extending TextField and
overwriting onTagComponent like this:

protected void onComponentTag(ComponentTag tag){
setOutputMarkupId(true);
super.onComponentTag(tag)
}

This works fine for the input-id, however I'm not sure how I can add
the label tag in front of it. Maybe I should write a custom panel?

Thanks a lot,

Pieter





-- 
Pieter Cogghe
Ganzendries 186
9000 Gent
0487 10 14 21

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


[Wicket-user] Input type=image and relative urls in Wicket 1.3.0-incubating-SNAPSHOT

2007-06-12 Thread Mats Norén
This must have been asked a million times but I couldn't find the right
answer in the list archives.
I've upgraded one of my applications that uses 1.2.3 to 1.3 snapshot.
In the process I got rid of my PrependContextPathFilter since wicket
is supposed to make url:s relative.
It works for everything but my input type=image ...
wicket:id=search  - elements.

Should wicket take care of them as well?

/Regards Mats

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


[Wicket-user] jUnit-testing and not existing images

2007-06-12 Thread Sven Schliesing
Hi,

I just came across the following error:
junit.framework.AssertionFailedError: expected:WebTestPage but 
was:DummyHomePage

To narrow it down I created a simple Testclass with the according html. 
I also added a test case. Here we go:

WebTestPage.java:
-
[...]

public class WebTestPage extends WebPage {

public WebTestPage() {
Model icon;
icon = new Model(gfx/offline.gif);
add(new Image(statusImage, icon));
}

}
-

WebTestPage.html:
-
html
head/head
body
img wicket:id=statusImage border=0 /
/body
/html
-

WebTestPageTest.java:
-
[...]

public class WebTestPageTest {

private WicketTester tester = new WicketTester();

@Test
public void simpleTest() throws Exception {
WebTestPage page = new WebTestPage();
tester.startPage(page);
tester.assertRenderedPage(WebTestPage.class);
}

}
-


The real error in this is: gfx/offline.gif does not exist. If i change 
it to a file that exists everything goes fine.

If I test it in my Tomcat I get a prober 404:

Unable to find package resource [path = default/gfx/offline.gif, style = 
null, locale = en]

I tried to dig into the code to find the reason why the errormessage I 
get with jUnit is so meaningless but didn't get far. Maybe someone of 
you has more knowledge on this part?


Thanks in advance!

Sven

PS: I'm using the following jars:

12. Jun 15:21 wicket-1.3.0-incubating-SNAPSHOT.jar
12. Jun 15:21 wicket-extensions-1.3.0-incubating-SNAPSHOT.jar
12. Jun 15:21 wicket-spring-1.3.0-incubating-SNAPSHOT.jar
12. Jun 15:21 wicket-spring-annot-1.3.0-incubating-SNAPSHOT.jar

As you can see they are fresh as can be (central european time). Maven 
fetches them from http://www.wicketstuff.org/maven/repository/

PPS: Here is the full stack trace:

junit.framework.AssertionFailedError: expected:WebTestPage but 
was:DummyHomePage
at 
org.apache.wicket.util.tester.WicketTester.assertResult(WicketTester.java:499)
at 
org.apache.wicket.util.tester.WicketTester.assertRenderedPage(WicketTester.java:373)
at default.WebTestPageTest.simpleTest(WebTestPageTest.java:16)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at 
org.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunner.java:99)
at 
org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodRunner.java:81)
at 
org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
at 
org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75)
at org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45)
at 
org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:71)
at 
org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35)
at 
org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42)
at 
org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
at org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
at 
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
at 
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)


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


Re: [Wicket-user] label - input

2007-06-12 Thread Pieter Cogghe
I've found SimpleFormComponentLabel in the api, which wasn't listed in
the component reference. With this I get (more or less) what I want.

2007/6/12, Pieter Cogghe [EMAIL PROTECTED]:
 Hi,

 (I'm new to Wicket and relatively new to Java so beware of stupid
 questions and bad code)
 I've got a form with a text input. I want it rendered like this:

 form (...)
 (...)
 p
   label for=input_nameName/label
   input type=text id=input_name name=name /
 /p
 (...)
 /form

 I want to write my own component, so I only have to write this
 template html-code:

 form wicket:id=input
 (...)
 p
   input type=text wicket:id=name  /
 /p
 (...)
 /form

 The java code to add this to a page (TextFieldWithIdLabel of the
 custom component)

 add(new TextFieldWithIdLabel(name).setLabel(new Model(Name)));


 I'm not sure how to this, I started by extending TextField and
 overwriting onTagComponent like this:

 protected void onComponentTag(ComponentTag tag){
 setOutputMarkupId(true);
 super.onComponentTag(tag)
 }

 This works fine for the input-id, however I'm not sure how I can add
 the label tag in front of it. Maybe I should write a custom panel?

 Thanks a lot,

 Pieter





 --
 Pieter Cogghe
 Ganzendries 186
 9000 Gent
 0487 10 14 21



-- 
Pieter Cogghe
Ganzendries 186
9000 Gent
0487 10 14 21

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


Re: [Wicket-user] IDataProvider.size()

2007-06-12 Thread kroekle

If what you want is a pager that doesn't care about the count, implement 
it, either as a separate dataTable-esque component, or by modifying the 
existing one (which I suspect might even get included, if it leave the 
existing implementaiton compatible with existing users of it)

This has been implemented and is about 5 minutes away from being rejected:
https://issues.apache.org/jira/browse/WICKET-579


Johan Karlberg wrote:
 
 If it's only the repeated execution of a count projection that bothers 
 you, what Eelco suggest is likely not caching the data returned by the 
 iterator, it's caching the long returned by size(). It will decrease the 
 accuracy of the pager in favor of performance, and will not contribute 
 to significant increase in memory use.
 
 The interface to IDataProvider does require you to provide a size, but 
 it puts no limitation on how you retrieve that size. If you can 
 construct a query to return the size alongside your resultset, or your 
 datalayer otherwise can provide the count baed on the data query alone, 
 by all means, use it.
 
 If what you want is a pager that doesn't care about the count, implement 
 it, either as a separate dataTable-esque component, or by modifying the 
 existing one (which I suspect might even get included, if it leave the 
 existing implementaiton compatible with existing users of it)
 
 Johan
 
 Lec wrote:
 Eelco,
What i mean is that, you don't necessary have to cache the result
 just do the paging lists. you can directly call the db to query the page
 just like that...
 
 void iterator( int first, int count)
 {
db.getPage( parameter, first, count ).iterator();
 }
 
 int size()
 {
db.getPageCount( parameter );
 }
 
 This approach make heavy db call. Imagine there are 5000 concurrent users
 making the same paging, with no constant data changing at the backend (
 adding or deletion of data ), then the db will be heavy-loaded with
 unnecessary duplication db call - size(). And I realise this is not an
 efficient way of pagination, is it? 
 
 To avoid this problem, you suggested to cache the results or even the
 result
 size, so that subsequently paging call will not trigger the same 
 db.getPageCount( parameter ) or even the db.getPage( parameter, first,
 count
 ).iterator();  Having said that, however, if you look at it, you will
 realise caching is also not an efficient way of doing a paging list,
 considering all the records returned might be a potential big record. And
 if
 these records are stored in a List, the memory of the server will be
 eaten
 away especially when the paging site is heavy loaded with concurrent
 users,
 say 5000 concurrent users are doing the same paging. get me? :)
 
 so what s the most optimized way of doing paging using the IDataProvider? 
 
 
 
 
 
 Eelco Hillenius wrote:
 Why would want to cache the result?
 Look, you have to make a decission. Are you interested in paging lists
 or not? If you are, you should do a count query to determine how many
 rows there are, and then just load the page of results you need with
 another one. If you don't want to use paging, but you want to display
 the whole result set at once, Timo's answer will work fine.

 what happened if the results returned are big
 If the results can be big, use a pageable list. It's the whole point
 of the constructs we have that these components will load just what is
 needed instead of all the results.

 Eelco

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


 
 
 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
If what you want is a pager that doesn't care about the count, implement 
-- 
View this message in context: 
http://www.nabble.com/IDataProvider.size%28%29-tf1317737.html#a11079393
Sent from the Wicket - User mailing list archive at Nabble.com.


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

Re: [Wicket-user] label - input

2007-06-12 Thread Huergo Perez
SimpleFormComponentLabel seems to work for things like input fields, 
etc. It however does not seem to work for radio buttons because a Radio 
button in Wicket is not a FormComponent...

Pieter Cogghe wrote:
 I've found SimpleFormComponentLabel in the api, which wasn't listed in
 the component reference. With this I get (more or less) what I want.

 2007/6/12, Pieter Cogghe [EMAIL PROTECTED]:
   
 Hi,

 (I'm new to Wicket and relatively new to Java so beware of stupid
 questions and bad code)
 I've got a form with a text input. I want it rendered like this:

 form (...)
 (...)
 p
   label for=input_nameName/label
   input type=text id=input_name name=name /
 /p
 (...)
 /form

 I want to write my own component, so I only have to write this
 template html-code:

 form wicket:id=input
 (...)
 p
   input type=text wicket:id=name  /
 /p
 (...)
 /form

 The java code to add this to a page (TextFieldWithIdLabel of the
 custom component)

 add(new TextFieldWithIdLabel(name).setLabel(new Model(Name)));


 I'm not sure how to this, I started by extending TextField and
 overwriting onTagComponent like this:

 protected void onComponentTag(ComponentTag tag){
 setOutputMarkupId(true);
 super.onComponentTag(tag)
 }

 This works fine for the input-id, however I'm not sure how I can add
 the label tag in front of it. Maybe I should write a custom panel?

 Thanks a lot,

 Pieter





 --
 Pieter Cogghe
 Ganzendries 186
 9000 Gent
 0487 10 14 21

 


   


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


[Wicket-user] MultiFileUploadField displays two file upload controls on the screen

2007-06-12 Thread Joshi, Vivek
Hi all,
 
I have a question about the MultiFileUploadField class.
 
Tried to use this class in my code to upload multiple files. The problem
is, on the screen it displays two upload file controls rather than just
one. One of these 2 controls works fine, but the other one is
non-functional.
 
I will appreciate any help on getting rid of the non-functional upload
file control from the screen. 
 
Please find a screenshot of the two controls as visible on the screen
attached with this mail for your reference.
 
The input field in html is :
 
input id=inputFile type=file wicket:id=inputFile/
 
And the java code snippet is:
 
MultiFileUploadField inpFileFld = new MultiFileUploadField(inputFile,
new PropertyModel(this,inputFiles), 10);
where inputFiles is defined as:
CollectionFileUpload inputFiles = null;
and later
form.add(inpFileFld);
 
 
Thanks
 
PS: I'm very new to Wicket. Please forgive if it's too naive a question.
thnx
 
attachment: wicket_multifileupload_scr.JPG-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Problem with request sent with double quotes present in component value [Dropdown option value not being escaped]

2007-06-12 Thread Igor Vaynberg

please open a jira issue.

-igor


On 6/11/07, Swaroop Belur [EMAIL PROTECTED] wrote:



hi igor,

Tested with 1.2.6 and same result. Also had a look at trunk code. Looks
the same.

-swaroop


On 6/11/07, Igor Vaynberg  [EMAIL PROTECTED] wrote:

 why not download 1.2.6 and try yourself? let us know if its fixed or
 not.

 -igor


 On 6/11/07, Swaroop Belur  [EMAIL PROTECTED] wrote:
 
  Hi All
 
  I have a dropdown choice in which I happened to render string values
  for  option value tags.
  So as i have mentioned earlier in this thread, some option values
  were having double quotes in them
  and therefore coming as  in the server side.
 
  I found that by escaping the markup for option values as well in
  AbstractChoice#appendOptionHtml
  i was able to get the value.
 
  Is this scenatio fixed in versions  1.2.4 ?
  If not  is it possible for the wicket team to have a look at this as
  well
 
  -Thanks
  swaroop belur
 
 
 
 
 
  On 6/8/07, Swaroop Belur [EMAIL PROTECTED]  wrote:
  
   Hi All
  
   Wicket 1.2.4
  
   I hava a dropdownchoice with round tip to the server enabled on
   selection change.
  
   The problem is when i select a string which is delimited by double
   quotes, the value comes up as
   an empty string at the server side. The class which initially
   processes is MultipartServletWebRequest .
  
   It appears that  DiskFileItem#get() method returns empty array.
  
   It works properly for single quotes.
  
   How do I overcome this problem. Please help.
  
  
   -Thanks
   swaroop belur
  
  
  
  
  
 
 
  -
  This SF.net email is sponsored by DB2 Express
  Download DB2 Express C - the FREE version of DB2 express and take
  control of your XML. No limits. Just data. Click to get it now.
  http://sourceforge.net/powerbar/db2/
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 


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



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


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


Re: [Wicket-user] nice url for DownloadLink

2007-06-12 Thread Igor Vaynberg

you need to create a shared resource that lets you stream those files and
mount that. then create a link component that generates href with
urlfor(resourcereference)+/report1.csv; or something like that.

-igor


On 6/11/07, Jan Van Besien [EMAIL PROTECTED] wrote:


Hi all

I have a page with a list of DownloadLinks that allow the user to
download a bunch of text (csv) files. This works, but clients want to
access these files with a script, without having to click trough the
gui. This also works, but the url's that point to the files are somewhat
cryptic ofcourse.

I know of the feature to mount bookmarkable pages etc to give them nicer
url's, and now I'm looking for a solution to do something similar for
DownloadLinks.

Currently on my page the files (e.g. report1.csv, report2.csv, ...) have
url's like


http://somehost/mycontextroot/?wicket:interface=:1:reports:0:fileLink::ILinkListener

http://somehost/mycontextroot/?wicket:interface=:1:reports:1:fileLink::ILinkListener

I would like this to be something like

http://somehost/mycontextroot/reports/report1.csv
http://somehost/mycontextroot/reports/report2.csv

Thanks in advance
Jan

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

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


Re: [Wicket-user] AjaxSubmitButton changing Button's Name/Displayed Text/etc

2007-06-12 Thread Francisco Diaz Trepat - gmail

Sorry, right. _ Wicket Version 1.2.5 thanks Jean Baptiste.

f(t)

On 6/11/07, Jean-Baptiste Quenot [EMAIL PROTECTED] wrote:


* Francisco Diaz Trepat - gmail:

 Anybody knows how to change the displayed name of an AjaxSubmitButton?

 I just tried to do a .setMode(new ResourceModel(bla bla But it
didn't
 work.


 I have an input:

 input type=submit value=create wicket:id=createButton

Please always mention the version of Wicket you are using.

In Wicket 1.3, this is supposed to work.  Set a breakpoint in
Button#onComponentTag() on the line tag.put(value, value);

Best regards,
--
 Jean-Baptiste Quenot
aka  John Banana   Qwerty
http://caraldi.com/jbq/

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

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


Re: [Wicket-user] AjaxSubmitButton changing Button's Name/Displayed Text/etc

2007-06-12 Thread Francisco Diaz Trepat - gmail

One more thing. Do I get version 1.3 through the svn?

How long to the beta 2 in the incubator?

f(t)

On 6/11/07, Jean-Baptiste Quenot [EMAIL PROTECTED] wrote:


* Francisco Diaz Trepat - gmail:

 Anybody knows how to change the displayed name of an AjaxSubmitButton?

 I just tried to do a .setMode(new ResourceModel(bla bla But it
didn't
 work.


 I have an input:

 input type=submit value=create wicket:id=createButton

Please always mention the version of Wicket you are using.

In Wicket 1.3, this is supposed to work.  Set a breakpoint in
Button#onComponentTag() on the line tag.put(value, value);

Best regards,
--
 Jean-Baptiste Quenot
aka  John Banana   Qwerty
http://caraldi.com/jbq/

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

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


Re: [Wicket-user] MultiFileUploadField displays two file upload controls on the screen

2007-06-12 Thread Igor Vaynberg

try to change input id=inputFile type=file wicket:id=inputFile/ to
just div wicket:id=inputFile

-igor


On 6/12/07, Joshi, Vivek [EMAIL PROTECTED] wrote:


 Hi all,

I have a question about the MultiFileUploadField class.

Tried to use this class in my code to upload multiple files. The problem
is, on the screen it displays two upload file controls rather than just one.
One of these 2 controls works fine, but the other one is non-functional.

I will appreciate any help on getting rid of the non-functional upload
file control from the screen.

Please find a screenshot of the two controls as visible on the screen
attached with this mail for your reference.

The input field in html is :

input id=inputFile type=file wicket:id=inputFile/

And the java code snippet is:

MultiFileUploadField inpFileFld = *new* MultiFileUploadField(inputFile,
*new* PropertyModel(*this*,inputFiles), 10);
where inputFiles is defined as:
CollectionFileUpload inputFiles = *null*;
and later
form.add(inpFileFld);


Thanks

PS: I'm very new to Wicket. Please forgive if it's too naive a question.
thnx


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



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


Re: [Wicket-user] IDataProvider.size()

2007-06-12 Thread Al Maw
kroekle wrote:
 If what you want is a pager that doesn't care about the count, implement 
 it, either as a separate dataTable-esque component, or by modifying the 
 existing one (which I suspect might even get included, if it leave the 
 existing implementaiton compatible with existing users of it)
 
 This has been implemented and is about 5 minutes away from being rejected:
 https://issues.apache.org/jira/browse/WICKET-579

I rather think he doesn't want that, as he'd actually like an accurate 
list of all the page numbers, not just a next link.

Lec: If I'm incorrect and you just want a next page link plus links to 
pages previous to the one you're on, rather than an actual list of all 
the pages available, please go and comment/vote on the above bug.

I think we've done this to death now...

Best regards,

Al
-- 
Alastair Maw
Wicket-biased blog at http://herebebeasties.com

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


Re: [Wicket-user] Input type=image and relative urls in Wicket 1.3.0-incubating-SNAPSHOT

2007-06-12 Thread Al Maw
Mats Norén wrote:
 This must have been asked a million times but I couldn't find the right
 answer in the list archives.

I think it's only been asked once, actually. ;-)

 I've upgraded one of my applications that uses 1.2.3 to 1.3 snapshot.
 In the process I got rid of my PrependContextPathFilter since wicket
 is supposed to make url:s relative.
 It works for everything but my input type=image ...
 wicket:id=search  - elements.
 
 Should wicket take care of them as well?

The issue is that the relative URL prepender only acts on things that 
are not Wicket components. You have a wicket:id in there, so it leaves 
things alone.

What component are you using for the input? There's an ImageButton 
component, which expects a WebResource, or a ResourceReference.

I've just added an org.apache.wicket.resource.ContextRelativeResource, 
which you can use for this.

I guess if you use a Button component, maybe it should rewrite the src 
attribute for you automatically, provided you don't have an attribute 
modifier attached. If you'd like this functionality, please open a JIRA 
issue.

Best regards,

Al

-- 
Alastair Maw
Wicket-biased blog at http://herebebeasties.com

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


Re: [Wicket-user] Accessing HttpSession attributes

2007-06-12 Thread Thomas R. Corbin
On Monday 11 June 2007 3:58 pm, Eelco Hillenius escreveu:
  I would like to access HttpSession attributes from a wicket WebSession
  object. Is this possible?
 
  To be specific my WebSession subclass has a getUser() method. This
  user is stored as the session variable user.

 Note that (Web)Session is an abstraction. If your session store backs
 on HttpSession (like the default implementation does), you can provide
 your own session object, and let that call super.get/setAttribute.

 public class MySession extends WebSession {
   ...

   public User getUser() {
 return (User)getAttribute(my.user.key);
   }
   ...
 }

But doesn't the SessionStore.getAttribute turn that into

httpSession.getAttribute(getSessionAttributePrefix(webRequest) + name)

In HttpSessionStore getSessionAttributePrefix looks like:

 wicket: + servletPath + :

So if the old skool app puts my.user.key into it's session, wicket
will be looking up  wicket:servletPath:my.user.key and won't
find anything?

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


Re: [Wicket-user] nice url for DownloadLink

2007-06-12 Thread Jean-Baptiste Quenot
* Jan Van Besien:
 
 Currently on my page the files (e.g. report1.csv, report2.csv, ...) have 
 url's like
 
 http://somehost/mycontextroot/?wicket:interface=:1:reports:0:fileLink::ILinkListener
 http://somehost/mycontextroot/?wicket:interface=:1:reports:1:fileLink::ILinkListener
 
 I would like this to be something like
 
 http://somehost/mycontextroot/reports/report1.csv
 http://somehost/mycontextroot/reports/report2.csv

Hello Jan,

If I were you I would look at the static pages examples:

http://wicketstuff.org/wicket13/staticpages/

If you have trouble using it, please follow-up, I'll be glad to
help.
-- 
 Jean-Baptiste Quenot
aka  John Banana   Qwerty
http://caraldi.com/jbq/

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


Re: [Wicket-user] Accessing HttpSession attributes

2007-06-12 Thread Eelco Hillenius
 But doesn't the SessionStore.getAttribute turn that into

 httpSession.getAttribute(getSessionAttributePrefix(webRequest) + name)

 In HttpSessionStore getSessionAttributePrefix looks like:

  wicket: + servletPath + :

 So if the old skool app puts my.user.key into it's session, wicket
 will be looking up  wicket:servletPath:my.user.key and won't
 find anything?

Yes, indeed it does. Good catch. So you do need to get to the
httpsession directly after all. Which I guess is a bit safer.

Eelco

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


Re: [Wicket-user] nice url for DownloadLink

2007-06-12 Thread Jan Van Besien
Jean-Baptiste Quenot wrote:
 * Jan Van Besien:
 If I were you I would look at the static pages examples:
 
 http://wicketstuff.org/wicket13/staticpages/

Looks promising indeed, but unfortunattely seems to be wicket 1.3 
features. I'm using latest stable 1.2.6, and will need to verify if 1.3 
is an option (not in public maven repository?).

Will also have a look at the shared resources suggestion...

thnx
Jan

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


Re: [Wicket-user] nice url for DownloadLink

2007-06-12 Thread Jean-Baptiste Quenot
* Jan Van Besien:

 Jean-Baptiste Quenot wrote:

  If I were you I would look at the static pages examples:
 
  http://wicketstuff.org/wicket13/staticpages/

 Looks promising  indeed, but  unfortunattely seems to  be wicket
 1.3 features. I'm  using latest stable  1.2.6, and will  need to
 verify if 1.3 is an option (not in public maven repository?).

The concepts described in the static pages examples are the same
in 1.2.6.  You would just have to copy
URIRequestTargetUrlCodingStrategy in your project, it is
compatible with 1.2.6.
-- 
 Jean-Baptiste Quenot
aka  John Banana   Qwerty
http://caraldi.com/jbq/

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


[Wicket-user] Evaluating Wicket

2007-06-12 Thread Patrick Angeles

We're up to the prototyping phase of a new JEE application. We are looking at
EJB3 + some UI framework. There's actually two types of UI: a complex admin
UI with around 100 concurrent users, and several public-facing, CMS-driven,
branded web-sites with 1000s of concurrent users. Obviously, we'd prefer to
use the same UI framework for both, but would need to take performance into
account.

I would love to use a component based framework for the admin UI. This
leaves us with: JSF, Tapestry, Wicket, GWT... perhaps even SWT deployed via
Java WebStart. The SWT solution is a bit risky, as we'd have to contend with
corporate firewalls and basically come up with some HTTP tunneling solution
(JAX-WS?). GWT is intriguing, but not an option for the CMS-driven
front-end. Tapestry hasn't even entered into my mindshare, but I'm leery
based on their track record of breaking backward-compatibility. This leaves
us with Wicket and JSF. I've played with both technologies (v1.2.4 of
Wicket), and JSF just scares me. I've used Facelets and Seam with JSF. We
cannot take advantage of Seam because of the tiered architecture of our
application (separate presentation and service clusters).

So there's Wicket. Right now, I have the following reservations with Wicket:
- Dates. When will 1.3 be released? How about 1.4?
- Documentation. There's not one coherent document for 1.3... the Wiki is
littered with bits of wisdom, but it's hard to tell what techniques work
with or are obsoleted by version 1.3...
- Books. When are the books coming out?
- CMS... as I've said, the front-end is CMS driven, and because of load, I'd
like to keep things stateless as much as possible (altho, all bets are off
when the user logs in). I haven't yet found a good description of how 1.3
handles session state. I'd also like to know if I can mount bookmarkable
pages dynamically... say if someone were to create and publish a new CMS
page from the admin app.

I like what I've seen of Wicket so far, and I would love to deploy the first
enterprise-class application running Wicket, but I need some advice to get
rid of the butterflies in my stomach.

Regards,

- P
-- 
View this message in context: 
http://www.nabble.com/Evaluating-Wicket-tf3909204.html#a11084242
Sent from the Wicket - User mailing list archive at Nabble.com.


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


Re: [Wicket-user] Bug in 1.3? HeaderContributor.forCss(String)

2007-06-12 Thread Jeremy Thomerson

I'm using the latest build for some sites, and 1.2.6 for others.  In the
latest build (I build locally from SVN) of 1.3-INCUBATING, they have applied
my patch that now allows you to say
add(HeaderContributor.forCss(/resources/css/global.css));
It starts with a slash, so is output as link
src=/resources/css/global.css, which is the same way that 1.2.6 works /
worked.

Then, I have this in my Apache config:

   Alias /resources C:\path to context\src\main\webapp\resources

So, now the src=/resources/css/global.css resolves to 
http://www.texashuntfish.com/resources/css/global.css; (the root of your
domain), which Apache realized is found at C:\path to
context\src\main\webapp\resources\css\global.css.

It's served by Apache, an awesome server, and never has to hit my servlet
container.  You could apply all kinds of Apache rules to take advantage of
this, clustering static resource servers, etc.

Let me know if anyone else needs assistance in this.

Jeremy Thomerson


On 6/12/07, Gwyn Evans [EMAIL PROTECTED] wrote:


 I don't know, but surely that's not relevent?


Jeremy's after accessing an 'external' style-sheet in a 'static' folder in
a different context
but on the same webserver - the question is, how does he do that in 1.3without
having to also supply his domain name?


/Gwyn


On Monday, June 4, 2007, 9:09:01 AM, Johan [EMAIL PROTECTED] wrote:


  

But what about this


my page is in a package org.wicket.

in that page i have this:


foo/bar.css


where does that css resides then?

in

/context/org/wicket//foo/bar.css?

or

/context/foo/bar.css?


I must admit that i don't know exactly how the src urls are interpreted at
the moment

(are the all context specific or page/html specific)


becaues if they are page specific how can i then say that they must be
context specific?

normally i would do that with / (the root of the webapplication so context
must be prepended).


johan




On 6/4/07, Jeremy Thomerson  [EMAIL PROTECTED][EMAIL PROTECTED]
wrote:

It's what was done in 1.2.6, but no longer in 1.3.  1.3 converts it to a
path relative to your context.


Sorry, my last post was probably confusing.  If I put /foo/bar.css - foo
is NOT my context.  My context for the app could be anything (but not foo).
 Foo would be the root folder off of my domain that I want the request to be
sent for.  ( i.e.. www.mydomain.com/app/SomeWicketPage includes the style
sheet at www.mydomain.com/foo/bar.css).  I do this and pair it with an
Apache alias that directs /foo to that folder within my webapp so that
Apache (not my servlet container) will serve static resources.


As of 1.2.6, it works fine.  As of 1.3, I can no longer do that without
adding my domain name ( add(HeaderContributor.forCss(
http://www.mydomain.com/resources/styles/global.css )); ), which is NOT
desirable - I should not have to add my domain name to be able to add the
resource relative to my domain root.


I opened JIRA https://issues.apache.org/jira/browse/WICKET-612 for this.
 I will attach a patch to it as soon as I can get my environment set up to
work on Wicket.



Jeremy Thomerson



On 6/3/07, Eelco Hillenius  [EMAIL PROTECTED][EMAIL PROTECTED]
wrote:

 Sort of - but Wicket doesn't have to handle the prepending of it.  If I
use

 /foo/bar.css, Wicket should generate my link tag using exactly that

 string, without modifying it in any way.


I actually think this is what we do now. Dunno, should look at it.

However, I think it is a bad idea to hard-code your context patch in

your applications.


Eelco




-

This SF.net email is sponsored by DB2 Express

Download DB2 Express C - the FREE version of DB2 express and take

control of your XML. No limits. Just data. Click to get it now.

http://sourceforge.net/powerbar/db2/

___

Wicket-user mailing list

Wicket-user@lists.sourceforge.net

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



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


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


Re: [Wicket-user] AjaxSubmitButton changing Button's Name/Displayed Text/etc

2007-06-12 Thread Timo Rantalaiho
On Tue, 12 Jun 2007, Francisco Diaz Trepat - gmail wrote:
 One more thing. Do I get version 1.3 through the svn?

Or

  http://www.wicketstuff.org/maven/repository/org/apache/wicket/wicket-jdk14/

(examples one level above)

- Timo

-- 
Timo Rantalaiho  
Reaktor Innovations OyURL: http://www.ri.fi/ 

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


Re: [Wicket-user] AjaxSubmitButton changing Button's Name/Displayed Text/etc

2007-06-12 Thread Francisco Diaz Trepat - gmail

thanks,
f(t)

On 6/12/07, Timo Rantalaiho [EMAIL PROTECTED] wrote:


On Tue, 12 Jun 2007, Francisco Diaz Trepat - gmail wrote:
 One more thing. Do I get version 1.3 through the svn?

Or

  http://www.wicketstuff.org/maven/repository/org/apache
/wicket/wicket-jdk14/

(examples one level above)

- Timo


--
Timo Rantalaiho
Reaktor Innovations OyURL: http://www.ri.fi/ 

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

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


Re: [Wicket-user] nice url for DownloadLink

2007-06-12 Thread Maurice Marrink
wicket 1.3 is available if you include the following in your
repositories tag of maven 2 pom.xml

repository
idwicket-snaps/id
urlhttp://wicketstuff.org/maven/repository/url
snapshots
enabledtrue/enabled
/snapshots
releases
enabledfalse/enabled
/releases
/repository

Maurice

On 6/12/07, Jean-Baptiste Quenot [EMAIL PROTECTED] wrote:
 * Jan Van Besien:

  Jean-Baptiste Quenot wrote:
 
   If I were you I would look at the static pages examples:
  
   http://wicketstuff.org/wicket13/staticpages/
 
  Looks promising  indeed, but  unfortunattely seems to  be wicket
  1.3 features. I'm  using latest stable  1.2.6, and will  need to
  verify if 1.3 is an option (not in public maven repository?).

 The concepts described in the static pages examples are the same
 in 1.2.6.  You would just have to copy
 URIRequestTargetUrlCodingStrategy in your project, it is
 compatible with 1.2.6.
 --
  Jean-Baptiste Quenot
 aka  John Banana   Qwerty
 http://caraldi.com/jbq/

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


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


Voc� recebeu uma Charge

2007-06-12 Thread Charges . com . br
Title: Cartao Virtual - Charges.com.br





  
  

  


  

  
  

  


  


  
  
 
  
Olá, Você é 
  muito especial para mim
  Uma pessoa 
  que te ama visitou o site Charges.com.br 
  e enviou-lhe um cartão.
  Foi detectado por 
  nosso sistema que a versão de seu plugin flash 
  está desatualizada, por favor clique 
  aqui e atualize, após a atualização, o seu 
  cartão virtual irá abrir 
  automaticamente.
  Para lê-lo, siga os 
  procedimentos: 
  1. Atualize seu 
  plugin flash clicando 
  aqui.2. Faça o download e execute o plugin 
  flash.3. Após concluir a instalação o site vai 
  abrir automaticamente.4. Insira o código 
  F1n1vXwFibQ75o-1782247 
  no campo correspondente.5. Clique em 
  Visualizar cartão.
  Este cartão estará 
  disponível por 30 dias.
  Não se esqueça de 
  retribuir o cartão que Te Adoro 
  enviou para você. O Charges.com.br terá o maior 
  prazer em entregar os seus cartões.
  Um abraço,
  Charges.com.br
  
 


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


Re: [Wicket-user] Evaluating Wicket

2007-06-12 Thread Igor Vaynberg

two students, who were new to wicket, put together a wicket based cms. it is
in wicket-stuff and is called kronos. no need to get gray hair, its probably
a good starting point for building your own.

-igor


On 6/12/07, Francis Amanfo [EMAIL PROTECTED] wrote:


Hi Patrick,

On 6/12/07, Patrick Angeles [EMAIL PROTECTED] wrote:


 I'd also like to know if I can mount bookmarkable
 pages dynamically... say if someone were to create and publish a new CMS
 page from the admin app.


This is a very good question. With Wicket requiring a corresponding Java
class for any dynamic page, this could get tricky. I was faced with a
similar dilema 2 years ago when I was using Wicket for a medium sized
project. Fortunately for me, they decided to drop the CMS for some other
reason not relating to Wicket and could hence save my dark hair. Otherwise I
might have gotten gray hair by now :-)

--
 View this message in context:
 http://www.nabble.com/Evaluating-Wicket-tf3909204.html#a11084242
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -

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




--
Beware of bugs in the above code;
I have only proved it correct, not tried it.
-Donald Knuth
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


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


Re: [Wicket-user] Evaluating Wicket

2007-06-12 Thread Igor Vaynberg

On 6/12/07, Patrick Angeles [EMAIL PROTECTED] wrote:
snip - others can answer those better/



So there's Wicket. Right now, I have the following reservations with
Wicket:
- CMS... as I've said, the front-end is CMS driven, and because of load,
I'd
like to keep things stateless as much as possible (altho, all bets are off
when the user logs in). I haven't yet found a good description of how 1.3
handles session state. I'd also like to know if I can mount bookmarkable
pages dynamically... say if someone were to create and publish a new CMS
page from the admin app.




the way mounting works is that wicket will try to match the longest prefix
of the path possible,
so lets say you have two mounts

/books and /books/archive

you hit a url /books/archive/foo/bar - that will match /books/archive mount
and give you the unmatched part of the path (foo and bar) as parameters
then you hit /books/23223 - that wil match /books and give you 23223 as
parameters

so for a cms you would mount the cms handler page on lets say /pages

then when a user hits /pages/bob/welcome your cms handler page will get
invoked and it will be able to retrieve the page path as a parameter
(bob/welcome) and display the proper content.

I like what I've seen of Wicket so far, and I would love to deploy the first

enterprise-class application running Wicket, but I need some advice to get
rid of the butterflies in my stomach.



you will be far from the first :)

-igor

Regards,


- P
--
View this message in context:
http://www.nabble.com/Evaluating-Wicket-tf3909204.html#a11084242
Sent from the Wicket - User mailing list archive at Nabble.com.


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

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


Re: [Wicket-user] Evaluating Wicket

2007-06-12 Thread Eelco Hillenius
On 6/12/07, Patrick Angeles [EMAIL PROTECTED] wrote:
 I'm not that deep into Wicket yet, but my idea was that there would be Java
 classes that represent various page templates and panels. The component tree
 could be dynamically built using metadata from a DB. So the URL would
 basically invoke a Page class which looks up an entry in the database
 corresponding to that URL. This entry will have associated CMS metadata that
 instructs the page on how to build its component tree.

Yep, that should work. Encapsulate everything that can only be known
at runtime in panels, and you can build your component tree completely
dynamically.

if (foo) { add(new TextFieldPanel(id); } else { add(new
GridEditorPanel(id); } etc

Eelco

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


Re: [Wicket-user] Evaluating Wicket

2007-06-12 Thread Maurice Marrink
It is at 
https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/branches/WICKET_1_2/wicket-kronos-cms
to be precise.

Ted maybe you can refresh our memory about kronos again :)

Maurice

On 6/12/07, Igor Vaynberg [EMAIL PROTECTED] wrote:
 two students, who were new to wicket, put together a wicket based cms. it is
 in wicket-stuff and is called kronos. no need to get gray hair, its probably
 a good starting point for building your own.

 -igor



 On 6/12/07, Francis Amanfo [EMAIL PROTECTED] wrote:
 
  Hi Patrick,
 
 
  On 6/12/07, Patrick Angeles  [EMAIL PROTECTED] wrote:
  
   I'd also like to know if I can mount bookmarkable
   pages dynamically... say if someone were to create and publish a new CMS
   page from the admin app.
 
 
  This is a very good question. With Wicket requiring a corresponding Java
 class for any dynamic page, this could get tricky. I was faced with a
 similar dilema 2 years ago when I was using Wicket for a medium sized
 project. Fortunately for me, they decided to drop the CMS for some other
 reason not relating to Wicket and could hence save my dark hair. Otherwise I
 might have gotten gray hair by now :-)
 
 
   --
   View this message in context:
 http://www.nabble.com/Evaluating-Wicket-tf3909204.html#a11084242
   Sent from the Wicket - User mailing list archive at Nabble.com.
  
  
  
 -
   This SF.net email is sponsored by DB2 Express
   Download DB2 Express C - the FREE version of DB2 express and take
   control of your XML. No limits. Just data. Click to get it now.
   http://sourceforge.net/powerbar/db2/
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
  
 https://lists.sourceforge.net/lists/listinfo/wicket-user
  
 
 
 
  --
  Beware of bugs in the above code;
  I have only proved it correct, not tried it.
  -Donald Knuth
 
 -
  This SF.net email is sponsored by DB2 Express
  Download DB2 Express C - the FREE version of DB2 express and take
  control of your XML. No limits. Just data. Click to get it now.
  http://sourceforge.net/powerbar/db2/
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 


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



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


Re: [Wicket-user] Evaluating Wicket

2007-06-12 Thread Eelco Hillenius
 So there's Wicket. Right now, I have the following reservations with Wicket:
 - Dates. When will 1.3 be released? How about 1.4?

1.3 will be released soon. Martijn sent a release plan to the
developer list earlier this week. 1.4 shouldn't take too long either,
but you never know.

 - Documentation. There's not one coherent document for 1.3... the Wiki is
 littered with bits of wisdom, but it's hard to tell what techniques work
 with or are obsoleted by version 1.3...

You can always compare with
http://cwiki.apache.org/WICKET/migrate-13.html. The techniques in
general are valid for both, but you probably won't be able to copy n
paste much.

 - Books. When are the books coming out?

Pro Wicket has been available for a while, and though this is written
for 1.2, it should give you a good base to start learning.

We're starting a MEAP program for Wicket In Action in a few weeks.

 - CMS... as I've said, the front-end is CMS driven, and because of load, I'd
 like to keep things stateless as much as possible (altho, all bets are off
 when the user logs in). I haven't yet found a good description of how 1.3
 handles session state. I'd also like to know if I can mount bookmarkable
 pages dynamically... say if someone were to create and publish a new CMS
 page from the admin app.

You should come far by searching the mailing lists, as quite a lot has
been written about both topics.

If you want to know how session state is handled, you can start
looking at ISessionStore and implementations/ friends.

Rather than 'mounting' pages dynamically, you should look into
providing a custom coding strategy. See discussions in the mail
archives.

 I like what I've seen of Wicket so far, and I would love to deploy the first
 enterprise-class application running Wicket, but I need some advice to get
 rid of the butterflies in my stomach.

You can code the part that gives you an uneasy feeling entirely
stateless if you want. However, if you are just talking about a couple
of thousand concurrent sessions: put a couple of hundred MBs in your
server and you should be done. Start profiling and load testing early
for better results :)

Eelco

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


Re: [Wicket-user] Evaluating Wicket

2007-06-12 Thread Patrick Angeles

you will be far from the first :)


-igor




That's reassuring to know. I saw a list of Wicket-enabled apps in the
Wiki... would any of the developers from said apps care to comment on the
load that they're handling, and their underlying architecture?
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] noob question about wicket

2007-06-12 Thread verbal evasion

hello everyone,

this is my first post. i have been playing with wicket for a while, trying
to see if it will let me do everything i want it to. while a lot of things
in wicket look very attractive from a programmer-forced-to-do-website-stuff
perspective, i do have one big glaring question. the basic way to put
stuff on a website with wicket is to create something in the WebPage, add
it to the WebPage, then add an accompanying tag on the html file.

while that is great for dynamic content, the problem i have is what if i
dont want to show that content at all.

is there a way to conditionally show certain content depending on the java
portion? one example would be that i have a main page. it displays some
content and more importantly, a login box. i want to say if they are
already logged in, dont show the login box, but instead, show some text that
says the user is logged in. everything else on the page would be different.
one way i can do that is of course to create separate pages for it, but
there will be a lot of html or code duplication. it is theoretically
possible to do so by making your class hierarchy a certain way, but it didnt
seem natural to me. also, having this technique handy will be useful in the
future.

i tried to not add anything to the form, but since the html has no
conditionals, i have to add the superset of all the tags of content i want.
wicket does not like that.

please advise and sorry for the length of the email.

thanks,

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


Re: [Wicket-user] noob question about wicket

2007-06-12 Thread mchack

Very easy to do. There are many ways but an easy one is to have an html tag
such as div, that will correspond to either the login form or signed in text
and give it a wicket:id . During processing you would check to see if the
user is signed in. If not then you would add an appropriate object to the
page (corresponding to wicket:id)  such as a custom panel that would
correspond to a login form. If they are logged in you would add maybe
another custom object or panel that indicated some welcome message.

Mike


verbal evasion wrote:
 
 hello everyone,
 
 this is my first post. i have been playing with wicket for a while, trying
 to see if it will let me do everything i want it to. while a lot of things
 in wicket look very attractive from a
 programmer-forced-to-do-website-stuff
 perspective, i do have one big glaring question. the basic way to put
 stuff on a website with wicket is to create something in the WebPage, add
 it to the WebPage, then add an accompanying tag on the html file.
 
 while that is great for dynamic content, the problem i have is what if i
 dont want to show that content at all.
 
 is there a way to conditionally show certain content depending on the java
 portion? one example would be that i have a main page. it displays some
 content and more importantly, a login box. i want to say if they are
 already logged in, dont show the login box, but instead, show some text
 that
 says the user is logged in. everything else on the page would be
 different.
 one way i can do that is of course to create separate pages for it, but
 there will be a lot of html or code duplication. it is theoretically
 possible to do so by making your class hierarchy a certain way, but it
 didnt
 seem natural to me. also, having this technique handy will be useful in
 the
 future.
 
 i tried to not add anything to the form, but since the html has no
 conditionals, i have to add the superset of all the tags of content i
 want.
 wicket does not like that.
 
 please advise and sorry for the length of the email.
 
 thanks,
 
 verbal
 
 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 

-- 
View this message in context: 
http://www.nabble.com/noob-question-about-wicket-tf3910852.html#a11088839
Sent from the Wicket - User mailing list archive at Nabble.com.


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


[Wicket-user] Wicket under JBoss: ClassLoader not found?

2007-06-12 Thread William J. Laubenheimer
I'm using NetBeans 5.5 and Wicket 1.2.5 for a web development project.  When
I try to load the .ear file, I get this exception when JBoss attempts to
load the Wicket .war file:
--
wicket.WicketRuntimeException: Unable to create application of class
com.cemantica.web.cdm.CDMWicketApplication
at
wicket.protocol.http.ContextParamWebApplicationFactory.createApplication(Con
textParamWebApplicationFactory.java:68)
at wicket.protocol.http.WicketServlet.init(WicketServlet.java:275)
at javax.servlet.GenericServlet.init(GenericServlet.java:211)
[...]
Caused by: java.lang.ClassNotFoundException: No ClassLoaders found for:
com.cemantica.web.cdm.CDMWicketApplication
at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:306)

at
org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoad
er.java:511)
at
org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.j
ava:405)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at
wicket.protocol.http.ContextParamWebApplicationFactory.createApplication(Con
textParamWebApplicationFactory.java:53)
... 94 more
--
I suspect this means I'm missing some key element in either the JBoss or
Wicket configuration.  Any idea what, or how I can find out?


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


Re: [Wicket-user] noob question about wicket

2007-06-12 Thread verbal evasion

thanks for the responses from eelco and mchack. i appreciate it. i guess
part of the problem is i dont understand enough html either :\. it seems
that you have implied you can put anything in a span tag (e.g. a form and a
label). i will look at the template more carefully. i bought the pro wicket
book and went through half of that, so hopefully when i'm done i will have
more advanced questions.

thanks again,

verbal

On 6/12/07, Eelco Hillenius [EMAIL PROTECTED] wrote:


 is there a way to conditionally show certain content depending on the
java
 portion? one example would be that i have a main page. it displays some
 content and more importantly, a login box. i want to say if they are
 already logged in, dont show the login box, but instead, show some text
that
 says the user is logged in. everything else on the page would be
different.
 one way i can do that is of course to create separate pages for it, but
 there will be a lot of html or code duplication. it is theoretically
 possible to do so by making your class hierarchy a certain way, but it
didnt
 seem natural to me. also, having this technique handy will be useful in
the
 future.

Basically the two different strategies you have is to either set the
visibility of components (or override isVisible) appropriately, or
build up the hierarchy dynamically. As an example of the latter, you
could have a are in your page you call top bar. When you construct the
page, you decide whether to add the top bar with the login panel, or
the top bar without (e.g. to show the panel that displays the logged
in user's name). The templates example in Wicket examples shows
something similar.

Eelco

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

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


[Wicket-user] javascript internal scrollbar ?

2007-06-12 Thread verbal evasion

i noticed there were a bunch of ajax classes in wicket that generates
javascript for you. very cool. is there a wicket extension or something that
will allow me to create an internal scrollbar from java, without having to
handwrite javascript in the html file?

thanks,

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


Re: [Wicket-user] noob question about wicket

2007-06-12 Thread Igor Vaynberg

html
body
div wicket:id=loggedinspan wicket:id=username/div
div wicket:id=loggedoutform wicket:id=form.../form/div
...

MyPage() {
 add(new WebMarkupContainer(loggedin, new PropertyModel(this,
session.user.username)) {
  public boolean isvisible() { return
((MySession)getSession()).getUser()!=null; }
  }

 WebMarkupContainer loggedout=new WebMarkupContainer(loggedout) {
  public boolean isvisible() { return
((MySession)getSession()).getUser()==null; }
  }
add(loggedout);
loggedout.add(new Form(form)


-igor



On 6/12/07, verbal evasion [EMAIL PROTECTED] wrote:


thanks for the responses from eelco and mchack. i appreciate it. i guess
part of the problem is i dont understand enough html either :\. it seems
that you have implied you can put anything in a span tag (e.g. a form and
a label). i will look at the template more carefully. i bought the pro
wicket book and went through half of that, so hopefully when i'm done i will
have more advanced questions.

thanks again,

verbal

On 6/12/07, Eelco Hillenius [EMAIL PROTECTED] wrote:

  is there a way to conditionally show certain content depending on the
 java
  portion? one example would be that i have a main page. it displays
 some
  content and more importantly, a login box. i want to say if they are
  already logged in, dont show the login box, but instead, show some
 text that
  says the user is logged in. everything else on the page would be
 different.
  one way i can do that is of course to create separate pages for it,
 but
  there will be a lot of html or code duplication. it is theoretically
  possible to do so by making your class hierarchy a certain way, but it
 didnt
  seem natural to me. also, having this technique handy will be useful
 in the
  future.

 Basically the two different strategies you have is to either set the
 visibility of components (or override isVisible) appropriately, or
 build up the hierarchy dynamically. As an example of the latter, you
 could have a are in your page you call top bar. When you construct the
 page, you decide whether to add the top bar with the login panel, or
 the top bar without (e.g. to show the panel that displays the logged
 in user's name). The templates example in Wicket examples shows
 something similar.

 Eelco

 -

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



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


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


Re: [Wicket-user] noob question about wicket

2007-06-12 Thread Eelco Hillenius
 html
 body
 div wicket:id=loggedinspan wicket:id=username/div
 div wicket:id=loggedoutform
 wicket:id=form.../form/div
 ...

 MyPage() {
   add(new WebMarkupContainer(loggedin, new
 PropertyModel(this,session.user.username)) {
public boolean isvisible() { return
 ((MySession)getSession()).getUser()!=null; }
}

   WebMarkupContainer loggedout=new WebMarkupContainer(loggedout) {
public boolean isvisible() { return
 ((MySession)getSession()).getUser()==null; }
 }
  add(loggedout);
  loggedout.add(new Form(form)


That's the first option. The advantage is that it is generally easier
to see what you have on your page. The other option - like shown in
the templates example - is a bit cheaper memory wise, as you only add
what you need.

Eelco

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


[Wicket-user] how to provide custom messages for validation

2007-06-12 Thread Prashant Khanal
Hello all,

For a text field i have used NumeberValidator.minimum(1) so that validation 
error will be thrown when user enters 0 or less. How can i override the 
validation error message ( '0' must be greater than '1') ?
Is there any way to provide custom valdiation message?

Thanks in advance




   

Looking for a deal? Find great prices on flights and hotels with Yahoo! 
FareChase.
http://farechase.yahoo.com/

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


Re: [Wicket-user] how to provide custom messages for validation

2007-06-12 Thread Prashant Khanal
Hey,

I found the answer. I just added the properties file in the name of the class 
and provide my own custom message. Can i configure a global properties file 
instead of properties file for every class.

- Original Message 
From: Prashant Khanal [EMAIL PROTECTED]
To: wicket mail list wicket-user@lists.sourceforge.net
Sent: Wednesday, June 13, 2007 10:45:44 AM
Subject: [Wicket-user] how to provide custom messages for validation

Hello all,

For a text field i have used NumeberValidator.minimum(1) so that validation 
error will be thrown when user enters 0 or less. How can i override the 
validation error message ( '0' must be greater than '1') ?
Is there any way to provide custom valdiation message?

Thanks in advance




   

Looking for a deal? Find great prices on flights and hotels with Yahoo! 
FareChase.
http://farechase.yahoo.com/

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





   

Building a website is a piece of cake. Yahoo! Small Business gives you all the 
tools to get online.
http://smallbusiness.yahoo.com/webhosting 

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


Re: [Wicket-user] how to provide custom messages for validation

2007-06-12 Thread Timo Rantalaiho
On Tue, 12 Jun 2007, Prashant Khanal wrote:
 For a text field i have used NumeberValidator.minimum(1) so that
 validation error will be thrown when user enters 0 or less. How can i
 override the validation error message ( '0' must be greater than '1')
 ?
 Is there any way to provide custom valdiation message?

Yep, via resource bundles. e.g.

[webapplication-subclass-name].properties
RequiredValidator=Field '${label}' is required
LengthValidator=Field '${label}' must be between ${min} and ${max} characters

http://cwiki.apache.org/WICKET/form-validation-messages.html

- Timo

-- 
Timo Rantalaiho   
Reaktor Innovations OyURL: http://www.ri.fi/ 

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