Re: [Wicket-user] Session ids and search engine bots

2006-06-14 Thread Timo Stamm
Alexandru Popescu schrieb:
 Unfortunately this is not completely accurate information.
 I was writing about my experience and I wrote it down accurately.

 
 Timo, sorry if you found my comments as offending.

Nah, I didn't.


___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Session ids and search engine bots

2006-06-12 Thread Timo Stamm
Alexandru Popescu schrieb:
 On 6/8/06, Timo Stamm [EMAIL PROTECTED] wrote:
 John Patterson schrieb:
 Currently, I am considering either apache url rewriting to remove all
 session ids from non-conversational pages or hacking wicket to disable
 url encoding for all pages that do not absolutely require a session.
 Are you sure this issue is that important? In my experience, Google does
 index pages with a session id parameter in the URL. The session id is
 stripped in the search result URL, so I don't see any problems. Even if
 there is any penalty, it is probably much more important to have good
 content.
 
 Unfortunately this is not completely accurate information.

I was writing about my experience and I wrote it down accurately.


 Google
 indeed indexes pages with jsessionid in their URLs, but it is not
 stripping it.

The session id is stripped from the link in the search result page. At 
least in the cases I had to deal with. That means that the user doesn't 
get a message like session expired.


 Due to this, same page (retrieved through same URL, but
 containing different jsessionid-s) will have their page ranks computed
 independently.

Yes.


Timo


___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Session ids and search engine bots

2006-06-08 Thread Timo Stamm
John Patterson schrieb:
 Currently, I am considering either apache url rewriting to remove all 
 session ids from non-conversational pages or hacking wicket to disable 
 url encoding for all pages that do not absolutely require a session.

Are you sure this issue is that important? In my experience, Google does 
index pages with a session id parameter in the URL. The session id is 
stripped in the search result URL, so I don't see any problems. Even if 
there is any penalty, it is probably much more important to have good 
content.


Timo


___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Wicket

2006-06-08 Thread Timo Stamm
Gangadhar Vibhute schrieb:
 I want to use following methods of servlets in wicket how to use it
 
 response.getWriter()
 ServletOutputStream ouputStream =response.getOutputStream();

A major achievement of Wicket is that you *don't* have to use these. 
What do you want to accomplish? I am sure we can help out.


Timo


___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] CheckGroup/Check path value

2006-06-07 Thread Timo Stamm
Johan Compagner schrieb:
 what whould happen if you have a checkgroup inside a listview again?
 how would you differentiate the 2 or 3 checkgroups values?

You don't have to. The values are separate because they are sent using 
the different input names of the checkgroups.

I tripped over this, too :)


Timo


 On 6/6/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

 Hello,

 I'm working on some javascript functionality in conjunction with
 CheckGroup/Check components.

 For this I'd really appreciate if Check would render a 'shorter' value
 attribute, e.g. instead of:

   input value=2:form:bar:foos:0:select type=checkbox

 ... just the relevant part of the path from the CheckGroup (bar) to the
 Check:

   input value=foos:0:select type=checkbox

 Makes a leaner HTML with less details about the full component hierarchy.
 The change is trivial, just move the substring handling from CheckGroup
 into Check:

 CheckGroup.java, line 125:
 //path = path.substring(getPath().length() + 1);

 Check.java, line 91:
 tag.put(value, path.substring(group.getPath().length() + 1));

 I'm working with Wicket 1.2 and the same could be applied to
 RadioGroup/Radio as well.

 Thanks

 Sven


 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user

 
 
 
 
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Best practice for mapping objects to ids

2006-06-02 Thread Timo Stamm
Interesting. The SimpleSelection can be used on any DropDownChoice, this 
is nice. I extended DropDownChoice for all the cases where I want to 
specify the choices directly:


public static class SimpleDropDownChoice extends DropDownChoice {
   private static class Choice {
 private String label;
 private Object value;

 public Choice(String choiceLabel, Object choiceValue) {
   label = choiceLabel;
   value = choiceValue;
 }
 public String getLabel() {
   return label;
 }

 public Object getValue() {
   return value;
 }
   }
   public SimpleDropDownChoice(String id, IModel model) {
 this(id);
 setModel(model);
   }
   public SimpleDropDownChoice(String id) {
 super(id);
 setChoiceRenderer(new IChoiceRenderer() {
   public String getDisplayValue(Object object) {
 Choice e = (Choice) object;
 return e.getLabel();
   }
   public String getIdValue(Object object, int index) {
 return String.valueOf(index);
   }
 });
 setChoices(new ArrayList());
   }
   public SimpleDropDownChoice addChoice(String label, Object value) {
 List choices = getChoices();
 choices.add(new Choice(label, value));
 setChoices(choices);
 return this;
   }
}


Usage:

   SimpleDropDownChoice c = new SimpleDropDownChoice(gender);
   c.addChoice(Male, new Integer(1));
   c.addChoice(Female, new Integer(2));
   c.addChoice(Unisex, new Integer(3));


Timo


Matej Knopp schrieb:
 It's doable, but you have to write your own choice renderer.
 I've made a SimpleSelection class that might help you. Usage is
 
 SimpleSelectionItem items[] = {
   new SimpleSelectionItem(1, Male),
   new SimpleSelectionItem(2, Female),
   new SimpleSelectionItem(4, Unisex)
 };
 
 SimpleSelection selection = new SimpleSelection(items);
 
 add(new DropDownChoice(gender,
new PropertyModel(this, gender),
selection.getItemsModel(),
selection.getChoiceRenderer());
 
 void setGender(int) {
   ...
 }
 
 int getGender() {
   ...
 }
 
 -Matej
 
 Johan Compagner wrote:
 that is a problem. Because currently the Choice/ChoiceRender solutions 
 require
 a one-one relation ship between whats in the list and whats in the 
 model.
 if you want to map that then the fastest way that i can think of right 
 now is to use
 a model that sits between it. That maps CategoryVO - int back and 
 forward.

 Why do you work with ints in the model objects? Why not just full 
 blown java objects?

 johan


 On 6/2/06, *Ralf Ebert* [EMAIL PROTECTED] 
 mailto:[EMAIL PROTECTED] wrote:

 Hi,

 quite often I have the problem that my model objects (which are bound
 using compound property models) contain a field like categoryId (as
 int), but when building pages, I would like to use objects like
 CategoryVO. Simplest example is choosing from a list, the
 dropdownchoices would be a ListCategoryVO while the model object
 itself would be an simple integer. I'm looking for an elegant way to
 handle these things in a model based way. I would like to throw in a
 little class which allows me to implement a mapping between both 
 types
 (id - object, object - id, a bit like a converter). I couldn't find
 an elegant way to do things like these, is there some best practice
 for handling such cases?

 thx,
 Ralf


 ---
 All the advantages of Linux Managed Hosting--Without the Cost and 
 Risk!
 Fully trained technicians. The highest number of Red Hat
 certifications in
 the hosting industry. Fanatical Support. Click to learn more
 
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=107521bid=248729dat=121642
 
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=107521bid=248729dat=121642 

 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 mailto:Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user


 



___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] started working on 2.0 and migration doc

2006-05-30 Thread Timo Stamm

Eelco Hillenius schrieb:
We're hoping for you help, and of course we hope that you'll like Wicket 
2.0


I wasn't convinced by the constructor change at first for two reasons:

- Requiring a constructor can be very limiting for clients of the API
- add() seems to be a very intuitive method for adding children to a 
component


After thinking about the impact that this change would have on the 
actual code I am writing, I changed my opinion. Quite often, I have code 
fragments that look similar to your example in the wiki article:


  MyLink link = new MyLink(link);
  add(link);
  link.add(new Label(myLabel, myText));

The Wicket 2.0 version is much more streamlined:

  MyLink link = new MyLink(this, link);
  new Label(link, myLabel, myText);


One thing that came into my mind regards the use of repeaters. Instead 
of requiring this not very intuitive code:


  Repeater r = ...
  r.add(new Label(r, r.newChildId()));

It would be possible to let the child acquire it's ID from the parent:

  class Label {
Label(Repeater parent) {
  super(parent, parent.newChildId());
}
  }

Resulting in a nicer usage:

  Repeater r = ...
  r.add(new Label(r));

I am not sure about the impact, but it looks nice from my naive 
perspective.



Regarding the use of Generics for IModel and Components, I think that 
it's a perfect fit. So, yes, I think I'm going to like 2.0 :)



Where do you need help, and how should that work? I would imagine that 
it wouldn't help much if everyone bombards you with incompatible patches.



Timo


---
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnkkid=107521bid=248729dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Wicket 1.2 released!

2006-05-27 Thread Timo Stamm

Damn those buzzword-inventors.

I had to google for 2 minutes just to find that comet is a stupid name 
for pushing data from the server.



Timo


Igor Vaynberg schrieb:

hehe, we had a pool on when someone was going to mention wicket comet
integrationwho won?

-Igor


On 5/24/06, Marco Geier [EMAIL PROTECTED] wrote:


You guys really rock! Thank you all!

That release is just in time for me,
i'll release out wicket-based auction-app next week!

I'll keep you updated (since i'm using some comet-style polling, which
could be an interesting extension to wicket, but i've got to clean it
up first and see how it performs in the real world).

Marco
___

Dipl.-Ing. Marco Geier
EyeTea GmbH
Germany
phone   +49 (0)721 662464-0
fax +49 (0)721 662464-1
mobile  +49 (0)177 6579590
[EMAIL PROTECTED]


---
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat 
certifications in

the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnkkid=107521bid=248729dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user







---
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnkkid=107521bid=248729dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] WARNING: head/ trunk is highly experimental for a while

2006-05-23 Thread Timo Stamm

Johan Compagner schrieb:

But if it does take longer you could use trunk. It is now a fast moving
target.
But many of those changes are java 5 related [...]



Yay! Generics and Covariant Return Types!! No more Castings! !WOOOT


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


Re: [Wicket-user] Border and markup inheritance problem

2006-05-20 Thread Timo Stamm

Jerry,


the wiki has an example: 
http://wicket-wiki.org.uk/wiki/index.php/Markup_inheritance



Timo


Igor Vaynberg schrieb:

with markup inheritance you wouldnt need a separate border that wraps all
the pages, simply move everything that is in the border into the basepage
instead.

-Igor


On 5/19/06, Jerry Smith [EMAIL PROTECTED] wrote:


 Thanks for the reply Igor!  I'll try the methods you mentioned.  You 
also
said markup inheritance is a better fit for this use case, could 
demonstrate

how you would do this? I thought I was using markup inheritance, but it
appears I don't fully understand how to set it up correctly.  Thanks!



-Jerry


  --

*From:* [EMAIL PROTECTED] [mailto:
[EMAIL PROTECTED] *On Behalf Of *Igor Vaynberg
*Sent:* Friday, May 19, 2006 2:03 PM
*To:* wicket-user@lists.sourceforge.net
*Subject:* Re: [Wicket-user] Border and markup inheritance problem



if you look at the hierarchy of your message label it is like this:

in java:

page-message

in markup:

page-border-message

so when wicket tries to render message in the markup it cannot find it
because it expects it to be in the border, but in fact you have added 
it to

the page itself in extendpage.

so what you should do is either someting like this

ExtendPage() { getBorder().add(message); } to put it in the right place

or

BasPage() { add(new MyBorder(blah).setTransparentResolver(true); } this
will tell wicket that the border is transparent - if component inside 
border

cannot be found wicket should try to locate it in the border's parent

or use markup inheritance which is a much much better fit for this 
usecase


-Igor


 On 5/19/06, *Jerry Smith*  [EMAIL PROTECTED] wrote:

Sorry to send this again, I know you're all very busy trying to get the
1.2 release together, but I didn't want this to fall through the 
cracks if

it is a bug.



I'm get a WicketMessage: Unable to find component with id 'message'

error. Maybe this can't be done or I'm doing it wrong using 1.2rc4, but
what I'm working with is a MyBorder component, a BasePage, and 
ExtendPage.

Here's the distilled code bits:



MyBorder.html:

wicket:border

div wicket:id=header[header]/div

div

wicket:body/

/div

div wicket:id=footer[footer]/div /wicket:border



MyBorder.java:

public class MyBorder extends Border {

public MyBorder(String id) {

super(id);

add(new Label(header, new Model(Border Header)));

add(new Label(footer, new Model(Border Footer)));

}

}



BasePage.html

html

body

div wicket:id=border

wicket:child/

/div

/body

/html



BasePage.java

public class BasePage extends WebPage {

public BasePage() {

add(new MyBorder(border));

}

}



ExtendPage.html:

wicket:extend

span wicket:id=message[message]/span

/wicket:extend



ExtendPage.java:

public class ExtendPage extends BasePage {

public ExtendPage() {

super();

add(new Label(message, new Model(Extended message)));

}

}



Here's the error output minus stack:

html

head

title/title

/head

body

div wicket:id=border

wicket:childwicket:extend

span wicket:id=message[message]/span

/wicket:extend/wicket:child

/div

/body

/html



[Page class = ExtendPage, id = 4]:

# PathSizeType
  Model Object

1_body 2.7K
wicket.markup.html.internal.HtmlBodyContainer

2_header 473 bytes
wicket.markup.html.internal.HtmlHeaderContainer

3border  1.3K
com.ses.wicket.components.test.x.MyBorder

4border:_child   485 bytes
wicket.markup.html.WebMarkupContainer

5border:_child:_extend   456 bytes
wicket.markup.html.WebMarkupContainer

6border:footer   456 bytes   wicket.markup.html.basic.Label
  Border Footer

7border:header   456 bytes   wicket.markup.html.basic.Label
  Border Header

8message 460 bytes   wicket.markup.html.basic.Label
  Extended message





From this it looks like the message Label isn't being added to the
correct component(border:_child:_extend?), am I doing something wrong, 
or is

this a bug?



Thanks for any input!



-Jerry











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


Re: [Wicket-user] can'nt read wiki

2006-05-18 Thread Timo Stamm

ali schrieb:
please help , i would use offline explorer to track changes and auto 
update downloaded

wiki pages but wiki reponse me this :

Precondition Failed
We're sorry, but we could not fulfill your request for  =

/wiki/index.php/FAQs on this server.



Read the rest of the page. It gives you an explanation and possible 
solutions.



Timo


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


Re: [Wicket-user] Google Web Toolkit integration ?

2006-05-17 Thread Timo Stamm

smallufo schrieb:

Google Web Toolkit - Build AJAX apps in the Java language
released on 5/16/2006
http://code.google.com/webtoolkit/

It seems powerful and slick



Had a quick look at it.

It is a small but complete framework. Everything is written in Java, 
even the GUI components, which are compiled into Javascript+HTML. There 
is a remote procedure call interface that allows arbitrary serializable 
java objects to be sent to the client, even exceptions. I can't say much 
on the Java to Javascript+HTML compiler, but it doesn't seem to be such 
a good idea. Java 1.5 is not supported, and the rich set of java 
libraries can't be used.


It's certainly an intriguing idea (have a look at haxe.org if you find 
it interesting), but I don't really believe in this concept. It is very 
difficult to abstrahize the features (or should I say quirks) of 
different browsers. Some months ago, I had a look at several javascript 
libraries and it worked pretty flawless in every browser. When I checked 
again this week, one browser simply crashed. On 2 of 4 pages. It's sad, 
but it's just not stable enough for me. The GWT demo site worked fine, 
but custom components will be very tedious to develop and maintain.


Another issue is previewability. Not just for a designer, but for 
debugging purposes. If you click view source in your browser on a GWT 
page, you will see nothing but a HTML skeleton and an iframe.




Anybody has any idea to integrate it to wicket ?


Integration into wicket doesn't seem feasible to me. It might be 
possible to integrate GWT widgets into a wicket page, but I think it 
makes more sense to use wicket components in combination with a client 
side ui library like the yahoo ui library. The effect will be the same, 
but you only have one type of component to take care of. But I don't 
know if wickets AJAX support is good enough yet.



Timo


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


Re: [Wicket-user] ListView.setVisible(false) doesn't work at AjaxFallbackLink

2006-05-17 Thread Timo Stamm

Bruno Borges schrieb:

ListView is considered one single component, with multiple
childs (ListItem).



That's true, but the *markup* associated with the ListView is repeated 
with every child, so a there is no single HTML tag that represents the 
ListView.


What you want is something like this:

  div id=listview
span id=listItem.../span
  /div


Timo





On 5/17/06, Johan Compagner [EMAIL PROTECTED] wrote:


and that parent would be??
A markupcontainer? a panel is a markup container.. pretty much all are.

I think you mean.. the listview must be added to a container where he is
the only child??
to require that looks stupid to me.

Maybe we could some do see it as one object by generating an markup id
for every listview html component...
listview1, listview2 and then target that as one thing. But that is
more a thing for igor i guess.

johan



On 5/17/06, Bruno Borges [EMAIL PROTECTED] wrote:

 Sure, I know about that, but the way we code for other things like 
Label
 or TextField, it works, right? So, for ListView it should work too. 
It's a

 component just like other.

 Maybe a change at the API so ListView can't be added directly to
 (Some)MarkupContainer? And require the developer to add it into some 
parent

 like Panel or anything else dummy.

 I know this would break _all_ projects working with ListView. But I
 think it's necessary.


 On 5/17/06, Johan Compagner  [EMAIL PROTECTED] wrote:
 
  as far as i know you need to wrap it in a span or something (no need
  for a panel)
  and target that to set visible and so on. Because in html you need to
  target one thing (id)
 
 
  On 5/17/06, Bruno Borges [EMAIL PROTECTED] wrote:
  
   Looks like setting visible false at a ListView instance isn't
   working properly.
  
   The html printed out by wicket is something like this:
  
   tr wicket:id=listView
   td ...
   /tr
   tr wicket:id=listView
   td ...
   /tr
   tr wicket:id=listView
   td ...
   /tr
  
   And that's the reason Ajax can't set visible(false) at the 
listViewcomponent.

   You guys will probably say that I should put my ListView into a
   Panel (or a fragment maybe? new stuff...) but conceptually the 
use of
   ListView and how we should making it invisible at an Ajax 
request, it's

   correct I think.
  
   Thanks
   --
   Bruno Borges
   Summa Technologies
  
 
 


 --
 Bruno Borges
 Summa Technologies










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


Re: [Wicket-user] dynamic html controls

2006-05-16 Thread Timo Stamm

Igor Vaynberg schrieb:

meanwhile maybe someone can
write up a general wiki page.


There already is a wiki page on this topic:

http://wicket-wiki.org.uk/wiki/index.php/Forms_with_dynamic_elements


Timo


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


Re: [Wicket-user] Custom component inheritance

2006-05-16 Thread Timo Stamm

Eelco Hillenius schrieb:

Yeah, use markup inheritance. See wicket-examples,
http://www.javalobby.org/java/forums/t69357.html, the test cases and
there's probably something about it on the WIKI.


Of course there is :)

http://www.wicket-wiki.org.uk/wiki/index.php/Markup_inheritance




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


Re: [Wicket-user] stale session on form submit

2006-05-16 Thread Timo Stamm

Ittay Dror schrieb:

how can i tell if a Page is bookmarkable or not?


No constructor args or PageParameters as constructor arg - bookmarkable

See:

http://www.wicket-wiki.org.uk/wiki/index.php/Bookmarkable_nonBookmarkable_pages



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


Re: [Wicket-user] URL redirect

2006-05-16 Thread Timo Stamm

Thomas,


you are using a proxy, right?


If you enter

  http://localhost:8080/foo/

in the browser, wicket redirects to

  http://localhost:8080/foo/?page=0

But with the proxy in between, the browser is redirected to

  http://localhost:8080/foo?page=0


I have experienced this problem with mod_prox, and I don't have a 
solution. I hope to be able to fix it when going to 1.2. which seems 
allows more control over URLs.


IMHO wicket should allow full control over rendering of URLs and never 
rely on the servlet container to complete redirect URLs. This would make 
working with proxies a lot easier.



Timo


Tom S. schrieb:

Why should it redirect to /foo/xyz.abc?


Because I've entered /foo/ and a typical plain-html-webserver redirects 
to /foo/index.html.



You can do that if you mount bookmarkable pages i guess.


I have no clue, how to do that, esp. with the home page.


What kind of resource is not found?
Can you give an example?


I've tried to sketch that in my original posting. Sorry, if it wasn't 
clear enough. I'll try with different wordings:


I enter the URL http://localhost:8080/foo/ in the browser. My Index.html 
(and the page content ariving my browser) contains a graphic reference 
to graphics/logo.png (it is found and displayed correctly when I enter 
the URL http://localhost:8080/foo/graphics/logo.png). Since the 
wicket-servlet obviously is redirecting to 
http://localhost:8080/foo?page=0, the browser obviously expects the 
graphic to be at http://localhost:8080/graphics/logo.png (note the 
missing /foo after the port!).


--
Cheers,
Tom


Johan Compagner wrote:

Why should it redirect to /foo/xyz.abc?
You can do that if you mount bookmarkable pages i guess.

What kind of resource is not found?
Can you give an example?

johan


On 2/14/06, *Thomas Singer* [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED] wrote:


  does this clear things up?

No, not really.

  it processes because the url http://localhost/foo/index.html
matches the /foo/* mapping. see the /foo/ in the url, the /foo/*
mapping will match /foo/index.html fragment of the url.

This fully is clear, but why http://localhost/foo?page=0 is 
processed by

the /foo/*-mapping? And why does the wicket-servlet redirects to
http://localhost/foo?page=0 and not to http://localhost/foo/xyz.abc?

I'll ask these things, because this might be the problem why my 
resource

(graphics) cannot not be found.

Tom


Igor Vaynberg wrote:
  it processes because the url http://localhost/foo/index.html
matches the
  /foo/* mapping. see the /foo/ in the url, the /foo/* mapping will
match
  /foo/index.html fragment of the url.
 
  i am assuming you are deploying the wicket app in the root
context, so
  users should really be starting at http://localhost/index.html
http://localhost/index.html.
 
  when your users hit http://localhost/foo/ it will be processed 
by the

  wicket servlet. since no page is specified the homepage will be
retrieved.
 
 
  does this clear things up?
 
  On 2/14/06, *Tom S.* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote:
 
  Hi Igor,
 
  I meant something different. What happens, when the user
enters the URL
  http://localhost/foo/ in its browser? I guess, this address
is sent to
  the web server. If it is a passive one, it might redirect the
  browser to
  http://localhost/foo/index.html (note, the directory is the
same). But
  the wicket-servlet tells the browser to try it again at
  http://localhost/foo?page=0 (which is a different directory).
Is this
  correct so far?
 
  Just curious, why does the wicket-servlet processes this
request, when
  the servlet-mapping is set to the URL-pattern /foo/*?
 
  Tom
 
  PS: Please excuse my trivial wordings, these are my first
deeper steps
  in webapp development.
 
 
  Igor Vaynberg wrote:
you should put index.html in your context root and have a
  metaredirect
to /foo inside
   
something like this:
   
   
html
head
meta http-equiv=Refresh content=0; url=foo
/head
/html
   
   
-Igor
   
   
On 2/13/06, *Tom S.*  [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]  wrote:
   
OK, I now can read my html files from a different
location. But I
still have
a serious problem with resources ( e.g. graphics). The
servlet
   

Re: [Wicket-user] Image upload

2006-05-06 Thread Timo Stamm

Eelco Hillenius schrieb:

Though that will only work when your servlet container is configured
to have access to that directory as one to serve files from, right?


No, you can deliver files from anywhere Java has access to. The example 
was copied from production code.



Timo



On 5/6/06, Timo Stamm [EMAIL PROTECTED] wrote:

Igor Vaynberg schrieb:
 so what you need is something that maps to some url and when invoked
 streams
 the image back to the user.

 i see two possible ways to do this

 one:
 use a separate servlet to do this

public class WeblibServlet extends HttpServlet {

   private static final String base =
  /WEB-INF/classes/META-INF/admin/weblib;

   public void doGet(HttpServletRequest request,
   HttpServletResponse response)
   throws IOException, ServletException {
 String p = base + request.getPathInfo().replace(.., );
 RequestDispatcher d = getServletContext().getRequestDispatcher(p);
 if (d != null) {
   d.forward(request, response);
 }
   }

   public void doPost(HttpServletRequest request,
   HttpServletResponse response)
   throws IOException, ServletException {
 doGet(request, response);
   }
}



---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job 
easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache 
Geronimo

http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user




---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job 
easier

Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=kkid0709bid3057dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user





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


Re: [Wicket-user] Re: The other side of Wicket ...

2006-05-05 Thread Timo Stamm

Hi Ashley,


only some points answered, but maybe the answers are helpful.


Ashley Aitken schrieb:
Clone by serialisation?  I guess you mean you serialise and then 
un/de-serialise.   So you don't serialise to save to disk?


Java has no deep-copy mechanism. Serialization can be used as a workaround.


I don't think 
the back button can be equivalent to an undo type operation?


It actually is with Wicket.

Of course you have to decide when you commit data. For example you can't 
undo a sent E-Mail.



i think you misunderstand what the model is. the model is the 
databinding. it allows the component to retrieve and store data in an 
abstract way.


Sorry if I am not getting this.  I thought a model could be a simple 
String, or a more complex object (or small object graph) like 
Customer.   I thought most components were associated with a model, i.e. 
the object(s) that they are representing in some way in their view.


A databinding, for me at least, would be a mapping between parts of the 
view and parts of the model but *not* the model itself, an associative 
map of some kind.  That said, I think I know what you mean and there is 
no need to argue over definition.


The terminology of Wicket is a bit imprecise. IModel is the glue. Model 
objects (IModel#getObject()) are the model.



the extra work with models gives you the backbutton support, something 
that almost no other framework that stores state in session does.


As above, personally speaking, I am not sure this is a high priority 
feature for Web 2.0 applications.  But, of course, these are only one 
type of Web applications, and perhaps not a focus of Wicket.


It is a high priority feature of stateful web frameworks. Without that, 
the back button would behave unexpectedly.



well, wicket is perfect for the heavily stateful applications imho. i 
think the best way to learn would be to write a small application in 
the prod like environment. see where the challenges are, and we will 
try to help you along the way.


prod = productivity?


Production environment. Solving real problems instead of theoretical ones.



Thanks for the offer and I may just be doing that.

To be honest though, I am still tossing up between Wicket and Echo2 (or 
even something more standard).


Echo2 is, to me at least, very Web 2.0 focussed.


Quite frankly, Echo sucks.

I evaluated it (and many other frameworks) halve a year ago, and it took 
me some time to find a browser that would work with Echo (the demo apps 
were still terribly buggy).


I think Browsers are not ready for client-side applications. Server side 
state in combination with very little AJAX here and there is much more 
reliable, easier to build and more useful.


David H. Hansson (the RoR guy) wrote a nice article about how AJAX can 
be used in a sane way: http://www.loudthinking.com/arc/000428.html


Neither Web 2.0 nor AJAX mean that you need a lot of Javascript. Web 2.0 
  isn't really about technologies, but more about business models: 
http://www.oreillynet.com/pub/a/oreilly/tim/news/2005/09/30/what-is-web-20.html




I'm way off topic now, so I will end here.


Only speaking for myself, but I think this is on topic.


Timo


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


Re: [Wicket-user] Image upload

2006-05-05 Thread Timo Stamm

Igor Vaynberg schrieb:
so what you need is something that maps to some url and when invoked 
streams

the image back to the user.

i see two possible ways to do this

one:
use a separate servlet to do this


public class WeblibServlet extends HttpServlet {

  private static final String base =
 /WEB-INF/classes/META-INF/admin/weblib;

  public void doGet(HttpServletRequest request,
  HttpServletResponse response)
  throws IOException, ServletException {
String p = base + request.getPathInfo().replace(.., );
RequestDispatcher d = getServletContext().getRequestDispatcher(p);
if (d != null) {
  d.forward(request, response);
}
  }

  public void doPost(HttpServletRequest request,
  HttpServletResponse response)
  throws IOException, ServletException {
doGet(request, response);
  }
}



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


Re: [Wicket-user] CSS error with Opera and wicket:border

2006-05-04 Thread Timo Stamm

Johannes Fahrenkrug schrieb:

Hi,

It took me a while to track down why Opera makes my Wicket application 
look like crap.

Here's why:
when you use a css class like
td.someclass
and apply that class to a td tag within a table that is surrounded by 
wicket:border tags, Opera doesn't apply the CSS class to the td tag. 
If you define a general CSS class like

.someclass
it works (or when there are no wicket:border tags.

Everything is fine when using Firefox, Safari or even IE.

My question is: Can I somehow keep the wicket:border tags from showing 
up in the rendered markup?


Yes. See here:

http://www.wicket-wiki.org.uk/wiki/index.php/Remove_wicket_markup


But your HTML is broken. There is no doctype declaration and the style 
tag is incomplete.


If you declare the document as XHTML, the wicket tags *should* be 
ignored because they are in a different namespace. If they are not 
ignored, this is a bug in Opera, and should be reported.



Timo


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


Re: [Wicket-user] Re: Problem loading DatePicker inside Panel through AjaxLink

2006-05-04 Thread Timo Stamm

Igor Vaynberg schrieb:

right, and that is the main problem to solve. is a script tag legal in the
middle of html?


Not in XHTML :(



-Igor


On 5/4/06, Bruno Borges [EMAIL PROTECTED] wrote:


Igor, I'm not sure if browsers support the update head thing (probably
not), but one first step solution is to notify the component that it is
been added through Ajax, so the component must generate a load function
and return that function name to the Ajax call, so the Ajax JS can 
call that

function postprocessing.

Of course, the main problem still continues: how to add the .js file of
DatePicker/anything else, to the html page dynamically.


On 5/4/06, Igor Vaynberg [EMAIL PROTECTED] wrote:

 yes, there is a problem indeed with components that need head
 contribution and are added via ajax. the problem is that when the 
component

 is added via ajax its header contribution is ingored because the head
 section is not updated. so in case of the datepicker the js it needs is
 never added to the page.

 im not really sure what the good solution for this is. maybe we can
 update the head, but do browsers take that into account? will a 
script tag
 added to head via outerhtml replacement be processed by the browser? 
can you

 even use outer/innerHtml on elements in the head region of the page?

 any thoughts/ideas are welcome.

 -igor



 On 5/3/06, Bruno Borges [EMAIL PROTECTED]  wrote:
 
  Oh, one mistake in the code I sent.
 
  - The id for newUserLink I'm using is newUser;
 
  Everything works: AjaxLink replacing the div, the panel, submit, etc.
  Only the datePicker JS isn't working!
 
  Regards,
 
 
 
  On 5/4/06, Bruno Borges [EMAIL PROTECTED] wrote:
  
   I'm trying to load a Form Panel's child, and this panel is been
   loaded through an AjaxLink.
  
   The DatePicker icon doesn't work. The calendar doesn't shows up. Is
   there any incompatibility between loading panels with Ajax and 
DatePicker

   within?
  
   My code looks like this:
  
   class Index extends WebPage {
   constructor {
   final Label welcome = new Label(bodyPanel, Welcome);
   add(welcome);
  
   AjaxLink goHome = new AjaxLink(home) {
   ... {
   getPage().replace(welcome);
   target.addComponent(welcome);
   }
   };
  
   AjaxLink newUserLink = AjaxLink(home) {
   ... {
   UserFormPanel panel = new UserFormPanel(bodyPanel);
   getPage().replace(panel);
target.addComponent(panel);
}
};
  
   add(newUserLink);
   add(goHome);
   }
   }
  
   class UserFormPanel extends Panel {
   constructor {
   add(new UserForm(userForm));
   }
   }
  
   class UserForm extends Form {
   constructor {
   ... // other basic fields like 'username', 'email', 'password'
  
   // Date field fieldBirthday
   RequiredTextField fieldBirthday = new RequiredTextField(birthday,
   Date.class);
   fieldBirthday .add(DateValidator.maximum(Calendar.getInstance
   ().getTime()));
   add(fieldBirthday);
  
   // DatePicker for fieldBirthday
   DatePickerSettings settings = new DatePickerSettings();
   settings.setIfFormat(%d/%m/%Y);
   settings.setWeekNumbers(false);
   DatePicker datePicker = new DatePicker(datePicker, 
fieldBirthday ,

   settings);
   add(datePicker);
   }
   }
  
   I can say for sure: the datepicker component was working perfectly
   before opening the panel through AjaxLink (actually, UserFormPanel
   was UserFormPage before this).
   Am I missing something here?
  
   Regards,
   --
   Bruno Borges
   [EMAIL PROTECTED]
   Sun Certified Java Programmer for 1.4
   Sun Certified Web Component Developer for 1.4
  
 
 
 
  --
  Bruno Borges
  [EMAIL PROTECTED]
  Sun Certified Java Programmer for 1.4
  Sun Certified Web Component Developer for 1.4
 




--
Bruno Borges
[EMAIL PROTECTED]
Sun Certified Java Programmer for 1.4
Sun Certified Web Component Developer for 1.4







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


Re: [Wicket-user] Re: Problem loading DatePicker inside Panel through AjaxLink

2006-05-04 Thread Timo Stamm

Ooops. I was wrong.

I just checked some stubs with the w3 validator, and they pass without a 
hitch. Both XHTML 1.0 strict and transitional. XHTML 1.1 and 2.0 seem to 
be fine as well.


Sorry.

Timo

Igor Vaynberg schrieb:

in that case i dont see how you can ever make this work in xhtml unless you
refresh the entire page.

-Igor


On 5/4/06, Timo Stamm [EMAIL PROTECTED] wrote:


Igor Vaynberg schrieb:
 right, and that is the main problem to solve. is a script tag legal in
the
 middle of html?

Not in XHTML :(


 -Igor


 On 5/4/06, Bruno Borges [EMAIL PROTECTED] wrote:

 Igor, I'm not sure if browsers support the update head thing
(probably
 not), but one first step solution is to notify the component that it
is
 been added through Ajax, so the component must generate a load
function
 and return that function name to the Ajax call, so the Ajax JS can
 call that
 function postprocessing.

 Of course, the main problem still continues: how to add the .js 
file of

 DatePicker/anything else, to the html page dynamically.


 On 5/4/06, Igor Vaynberg [EMAIL PROTECTED] wrote:
 
  yes, there is a problem indeed with components that need head
  contribution and are added via ajax. the problem is that when the
 component
  is added via ajax its header contribution is ingored because the 
head

  section is not updated. so in case of the datepicker the js it needs
is
  never added to the page.
 
  im not really sure what the good solution for this is. maybe we can
  update the head, but do browsers take that into account? will a
 script tag
  added to head via outerhtml replacement be processed by the browser?
 can you
  even use outer/innerHtml on elements in the head region of the page?
 
  any thoughts/ideas are welcome.
 
  -igor
 
 
 
  On 5/3/06, Bruno Borges [EMAIL PROTECTED]  wrote:
  
   Oh, one mistake in the code I sent.
  
   - The id for newUserLink I'm using is newUser;
  
   Everything works: AjaxLink replacing the div, the panel, submit,
etc.
   Only the datePicker JS isn't working!
  
   Regards,
  
  
  
   On 5/4/06, Bruno Borges [EMAIL PROTECTED] wrote:
   
I'm trying to load a Form Panel's child, and this panel is been
loaded through an AjaxLink.
   
The DatePicker icon doesn't work. The calendar doesn't shows up.
Is
there any incompatibility between loading panels with Ajax and
 DatePicker
within?
   
My code looks like this:
   
class Index extends WebPage {
constructor {
final Label welcome = new Label(bodyPanel, Welcome);
add(welcome);
   
AjaxLink goHome = new AjaxLink(home) {
... {
getPage().replace(welcome);
target.addComponent(welcome);
}
};
   
AjaxLink newUserLink = AjaxLink(home) {
... {
UserFormPanel panel = new UserFormPanel(bodyPanel);
getPage().replace(panel);
 target.addComponent(panel);
 }
 };
   
add(newUserLink);
add(goHome);
}
}
   
class UserFormPanel extends Panel {
constructor {
add(new UserForm(userForm));
}
}
   
class UserForm extends Form {
constructor {
... // other basic fields like 'username', 'email', 'password'
   
// Date field fieldBirthday
RequiredTextField fieldBirthday = new
RequiredTextField(birthday,
Date.class);
fieldBirthday .add(DateValidator.maximum(Calendar.getInstance
().getTime()));
add(fieldBirthday);
   
// DatePicker for fieldBirthday
DatePickerSettings settings = new DatePickerSettings();
settings.setIfFormat(%d/%m/%Y);
settings.setWeekNumbers(false);
DatePicker datePicker = new DatePicker(datePicker,
 fieldBirthday ,
settings);
add(datePicker);
}
}
   
I can say for sure: the datepicker component was working
perfectly
before opening the panel through AjaxLink (actually,
UserFormPanel
was UserFormPage before this).
Am I missing something here?
   
Regards,
--
Bruno Borges
[EMAIL PROTECTED]
Sun Certified Java Programmer for 1.4
Sun Certified Web Component Developer for 1.4
   
  
  
  
   --
   Bruno Borges
   [EMAIL PROTECTED]
   Sun Certified Java Programmer for 1.4
   Sun Certified Web Component Developer for 1.4
  
 
 


 --
 Bruno Borges
 [EMAIL PROTECTED]
 Sun Certified Java Programmer for 1.4
 Sun Certified Web Component Developer for 1.4





---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job
easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache 
Geronimo

http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user







---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done

Re: [Wicket-user] The other side of Wicket ...

2006-05-04 Thread Timo Stamm

Johan Compagner schrieb:

and doing all of this while training a new developer who just joined
the company and is not familiar w/ Java, Wicket, or even web apps
development in general.


lucky you!!! because they are not completely infected by the mvc (struts)
way of working!


MVC is not Struts! (MVC is *much* older.) I wouldn't even say that 
Struts is MVC.



Timo


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


Re: [Wicket-user] The other side of Wicket ...

2006-05-04 Thread Timo Stamm

Frank Silbermann schrieb:

My great hope is that Wicket can provide great productivity and power to
people who have a true mastery of object-oriented techniques, raising
their pay and status above that of ordinary code-monkeys and
API-memorizers.

My great fear is that the market will reject Wicket because
procedurally-oriented code-monkeys won't be able to use it.


The better for us. We can offer better quality for the same price *and* 
go home early :)



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


Re: [Wicket-user] Generating HTML with Wicket?

2006-05-03 Thread Timo Stamm

Eelco Hillenius schrieb:

While it wouldn't be considered best practice, you could. There are
several tags, like dropdownchoice, that write out pieces of HTML
without creating sub elements first.


Instead of handling Strings yourself, it is perfectly possible to use 
ECS or any other lib (like the ones that come with Jetty) for this task.


But I doubt that this integrates well with the rest of the wicket world. 
Using Panels to generate markup dynamically is quite powerful. I think 
that Wicket could handle this a bit more elegant, but it really works 
well enough for most cases.


See this article for a very short introduction to using Panels for 
dynamic markup:


http://www.wicket-wiki.org.uk/wiki/index.php/Create_dynamic_markup_hierarchies_using_panels


There is a BeanEditor in wicket extensions that uses Panels to create 
the input elements for the bean properties dynamically. At least with 
1.1.1, you can find an example in the example project under 
examples/compref/BeanEditPage.java



Timo



On 5/3/06, Ashley Aitken [EMAIL PROTECTED] wrote:



Howdy All,

I am new to Wicket, just looking around for an appropriate Web 
framework to

use on my next project.

I would like to know if Wicket can (or will shortly be able to) generate
HTML elements (as well as doing all the other things it can do).  By 
this I
mean something like the old Element Construction Set (ECS) or perhaps 
even

Swinglets.

I've seen some discussion of this on the mailing list archive 
(although it

is hard to follow threads via the archive), but it was mainly relating to
Wicket possibly auto-generating prototype HTML if a HTML file was not
available.

I also understand that Wicket usually works with a HTML file and some may
suggest using a Wicket panel for each possible element I wish to 
construct.

That may be a possible but it doesn't seem elegant.

However, I can't see why Wicket couldn't generate HTML when required, for
very dynamic parts of a Web page.  Wicket seems to have classes
corresponding to most (if not all) HTML elements already.

Of course, most dynamic Web pages won't need this, they just want to slot
some dynamic content in an already setup HTML template, but I can also 
see

where full dynamic control of the tags and content could be useful.

Sorry if I have misunderstood how Wicket works.  Any comments, or
suggestions, would be most appreciated.



Cheers,


Ashley.




--

Ashley Aitken

Perth, Western Australia

mrhatken at mac dot com

Skype Name: MrHatken (GMT + 8 Hours!)








---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job 
easier

Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=kkid0709bid3057dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user





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


Re: [Wicket-user] Generating HTML with Wicket?

2006-05-03 Thread Timo Stamm

Ashley Aitken schrieb:


On 03/05/2006, at 5:42 PM, Timo Stamm wrote:

Instead of handling Strings yourself, it is perfectly possible to use 
ECS or any other lib (like the ones that come with Jetty) for this task.


Yes, that was my hope (or that Wicket classes could optionally generate 
the full HTML).  But I am unsure how to inject the HTML into a Wicket 
page at a particular location.


Would I just have something like a a SPAN or DIV tag with a wicket:id 
and then dynamically put the string generated from ECS or similar in 
there at run-time using a Label?


Exactly.


But I doubt that this integrates well with the rest of the wicket 
world. Using Panels to generate markup dynamically is quite powerful. 
I think that Wicket could handle this a bit more elegant, but it 
really works well enough for most cases.


See this article for a very short introduction to using Panels for 
dynamic markup:


http://www.wicket-wiki.org.uk/wiki/index.php/Create_dynamic_markup_hierarchies_using_panels 



Yes thanks, I have seen that but it doesn't seem like it would scale to 
generate arbitrary HTML - having a component for every different HTML 
tag (pair) seems like overkill ;-)


Yes :)

Panels are useful to encapsulate common GUI elements with several lines 
of markup, but not for single tags.



Timo


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


Re: [Wicket-user] Redirect to bookmarkable page

2006-05-03 Thread Timo Stamm

Johan Compagner schrieb:

that is currently not possible


What about using the RedirectPage?

(I think it's ugly, but it should work)


Timo



we don't have a PageMap.redirectToInterceptPage(final Class pageClass)
only a Page

can you add a feature request for this?

johan


On 5/3/06, John Patterson [EMAIL PROTECTED] wrote:


Hi,

I would like users to be able to bookmark my login page with a nice
link. I have mounted the page and tested that this link does indeed take
you to my LoginPage.  However, when users are redirected to this page by
  redirectToInterceptPage the page url is not the bookmarkable one
(/member/login) but /member?wicket:interface=:0::

What can I do to make Wicket use the bookmarkable url when it redirects
users to the login page?

Thanks,

John.



---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job
easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache 
Geronimo

http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user







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


Re: [Wicket-user] Redirect to bookmarkable page

2006-05-03 Thread Timo Stamm

John Patterson schrieb:

Do you mean the RedirectPage in the library application?


I mean wicket.markup.html.pages.RedirectPage

It makes a redirect by putting the new URL into the location object 
using javascript. This URL can be bookmarkable.


But I don't even like the RedirectPage, and using it in the suggested 
way is an ugly kludge. I would wait for a better solution.



Timo


I thought that 
Session.invalidate() waits until after the request is finished anyway?



On 3 May 2006, at 16:04, Johan Compagner wrote:


yeah that could work. But that is really ugly.

johan


On 5/3/06, Timo Stamm [EMAIL PROTECTED] wrote:
Johan Compagner schrieb:
 that is currently not possible

What about using the RedirectPage?

(I think it's ugly, but it should work)


Timo


 we don't have a PageMap.redirectToInterceptPage(final Class pageClass)
 only a Page

 can you add a feature request for this?

 johan


 On 5/3/06, John Patterson [EMAIL PROTECTED] wrote:

 Hi,

 I would like users to be able to bookmark my login page with a nice
 link. I have mounted the page and tested that this link does indeed 
take
 you to my LoginPage.  However, when users are redirected to this 
page by

   redirectToInterceptPage the page url is not the bookmarkable one
 (/member/login) but /member?wicket:interface=:0::

 What can I do to make Wicket use the bookmarkable url when it 
redirects

 users to the login page?

 Thanks,

 John.



 ---
 Using Tomcat but need to do more? Need to support web services, 
security?

 Get stuff done quickly with pre-integrated technology to make your job
 easier
 Download IBM WebSphere Application Server v.1.0.1 based on Apache
 Geronimo
 
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642

 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user





---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job 
easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache 
Geronimo

http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user








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


Re: [Wicket-user] Wicket book

2006-05-02 Thread Timo Stamm

Vincent Jenks schrieb:

It's very useful, however, it's also lacking quite a bit of
information. The Wiki and the Javadoc doesn't get you as far as you'd
hope, as a newbie.


That's bad.

I think that Javadocs are perfect as a reference. In combination with 
various tutorials to get started, that's all I need to get things done. 
It should be the same with Wicket. The Javadocs are quite good, but 
maybe the tutorials aren't good enough.


I can't speak for the wicket committers, but in my opinion users should 
be encouraged to write down as much as possible in the wiki, even if the 
quality is not perfect. Other people can (and will, in my experience) 
improve it and remove redundant or false information.



Timo



I use the Wiki, search the mailing list, and then post when I run out
of options for info.

Anyhow, everything is improving daily...including the wiki.

On 5/1/06, Timo Stamm [EMAIL PROTECTED] wrote:

Vincent Jenks schrieb:
 Yes, the developers are *insanely* helpful and patient. ;)  Without
 this list I'm not sure I would have been able to use Wicket for long,
 to be perfectly honest.

Try the Wiki! wasn't ment as Try the Wiki because the devs have
better things to do, it was ment as Try the Wiki because it's become
damn useful!


Timo


 On 5/1/06, Timo Stamm [EMAIL PROTECTED] wrote:
 Rivka Shisman schrieb:
  A good book with examples and recipes is quite necessary :-)

 Try the Wiki! http://www.wicket-wiki.org.uk

 There is nice guide for beginners that should get you started:
 http://www.wicket-wiki.org.uk/wiki/index.php/Newuserguide

 Then there is the reference library with information and howtos on 
a lot
 of topics: 
http://www.wicket-wiki.org.uk/wiki/index.php/Reference_library



 Timo


 ---
 Using Tomcat but need to do more? Need to support web services, 
security?

 Get stuff done quickly with pre-integrated technology to make your job
 easier
 Download IBM WebSphere Application Server v.1.0.1 based on Apache
 Geronimo
 
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642

 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



 ---
 Using Tomcat but need to do more? Need to support web services, 
security?

 Get stuff done quickly with pre-integrated technology to make your job
 easier
 Download IBM WebSphere Application Server v.1.0.1 based on Apache 
Geronimo

 http://sel.as-us.falkag.net/sel?cmd=kkid0709bid3057dat1642
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user




---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job 
easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache 
Geronimo

http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user




---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job 
easier

Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=kkid0709bid3057dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user





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


Re: [Wicket-user] Wicket book

2006-05-02 Thread Timo Stamm

Eelco Hillenius schrieb:

Yeah, especially the component reference should be helpfull. We all
put a lot of effort in that! :)


Yes, I always look into the example project first to see how a component 
should be used. It's very helpful.


Replacing these examples with tutorials in the wiki would be a lot of 
work, especially keeping them up to date. But they would certainly get 
more attention and it would be a lot easier to refer and link to them 
from other articles.



Timo


On 5/1/06, Gwyn Evans [EMAIL PROTECTED] wrote:

One thing that often gets overlooked is the wicket-examples
module/project, which is either available as a download
(http://sourceforge.net/project/showfiles.php?group_id=119783package_id=138752) 


 or live at http://www.wicket-library.com/wicket-examples/, although
the live is based on the last major release, rather than the 1.2 at
the moment.  It's got working examples of all sorts of things,
though...

/Gwyn

On 01/05/06, Vincent Jenks [EMAIL PROTECTED] wrote:
 I have to agree.  What would be nice, if possible, is a small example
 code snippet in the Javadoc for each object.  However, some may feel
 that code doesn't belong in there at all and should be in the wiki
 instead.

 Personally, I like example code too but small examples don't always
 fully illustrate some conceptsthat's there the wiki comes in.

 On 5/1/06, Eelco Hillenius [EMAIL PROTECTED] wrote:
  Due to the lack of time most of us have here, we need to make 
choices.

  I think the WIKI is great for getting the contributions from the
  community itself, though the core devs - especially Gwyn - regularly
  update it too. But it's really great to see more people are helping
  out and writing items on the WIKI.
 
  I try to focus on examples personally. Everyone has a different 
way of

  learning; I find examples always really useful, and it has the
  additional advantage of functioning as proof-of-concept/ test code a
  lot of times.
 
  Just my 2c,
 
  Eelco
 
 
  On 5/1/06, Vincent Jenks [EMAIL PROTECTED] wrote:
   It's very useful, however, it's also lacking quite a bit of
   information.  The Wiki and the Javadoc doesn't get you as far as 
you'd

   hope, as a newbie.
  
   I use the Wiki, search the mailing list, and then post when I 
run out

   of options for info.
  
   Anyhow, everything is improving daily...including the wiki.
  
   On 5/1/06, Timo Stamm [EMAIL PROTECTED] wrote:
Vincent Jenks schrieb:
 Yes, the developers are *insanely* helpful and patient. ;)  
Without
 this list I'm not sure I would have been able to use Wicket 
for long,

 to be perfectly honest.
   
Try the Wiki! wasn't ment as Try the Wiki because the devs 
have
better things to do, it was ment as Try the Wiki because 
it's become

damn useful!
   
   
Timo
   
   
 On 5/1/06, Timo Stamm [EMAIL PROTECTED] wrote:
 Rivka Shisman schrieb:
  A good book with examples and recipes is quite necessary :-)

 Try the Wiki! http://www.wicket-wiki.org.uk

 There is nice guide for beginners that should get you started:
 http://www.wicket-wiki.org.uk/wiki/index.php/Newuserguide

 Then there is the reference library with information and 
howtos on a lot
 of topics: 
http://www.wicket-wiki.org.uk/wiki/index.php/Reference_library



 Timo




---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job 
easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache 
Geronimo

http://sel.as-us.falkag.net/sel?cmdlnkkid0709bid3057dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user




---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job 
easier

Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=kkid0709bid3057dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user





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


Re: [Wicket-user] Wicket book

2006-05-01 Thread Timo Stamm

Vincent Jenks schrieb:

Yes, the developers are *insanely* helpful and patient. ;)  Without
this list I'm not sure I would have been able to use Wicket for long,
to be perfectly honest.


Try the Wiki! wasn't ment as Try the Wiki because the devs have 
better things to do, it was ment as Try the Wiki because it's become 
damn useful!



Timo



On 5/1/06, Timo Stamm [EMAIL PROTECTED] wrote:

Rivka Shisman schrieb:
 A good book with examples and recipes is quite necessary :-)

Try the Wiki! http://www.wicket-wiki.org.uk

There is nice guide for beginners that should get you started:
http://www.wicket-wiki.org.uk/wiki/index.php/Newuserguide

Then there is the reference library with information and howtos on a lot
of topics: http://www.wicket-wiki.org.uk/wiki/index.php/Reference_library


Timo


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job 
easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache 
Geronimo

http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user




---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job 
easier

Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=kkid0709bid3057dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user





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


Re: [Wicket-user] images sizes

2006-04-25 Thread Timo Stamm

Alexander Lohse schrieb:
As I am coming from PHP I am used to a very quick function-call to find 
the size of an image. In Java I have to read the whole image into 
memory, which takes very long in terms of request-time.


You don't have to read the entire image. The dimensions are usually 
embedded in some meta-data section, so it is not necessary to decode the 
entire image just to get the dimensions.


This is how you get the dimensions from image files:

ImageInputStream i = ImageIO.createImageInputStream(new 
FileInputStream(file));

try {
   IteratorImageReader r = ImageIO.getImageReaders(i);
   if (r.hasNext()) {
  ImageReader reader = r.next();
  reader.setInput(i, true);
  width = reader.getWidth(0);
  height = reader.getHeight(0);
  formatName = reader.getFormatName().toLowerCase();
  reader.dispose();
   }
} finally {
   i.close();
}


HTH,
Timo


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


Re: [Wicket-user] WebPage generated script problem

2006-04-19 Thread Timo Stamm

nato schrieb:

mime type: text/html
doctype: xhtml 1.0 transitional
script and style tags: enclose it within CDATA

With this setup that I've been doing for almost a year, I haven't had any
problems. My applications run even on the very sucking IE. 


Dito.



But Wicket
prevents me from having a valid XHTML because of the markup it generates.

Actually, I'm a bit confious what document type to use for my Wicket html
markups... It's not HTML and not XHTML either. It's not HTML because it
requires some tags like the input tag to end with / . And it's not XHTML
either because it's not compliant even with XHTML-1.0-transitional.


How does Wicket force you to write HTML that is not compliant with XHTML?


Timo


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


Re: [Wicket-user] WebPage generated script problem

2006-04-19 Thread Timo Stamm

nato schrieb:

it's a syntax error for javascript if the ![CDATA[ and ]] are not
commented.


No it isn't, at least not if you declare the document as XHTML.


TImo


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


Re: [Wicket-user] New Suggestion: Form components as labels

2006-04-19 Thread Timo Stamm

Ali,


that's a nice idea. But I think it has some disadvantages: The TextInput 
component would have to change the entire tag. So it would have to be 
responsible not only for input tags, but for the static representation 
as a span or div as well.


I am not a friend of putting that much functionality into basic Form 
components.


Maybe it is an alternative to use the HTML standards to switch from 
editable to static textinputs? You can simply set the attribute 
disabled=disabled.



Timo



Ali Zaid schrieb:

Hi Guys;

I have been working with the RC1 and I found it wonderful, today I
came across something that make me think about new thing to add to
wicket (unless it is there and I don't know)

The thing is, I want to create some Information sheet (I always do
;)), and I need to show info, and give the user the ability to press
edit and edit this info, what I used to do is to create 2 panels, one
that show the info as text, and the other is the form. and the other
trick is to add 2 components to the field and show or hide one
depending on what mode the user in.

Since I'm lazy, and wicket has beed designed to make us even more lazy
than before ;), I would suggest this

TextField tf = new TextField(name);

now what wicket would expect is to have a tag for this in html that
looks like this

input type=text wicket:id=name /

now come the lazy part why don't we add something to it to make it
render as a simple Label, something like:

tf.preview(true);

or

tf.renderAsLabel(true);

now if this can be done for all the form component in my openion this
would be really useful, tell you the truth I'm so excited about Ajax
in place edit of 1.2, and I'm trying to use it in a new project I'm
writting in wicket! but still the above is really worth allot in my
openion.

--
Regards, Ali
-
Fight back spam! Download the Blue Frog.
http://www.bluesecurity.com/register/s?user=YWxsb2NoaTI5Nzk%3D


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





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


Re: [Wicket-user] Wicket continuations (was: wicket ajax memory leak with IE)

2006-04-16 Thread Timo Stamm

Eelco Hillenius schrieb:

However, a framework like Wicket is not only about flow. A very
important aspect is how you organize your pages. It the basis of
object orientation to be able to categorize ideas and encapsulate
their data and behavior.


That's exactly my idea. If you *do* have a complex but well-defined 
flow, why not encapsulate it?


Igor said that he build a wizard with reusable panels and a state 
machine and I believe that it does the job well enough. But I want 
better than well enough :)




But like I said, I wouldn't be against exploring continuations for
Wicket in some contexts - like wizards -, if you have a good idea how
this would be combined with component orientation I'd be interested to
hear.


I have made a proposal last year:

http://sourceforge.net/mailarchive/message.php?msg_id=13995847

Johan pointed out some problems and suggested an interface 
IContinuation. But this would require some changes in the wicket core.


Do you know any way to get around this core enhancement?

I think it should be sufficient to have one Continuation per Panel, or 
maybe even one per Page.



Timo



 But like you can read from that TSS thread, I just don't believe

in flow-oriented frameworks, and in fact think they put people in the
wrong mind set. But that's just me of course ;)

Eelco


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






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


Re: [Wicket-user] wicket ajax memory leak with IE

2006-04-14 Thread Timo Stamm

Igor,


do you know RIFE/Continuations? It uses continuations for better state 
handling and control flow instead of better performance.


There are some examples in this slide (pages 5 to 8):
https://www.dev.java.net/files/documents/204/3120/rife_fosdem_2004.pdf

It really looks like an interesting concept. You could keep complicated 
flow control for business-logic at one place.


It changes the bytecode using ASM, but if it's done properly, I don't care.


Timo


Igor Vaynberg schrieb:

well, at some point the server calls will start returning right? and so
xmlhttprequest objects will start being reused. it will consume memory to a
certain point and then stop. if you ask me 100ms for an ajax update is
unreasonable anyways, this is what jetty 6 continuations are for which would
be relatively simple to integrate into wicket as an alternative for ajax
self updating behaviors.

-Igor



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


Re: [Wicket-user] wicket ajax memory leak with IE

2006-04-14 Thread Timo Stamm

Eelco Hillenius schrieb:

I can't speak for Igor - though we have talked about that too - but
for my opion see e.g.
http://www.theserverside.com/news/thread.tss?thread_id=39579#204913


Thanks for the link.



mind you that Wicket allows for very fancy state optimizations as
well.


Quoting from a response from Bruce Tate (taken from your link):

| check out Seaside's online store as an example of a wizard with
| continuations. It's a classic shopping cart. The code:
|
| go
|   | shipping billing creditCard |
|   cart _ WAStoreCart new.
|   self isolate:
|  [[self fillCart.
| self confirmContentsOfCart]
|   whileFalse].
|
|   self isolate:
|  [shipping - self getShippingAddress.
|   billing - (self useAsBillingAddress: shipping)
| ifFalse: [self getBillingAddress]
| ifTrue: [shipping].
| creditCard - self getPaymentInfo.
| self shipTo: shipping billTo: billing payWith: creditCard].
|
|   self displayConfirmation.

I like this a lot better than spreading the logic over several 
components and handlers.




So, I'm not pro continuations in Wicket at this point, except for the
ajax optimization with Jetty, which will probably be implemented
transparently.


I am not asking you to write it :) I just want to discuss the idea, 
because I would like to know what benefit or problems/incompatibilities 
other people see.




Geert has done the extra effort
of ensuring his continutation API can be used without RIFE


WebWork already has some support.


Timo


, so that's

certainly an option (I think, because I never seriously thought about
how this would/ should be integrated in Wicket).

My 2c,

Eelco

On 4/14/06, Timo Stamm [EMAIL PROTECTED] wrote:

Igor,


do you know RIFE/Continuations? It uses continuations for better state
handling and control flow instead of better performance.

There are some examples in this slide (pages 5 to 8):
https://www.dev.java.net/files/documents/204/3120/rife_fosdem_2004.pdf

It really looks like an interesting concept. You could keep complicated
flow control for business-logic at one place.

It changes the bytecode using ASM, but if it's done properly, I don't care.


Timo


Igor Vaynberg schrieb:

well, at some point the server calls will start returning right? and so
xmlhttprequest objects will start being reused. it will consume memory to a
certain point and then stop. if you ask me 100ms for an ajax update is
unreasonable anyways, this is what jetty 6 continuations are for which would
be relatively simple to integrate into wicket as an alternative for ajax
self updating behaviors.

-Igor


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




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





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


Re: [Wicket-user] HTTP POST from Acrobat

2006-04-13 Thread Timo Stamm

Johan Compagner schrieb:

PageParametes will contain post params..


That's great. Thanks, I wasn't aware of that.


Timo



So if for example you post to a bookmarkable page then PageParameters should
be filled with everything.

johan

On 4/13/06, Timo Stamm [EMAIL PROTECTED] wrote:

kurt heston schrieb:

I could probably extend one of the core wicket
classes instead of HttpServlet and arrive at the same place, though I'm
not sure it would be any more elegant.


A thought: Maybe PageParameters should be available for POST requests as
well.

I don't know if it possible for a framework-client to handle requests at
the required level...


Timo



Thanks for the help.

Timo Stamm wrote:

kurt heston schrieb:

I've got some legacy PDFs laying around that utilize the HTTP submit
functionality available when using Acrobat fillable forms.  The
servlet I have answering these Acrobat requests saves off the field
names and values submitted in a 3 column table (rec id, field name,
value).  We change the forms and add fields pretty often.  Later,
when a view of the filled form is requested, I fill it again with the
database values using iText (which is BEYOND cool) and stream it to
the browser.  Simple enough.

I'm presently using this servlet's response object to just forward
calls on to a Wicket bookmarkable page...pretty loose integration.

I think this loose integration is the best you can do. I am using
quite a similar approach to integrate a legacy JSP based app and it
works very well.



Any suggestions as to how I might Wickefy my servlet such that I
can take advantage of things like Wicket session management an such
when handling requests submitted via Acrobat?

What are you missing? The bookmarkable Page should have access to the
Wicket session. Remember to forward the session id as well.


Timo


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting
language
that extends applications into web and mobile media. Attend the live
webcast
and join the prime developer group breaking into this new coding
territory!


http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642

___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user



---
This SF.Net email is sponsored by xPML, a groundbreaking scripting

language

that extends applications into web and mobile media. Attend the live
webcast
and join the prime developer group breaking into this new coding

territory!

http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user




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







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


Re: [Wicket-user] HTTP POST from Acrobat

2006-04-13 Thread Timo Stamm

Johan Compagner schrieb:

PageParametes will contain post params..


This comment by Martijn Dashorst sounds different:

| A note to the article: you can't use the PageParameters for types
| other than simple types such as Strings and Integers. [...]
|
| The bookmarkable links and PageParameters are used for things that
| need to be bookmarkable.

http://www.javalobby.org/java/forums/m91985755.html


Only URLs with simple urlencoded parameters are bookmarkable. You can't 
bookmark a POST request.



The API doc says:
| Page parameters in HTTP are query string values in the request URL.


Johan, are you sure that multipart POST requests are supported?


Timo






So if for example you post to a bookmarkable page then PageParameters should
be filled with everything.

johan

On 4/13/06, Timo Stamm [EMAIL PROTECTED] wrote:

kurt heston schrieb:

I could probably extend one of the core wicket
classes instead of HttpServlet and arrive at the same place, though I'm
not sure it would be any more elegant.


A thought: Maybe PageParameters should be available for POST requests as
well.

I don't know if it possible for a framework-client to handle requests at
the required level...


Timo



Thanks for the help.

Timo Stamm wrote:

kurt heston schrieb:

I've got some legacy PDFs laying around that utilize the HTTP submit
functionality available when using Acrobat fillable forms.  The
servlet I have answering these Acrobat requests saves off the field
names and values submitted in a 3 column table (rec id, field name,
value).  We change the forms and add fields pretty often.  Later,
when a view of the filled form is requested, I fill it again with the
database values using iText (which is BEYOND cool) and stream it to
the browser.  Simple enough.

I'm presently using this servlet's response object to just forward
calls on to a Wicket bookmarkable page...pretty loose integration.

I think this loose integration is the best you can do. I am using
quite a similar approach to integrate a legacy JSP based app and it
works very well.



Any suggestions as to how I might Wickefy my servlet such that I
can take advantage of things like Wicket session management an such
when handling requests submitted via Acrobat?

What are you missing? The bookmarkable Page should have access to the
Wicket session. Remember to forward the session id as well.


Timo


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting
language
that extends applications into web and mobile media. Attend the live
webcast
and join the prime developer group breaking into this new coding
territory!


http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642

___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user



---
This SF.Net email is sponsored by xPML, a groundbreaking scripting

language

that extends applications into web and mobile media. Attend the live
webcast
and join the prime developer group breaking into this new coding

territory!

http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user




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







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


Re: [Wicket-user] HTTP POST from Acrobat

2006-04-13 Thread Timo Stamm

Johan Compagner schrieb:

you where talking about the PageParameters object so i thought you where
talking about inbound stuff.
Then every parameters will be in it.

Ofcourse no multipart stuff and ofcourse outbound only what can be presented
in a simple string can be added.


Ok, so it doesn't work. That was a misunderstanding. We are talking 
about integrating wicket with other apps. For example Acrobat, which can 
send POST data (no URL parameters) from a form.




That seems logical to me


Yes, it is. But on the other hand there might be a need to integrate a 
legacy app with wicket that requires that a POST request is handled.


Kurt is using a servlet to handle that request, and redirects to a 
bookmarkable wicket page. I thought about how Wicket could handle this 
directly, without a servlet in between, and PageParameters came into my 
mind.



Timo




On 4/13/06, Timo Stamm [EMAIL PROTECTED] wrote:

Johan Compagner schrieb:

PageParametes will contain post params..

This comment by Martijn Dashorst sounds different:

| A note to the article: you can't use the PageParameters for types
| other than simple types such as Strings and Integers. [...]
|
| The bookmarkable links and PageParameters are used for things that
| need to be bookmarkable.

http://www.javalobby.org/java/forums/m91985755.html


Only URLs with simple urlencoded parameters are bookmarkable. You can't
bookmark a POST request.


The API doc says:
| Page parameters in HTTP are query string values in the request URL.


Johan, are you sure that multipart POST requests are supported?


Timo






So if for example you post to a bookmarkable page then PageParameters

should

be filled with everything.

johan

On 4/13/06, Timo Stamm [EMAIL PROTECTED] wrote:

kurt heston schrieb:

I could probably extend one of the core wicket
classes instead of HttpServlet and arrive at the same place, though

I'm

not sure it would be any more elegant.

A thought: Maybe PageParameters should be available for POST requests

as

well.

I don't know if it possible for a framework-client to handle requests

at

the required level...


Timo



Thanks for the help.

Timo Stamm wrote:

kurt heston schrieb:

I've got some legacy PDFs laying around that utilize the HTTP submit
functionality available when using Acrobat fillable forms.  The
servlet I have answering these Acrobat requests saves off the field
names and values submitted in a 3 column table (rec id, field name,
value).  We change the forms and add fields pretty often.  Later,
when a view of the filled form is requested, I fill it again with

the

database values using iText (which is BEYOND cool) and stream it to
the browser.  Simple enough.

I'm presently using this servlet's response object to just forward
calls on to a Wicket bookmarkable page...pretty loose integration.

I think this loose integration is the best you can do. I am using
quite a similar approach to integrate a legacy JSP based app and it
works very well.



Any suggestions as to how I might Wickefy my servlet such that I
can take advantage of things like Wicket session management an such
when handling requests submitted via Acrobat?

What are you missing? The bookmarkable Page should have access to the
Wicket session. Remember to forward the session id as well.


Timo


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting
language
that extends applications into web and mobile media. Attend the live
webcast
and join the prime developer group breaking into this new coding
territory!


http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642

___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting

language

that extends applications into web and mobile media. Attend the live
webcast
and join the prime developer group breaking into this new coding

territory!

http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642

___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user



---
This SF.Net email is sponsored by xPML, a groundbreaking scripting
language
that extends applications into web and mobile media. Attend the live
webcast
and join the prime developer group breaking into this new coding
territory!


http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642

___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user




---
This SF.Net email is sponsored by xPML, a groundbreaking

Re: [Wicket-user] HTTP POST from Acrobat

2006-04-12 Thread Timo Stamm

kurt heston schrieb:
I've got some legacy PDFs laying around that utilize the HTTP submit 
functionality available when using Acrobat fillable forms.  The servlet 
I have answering these Acrobat requests saves off the field names and 
values submitted in a 3 column table (rec id, field name, value).  We 
change the forms and add fields pretty often.  Later, when a view of the 
filled form is requested, I fill it again with the database values using 
iText (which is BEYOND cool) and stream it to the browser.  Simple enough.


I'm presently using this servlet's response object to just forward calls 
on to a Wicket bookmarkable page...pretty loose integration.


I think this loose integration is the best you can do. I am using quite 
a similar approach to integrate a legacy JSP based app and it works very 
well.



Any 
suggestions as to how I might Wickefy my servlet such that I can take 
advantage of things like Wicket session management an such when handling 
requests submitted via Acrobat?


What are you missing? The bookmarkable Page should have access to the 
Wicket session. Remember to forward the session id as well.



Timo


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


Re: [Wicket-user] View from 30,000 feet of Wicket infrastructure

2006-04-12 Thread Timo Stamm

Johan Compagner schrieb:

the problem with myeclipse is that they don't move quickly enough for me.
They should be atleast have a version of myeclipse for every milestone
build. Else i can't really use there software.



Yes, they don't move very fast. Dependencies for web projects are also a 
big issue for me. They wanted to improve the flexibility of the build 
process last summer, but AFAIK that's not done yet.


On the other hand, support is very good.


Timo



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


Re: [Wicket-user] View from 30,000 feet of Wicket infrastructure

2006-04-12 Thread Timo Stamm

Vincent Jenks schrieb:

They definitely seem more focused on new features and longer delays on
releases.  Personally, I don't use half of the features but that's not
to say that I never will.  I do, however, appreciate the rock-solid
stability and the support, so far, has been very good.


I use pretty much every feature except the Struts support. Couldn't live 
without the DataBase Explorer.


Stability is an issue under OS X. Maybe it's better on Windows or Linux.



How is the dependencies feature not flexible?  I specifically chose
MyEclipse because Webtools 1.0 had a broken dependencies problem and
you had to manually add jars to the web project for them to be
deployed.


Maybe it's better than Webtools (never tried that), but you can't 
inherit anything from a WebProject. This sucks if you have an app that 
is split into individual projects.



Timo



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


Re: [Wicket-user] IMG reload via AJAX

2006-04-12 Thread Timo Stamm

Yes, but what if the clock fails?

:)


Johan Compagner schrieb:

my god! how brilliant!
Igor++!

On 4/12/06, Timo Stamm [EMAIL PROTECTED] wrote:

Igor Vaynberg schrieb:

you are absolutely right, how foolish of me.

a better way of course would be

url=url+rand=+UUID.random().toString()

but wait...even with that there is a chance of collission...hmmm

how about you have a static BigInteger in your resource, and use that as

a

sequence to generate unique ids to append to the url!


System.currentTimeMillis()


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







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


Re: [Wicket-user] HTTP POST from Acrobat

2006-04-12 Thread Timo Stamm

kurt heston schrieb:
I could probably extend one of the core wicket 
classes instead of HttpServlet and arrive at the same place, though I'm 
not sure it would be any more elegant.



A thought: Maybe PageParameters should be available for POST requests as 
well.


I don't know if it possible for a framework-client to handle requests at 
the required level...



Timo



Thanks for the help.

Timo Stamm wrote:

kurt heston schrieb:
I've got some legacy PDFs laying around that utilize the HTTP submit 
functionality available when using Acrobat fillable forms.  The 
servlet I have answering these Acrobat requests saves off the field 
names and values submitted in a 3 column table (rec id, field name, 
value).  We change the forms and add fields pretty often.  Later, 
when a view of the filled form is requested, I fill it again with the 
database values using iText (which is BEYOND cool) and stream it to 
the browser.  Simple enough.


I'm presently using this servlet's response object to just forward 
calls on to a Wicket bookmarkable page...pretty loose integration.


I think this loose integration is the best you can do. I am using 
quite a similar approach to integrate a legacy JSP based app and it 
works very well.



Any suggestions as to how I might Wickefy my servlet such that I 
can take advantage of things like Wicket session management an such 
when handling requests submitted via Acrobat?


What are you missing? The bookmarkable Page should have access to the 
Wicket session. Remember to forward the session id as well.



Timo


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting 
language
that extends applications into web and mobile media. Attend the live 
webcast
and join the prime developer group breaking into this new coding 
territory!

http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user




---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live 
webcast

and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user





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


Re: [Wicket-user] New Link component ?

2006-04-03 Thread Timo Stamm

Alex schrieb:
Hi, 
we've been using wicket for about a month now, so far so good. 
The only complain is about code lisibility, sometimes our constructors
are filled with a lot of code, particurally with all the : 


add(new Link(myLink)
{
public void onClick(RequestCycle cycle)
{
// do something here...  
}

);



If java had good support for closures, not just anonymous classes, the 
syntax could be much more compact. A closure is a function object that 
has access to the lexical environment of when it was created.



A closure could be declared like this:

   String {Object t} manipulate;

String means that the Closure returns a String.
Object t is the only argument.


The definition of a Closure could look like this:

  manipulate = {t | return t.toString + abc};

The part before | is the closure argument t. The part after | is 
the body of the closure.




So instead of using anonymous classes and overriding methods like this:

   new TextInput(myTextInput) {
  @Override
  String manipulate(String input) {
 return input.toString() + abc;
  }
   }


The TextInput could accept a closure:

   new TextInput(myTextInput, {t | return input.toString() + abc});


The constructor signature:

   TextInput(String id, String {Object t} manipulate)



For more information, see the entry on closures in the wiki of the 
excellent Martin Fowler:


  http://www.martinfowler.com/bliki/Closure.html




[...] So we thought a custom component subclassing Link could force this 

 approach :


in constructor :

add(new ReflectionLink(myLink, myMethod))

and elsewhere :

public void myMethod() { // do something here ... }

Basically the ReflectionLink would contain some reflection stuff in
onClick(RequestCycle cycle) to invoke our method... 


What do you think ?



What about something like this:


html:

   input type=submit wicket:reflect=onMyAction /


java:

   class X extends WebPage {
  @Expose
  public void onMyAction() {
 System.out.println(myButton klicked);
  }

   }



Timo



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


Re: [Wicket-user] New Link component ?

2006-04-03 Thread Timo Stamm

Igor Vaynberg schrieb:
yeah, but how many times are your onclick handles that simple? 


Quite often, actually. And if they are more complex, I would really like 
to loose some of the superflous brackets and indentation which anonymous 
classes add.




usually they
are more complex, they might have a few try/catch blocks, etc. this is just
syntactic sugar.


I think Java really needs some syntactic sugar. Generics for example can 
easily become awfully verbose. A little bit of local inference would 
really help.



Timo


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


Re: [Wicket-user] Location of image files

2006-03-29 Thread Timo Stamm

Frank Silbermann schrieb:

But my src attribute to be modified _is_ in my HTML, as you can see
(value shown is REPLACE_THIS.png).  The problem is that the existing
src attribute's value was not replaced.  What do I need to do
differently?


Use this constructor:

new AttributeModifier(src, true, new Model(pictureFile));
 


It's documented:

public AttributeModifier(java.lang.String attribute,
 boolean addAttributeIfNotPresent,
 IModel replaceModel)

Parameters:

  attribute - The attribute name to replace the value for
  addAttributeIfNotPresent - Whether to add the attribute if it is not
 present
  replaceModel - The model to replace the value with


Timo


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


Re: [Wicket-user] Java Web Framework Sweet Spots

2006-03-27 Thread Timo Stamm

Eelco Hillenius schrieb:

As could be expected, there's a discussion going on that document on
Raible's blog: 
http://raibledesigns.com/page/rd?entry=java_web_frameworks_sweet_spots#comments

I seem to get bonus points for being blunt ;)



Eelco,


I think your comments were well-balanced and honest.

You even managed to give a differentiated comment on RoR without bashing 
or hyping it, which seems to be very difficult (especially for java 
programmers).



Timo


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


Re: [Wicket-user] Java Web Framework Sweet Spots

2006-03-25 Thread Timo Stamm

Eelco Hillenius schrieb:

This is what is going wrong in your company. You shouldn't let the
average designer produce HTML. Have them produce their screens in
Photoshop, and let a technical person build the HTML.


I have seen both. Probably more often than not designers just produce
some images. Leaving you (the developer) with the boring task of
creating HTML and CSS of that. It's sub-optimal and duplication of
effort though.


I actually prefer that over messy HTML. It's incredible what garbage 
HTML editors can create.


On the other hand, it can also get very complicated if the designer 
doesn't have any experience with web design and creates layouts that 
just don't make sense in HTML.




I had the best experience with Topicus last year when
we had designer that actually worked on our HTML and CSS. I loved to
work like that and I thought it was a much more efficient way of doing
things.


I never had the pleasure to work like this :(

But there certainly are some great designers:

John Gruber: http://daringfireball.net/
Justin Palmer: http://encytemedia.com/blog/
Cameron Moll: http://www.cameronmoll.com/
Steve Smith: http://orderedlist.com/


Timo


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


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

2006-03-21 Thread Timo Stamm

Steve Knight schrieb:

If my SortableDataProvider implementation will always return the max number
of results (I'm not using paging), is it safe to have the size() method
simply return Integer.MAX_VALUE instead of performing a database query to
count the actual results?


You shouldn't. It might not give you problems right now, but you break 
the contract with the interface.


You can cache the result so that you do only one query per request to 
get both the result size and the result values. Use onDetach to clear 
the cache after each request.



It should look like this (pseudo-code):


private List result;

void onDetach() {
  result = null;
}

Iterator iterator(from, to) {
   return getData().iterator();
}

int size() {
  return result.size();
}

private Collection getData() {
  if (result == null) {
result = dbquery(from, to);
  }
  return result;
}


Timo


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


Re: [Wicket-user] Writing to outputstream (Trying to do export)

2006-03-21 Thread Timo Stamm

Mats Norén schrieb:

I'm trying to export a POI worksheet as a download link in my wicket page.
The link sets the responsepage to a download page in which
trying to get the outputbuffer to write to.



You can do that directly from your link, without an intermediate page. 
At least it works with buttons with a form, but I don't think a link 
makes any difference:



protected void onSubmit() {
   WebResponse r = (WebResponse)getRequestCycle().getResponse();
   r.setContentType(application/octet-stream);
   r.setHeader(Content-Disposition,
  attachment; filename=\data.abc\);
   r.write(data);
   getRequestCycle().setResponsePage((WebPage)null);
}

See wicket.examples.displaytag.export.Export for a more complete example.

This is what I am using with wicket 1.1.1.


Timo


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


Re: [Wicket-user] Error editing wicket wiki

2006-03-19 Thread Timo Stamm

Thanks, Gwyn.


Timo

Gwyn Evans schrieb:

And fixed as of a couple of hours ago...

/Gwyn
On 19/03/06, Gwyn Evans [EMAIL PROTECTED] wrote:

Nothing back yet, but note that despite the message, the edit actually works...

/Gwyn
On 19/03/06, Gwyn Evans [EMAIL PROTECTED] wrote:

Hi,
  Thanks for flagging the issue - it looks as if there's a problem
with the hosted DB, so I've raised an issue with the hosting company -
will post when more info available...

/Gwyn

On 18/03/06, Timo Stamm [EMAIL PROTECTED] wrote:

Hi,

I got the following message when trying to edit the article
Panels_and_borders:

Database error
A database query syntax error has occurred. This may indicate a bug in
the software. The last attempted database query was:
(SQL query hidden)
from within function SearchUpdate::doUpdate. MySQL returned error
1034: Incorrect key file for table 'mw_searchindex'; try to repair it
(localhost).


Timo



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





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


Re: [Wicket-user] Re: Common Pitfall for Ajax Users in Wicket

2006-03-19 Thread Timo Stamm

Nathan Hamblen schrieb:

It could just wrap every Ajax
target with a made-up span by default, non-destructively as far as I can
tell.


I really don't like the idea of markup that is magically inserted.

It will break all Javascript code (and everything else) that relies on a 
certain DOM structure, and even more importantly, it is *not* allowed to 
place block elements within a span. Wrapping the tags in divs doesn't 
work either, because this will change the appearance.


There is no way around a better solution that changes the attributes or 
replaces the element.



Timo


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


Re: [Wicket-user] Re: Re: Common Pitfall for Ajax Users in Wicket

2006-03-19 Thread Timo Stamm

Sorry, I misread. But a span as child of a table isn't allowed, either.


Timo

Timo Stamm schrieb:

Johan Compagner schrieb:

table
span id=unique
tr wicket:id=repeater
.. some td with components
/tr
...
/span
/table

is that legal xhtml?


No. A tr may only contain td and th.


Timo


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live 
webcast

and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user





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


Re: [Wicket-user] Favicons

2006-03-18 Thread Timo Stamm

Mark Southern schrieb:

I'm sure it would make a great addition at some point!


What's the use? Really, I can't imagine any useful application.


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


[Wicket-user] Error editing wicket wiki

2006-03-18 Thread Timo Stamm

Hi,

I got the following message when trying to edit the article 
Panels_and_borders:


Database error
A database query syntax error has occurred. This may indicate a bug in 
the software. The last attempted database query was:

(SQL query hidden)
from within function SearchUpdate::doUpdate. MySQL returned error 
1034: Incorrect key file for table 'mw_searchindex'; try to repair it 
(localhost).



Timo


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


SOLVED: Re: [Wicket-user] Starting download after form submission [Wicket 1.1.1]

2006-03-17 Thread Timo Stamm

Igor Vaynberg schrieb:

ah, if you are on 1.1 then we already have examples that do this.

check out wicket-examples under display tag examples. there should be an
export example there.



Thanks a lot Igor, that's what I was looking for!

I have created an entry in the wiki:
http://www.wicket-wiki.org.uk/wiki/index.php/Best_Practices_and_Gotchas#Starting_download_after_form_submission_.28Wicket_1.1.29


Timo


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


[Wicket-user] Starting download after form submission [Wicket 1.1.1]

2006-03-16 Thread Timo Stamm

Hi,


I have a filterable table (based on DataView - nice work, thanks Igor) 
and need a button to export selected entries as CVS.


After form submission, I can simply get the selected entries from an 
extended IDataProvider implementation and generate the CSV data.


But how do I get the data to the client?


I searched the wiki, the mailing list and the API-docs, but couldn't 
find a solution. It would be great to be able to redirect to a resource 
just like it is possible with pages:


  setResponseResource(new MyResource(myData));

A less elegant solution would be sufficient. It would be fine to store 
the data on disk or in the session and redirect to a servlet to 
download. But I can't find any way to do this, either.


Am I missing something?


Timo


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


Re: [Wicket-user] Starting download after form submission [Wicket 1.1.1]

2006-03-16 Thread Timo Stamm

Thanks Igor, I like this suggestion:


add(new Link(export-link) {
   onclick() {
   getRequestCycle().setRequestTarget(new ComponentRequestTarget(dt));
   WebResponse wr=(WebResponse)getResponse();
   wr.setHeader(blah);
   }
}


But it requires wicket 1.2.


I tried to use a simple Page that outputs CSV instead of HTML, but I am 
unable to set the proper headers in the response. They are simply ignored.


public class DownloadPage extends WebPage {
//...
public void onRequest() {
  WebResponse r = getWebRequestCycle().getWebResponse();
  r.setHeader(Content-Disposition, attachment; filename=\x.csv\);
  r.setHeader(Content-Type, application/octet-stream);
}


I would have a look at the jasperreports project (though I doubt that it 
solves my problem), but I can't connect to the servers.



I could even live with putting the information in the session and 
redirecting to a servlet that outputs CSV. But wicket tries to modify 
the headers after I set redirect headers, resulting in 
WicketRuntimeExceptions.



Is there no solution? I really just want to return textual data with my 
own content-type and content-disposition headers after a form submission.



Timo



Igor Vaynberg schrieb:

hi Timo,
please see this thread for a way to do it:

http://www.nabble.com/Rendering-DataTable-or-DataView-%28or-model%29-as-Excel-sheet-t1042760.html#a2711299


-Igor

On 3/16/06, Timo Stamm [EMAIL PROTECTED] wrote:

Hi,


I have a filterable table (based on DataView - nice work, thanks Igor)
and need a button to export selected entries as CVS.

After form submission, I can simply get the selected entries from an
extended IDataProvider implementation and generate the CSV data.

But how do I get the data to the client?


I searched the wiki, the mailing list and the API-docs, but couldn't
find a solution. It would be great to be able to redirect to a resource
just like it is possible with pages:

   setResponseResource(new MyResource(myData));

A less elegant solution would be sufficient. It would be fine to store
the data on disk or in the session and redirect to a servlet to
download. But I can't find any way to do this, either.

Am I missing something?


Timo


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







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


Re: [Wicket-user] [Wicket 1.1.1] Modifying attributes of the HTML body tag

2006-03-01 Thread Timo Stamm

Eelco Hillenius schrieb:

And programatically you can do:

/**
 * @see 
wicket.Component#renderHead(wicket.markup.html.internal.HtmlHeaderContainer)
 */
public void renderHead(HtmlHeaderContainer container)
{
((WebPage)getPage()).getBodyContainer().addOnLoadModifier(
init + javaScriptComponentName + (););
super.renderHead(container);
}

Use with care though.



Thanks Eelco, this seems to be what I am looking for.

Thanks to you too, Juergen. I knew about the header contribution of 
Panels, but I need this functionality from a WebMarkupContainer and it 
has to be dynamic.



Timo


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


Re: [Wicket-user] Good document explaining Models

2006-03-01 Thread Timo Stamm
It helped me to understand Wicket Models as an implementation of the 
Facade pattern.


The intention is to have a clean separation between the code providing 
the data (Model) and the code presenting the data (Component).


The IModel interface and its implementations serve as glue between Model 
object and Components.



Timo




Riyad Kalla schrieb:

doh... thanks Igor.

Igor Vaynberg wrote:
here is a wiki page on the matter: 
http://www.wicket-wiki.org.uk/wiki/index.php/Models


-Igor

On 3/1/06, * Riyad Kalla* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 
wrote:


I realized that 90% of my confusion when working with wicket is 
due to

my lack of understanding models properly. Is there one or more good
resources covering models, the basic idea behind them, how they were
designed, how they function in a few well known components, etc.?
Sort
of a bottom-up approach to get my brain in sync with the Wicket 
way of

thinking?

Thanks guys,
-R


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting
language
that extends applications into web and mobile media. Attend the
live webcast
and join the prime developer group breaking into this new coding
territory!

http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642

http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642 


___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
mailto:Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user








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


[Wicket-user] [Wicket 1.1.1] Modifying attributes of the HTML body tag

2006-02-28 Thread Timo Stamm

Hi.


I have to modify the onload attribute of the body tag. I thought it 
would be sufficient to add a new WebMarkupContainer in my base Page and 
link it to the body tag in the markup.


But unfortunately it doesn't seem to be so easy. (I have to override the 
add methods of Page, and Wicket compains about that.)



Is there a recommended way?


Timo


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


Re: [Wicket-user] Wicket remove tags

2006-02-20 Thread Timo Stamm

Mats Norén schrieb:

Hmm...ok, so basically I have to litter my Java code with
setRenderBodyOnly(true) instead.


Create a subclass and use that.



Well, I guess I can live with that.
But it seems a bit weird that the default behaviour for a label is to
leave the span tag. 


A label can be applied to any tag. It would be very confusing to me if 
the label component removed it´s associated tag.


I think the problem is that one always needs a tag for each component. 
This means that you have to add spans in the markup just to be able to 
insert text.


It's not very pretty.


Timo


Anyway, thanks for the tip.


On 2/20/06, Alastair Maw [EMAIL PROTECTED] wrote:

Mats Norén wrote:

Stupid question,
but is it possible to remove the actual span-tags from the output?

getMarkupSettings().setStripWicketTags(true);

removes the wicket:ids and the other wicket tags, but is it possible
to remove the span tags for a label?

My output looks almost like the font hell from early Frontpage days,
it's completely littered with span tags :)

/Mats

You can call setRenderBodyOnly(true) on the Component for your span tag.

Or I suppose one could write a rendering filter that removed all span
tags that didn't have any attributes set on them, but that would be a
bit horrid.

Al


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




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





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


Re: [Wicket-user] VOTE

2006-02-16 Thread Timo Stamm

Eelco Hillenius schrieb:

1. Give me the constructor change and the Java 5 functionality in one
pass (Wicket 2.0)




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


Re: [Wicket-user] Post 1.2 roadmap

2006-02-14 Thread Timo Stamm

Martijn Dashorst schrieb:

 - constructor refactor


Wow, that's a /major/ change and will probably effect every custom 
component and every application written using Wicket.


I see the benefit of having a complete component hierarchy availably 
right at the initialization of a class.


But wouldn't it suffice to just make the new constructors available, and 
put a clear statement in the API docs? Then maybe deprecate the public 
add() in the next major version, and drop it in 2.0 or something like that?




This opens up a lot of better markup parsing strategies for the
core.


Just get rid of markup, it sucks anyway ;)



 - java 5 support


+1






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


Re: [Wicket-user] Post 1.2 roadmap

2006-02-14 Thread Timo Stamm

Johan Compagner schrieb:

that would be very hard to maintain.
For example if you have a panel that is rewritten by using only the new
parent in constructor params.
And you add that in youre own webpage/panel that doesn't use that parent in
constructor param.
Then you get all kind of errors because the child panel expect to have it
all but because of the hierarchy problem
that we have then, he doesn't have it.

So i do think it is all or nothing.


I see, thanks for the explanation.

-1 for constructor change.




On 2/14/06, Timo Stamm [EMAIL PROTECTED] wrote:

Martijn Dashorst schrieb:

 - constructor refactor

Wow, that's a /major/ change and will probably effect every custom
component and every application written using Wicket.

I see the benefit of having a complete component hierarchy availably
right at the initialization of a class.

But wouldn't it suffice to just make the new constructors available, and
put a clear statement in the API docs? Then maybe deprecate the public
add() in the next major version, and drop it in 2.0 or something like
that?



This opens up a lot of better markup parsing strategies for the
core.

Just get rid of markup, it sucks anyway ;)



 - java 5 support

+1






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







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


Re: [Wicket-user] Re: Security framework in Wicket

2006-02-12 Thread Timo Stamm

Johan Compagner schrieb:


In my case, I don't even need authorization exceptions. It looks like
this:

for (Action a : entity.getActions()) {
add(new ActionButton(a));
}




So for every link/button you have you have a listview and/or panels in
wicket?


Yes.



Because you can't just not add a button/link if it is specified in the
markup.
Or add one that isn't specified in the markup.

The problem when you use for these kind of things listviews/repeaters is
that design is again must harder to do.


That's true. But on the other hand, there are only a very few pages that 
have to be designed, because components are reused very often.




I like that a designer can design the complete page including all the menu's
and menuitems so that that page
has all the features.
Then in wicket we will add all menus/menuitems but the security framework
will let them render or not.

These links mostly don't have a model, it only points to another page class
and that page class is specified in the security settings
that a user can see that page or not and based on that the link is not
rendered.. So no model data nothing is specified for this
just pure wicket stuff.
This is in my case a very common usecase.


I understand. In early development stages, a new module in my app works 
the same.



Timo


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


Security framework in Wicket (was:Re: [Wicket-user] Wicket 1.2 ?)

2006-02-11 Thread Timo Stamm

Johan Compagner schrieb:

We have now a Security framework (better said security interfaces) inside
wicket.



I was wondering whether this is really a good idea. Isn't authorization 
a responsibility of the model in a MVC application?




Timo


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


[Wicket-user] Re: Security framework in Wicket

2006-02-11 Thread Timo Stamm

Igor Vaynberg schrieb:

wicket is not MVC so the design of your application will be different.


I think a lot of people take wicket for a MVC framework, but let's not 
have yet another discussion about what MVC is.


Since wicket propagates seperation of concerns (and it has a very good 
separation between model and presentation), I think my point is valid.




what
we provide are hooks for you to build on, if you dont want to use them you
dont have to. that is the beauty of the design: they are there for you if
you need them, and invisible if you dont.


Putting authorization tasks into the presentation is not a good design 
choice because you will have to reimplement all access checks if you 
need a different way to access the model. And you are bound to make 
errors sooner or later, which is especially bad since they affect the 
business layer.



In my opinion, Wicket should concentrate on it's core tasks, and leave 
the other tasks to different frameworks. Authorization would be part of 
a model framework.


A beautiful design would be to make it possible to add any kind of hook, 
and not to provide any hooks that are unrelated to the core tasks.



Timo



On 2/11/06, Timo Stamm [EMAIL PROTECTED] wrote:

Johan Compagner schrieb:

We have now a Security framework (better said security interfaces)

inside

wicket.


I was wondering whether this is really a good idea. Isn't authorization
a responsibility of the model in a MVC application?



Timo


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







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


Re: [Wicket-user] Re: Security framework in Wicket

2006-02-11 Thread Timo Stamm

Johan Compagner schrieb:

most of the time you want security over pages or links (rendered/shown or
not)


This can be very elegantly solved with an application model. For 
example, a navigation provider should only return navigation items the 
user has access to.


As for other links/buttons that require access checks, they are most 
likely actions on model objects. So it's up to the model object to 
provide only the actions the user has access to.




It should be easy to integrate a signin page and so on.


Signin is part of the authentication (not authorization), and I concur 
that a web framework should provide hooks for it.




that should be possible in wicket. And that is what the security interfaces
(and an example implemention) is for
just to provide hooks to do those things.

Most people don't look at the model (data) for security things they have
pages that they know are showing data.


This argument nearly convices me :)

Not all web sites one may want to build with wicket require complex 
model objects that handle authorization. But do they really require 
security support from wicket?



Timo



Just like many url based frameworks do it even on the url /admin /xxx / yyy

johan


On 2/11/06, Timo Stamm [EMAIL PROTECTED] wrote:

Igor Vaynberg schrieb:

wicket is not MVC so the design of your application will be different.

I think a lot of people take wicket for a MVC framework, but let's not
have yet another discussion about what MVC is.

Since wicket propagates seperation of concerns (and it has a very good
separation between model and presentation), I think my point is valid.



what
we provide are hooks for you to build on, if you dont want to use them

you

dont have to. that is the beauty of the design: they are there for you

if

you need them, and invisible if you dont.

Putting authorization tasks into the presentation is not a good design
choice because you will have to reimplement all access checks if you
need a different way to access the model. And you are bound to make
errors sooner or later, which is especially bad since they affect the
business layer.


In my opinion, Wicket should concentrate on it's core tasks, and leave
the other tasks to different frameworks. Authorization would be part of
a model framework.

A beautiful design would be to make it possible to add any kind of hook,
and not to provide any hooks that are unrelated to the core tasks.


Timo



On 2/11/06, Timo Stamm [EMAIL PROTECTED] wrote:

Johan Compagner schrieb:

We have now a Security framework (better said security interfaces)

inside

wicket.

I was wondering whether this is really a good idea. Isn't authorization
a responsibility of the model in a MVC application?



Timo


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log
files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!


http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642

___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user




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







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


[Wicket-user] Re: Security framework in Wicket

2006-02-11 Thread Timo Stamm

Eelco Hillenius schrieb:

I would like to put it a bit differently. Actually I think wicket is
more MVC than frameworks like struts are because we have the MVC at
the level of components instead of requests.

But to answer your question: yes it is a good idea to have such a
framework, even if you want to make authorization part of the model
layer. The mechanism we built in gives you a guaranteed mechanism to
plug in your authorization (in your case, like at Component.ENABLE),
and gives you the possibility to handle authorization exceptions at
the UI layer (because besides denying actions, you generally want to
communicate the denial in some way).  So that works even in your case.


In my case, I don't even need authorization exceptions. It looks like this:

for (Action a : entity.getActions()) {
add(new ActionButton(a));
}



Furthermore I don't agree with the statement that it should be done in
the model. 


It should be in an MVC application, especially if there is more than one 
view. In my app, the model is accessed by an administration application 
that uses Wicket, and a web service using standard servlets. Obviously I 
don't want to write the access checks multiple times.




We are building a generic framework, so as much as we can,
we should enable users to decide on this themselves. And I think a lot
of times, authorization actually is more related to end-user
functionality that has a 1-1 relationship with the UI than it is with
the model layer. But... opinions differ and that's why we just try to
provide a generic framework.


I guess peoples opinions differ because the situations differ. In my 
case, the security features of Wicket just add to Wickets complexity, 
which is a bad thing. In other cases, it might be convenient to have 
security support.


I would not trade simple design for convenience (I think it's better to 
improve the simplicity of the design), but that is certainly just my 
opinion.



Timo




On 2/11/06, Igor Vaynberg [EMAIL PROTECTED] wrote:

wicket is not MVC so the design of your application will be different. what
we provide are hooks for you to build on, if you dont want to use them you
dont have to. that is the beauty of the design: they are there for you if
you need them, and invisible if you dont.


-Igor



On 2/11/06, Timo Stamm [EMAIL PROTECTED] wrote:

Johan Compagner schrieb:

We have now a Security framework (better said security interfaces)

inside

wicket.


I was wondering whether this is really a good idea. Isn't authorization
a responsibility of the model in a MVC application?



Timo


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log

files

for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!


http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642

___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user






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





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


Re: [Wicket-user] Re: Security framework in Wicket

2006-02-11 Thread Timo Stamm

Eelco Hillenius schrieb:

Signin is part of the authentication (not authorization), and I concur
that a web framework should provide hooks for it.


Heh :) Don't agree. Authentication should be seen as part of
authorization. Authorization is the end-means of seeing whether action
x is permitted or not. Authentication is just a possible step to
validate whether client a is who he states he is, and to get clear
what security attributes are coupled to the client (like roles/
principals, etc).


I know that authorization and authentication are intertwined, but while 
authorization only makes sense with some kind of authentication, 
authentication could be used without authorization: Take a simple 
operating system, for example. A user logs on (authenticating himself), 
and if the OS doesn't support authorization, he can access any file. If 
the OS supports authorization, it will check the owner, group and access 
flags, and decide whether the user has access.


In a web app, the part of the application that handles requests is 
responsible to authenticate a user (even if it is just for http 
sessions). That's why I think that it should support authentication to 
some degree, but does not have to support authorization at all.




Not all web sites one may want to build with wicket require complex
model objects that handle authorization. But do they really require
security support from wicket?


Then don't use it. It's just a hook. The hook is built on a more
generic hook too.

We found the need to have a mechanism for authentication that is
supported out of the box, and it has been requested by many users. I
agree a framework should provide for anything and it's mother, but in
this case I think Wicket needed the ability to at least cooperate on
this with other layers of your application.


I guess you ment it should _not_ provide for anything and it's mother?

What I would like to have is a component framework that just 
concentrates on component relationships and event handling. A web 
framework would extend that component framework. And a convenient web 
framework may extend this web framework and provide security support, 
versioning, etc.



Timo


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


[Wicket-user] Wicket Application behind a proxy

2006-02-03 Thread Timo Stamm

Hi.


I have to use a proxy (apache with mod_proxy) in front of my wicket 
application.


This means that all redirects (and requests) must point to the proxy 
server, not the wicket application.



So my question is: Where can I modify the construction of redirect URLs 
in wicket?



Timo


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


Re: [Wicket-user] Wicket Application behind a proxy

2006-02-03 Thread Timo Stamm

Hi Flemming.


Thanks for asking, I guess my question was too unspecific.


Flemming schrieb:
I also use mod_proxy with wicket, but I have not encountered any need to 
modify the urls.


What is causing you to do it?



It is a requirement of some important legacy apps and can't be 
circumvented. All request must go through the proxy.



I have a proxy server:

   http://proxy.com/


All requests to the proxy must be forwarded to the app server:

   http://app.com/.../wicketapp/


The request forwarding works flawlessly, but the redirect locations 
created by wicket point to the app server. This is what I expect, but I 
need these redirects to point to the proxy server.


For my JSP-based apps I simply had a utility method to construct all 
redirect urls. But in wicket, explicit redirects are very rare. The are 
mostly created and handled internally.


I just need a hook where I can control all redirects.


Timo


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


Re: [Wicket-user] Wicket Application behind a proxy

2006-02-03 Thread Timo Stamm

Mark Derricutt schrieb:

On 2/4/06, Timo Stamm [EMAIL PROTECTED] wrote:

The request forwarding works flawlessly, but the redirect locations

created by wicket point to the app server. This is what I expect, but I
need these redirects to point to the proxy server.




From memory mod_proxy has TWO options, the forward proxy, and the reverse

proxy setting.  Which rewrites URLs coming OUT of the application.

So if wicket generated a URL pointing to
localhost:8080/my-wicket-app/foo.jpg the reverse proxy would convert that to
www.myapp.com/foo.jpg

That may be what you're missing.



Thanks, I will investigate if it is possible to use the reverse proxy on 
the server. This seems a lot better than creating dependencies in my app.



Timo


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


Re: [Wicket-user] How can I separate the java and html?

2006-01-17 Thread Timo Stamm

Frank Silbermann schrieb:

[...]

It seems reasonable to want to use the same HTML page to mark up many
Wicket page objects sharing the same layout.  Yes, I realize we can
group common HTML in a reusable panel (though we would still need a
trivial HTML file to contain the panel for each Wicket page), and I
realize we can write a single generalized Wicket page and change the
contents of the model.


Or you could use inheritance.



I was just wondering about the advantages gained
by matching the HTML filename to the name of the Wicket page class [...]


It is always obvious which markup-file belongs to which class.
Resource Bundles are named using the same standard 
(ClassName.properties). I think you could call this a java standard.



Timo


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


Re: [Wicket-user] How can I separate the java and html?

2006-01-17 Thread Timo Stamm

Frank Silbermann schrieb:
Frank Silbermann schrieb: 

[...]


It seems reasonable to want to use the same HTML page to mark up many
Wicket page objects sharing the same layout.  Yes, I realize we can
group common HTML in a reusable panel (though we would still need a
trivial HTML file to contain the panel for each Wicket page), and I
realize we can write a single generalized Wicket page and change the
contents of the model.


Timo Stamm schrieb:  

Or you could use inheritance.


If I have a long inheritance chain descended from
wicket.markup.html.WebPage, what is the rule as to which class-name
needs to match the HTML filename?  Would it always be the class which
inherits from wicket.markup.html.WebPage directly?


AFAIK, wicket loads markup for the current class at first. It will 
ascend through the inheritance chain until a markup file is found. If 
the markup contains a wicket:extends tag, the markup enclosed in the 
wicket:extend tag will be included in the markup of the parent class (at 
the location of the wicket:child tag).


I guess it is possible to use more than one wicket:extends tag in an 
inheritance chain, but I have not yet been in a situation where it would 
have been useful. This is absolutely enough for my needs:


- abstract base pages (access check, context objects)
- pages with base markup (navigation types)
- pages with extending markup (forms, lists)


Timo



(Wie kennt man ob man schrieb oder hat geschrieben benuetzen soll?)


Habe ich noch nie verstanden, aber hier sollte es sowieso eher wrote 
sein :)



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


Re: [Wicket-user] (no subject)

2006-01-13 Thread Timo Stamm

pepone pepone schrieb:

This not works for me with wicket-wicket-1.2-20060108


As a workaround, you can simply subclass this page and call the super 
constructor with default parameters in the constructor:



public class HomePage extends MyBasePageWhichRequiresParameters {
static PageParameters params = new PageParameters();
{
params.put(page,Home);
params.put(action,view);
params.put(node,/homeDocument.html);
}

public HomePage() {
super(params);
}
}



Timo


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Web Continuation Servers

2005-11-27 Thread Timo Stamm

Johan Compagner wrote:

ahh so a program on the webserver just runs in its own thread. (every
session has its own thread)
And the webserver threads are dispatchting to those threads and then getting
response from them.

That doesn't look to hard to do. (the burden on the webserver would improved
greatly)


Yes, the load on the webserver would increase.



If we build something like this in wicket. Where would youre code be in?
Now youre pieces of youre code is in the event/interface methods like
onclick or onsubmit.
Would you then have an onClick/onSubmit on a Page? and every thing that
comes in from that page
is called to there or better said it is continued there?

How would you say to wicket i want to start this part in a continue, a
special interface that a page
implements that is checked on in the response phase?


My opinion on implementation in Wicket lacks a lot of insight - I don't 
have time to really dig into wicket interna until next year.


I guess there are similarities to the handling of AJAX requests at a low 
level. Maybe there is a chance to generalize this and add all kinds of 
request handlers.


Where to add a hook for the user? Continuations would be used for flow 
control, so they would be part of the Control layer of the MVC paradigm. 
If Wicket Components are the View, they should not need to know about 
Continuations.


I am thinking of an Object that takes over control from a certain 
starting point. For example, you would have a button labeled start, 
whose onClick handler creates an instance of the Control Object and 
passes the context on (if necessary).


The Control Object should have a method to send a Page to the client 
(i.e. set the Response Page) and wait for the next Request for a Page.





I do think this thing is not for all. Only small portions, one page. else i
think you quicly get big
monolitic code again.


Yes, continuations certainly don't make sense for every kind of application.

I think that continuations would be very convenient for some
well-defined workflows, but it does not make sense to use them
everywhere for the reasons you mention.




If i compare it to swing then i just see this continuations as the Modal
Dialog...
That is the continuation in swing. You block youre current code and ask the
user for something.
Then it gets back (the modal dialog is closed) and you continue.


Yes, this is the idea. Just like the JavaScript alert(), confirm() and 
prompt() functions.





lets think about some examples how we would do this in wicket and what would
be a elegant way.


Let's say we have the Control Object mentioned above. The most important 
public method would be:


   WebPage sendAndWait(WebPage p);

(This method hides all the dirty work from the user, add a Request 
handler, etc.)




I think it would be convenient to provide methods for common tasks:

   void alert(String message);

   boolean confirm(String question);

   String prompt(String question);


These methods send a default AlertPage, ConfirmPage or PromptPage, 
evaluate the result after sendAndWait() returns and return a proper value.



An extension of the Control Object could provide methods for simple 
creation of Dialogues. Example:


   DialogueModel ask(DialogueModel d);

Usage:

   DialogueModel userInfo = new DialogueModel();
   userInfo.addStringInput(name, What is your name?);
   userInfo.addStringInput(color, What is your favorite color?);
   while (userInfo.hasEmptyInputs()) {
  ask(userInfo);
   }


You don't have to care about the view at all at this level of 
abstraction. You just work with the model.



Any comments are welcome,


Timo


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] replace ognl.

2005-10-27 Thread Timo Stamm

Johan Compagner wrote:

yes i currently don't have support for { or [ or things like that.
Just plain text with dots. This makes it very easy and fast to parse.
but if people really want this:

person.children[0].name


I can think of two reasons why an access operator [] could be useful:

- It might make the expression more readable, because you know that you 
are operating on an array, List or Map by looking at the expression.


- The content of the access operator could be an expression itself. Example:
person.children[person.selectedChildIndex].name


But I think this is already too much functionality. I would prefer the 
most simple approach with only the most basic support for arrays, Lists 
and Maps using only dot-syntax.



There is one issue that's very important to me. I have run into this 
using the Expression Language of JSP 2.0:


If you have a class that implements Map, you can not access a bean 
property on the instance.


Let's say we have the following class:

class Bar extends HashMap {
public String getFoo() ...
}

Now create an instance and populate it:

Bar b = new Bar();
b.put(yadda, value);


The JSP EL Evaluator would return null for the following expression:

b.foo


I think the Evaluator should look for a value in the map using 
containsKey() and look for a bean property if nothing was found. On a 
list, you could check if the key is numeric.


This would not be a performance hit, and you are still able to use the 
instance like any other object.




Timo


---
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] replace ognl.

2005-10-27 Thread Timo Stamm

Johan Compagner wrote:

I can think of two reasons why an access operator [] could be useful:

- It might make the expression more readable, because you know that you
are operating on an array, List or Map by looking at the expression.

- The content of the access operator could be an expression itself.
Example:
person.children[person.selectedChildIndex].name




If i you want to this then use ognl.
I will not support this by the basic stuff.


No, I don't want to do this.

My point is: Brackets can be useful for the two reasons I mentioned. If 
you do not intend to support these features, there is no reason to use 
brackets in the syntax.




I though about this (List and Maps being beans)
For a list this is not that hard because if the next expresion can be
converted to an int then it is just an int for the index.
(get1() is then not supported)
And if it can't be converted then we could check if a method is there.

For maps this is different.
Currently i see List/Maps are not beans. If i always use them as a List or
Map.

First check if something is there (in the map) looks strange to me.


It gives better performance.



Because what happens if you do this:

mymap.value = x

and there is a setValue() but not a map entry?
Should i use setValue or do a map update. (or both?)


That's true, I didn't think of this situation. So it is necessary to 
check for getters/setters before doing map stuff. This would be the 
following accessor precedence:


1 getter/setter
2 List
3 Map


I don't know if the performance hit is too high to allow getter/setter 
access on Maps and Lists, but I would certainly like this feature 
because it is an requirement of a framework I am using.



Anyways, kudos for replacing OGNL with something more simple and efficient.


Timo


---
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Re: replace ognl.

2005-10-27 Thread Timo Stamm

Nathan Hamblen wrote:
I use ognl {} projection to make non-List Collections into Lists for a 
ListView. (And it /is/ way too slow with long lists.) If list view could 
handle a SortedSet, or just any Collection, it would eliminate that need.


I created my own List Component in a few minutes that eats Iterable and Map.

The problem is that you can not change the order or get the total size 
for more advanced components from Iterable.



Timo




It would still be nice to have an OgnlPropertyModel, even if it doesn't 
have an accompanying compound model. Sometimes a complicated expression 
is just what you need, and I'm not crazy about putting those in a 
component ID anyway. But if you're looking to eliminate the ognl jar 
dependency, I guess that's a worthy cause.


Nathan

Johan Compagner wrote:


Hi

I have written a replacement of OGNL when i test it with a very simple 
test (The FormInput example)

then i see quite some improvements in cpu speedups and mem improvements

Around 40% speed increase for a submitting the forminput example page 
20 times

and only 1/5 of the memory garbage is generated (50MB against 10MB)

The question is what do you guys use of ognl? Can i completely drop it 
or must i make it an option so
that you can switch in youre application for all using ognl or the 
homebrew wicket impl.
Or make seperate classes (like AbstractPropertyModel) but this is not 
really doable because then all the

sub classes must also be copied...(Like CompoundXX)

What i do support now is this:

person.name http://person.name (plain properties)
person.addresses.0.street (addresses is a list and i take the first 
element)
person.addresses.homeaddress.street (addresses is map and i take the 
address with the key 'homeaddress' out of it)


so maps and list are seen and the next part of the expression is then 
the key or the index you can also put values in a map

or append/set to a list:

person.addresses.homeaddress = new Address()
person.addresses.10 = new Address()

if the list size is smaller then 10 then it will appends null to make 
it that size.


addresses can also be an Array but then it won't be able to grow.

Ofcourse the person.address.street will just be null if address is 
null, no exception will be thrown
if you try to set something on a null object a exception is still 
thrown, Maybe we could make some null handlers for that somehow that 
are easy useable.


So can people live with this? Does anybody uses something different of 
ognl?


johan





---
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user





---
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] replace ognl.

2005-10-27 Thread Timo Stamm

Johan Compagner wrote:

The only thing for me to use [] for an index and { } for a map (for example)
would be that this:

mymap.property would mean that you really want to have a getProperty on 
a map

(same goes for list)

so i will change it to use with [] (without quotes that i find totally 
not needed)


foo.list[0].bar
foo.map[key].bar
foo.list.bar (this is a get property of the list)
foo.map.bar (this is a get property of the map)


Great. This looks very nice.


Timo


---
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Where/how to store state information

2005-10-19 Thread Timo Stamm

Hi list,


I have created a navigation menu component and a menu model.

The menu component should show on every page of my application, so I 
derive all pages from a page class which creates and adds a menu instance.


The menu must remember which item is selected (the state is 
representable by a simple String).



Now I have the following problem: Where do I keep the state of the menu?

It seems obvious to use the session, but how? The Wicket Session class 
does not allow arbitrary attributes. I guess I could get the original 
HttpSession somehow, but I am sure that there is a better way.



Timo


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


Re: [Wicket-user] Where/how to store state information

2005-10-19 Thread Timo Stamm

Eelco Hillenius wrote:

For anything you want to store in the session, you can provide your
own session implementation. Not having some kind of generic map in
session was deliberate, as we think it is better to provide a custom
one that has strongly typed properties. See for example the hangman
example in wicket-examples.


Thanks, that's what I was looking for.



If
possible, the best way imo is to design your navigation component such
that you don't need any extra state info; just the current page and
maybe some additional attributes of that page and the current user. If
that is not possible, you might check out whether it is doable to pass
the state whenever you navigate to other pages. Not sure whether that
is a better idea than storing session info though.


I have considered both, but right now it is too early for generalization.


Timo


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


Re: [Wicket-user] Where/how to store state information

2005-10-19 Thread Timo Stamm

Dipu wrote:
Can't you declare an instance variable in your own application specific 
session class and add getter/setter methods.
I am not sure if this is the best solution. Please let me know if you 
find a better way for doing it.



Thanks, Eelco pointed me to the hangman example which shows how to use 
such a specific session implementation.



Timo


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


Re: [Wicket-user] Time to ramp up on Java 5

2005-10-12 Thread Timo Stamm

Gili wrote:


IBM's JDK 5 is in beta: 
http://www.javalobby.com/java/forums/t51875.html


According to their website, they plan on releasing JDK 5 final in 
the fourth quarter of 2005.


I believe you guys said you'd hold off on Java 5 support until IBM 
had a version out. Now that this is near please consider what changes 
you plan on making. Concurrency libraries come to mind, as do type-safe 
enums. Anything else?



Generics should help to avoid a lot of castings. I would like to see 
generics on models. The model would still be a clean Facade while 
retaining type safety for users.



interface IModelT {
T getModelObject();
}

class ComponentT {
IModelT getModel() ...
T getModelObject() ...
}

abstract class ListViewS extends ComponentListS {
public ListView(String id, IModelListS model)
public onRequest() {
for (S s : getModelObject()) {
ItemS m = newItem();
populateItem(m);
}
}
public abstract populateItem(ItemS item);
}


usage:

ArrayListString l = new ArrayListString();
l.add(a);
l.add(b);
new ListViewString(id, l) {
public populateItem(ItemString item) {
item.add(new Label(label, item.getModelObject()));
}
};



Timo


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


Re: [Wicket-user] Standard for database integration? (Please!)

2005-10-12 Thread Timo Stamm

Igor Vaynberg wrote:

Spring is about a lot more then xml config :)


But a *lot* of Spring is XML ;)


Timo


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


Re: [Wicket-user] Good way to back up form state?

2005-10-06 Thread Timo Stamm

Eelco Hillenius wrote:

So... what should continuations support look like in Wicket?


The aim of RIFE/continuations is to provide a library that can be used 
in unrelated projects.


Jetty 6 continuations will also be available for other containers. Greg 
Wilkins plans to propose the API for the servlet specification v3.


So it seems feasible to use one of those implementations.

RIFE/continuations is more mature, but the prospect of an official 
standard is also nice. I haven't yet decided wich one I like better, and 
I don't know wicket well enough to decide which one is more compatible 
with wicket or talk about implementation details.


I guess my knowledge of wicket can only get better, and maybe I find 
some time to spend with RIFE/c. and Jetty-c. But to be realistic, this 
will probably take a couple of months.



Timo


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


Re: [Wicket-user] Good way to back up form state?

2005-10-05 Thread Timo Stamm

Eelco Hillenius wrote:

/The/ big difference between a component/ event based framework like
Wicket and a (web) continuations framework is that with Wicket your
focus should be what's on your pages and how it reacts to user input,
using different pages to address different areas of functionality,
while with a continuations framework you focus on the flow of the
application (think in flows and have things like 'processAndWait' as
transition marks). There is no 'better' approach imo. For the kind of
applications I am usually involved in making, Wicket is a better fit,
and in my experience analysts are usually more focussed on direct
interaction/ domain functionality than on flow. Might be different for
you though.



This sounds like an apology ;-)

But there is no reason to apologize. I consider Wicket the best choice 
in java web frameworks for most applications.


It lacks tutorials and and third party libraries to compete with Struts 
and other more wide spread frameworks, but it is obviously technically 
superior. Especially when compared to Struts :-)



Back on topic:

I understand your argument that [wicket] does the same thing as
the original definition [of continuations]. You said that even though 
implementation may differ, the net effect is the same.


Of course that is true. From your linked page on common-lisp.net:

Continuations in web apps do not allow you to do anything which can't 
be done without them, though i'd  argue that there are certain user 
interactions which are  too complex to manage (for a developer's point 
of view) without them.



There is no native support for continuations in Java, so it is 
neccessary to emulate their behaviour to allow for flow oriented 
programming. Sure, Wicket is not incompatible with such an emulation of 
continuations, but there is no determined support for flow oriented 
programming as well.



Is support for flow oriented programming necesary? I think it is highly 
desirable. With abstractions of data objects and editors (in the spirit 
of the Code generator / Prototype generator thread), you can concentrate 
on the most important part of most applications: the flow. If you don't 
have to spread your business logic and work flow over several classes 
and layers, you will simply increase the code quality.


I have had a quick look at RIFE/Continuations, and it looks usable. 
There is a presentation that gives an immediate impression: 
https://rife.dev.java.net/files/documents/204/3120/rife_fosdem_2004.pdf 
(page 5 to 8 are the interesting ones)*.




Timo


* I find the term web continuations irritating. Either you have native 
continuation support or an emulation.






Eelco

On 10/5/05, Eelco Hillenius [EMAIL PROTECTED] wrote:


That was part of my point earlier on. There is a difference between
the 'normal' continuations concept and how it is applied to web
frameworks though. There are people working on 'native' continuations
support.

Here's a must-read on the topicus, which discusses a lot of points
that are relevant to Wicket as well (like I said, the way Wicket and
web continuations work doesn't differ that much imo):
http://common-lisp.net/project/ucw/docs/html/rest/rest.html

Eelco


On 10/5/05, Justin Lee [EMAIL PROTECTED] wrote:


Actually, rife supports continuations in java.  https://rife.dev.java.net/

Timo Stamm wrote:


Eelco Hillenius wrote:



Actually, when you look closer to the whole continuation thing,
continuations are not so incompattible with how Wicket works now.



I guess the problem is that continuations are not really compatible with
java. An elegant implementation of continuations in java seems to be
impossible.


The



original idea of continuations is to never return a value, but pass a
context object (continuation) to the next function call. That idea
translated to webapplications seems to be to have a 'wait-for-input'
concept, so that you can model a flow like a couple of linear steps
that conceptually 'pause'/ wait for input before it moves to the next
step. As Wicket has a current state and does not work with return
values for flow, I think we could defend that we do the same thing as
the original definition, though with a slightly different flavor. At
least it has the same net effect. And... if you want to do the web
variant of continuations... that's easy... just create a mini
framework that handles the flow and - I think - you're done.



That would just be a state machine.




Or... maybe I don't get the idea of continuations just yet. Please
correct me if that is the case :)



Have a look at this article:
http://www-128.ibm.com/developerworks/library/j-contin.html


Jetty 6 is going to have continuation support. Are there any plans of
supporting jetty continuations?

http://www.mortbay.com/MB/log/gregw/?permalink=Jetty6Continuations.html


Timo


---
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads

Re: [Wicket-user] fisheye

2005-10-04 Thread Timo Stamm

Juergen Donnerstag wrote:

Didn't know it exists: http://fisheye.cenqua.com/viewrep/wicket
May be it is worth a link on our homepage?



Fisheye is more comfortable to browse than viewvcs, and the sourceforge 
server is also a bit slow with responses at peak times.


I guess a link on the wicket site would be nice.


Timo


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


Re: [Wicket-user] Good way to back up form state?

2005-10-04 Thread Timo Stamm

Justin Lee wrote:

Actually, rife supports continuations in java.  https://rife.dev.java.net/


Thanks for the input, I didn't know about rife.

Cocoon supports Continuations as well, and the upcoming Jetty too.

Let me add an emphasis on my statement:


Timo Stamm wrote:

An **elegant** implementation of continuations in java seems to be
impossible.


Sure, continuations are nice. But if you have a clunky API to program 
against, the advantages are moot.



Timo


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


Re: [Wicket-user] Code generator / Prototype generator

2005-10-04 Thread Timo Stamm

Nick Heudecker wrote:

I'm coming into this conversation late so I might have missed something, but
what code are you proposing to generate for Wicket? Or is this outside of or
peripheral to Wicket?


David Liebeherr proposed to adopt some ideas of Ruby on Rails to wicket.

http://sourceforge.net/mailarchive/forum.php?thread_id=8381739forum_id=42411



If the code can be generated, why doesn't the language or framework simply
do it for you in the first place?


I agree. You can (to a certain degree) dynamically create objects at 
runtime that implement known interfaces, or use Javas API for dynamic 
data objects, the collection framework.



Timo


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


Re: [Wicket-user] Code generator / Prototype generator

2005-10-04 Thread Timo Stamm

David Liebeherr wrote:
With generated code (from customizable templates) i am able to generate 
a functional application very quick and i still have the possibility to 
customize the app later.


If you make changes to the generated source, you loose the ability to 
change the parameters (templates) of the generator after you made changes.


This would be a major design flaw in my opinion.


I think one common misthake in this discussion at this point is the 
understanding what a code generator does or is good for.


What i am thinking of is more a Prototype generator than a code 
generator which generates full apps for me.


I'll try to explain:

 [...]

Really, have a look at trails, I think you can get some ideas there. 
Here is a simple tutorial:


http://www.cstengel.de/tutorial/trails_firebird_tutorial/


Timo


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


Re: [Wicket-user] Code generator / Prototype generator

2005-10-03 Thread Timo Stamm

David Liebeherr wrote:

Hi!

Today i read a pretty much interesting article about Ruby on Rails (RoR).
First things first. I don't like ruby.


Then you may want to have a closer look at RoR. :)

There is a presentation video with David Heinemeier Hansson (the author 
of RoR) that gives a good overview of RoR, and also shows how Ruby 
contributes to RoR: http://www.rubyonrails.org/media/video/rubyonrails.mov




But: The Aproach of Ruby on Rails is very impressing and provides a
effective way to write standard Web-Apps.
So i like the way how wicket works much. And now i am thinking about to
adopt some ideas of Ruby on Rails to wicket.
The most interesting and time saving aspect of RoR is that it has mayn
scripts to automaticly generate Formulars and Lists so that you can deal
with Datas which mostly comes from a Database.


RoR goes way beyond that. Ruby is a very reflective language, much more 
than Java. Of course you can try to reproduce RoR in Java, but it will 
fail in some parts because of language restrictions, and it will 
certainly lack the elegance of RoR. More on that below.




I think a similary tool could be made for Wicket.
The features i think of are somehting likt this:
-Gernation of Formulars and Lists from the Strucure of a certain
Database-Table (Or JavaBean Class).


There already is a BeanEditor in the wicket examples.



 Which includes the generation of: Wicket-Class, Wicket-HTML-File and
that all already ready with all necessary connections and handling to
the database or the JavaBean object.


I think code generation is a bad idea. It works in certain cases where 
code generation and compilation are completely hidden from the user (see 
JSP).




My question now to you guys is:
1. Is already someone writing such a Generator?


There is a project that tries to reproduce RoR in Java. It's called 
Trails. It uses some code generation (using eclipse to generate getters 
and setters).


Well, it utterly failed to reproduce the simplicity and ease of use of RoR.



2. What do you guys think about this idea?


Sorry for being so pessimistic :)


Timo


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


Re: [Wicket-user] Typical use case problem

2005-09-29 Thread Timo Stamm

Eelco Hillenius wrote:

Martijn is working on an app that has similar requirements. Maybe
he'll want to comment on this too.

What I do for an app I'm working on now, is to use ajax components for
the fields that allways need to be current.



I am absolutely new to wicket, but can't you just pass on the page 
instance? This should keep the state, if I am not entirely misunderstanding.


Assuming we have page A, the master form page, and page B, which will be 
used for some inputs on page A.




class A extends WebPage implements BDataReceiver {

... button handler  {
getRequestCycle().setResponsePage(new B(A.this));
}

public void setBData(Object o) {
...
}

}


class B extends WebPage {

private BDataReceiver from

public B(BDataReceiver from) {
this.from = from;
}

... button handler  {
from.setBData(...);
getRequestCycle().setResponsePage(from);
}
}


Timo


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


Re: [Wicket-user] Good way to back up form state?

2005-09-29 Thread Timo Stamm

Eelco Hillenius wrote:

Actually, when you look closer to the whole continuation thing,
continuations are not so incompattible with how Wicket works now.


I guess the problem is that continuations are not really compatible with 
java. An elegant implementation of continuations in java seems to be 
impossible.



The

original idea of continuations is to never return a value, but pass a
context object (continuation) to the next function call. That idea
translated to webapplications seems to be to have a 'wait-for-input'
concept, so that you can model a flow like a couple of linear steps
that conceptually 'pause'/ wait for input before it moves to the next
step. As Wicket has a current state and does not work with return
values for flow, I think we could defend that we do the same thing as
the original definition, though with a slightly different flavor. At
least it has the same net effect. And... if you want to do the web
variant of continuations... that's easy... just create a mini
framework that handles the flow and - I think - you're done.


That would just be a state machine.



Or... maybe I don't get the idea of continuations just yet. Please
correct me if that is the case :)


Have a look at this article: 
http://www-128.ibm.com/developerworks/library/j-contin.html



Jetty 6 is going to have continuation support. Are there any plans of 
supporting jetty continuations?


http://www.mortbay.com/MB/log/gregw/?permalink=Jetty6Continuations.html


Timo


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


  1   2   >