[Wicket-user] Re: New snapshots available

2006-02-27 Thread jan_bar
Never mind, I found it. http://wicket.sourceforge.net, Project info -
Sourceforge, download pages

Jan

"jan_bar" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,
>
> how can I access the snapshot downloads? Currently I have to go the the
> Wicket downloads area and remove the package_id parameter from Url. I this
> way I get all packages, including snapshots. There must be simpler way.
>
> Thanks, Jan
>
>
> "Martijn Dashorst" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> All,
>
> I have uploaded a new snapshot release for a lot of Wicket projects:
>  o wicket
>  o wicket-extensions
>  o wicket-examples
>  o wicket-spring
>  o wicket-spring-annot
>  o wicket-spring-examples
>  o wicket-spring-annot-examples
>  o wicket-auth-roles
>  o wicket-auth-roles-examples
>
> They have all been created using maven 2. It is our intention to move
> our build system to maven 2, at least for the core projects.
>
> Most notable changes to wicket:
>  o ajax paging navigator
>  o new date picker (Yahoo), old datepicker has been deprecated
>  o maven 2 build system: much faster build times!
>  o markup fragments (inline panels)
>  o and of course the first downloadable releases of the spring and
> authorization projects
>
> Please help test our new build system, and try these packages. I have
> done the most I can to make sure everything is in there, but things
> may be missing.
>
> If anyone has time and interest in a maven 2 build, please take a look
> at the yet unreleased wicket-spring-cattr and
> wicket-spring-cattr-examples project. They have a specific dependency
> on commons-attributes-plugin to modify source code. I have tried to
> get this one to build, but didn't manage to make it work. If anyone
> can add this feature to the examples project, then we'd be very
> thankful.
>
> Have fun!
>
> Martijn
>
> --
> Living a wicket life...
>
> Martijn Dashorst - http://www.jroller.com/page/dashorst
>
> Wicket 1.1.1 is out: http://wicket.sourceforge.net/wicket-1.1
>
>
> ---
> 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=k&kid0944&bid$1720&dat1642
>
>
>
>
>
> ---
> 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=lnk&kid=110944&bid=241720&dat=121642





---
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=lnk&kid=110944&bid=241720&dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Re: New snapshots available

2006-02-27 Thread jan_bar
Hi,

how can I access the snapshot downloads? Currently I have to go the the
Wicket downloads area and remove the package_id parameter from Url. I this
way I get all packages, including snapshots. There must be simpler way.

Thanks, Jan


"Martijn Dashorst" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
All,

I have uploaded a new snapshot release for a lot of Wicket projects:
 o wicket
 o wicket-extensions
 o wicket-examples
 o wicket-spring
 o wicket-spring-annot
 o wicket-spring-examples
 o wicket-spring-annot-examples
 o wicket-auth-roles
 o wicket-auth-roles-examples

They have all been created using maven 2. It is our intention to move
our build system to maven 2, at least for the core projects.

Most notable changes to wicket:
 o ajax paging navigator
 o new date picker (Yahoo), old datepicker has been deprecated
 o maven 2 build system: much faster build times!
 o markup fragments (inline panels)
 o and of course the first downloadable releases of the spring and
authorization projects

Please help test our new build system, and try these packages. I have
done the most I can to make sure everything is in there, but things
may be missing.

If anyone has time and interest in a maven 2 build, please take a look
at the yet unreleased wicket-spring-cattr and
wicket-spring-cattr-examples project. They have a specific dependency
on commons-attributes-plugin to modify source code. I have tried to
get this one to build, but didn't manage to make it work. If anyone
can add this feature to the examples project, then we'd be very
thankful.

Have fun!

Martijn

--
Living a wicket life...

Martijn Dashorst - http://www.jroller.com/page/dashorst

Wicket 1.1.1 is out: http://wicket.sourceforge.net/wicket-1.1


---
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=k&kid0944&bid$1720&dat1642





---
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=lnk&kid=110944&bid=241720&dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Re: Source of application using Wicket

2006-02-27 Thread jan_bar
Thanks Martijn,

I have latest version of burgerweeshuis, but it doesn't compile. It seems
that the wicket SNAPSHOT in the lib/wicket is out fo date. Which snapshot
should I use?

Jan



"Martijn Dashorst" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
wicket phonebook is a good example to start with.

Under construction, and more specifically /NOT/ by wicket guru's is the
Burgerweeshuis project hosted at sourceforge.

http://www.sourceforge.net/projects/burgerweeshuis

It is a dutch project, but you might find some interesting things there. It
uses hibernate 3, annotations and wicket. It is a rewrite of a previously
Model2 application (based on maverick).

Martijn



On 2/27/06, jan_bar <[EMAIL PROTECTED]> wrote:
Hi,

the Wicket samples is basic source of how to start with Wicket. But I miss
some real world (more complex) applications. I like to learn from code
written by Wicket gurus. For instance Pet Store with Wicket. Can you help
me?

Thank you, Jan





---
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=lnk&kid=110944&bid=241720&dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user




-- 
Living a wicket life...

Martijn Dashorst - http://www.jroller.com/page/dashorst

Wicket 1.1.1 is out: http://wicket.sourceforge.net/wicket-1.1





---
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=lnk&kid=110944&bid=241720&dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Bookmarkable links

2006-02-27 Thread Igor Vaynberg
On 2/27/06, David Leangen <[EMAIL PROTECTED]> wrote:
> hrm, maybe its a problem with our prepender. it does look like its> prepending the / but nothing after that, maybe the "." that is> screwing it up. try calling getApplicationSettings().setContextPath
> ("/.temp/www") in your application.init() method. if that works then i> will assume its a problem in our prepender and see if i can fix it.Unfortunately, still the same thing... :-(
could you replicate this in a quickstart project and post that. i would need to walk through it to see what is going wrong. 
> as far as the css links go wicket will only prepend static markup in> the .html file,  not the one you generate, so there you have to do it> manually. to put it another way, currently it is a preprocessor not a
> postprocessor.So I'd need to mount this like I would with my class pages? Is that whatyou're saying?Or I'd have to manually write in the context path as part of the link?
yep. youd have to append it manually if you dont want to use packaged resources. i would create a reusable subclass of attribute modifier that does this.-Igor


Re: [Wicket-user] Bookmarkable links

2006-02-27 Thread David Leangen

> hrm, maybe its a problem with our prepender. it does look like its
> prepending the / but nothing after that, maybe the "." that is
> screwing it up. try calling getApplicationSettings().setContextPath
> ("/.temp/www") in your application.init() method. if that works then i
> will assume its a problem in our prepender and see if i can fix it.

Unfortunately, still the same thing... :-(

Even if I set the context path explicitly as you mention above, only "/"
is being prepended, not the entire context path.


> as far as the css links go wicket will only prepend static markup in
> the .html file,  not the one you generate, so there you have to do it
> manually. to put it another way, currently it is a preprocessor not a
> postprocessor. 

So I'd need to mount this like I would with my class pages? Is that what
you're saying?

Or I'd have to manually write in the context path as part of the link?


Thanks so much!




---
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=lnk&kid=110944&bid=241720&dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Bookmarkable links

2006-02-27 Thread David Leangen

Hello!

I just tried the latest snapshot (20060227-0200). Still the same
problem, unfortunately.

> what does youre html look like?
> If you have non absolute paths in src or href attributes of tags then
> they will be made absolute in the latest snapshots.

My (relevant) html looks like this:













The context root is ".temp/www", and the resulting html (for one of my
pages as an example) is as below.

You'll notice that the "menu" links are properly rendered, but the image
links and the css are not. So, is this a "feature" or a "bug", I
wonder...



http://www.w3.org/1999/xhtml";>  


Page Title




  
  
  
  
  
  
  
  
  
 
  LSD
  PubMed
  Company
  Contact


  
  







BTW, the CSS is like this:



Page Title


final WebComponent c = new WebComponent( "css" );
final IModel model = new Model()
{
private static final long serialVersionUID = 1L;

public Object getObject( final Component c )
{
if ( ContentPage.this.isLocaleJapanese() )
return "styles/main_jp.css";
else
return "styles/main_en.css";
}
};
c.add( new AttributeModifier( "href", model ) );
add( c );




---
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=lnk&kid=110944&bid=241720&dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Bookmarkable links

2006-02-27 Thread Igor Vaynberg
hrm, maybe its a problem with our prepender. it does look like its prepending the / but nothing after that, maybe the "." that is screwing it up. try calling getApplicationSettings().setContextPath("/.temp/www") in your 
application.init() method. if that works then i will assume its a problem in our prepender and see if i can fix it.as far as the css links go wicket will only prepend static markup in the .html file,  not the one you generate, so there you have to do it manually. to put it another way, currently it is a preprocessor not a postprocessor.
-IgorOn 2/27/06, David Leangen <[EMAIL PROTECTED]> wrote:
Hello!I just tried the latest snapshot (20060227-0200). Still the sameproblem, unfortunately.> what does youre html look like?> If you have non absolute paths in src or href attributes of tags then
> they will be made absolute in the latest snapshots.My (relevant) html looks like this:src="">The context root is ".temp/www", and the resulting html (for one of my
pages as an example) is as below.You'll notice that the "menu" links are properly rendered, but the imagelinks and the css are not. So, is this a "feature" or a "bug", Iwonder...
http://www.w3.org/1999/xhtml">
Page Title  
  
LSD  PubMed
  Company  Contact
BTW, the CSS is like this:
Page Titlefinal WebComponent c = new WebComponent( "css" );
final IModel model = new Model(){private static final long serialVersionUID = 1L;public Object getObject( final Component c ){if ( 
ContentPage.this.isLocaleJapanese() )return "styles/main_jp.css";elsereturn "styles/main_en.css";}};
c.add( new AttributeModifier( "href", model ) );add( c );---This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcastand join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642___Wicket-user mailing list
Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] New snapshots available

2006-02-27 Thread Eelco Hillenius
I am sorry but I have no time for it. DatePicker is merely deprecated
- and if someone has a patch for the current problem I'd be happy to
apply it. Calendar is crude and not yet very easy to extend. And the
DatePicker functionality has to be build on top of it. I created YUI
Calendar this weekend to hopefully give a head start for people that
want to contribute. I don't know when I have time to finish it myself.

Eelco


> I know the new Calendar was just added to Wicket, and quite rapidly
> after the problem with the old DatePicker was identified, I might add.
> But could someone post a snippet of code showing how to use the new
> Calendar component (e.g. to set a datestring into a textbox)?


---
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=lnk&kid0944&bid$1720&dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


RE: [Wicket-user] New snapshots available

2006-02-27 Thread Frank Silbermann
The old DatePicker which didn't work in IE had in the documentation some
sample code for using it to load a textbox.  We also saw its use in the
FormInput example.

I know the new Calendar was just added to Wicket, and quite rapidly
after the problem with the old DatePicker was identified, I might add.
But could someone post a snippet of code showing how to use the new
Calendar component (e.g. to set a datestring into a textbox)?

Also, the concept of markup fragments (inline panels) sounds intriguing.
As anyone written anything about how these are used?  (Would I find much
about them in a search on this mailing list, for example?)

Thank you!

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Martijn
Dashorst
Sent: Monday, February 27, 2006 1:29 AM

I have uploaded a new snapshot release for a lot of Wicket projects:
 ...
Most notable changes to wicket:
 o new date picker (Yahoo), old datepicker has been deprecated
 o markup fragments (inline panels)
...


---
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=lnk&kid0944&bid$1720&dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Re: DatePicker problems

2006-02-27 Thread Martijn Dashorst
Yeah. +1 for extensions.MartijnOn 2/27/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
should we put these in extensions?-Igor
On 2/27/06, Nick Heudecker <[EMAIL PROTECTED]
> wrote:
Done.  I just copied the source into the description field since I figure you'll want to completely rewrite it. :)




-- Living a wicket life...Martijn Dashorst - http://www.jroller.com/page/dashorstWicket 1.1.1 is out: 
http://wicket.sourceforge.net/wicket-1.1


Re: [Wicket-user] Extending FormComponent

2006-02-27 Thread Ayodeji Aladejebi
well the last time i checked out that wicket-contrib-tinymce from CVS, i could'nt get any thing related to rte done from it maybe it hadnt been updated by then...but i will try again
On 2/27/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
also have a look at wicket-contrib-tinymce, it does what you are trying to do for the tinymce rte.
-Igor 

On 2/27/06, Juergen Donnerstag < [EMAIL PROTECTED]
> wrote: 
put it into  provided your own component is based on a Panel. Please the wiki for css, _javascript_ and header support. You'll
certainly find some information there.JuergenOn 2/27/06, Ayodeji Aladejebi <[EMAIL PROTECTED] 
> wrote:>> I have a _javascript_ library for rich text editor, i want to use it to create> my own small customized FormComponent/TextComponent . What do i do or how do> i use it>
> I have these 3 _javascript_ Lines to inject for the Rich text Component to> render>> 

Re: [Wicket-user] Bookmarkable links

2006-02-27 Thread Johan Compagner
what does youre html look like?If you have non absolute paths in src or href attributes of tags then they will be made absolute in the latest snapshots.i don't have any compile errors in head so don't know why you have.
On 2/27/06, David Leangen <[EMAIL PROTECTED]> wrote:
Sorry, I deleted the last post to this thread by Johan, so the order ismessed up a bit...Johan wrote something like:> If you use the latest snapshot, Wicket takes care of> resources...
I tried this, but unfortunately it does not work. My css and image filesare not prepended by the context path.I looked at the API, but (unless I misunderstood again) there does notseem to be a method of mounting resource files. Or should I mount the
directory that contains the resource files? For instance:  App.mount( "images/*", "images" );I'm not able to use CVS head to try stuff because there are builderrors...
---This SF.Net email is sponsored by xPML, a groundbreaking scripting languagethat 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=lnk&kid=110944&bid=241720&dat=121642
___Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Extending FormComponent

2006-02-27 Thread Igor Vaynberg
also have a look at wicket-contrib-tinymce, it does what you are trying to do for the tinymce rte.-IgorOn 2/27/06, Juergen Donnerstag <
[EMAIL PROTECTED]> wrote:put it into  provided your own component is based on a
Panel. Please the wiki for css, _javascript_ and header support. You'llcertainly find some information there.JuergenOn 2/27/06, Ayodeji Aladejebi <[EMAIL PROTECTED]
> wrote:>> I have a _javascript_ library for rich text editor, i want to use it to create> my own small customized FormComponent/TextComponent . What do i do or how do> i use it>
> I have these 3 _javascript_ Lines to inject for the Rich text Component to> render>> 

Re: [Wicket-user] Re: DatePicker problems

2006-02-27 Thread Igor Vaynberg
should we put these in extensions?-IgorOn 2/27/06, Nick Heudecker <[EMAIL PROTECTED]> wrote:
Done.  I just copied the source into the description field since I figure you'll want to completely rewrite it. :)





Re: [Wicket-user] Re: DatePicker problems

2006-02-27 Thread Nick Heudecker
Done.  I just copied the source into the description field since I figure you'll want to completely rewrite it. :)


Re: [Wicket-user] Header Contribution on inherited panels

2006-02-27 Thread Andre Matheus
Hi,

> I would very much appreciate if could prepare a little test case for
> me (like in src/test and based on WicketTestCase) for me to validate
> the implementation.

Sure. I am sending it attached.
I just don't know if it is what you need.

Case you need it in a different way, please tell me.

--
__
André Matheus

On 2/27/06, Juergen Donnerstag <[EMAIL PROTECTED]> wrote:
> Yes, it is the default behavior and the only one currently supported.
> Planned for the next snapshot is to introduce a scope for the header
> which by by default would be the class name of the extended component
> (PersonListPanel, PersonFormPanel). The scope can be defined like
>  
> A 2nd (more dynamic) choice will be to override
> newHeaderPartContainer() in your Panel to provide your own
> HeaderPartContainer (extended from HeaderPartContainer) and to allow
> you to provide whatever scope (it is a String) you want to.
>
> I would very much appreciate if could prepare a little test case for
> me (like in src/test and based on WicketTestCase) for me to validate
> the implementation.
>
> Juergen
>
> On 2/27/06, Andre Matheus <[EMAIL PROTECTED]> wrote:
> > Hi all, I am using wicket-1.2-20060227-0200.jar
> >
> > I found an strange thing in the Header Contribution on inherited panels.
> >
> > I have the following panel hierarchy, all them with wicket:head 
> > contribution:
> > BasePanel
> >-- BaseListPanel
> >-- PersonListPanel
> >-- BaseFormPanel
> >-- PersonFormPanel
> >
> > In the page, these panels are added like a master/detail page:
> >
> > Page p
> >-- PersonListPanel l
> >-- PersonFormPanel f
> >
> > When I look at the source code of the generated page, I see the header
> > contribution of BasePanel twice. For instance, if I add a javascript
> > alert("test") in the wicket:head section of BasePanel, it will be
> > executed twice.
> >
> > It looks like that the BasePanel is contributing as many times as a
> > inherited Panel is added to the page. Is it the expected behaviour? Is
> > it possible to make it contribute only once per page?
> >
> > Thank you very much.
> >
> > --
> > __
> > André Matheus
> >
> >
> > ---
> > 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?cmdlnk&kid0944&bid$1720&dat1642
> > ___
> > 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?cmdlnk&kid0944&bid$1720&dat1642
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>


--
__
André Matheus


test.isZip
Description: Binary data


Re: [Wicket-user] Re: DatePicker problems

2006-02-27 Thread Martijn Dashorst
Supply the two classes in the patch section of sourceforge (no need to make a diff though), we'll take care of the rest.MartijnOn 2/27/06, Nick Heudecker
 <[EMAIL PROTECTED]> wrote:Certainly, although it can probably be Wicket-ified some more.  I can also contribute a time selector I wrote.  Where should I put them?  
On 2/27/06, Martijn Dashorst
 <[EMAIL PROTECTED]> wrote:

Nick,Are you willing to donate your form component? I can see that there is some interest in the component you created.Martijn
On 2/27/06, 
Ayodeji Aladejebi <[EMAIL PROTECTED]> wrote:


please just a suggestion about Date Components. Is it possible to have a FormComponent for Date that is rendered as 3 combo boxes with Year | Month | Date in a drop down combos, so that when you attach that FormComponent, it will render 3 combo boxes for Year | Month | Date and then when you submit, it will internally convert the selected values in each combo boxex into the Date Objects.

 
I think this option will also be great especially in anticipation of _javascript_ issues with DatePicker components.thanks
 
On 2/26/06, Eelco Hillenius <[EMAIL PROTECTED]
> wrote:
I looked at the Yahoo components and I like them a lot. I startedworking on a yui (Yahoo UI library) package in extensions, an example
in wicket-examples, and picked Calendar as the first component. It'svery crude still, but it looks like that yahoo stuff is going to saveour day :)The only thing I am lacking is time. I am enclosing what I worked on
(it's in CVS too, but it'll  take a few hours to show up) and I amhoping on some participation. First step is to look at what I did, andthink what way you'd like it to evolve. Of course just a patch to make



it work in a form, have CSS styles work properly and an extension,DatePicker that let's you select a date and put it in some other fieldis more than welcome too! ;) Or the tree. Or...EelcoOn 2/24/06, Eelco Hillenius <
[EMAIL PROTECTED]> wrote:> Hi all,>> There's a bunch of problems with DatePicker poppin up. In fact, there
> have been problems with it's localization support from the start, but
> I hoped they would be fixed with a new version of jscalendar for which> the datepicker component is just a wrapper. However, the last release> of that thing was almost a year ago, and I don't feel confident there
> will be any release soon.>> I'd like to propose an alternative to jscalendar. One that has> robusteness over number of features, though I have no problem with> that thing looking nice.
>> One of the candidates that looks good to me is the yahoo calendar,> 


http://developer.yahoo.net/yui/calendar/index.html Anyone played
> around with that? If that's good, and some other yahoo components are> too (they sure look good to me), we could create a couple of> Yahoo/Wicket components. My plan would be to deprecate the current
> date picker - fix bugs if anyone can submit patches, but I'm too short> of time to go after that myself - and create a> wicket.extensions.markup.html.yahoo package for all yahoo components> (
e.g. we would have wicket.extensions.markup.html.yahoo.calendar).> Also, my plan would be to make using these components super easy to> use. If I look at the current DatePicker implementation, I believe I



> took it too far in trying to support a large part of the jscalendar> API. New implementations should be far simpler and more limited to> what it can do by default. If people want more fancy stuff, they could
> extend such a component and learn from the implementation how to take> their component further.>> Thoughts, suggestions?>> Eelco>





-- Living a wicket life...Martijn Dashorst - 

http://www.jroller.com/page/dashorstWicket 1.1.1
 is out: http://wicket.sourceforge.net/wicket-1.1



-- Living a wicket life...Martijn Dashorst - http://www.jroller.com/page/dashorstWicket 1.1.1
 is out: http://wicket.sourceforge.net/wicket-1.1


Re: [Wicket-user] Re: DatePicker problems

2006-02-27 Thread Nick Heudecker
Certainly, although it can probably be Wicket-ified some more.  I can also contribute a time selector I wrote.  Where should I put them?  On 2/27/06, Martijn Dashorst
 <[EMAIL PROTECTED]> wrote:
Nick,Are you willing to donate your form component? I can see that there is some interest in the component you created.Martijn
On 2/27/06, 
Ayodeji Aladejebi <[EMAIL PROTECTED]> wrote:

please just a suggestion about Date Components. Is it possible to have a FormComponent for Date that is rendered as 3 combo boxes with Year | Month | Date in a drop down combos, so that when you attach that FormComponent, it will render 3 combo boxes for Year | Month | Date and then when you submit, it will internally convert the selected values in each combo boxex into the Date Objects.

 
I think this option will also be great especially in anticipation of _javascript_ issues with DatePicker components.thanks
 
On 2/26/06, Eelco Hillenius <[EMAIL PROTECTED]
> wrote:
I looked at the Yahoo components and I like them a lot. I startedworking on a yui (Yahoo UI library) package in extensions, an example
in wicket-examples, and picked Calendar as the first component. It'svery crude still, but it looks like that yahoo stuff is going to saveour day :)The only thing I am lacking is time. I am enclosing what I worked on
(it's in CVS too, but it'll  take a few hours to show up) and I amhoping on some participation. First step is to look at what I did, andthink what way you'd like it to evolve. Of course just a patch to make


it work in a form, have CSS styles work properly and an extension,DatePicker that let's you select a date and put it in some other fieldis more than welcome too! ;) Or the tree. Or...EelcoOn 2/24/06, Eelco Hillenius <
[EMAIL PROTECTED]> wrote:> Hi all,>> There's a bunch of problems with DatePicker poppin up. In fact, there
> have been problems with it's localization support from the start, but
> I hoped they would be fixed with a new version of jscalendar for which> the datepicker component is just a wrapper. However, the last release> of that thing was almost a year ago, and I don't feel confident there
> will be any release soon.>> I'd like to propose an alternative to jscalendar. One that has> robusteness over number of features, though I have no problem with> that thing looking nice.
>> One of the candidates that looks good to me is the yahoo calendar,> 

http://developer.yahoo.net/yui/calendar/index.html Anyone played
> around with that? If that's good, and some other yahoo components are> too (they sure look good to me), we could create a couple of> Yahoo/Wicket components. My plan would be to deprecate the current
> date picker - fix bugs if anyone can submit patches, but I'm too short> of time to go after that myself - and create a> wicket.extensions.markup.html.yahoo package for all yahoo components> (
e.g. we would have wicket.extensions.markup.html.yahoo.calendar).> Also, my plan would be to make using these components super easy to> use. If I look at the current DatePicker implementation, I believe I


> took it too far in trying to support a large part of the jscalendar> API. New implementations should be far simpler and more limited to> what it can do by default. If people want more fancy stuff, they could
> extend such a component and learn from the implementation how to take> their component further.>> Thoughts, suggestions?>> Eelco>




-- Living a wicket life...Martijn Dashorst - 
http://www.jroller.com/page/dashorstWicket 1.1.1
 is out: http://wicket.sourceforge.net/wicket-1.1




Re: [Wicket-user] Header Contribution on inherited panels

2006-02-27 Thread Juergen Donnerstag
Yes, it is the default behavior and the only one currently supported.
Planned for the next snapshot is to introduce a scope for the header
which by by default would be the class name of the extended component
(PersonListPanel, PersonFormPanel). The scope can be defined like
 
A 2nd (more dynamic) choice will be to override
newHeaderPartContainer() in your Panel to provide your own
HeaderPartContainer (extended from HeaderPartContainer) and to allow
you to provide whatever scope (it is a String) you want to.

I would very much appreciate if could prepare a little test case for
me (like in src/test and based on WicketTestCase) for me to validate
the implementation.

Juergen

On 2/27/06, Andre Matheus <[EMAIL PROTECTED]> wrote:
> Hi all, I am using wicket-1.2-20060227-0200.jar
>
> I found an strange thing in the Header Contribution on inherited panels.
>
> I have the following panel hierarchy, all them with wicket:head contribution:
> BasePanel
>-- BaseListPanel
>-- PersonListPanel
>-- BaseFormPanel
>-- PersonFormPanel
>
> In the page, these panels are added like a master/detail page:
>
> Page p
>-- PersonListPanel l
>-- PersonFormPanel f
>
> When I look at the source code of the generated page, I see the header
> contribution of BasePanel twice. For instance, if I add a javascript
> alert("test") in the wicket:head section of BasePanel, it will be
> executed twice.
>
> It looks like that the BasePanel is contributing as many times as a
> inherited Panel is added to the page. Is it the expected behaviour? Is
> it possible to make it contribute only once per page?
>
> Thank you very much.
>
> --
> __
> André Matheus
>
>
> ---
> 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?cmdlnk&kid0944&bid$1720&dat1642
> ___
> 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=lnk&kid0944&bid$1720&dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Header Contribution on inherited panels

2006-02-27 Thread Andre Matheus
Hi all, I am using wicket-1.2-20060227-0200.jar

I found an strange thing in the Header Contribution on inherited panels.

I have the following panel hierarchy, all them with wicket:head contribution:
BasePanel
-- BaseListPanel
-- PersonListPanel
-- BaseFormPanel
-- PersonFormPanel

In the page, these panels are added like a master/detail page:

Page p
-- PersonListPanel l
-- PersonFormPanel f

When I look at the source code of the generated page, I see the header
contribution of BasePanel twice. For instance, if I add a javascript
alert("test") in the wicket:head section of BasePanel, it will be
executed twice.

It looks like that the BasePanel is contributing as many times as a
inherited Panel is added to the page. Is it the expected behaviour? Is
it possible to make it contribute only once per page?

Thank you very much.

--
__
André Matheus


---
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=lnk&kid0944&bid$1720&dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Extending FormComponent

2006-02-27 Thread Juergen Donnerstag
put it into  provided your own component is based on a
Panel. Please the wiki for css, javascript and header support. You'll
certainly find some information there.

Juergen

On 2/27/06, Ayodeji Aladejebi <[EMAIL PROTECTED]> wrote:
>
> I have a javascript library for rich text editor, i want to use it to create
> my own small customized FormComponent/TextComponent . What do i do or how do
> i use it
>
> I have these 3 JavaScript Lines to inject for the Rich text Component to
> render
>
>  src="richtext_compressed.js">
> initRTE(imagesPath, includesPath, cssFile)
> writeRichText(fieldname, value, width, height, buttons, readOnly)
>
> thanks


---
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=lnk&kid0944&bid$1720&dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Extending FormComponent

2006-02-27 Thread Ayodeji Aladejebi
I have a _javascript_ library for rich text editor, i want to use it to create my own small customized FormComponent/TextComponent . What do i do or how do i use it
 
I have these 3 _javascript_ Lines to inject for the Rich text Component to render
 

Re: [Wicket-user] Basic - JavaScriptReference and IInitializer question.

2006-02-27 Thread Johan Compagner
Don't forget restarting youre server and reloading the session from disc.Then the Resources are also not there yet in the SharedResources.And static blocks are then completely evil! Because the static part:
static{    PackageResourceReference resource = new PackageResourceReference ();}will pretty much fail because the class is loaded before there is an application objectbecaue it is loaded by the servlet container when it is deserializing the sessions.
johanOn 2/27/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
1) is just a reference, you need to bind the object first like you do in 2)the initializer is also needed for clustering, it is a better place to do the binding then static blocks somewhere.javadoc from IInitializer
/** * Initializes something when application loads *  * Initializer is there for clustering. Lets say you access a page that has a * link to a packaged resource on node A now the url for the resource gets
 * forwarded to node B, but node B doesnt have the resource registered yet * because maybe the page class hasn't been loaded and so its static block * hasn't run yet. So the initializer is a place for you to register all those
 * resources and do all the stuff you used to do in the static blocks. * -IgorOn 2/26/06, 
karthik Guru <
[EMAIL PROTECTED]> wrote:I have done this -1)

Re: [Wicket-user] Re: DatePicker problems

2006-02-27 Thread Johan Compagner
Then the sequence how you set the fields should be pushed by the locale settingsOr just specified in youre markup.johanOn 2/27/06, Ayodeji Aladejebi
 <[EMAIL PROTECTED]> wrote:
please just a suggestion about Date Components. Is it possible to have a FormComponent for Date that is rendered as 3 combo boxes with Year | Month | Date in a drop down combos, so that when you attach that FormComponent, it will render 3 combo boxes for Year | Month | Date and then when you submit, it will internally convert the selected values in each combo boxex into the Date Objects.

 
I think this option will also be great especially in anticipation of _javascript_ issues with DatePicker components.thanks
 
On 2/26/06, Eelco Hillenius <[EMAIL PROTECTED]
> wrote:
I looked at the Yahoo components and I like them a lot. I startedworking on a yui (Yahoo UI library) package in extensions, an example
in wicket-examples, and picked Calendar as the first component. It'svery crude still, but it looks like that yahoo stuff is going to saveour day :)The only thing I am lacking is time. I am enclosing what I worked on
(it's in CVS too, but it'll  take a few hours to show up) and I amhoping on some participation. First step is to look at what I did, andthink what way you'd like it to evolve. Of course just a patch to make

it work in a form, have CSS styles work properly and an extension,DatePicker that let's you select a date and put it in some other fieldis more than welcome too! ;) Or the tree. Or...EelcoOn 2/24/06, Eelco Hillenius <
[EMAIL PROTECTED]> wrote:> Hi all,>> There's a bunch of problems with DatePicker poppin up. In fact, there
> have been problems with it's localization support from the start, but
> I hoped they would be fixed with a new version of jscalendar for which> the datepicker component is just a wrapper. However, the last release> of that thing was almost a year ago, and I don't feel confident there
> will be any release soon.>> I'd like to propose an alternative to jscalendar. One that has> robusteness over number of features, though I have no problem with> that thing looking nice.
>> One of the candidates that looks good to me is the yahoo calendar,> 
http://developer.yahoo.net/yui/calendar/index.html Anyone played
> around with that? If that's good, and some other yahoo components are> too (they sure look good to me), we could create a couple of> Yahoo/Wicket components. My plan would be to deprecate the current
> date picker - fix bugs if anyone can submit patches, but I'm too short> of time to go after that myself - and create a> wicket.extensions.markup.html.yahoo package for all yahoo components> (
e.g. we would have wicket.extensions.markup.html.yahoo.calendar).> Also, my plan would be to make using these components super easy to> use. If I look at the current DatePicker implementation, I believe I

> took it too far in trying to support a large part of the jscalendar> API. New implementations should be far simpler and more limited to> what it can do by default. If people want more fancy stuff, they could
> extend such a component and learn from the implementation how to take> their component further.>> Thoughts, suggestions?>> Eelco>






Re: [Wicket-user] Detachable resources

2006-02-27 Thread Johan Compagner
His model is not detached because a Resource request is not a normal page request.We don't walk over the models because we don't have components and models.johanOn 2/27/06, 
Maurice Marrink <[EMAIL PROTECTED]> wrote:
I think he is already doing that johan, hence the question about there-attaching.Although there seems to be something going wrong because all modelsare detatched at the end of a request (unless you are nesting models
and you don't propagate the detach call to the nested model). ondetach the loadabledetachable model should set the hibernate object tonull and only store the class and the id so when later attach iscalled it can load them from the session.
That is what you usually use however if for some strange reason youmust keep the hibernateobject in your model then you have to resort tostuff like re-attach or merge (all in the hibernate session object )
Personaly i have some experiance with re-attching hibernate objects tothe session and it is not something you can use out of the box. Forinstance re-attch throws an exception if an object with the same id isalready loaded in the session (you need to do some dirty tricks to
find out if this is the case since hibernate does not have an api forthis). Re-attach only works for the hibernateobject you re-attached,meaning if i have an object A with a list of objects of type C and a
reference to object B, after re-attching i can only safely call A andC. if B has any lazy list they will give me an exception because theyhave not been re-attched.MauriceOn 2/24/06, Johan Compagner <
[EMAIL PROTECTED]> wrote:> personally i wouldn't keep hibernate objects in my models.> Let one of the Hibernate caches do that for you down below (closer to youre
> data)> instead of in the ui level/models.> On 2/23/06, Gili <[EMAIL PROTECTED]> wrote:> >> > Ah! Thank you :)
> >> > You seemed to have missed my question regarding clustering. Do I> need> > to fully detach LoadableDetachableModel on resource close or is it> > sufficient to reattach the Hibernate objects to a new Session on the
> > next request? Will the latter cause problems in clustering environments?> >> > Thank you,> > Gili> >> > Johan Compagner wrote:> > > Iresourcestream.close
()> > >> > > On 2/23/06, *Gili* < [EMAIL PROTECTED]> > > [EMAIL PROTECTED]
>> wrote:> > >> > >> > >I meant I haved a Resource that gets its data from the> > > database. So I> > > wrapped my Hibernate object in a LoadableDetachableModel. Basically
> > > what> > > I am noticing is this:> > >> > > 1) First request comes in> > > 2) New Hibernate session is opened> > > 3) 
Resource.getData() gets invoked> > > 4) LoadableDetachableModel.attach() gets invoked and its object is> > > returned. Resource uses this to generate its data.> > > 5) Data is returned to client, Hibernate session is closed at the
> end of> > > the request (by my servlet filter)> > >> > > 6) Second request comes in> > > 7) LoadableDetachableModel thinks it is still attached> > > 8) I try using the Hibernate object it returns but it is now
> > > disconnected from the Session so I have to explicitly reconnect it> to a> > > new session.> > >> > >Ideally I'd like to have a mechanism which lets me know when
> > > I should> > > reconnect the Hibernate objects to the session so if> > > Resource.getLength(), getData() get invoked in a single HTTP> request, I> > > only attach them to the session once.
> > >> > >In my original image I was looking for a way to detach()> > > LoadableDetachableModel at the end of each HTTP request, but I> realize> > > now this might be overkill. It is far more expensive to re-attach a
> > > LoadableDetachableModel than simply reattach its resulting object to> the> > > Hibernate session.> > >> > >So two questions:> > >
> > > 1) Is there a good reason to re-attach the LoadableDetachableModel> at> > > the beginning of each HTTP request? Or is it enough to simply> re-attach> > > the Hibernate object? Will the latter break anything in a clustering
> > > environment?> > >> > > 2) Does it make sense for Wicket to provide some sort of> mechanism/hook> > > to let the resource know when the HTTP request begins/ends so it can
> > > reattach its model objects (if any exist) to the database?> > >> > > Thank you,> > > Gili> > >> > > Johan Compagner wrote:
> > >  >  i guess you are now talking about a Component that is directly> > > its own> > >  > Resource Streamer?> > >  > of do you have Shared Resources with a detachablemodel? That
> would be> > >  > strange because that> > >  > doesn't make anysense for wicket (we don't attach/detach it)> > >  >> > >  > But for a component and a model impl that has the resource this
> > >  > shouldn't be a problem to begin with> > >  > Because the stream is done in one go so contenttype, da

Re: [Wicket-user] Re: DatePicker problems

2006-02-27 Thread Martijn Dashorst
Nick,Are you willing to donate your form component? I can see that there is some interest in the component you created.MartijnOn 2/27/06, 
Ayodeji Aladejebi <[EMAIL PROTECTED]> wrote:
please just a suggestion about Date Components. Is it possible to have a FormComponent for Date that is rendered as 3 combo boxes with Year | Month | Date in a drop down combos, so that when you attach that FormComponent, it will render 3 combo boxes for Year | Month | Date and then when you submit, it will internally convert the selected values in each combo boxex into the Date Objects.

 
I think this option will also be great especially in anticipation of _javascript_ issues with DatePicker components.thanks
 
On 2/26/06, Eelco Hillenius <[EMAIL PROTECTED]
> wrote:
I looked at the Yahoo components and I like them a lot. I startedworking on a yui (Yahoo UI library) package in extensions, an example
in wicket-examples, and picked Calendar as the first component. It'svery crude still, but it looks like that yahoo stuff is going to saveour day :)The only thing I am lacking is time. I am enclosing what I worked on
(it's in CVS too, but it'll  take a few hours to show up) and I amhoping on some participation. First step is to look at what I did, andthink what way you'd like it to evolve. Of course just a patch to make

it work in a form, have CSS styles work properly and an extension,DatePicker that let's you select a date and put it in some other fieldis more than welcome too! ;) Or the tree. Or...EelcoOn 2/24/06, Eelco Hillenius <
[EMAIL PROTECTED]> wrote:> Hi all,>> There's a bunch of problems with DatePicker poppin up. In fact, there
> have been problems with it's localization support from the start, but
> I hoped they would be fixed with a new version of jscalendar for which> the datepicker component is just a wrapper. However, the last release> of that thing was almost a year ago, and I don't feel confident there
> will be any release soon.>> I'd like to propose an alternative to jscalendar. One that has> robusteness over number of features, though I have no problem with> that thing looking nice.
>> One of the candidates that looks good to me is the yahoo calendar,> 
http://developer.yahoo.net/yui/calendar/index.html Anyone played
> around with that? If that's good, and some other yahoo components are> too (they sure look good to me), we could create a couple of> Yahoo/Wicket components. My plan would be to deprecate the current
> date picker - fix bugs if anyone can submit patches, but I'm too short> of time to go after that myself - and create a> wicket.extensions.markup.html.yahoo package for all yahoo components> (
e.g. we would have wicket.extensions.markup.html.yahoo.calendar).> Also, my plan would be to make using these components super easy to> use. If I look at the current DatePicker implementation, I believe I

> took it too far in trying to support a large part of the jscalendar> API. New implementations should be far simpler and more limited to> what it can do by default. If people want more fancy stuff, they could
> extend such a component and learn from the implementation how to take> their component further.>> Thoughts, suggestions?>> Eelco>



-- Living a wicket life...Martijn Dashorst - http://www.jroller.com/page/dashorstWicket 1.1.1
 is out: http://wicket.sourceforge.net/wicket-1.1


Re: [Wicket-user] Source of application using Wicket

2006-02-27 Thread Martijn Dashorst
wicket phonebook is a good example to start with.Under construction, and more specifically /NOT/ by wicket guru's is the Burgerweeshuis project hosted at sourceforge.    
http://www.sourceforge.net/projects/burgerweeshuisIt is a dutch project, but you might find some interesting things there. It uses hibernate 3, annotations and wicket. It is a rewrite of a previously Model2 application (based on maverick).
MartijnOn 2/27/06, jan_bar <[EMAIL PROTECTED]> wrote:
Hi,the Wicket samples is basic source of how to start with Wicket. But I misssome real world (more complex) applications. I like to learn from codewritten by Wicket gurus. For instance Pet Store with Wicket. Can you help
me?Thank you, Jan---This SF.Net email is sponsored by xPML, a groundbreaking scripting languagethat 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=lnk&kid=110944&bid=241720&dat=121642
___Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user-- Living a wicket life...Martijn Dashorst - http://www.jroller.com/page/dashorst
Wicket 1.1.1 is out: http://wicket.sourceforge.net/wicket-1.1


Re: [Wicket-user] Re: DatePicker problems

2006-02-27 Thread Ayodeji Aladejebi
please just a suggestion about Date Components. Is it possible to have a FormComponent for Date that is rendered as 3 combo boxes with Year | Month | Date in a drop down combos, so that when you attach that FormComponent, it will render 3 combo boxes for Year | Month | Date and then when you submit, it will internally convert the selected values in each combo boxex into the Date Objects.

 
I think this option will also be great especially in anticipation of _javascript_ issues with DatePicker components.thanks
 
On 2/26/06, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
I looked at the Yahoo components and I like them a lot. I startedworking on a yui (Yahoo UI library) package in extensions, an example
in wicket-examples, and picked Calendar as the first component. It'svery crude still, but it looks like that yahoo stuff is going to saveour day :)The only thing I am lacking is time. I am enclosing what I worked on
(it's in CVS too, but it'll  take a few hours to show up) and I amhoping on some participation. First step is to look at what I did, andthink what way you'd like it to evolve. Of course just a patch to make
it work in a form, have CSS styles work properly and an extension,DatePicker that let's you select a date and put it in some other fieldis more than welcome too! ;) Or the tree. Or...EelcoOn 2/24/06, Eelco Hillenius <
[EMAIL PROTECTED]> wrote:> Hi all,>> There's a bunch of problems with DatePicker poppin up. In fact, there> have been problems with it's localization support from the start, but
> I hoped they would be fixed with a new version of jscalendar for which> the datepicker component is just a wrapper. However, the last release> of that thing was almost a year ago, and I don't feel confident there
> will be any release soon.>> I'd like to propose an alternative to jscalendar. One that has> robusteness over number of features, though I have no problem with> that thing looking nice.
>> One of the candidates that looks good to me is the yahoo calendar,> http://developer.yahoo.net/yui/calendar/index.html Anyone played
> around with that? If that's good, and some other yahoo components are> too (they sure look good to me), we could create a couple of> Yahoo/Wicket components. My plan would be to deprecate the current
> date picker - fix bugs if anyone can submit patches, but I'm too short> of time to go after that myself - and create a> wicket.extensions.markup.html.yahoo package for all yahoo components> (
e.g. we would have wicket.extensions.markup.html.yahoo.calendar).> Also, my plan would be to make using these components super easy to> use. If I look at the current DatePicker implementation, I believe I
> took it too far in trying to support a large part of the jscalendar> API. New implementations should be far simpler and more limited to> what it can do by default. If people want more fancy stuff, they could
> extend such a component and learn from the implementation how to take> their component further.>> Thoughts, suggestions?>> Eelco>



Re: [Wicket-user] Detachable resources

2006-02-27 Thread Maurice Marrink
I think he is already doing that johan, hence the question about the
re-attaching.
Although there seems to be something going wrong because all models
are detatched at the end of a request (unless you are nesting models
and you don't propagate the detach call to the nested model). on
detach the loadabledetachable model should set the hibernate object to
null and only store the class and the id so when later attach is
called it can load them from the session.
That is what you usually use however if for some strange reason you
must keep the hibernateobject in your model then you have to resort to
stuff like re-attach or merge (all in the hibernate session object )
Personaly i have some experiance with re-attching hibernate objects to
the session and it is not something you can use out of the box. For
instance re-attch throws an exception if an object with the same id is
already loaded in the session (you need to do some dirty tricks to
find out if this is the case since hibernate does not have an api for
this). Re-attach only works for the hibernateobject you re-attached,
meaning if i have an object A with a list of objects of type C and a
reference to object B, after re-attching i can only safely call A and
C. if B has any lazy list they will give me an exception because they
have not been re-attched.

Maurice

On 2/24/06, Johan Compagner <[EMAIL PROTECTED]> wrote:
> personally i wouldn't keep hibernate objects in my models.
> Let one of the Hibernate caches do that for you down below (closer to youre
> data)
> instead of in the ui level/models.
>
>
>
>
> On 2/23/06, Gili <[EMAIL PROTECTED]> wrote:
> >
> > Ah! Thank you :)
> >
> > You seemed to have missed my question regarding clustering. Do I
> need
> > to fully detach LoadableDetachableModel on resource close or is it
> > sufficient to reattach the Hibernate objects to a new Session on the
> > next request? Will the latter cause problems in clustering environments?
> >
> > Thank you,
> > Gili
> >
> > Johan Compagner wrote:
> > > Iresourcestream.close()
> > >
> > > On 2/23/06, *Gili* < [EMAIL PROTECTED]
> > > > wrote:
> > >
> > >
> > >I meant I haved a Resource that gets its data from the
> > > database. So I
> > > wrapped my Hibernate object in a LoadableDetachableModel. Basically
> > > what
> > > I am noticing is this:
> > >
> > > 1) First request comes in
> > > 2) New Hibernate session is opened
> > > 3) Resource.getData() gets invoked
> > > 4) LoadableDetachableModel.attach() gets invoked and its object is
> > > returned. Resource uses this to generate its data.
> > > 5) Data is returned to client, Hibernate session is closed at the
> end of
> > > the request (by my servlet filter)
> > >
> > > 6) Second request comes in
> > > 7) LoadableDetachableModel thinks it is still attached
> > > 8) I try using the Hibernate object it returns but it is now
> > > disconnected from the Session so I have to explicitly reconnect it
> to a
> > > new session.
> > >
> > >Ideally I'd like to have a mechanism which lets me know when
> > > I should
> > > reconnect the Hibernate objects to the session so if
> > > Resource.getLength(), getData() get invoked in a single HTTP
> request, I
> > > only attach them to the session once.
> > >
> > >In my original image I was looking for a way to detach()
> > > LoadableDetachableModel at the end of each HTTP request, but I
> realize
> > > now this might be overkill. It is far more expensive to re-attach a
> > > LoadableDetachableModel than simply reattach its resulting object to
> the
> > > Hibernate session.
> > >
> > >So two questions:
> > >
> > > 1) Is there a good reason to re-attach the LoadableDetachableModel
> at
> > > the beginning of each HTTP request? Or is it enough to simply
> re-attach
> > > the Hibernate object? Will the latter break anything in a clustering
> > > environment?
> > >
> > > 2) Does it make sense for Wicket to provide some sort of
> mechanism/hook
> > > to let the resource know when the HTTP request begins/ends so it can
> > > reattach its model objects (if any exist) to the database?
> > >
> > > Thank you,
> > > Gili
> > >
> > > Johan Compagner wrote:
> > >  >  i guess you are now talking about a Component that is directly
> > > its own
> > >  > Resource Streamer?
> > >  > of do you have Shared Resources with a detachablemodel? That
> would be
> > >  > strange because that
> > >  > doesn't make anysense for wicket (we don't attach/detach it)
> > >  >
> > >  > But for a component and a model impl that has the resource this
> > >  > shouldn't be a problem to begin with
> > >  > Because the stream is done in one go so contenttype, data.
> > >  > And last modified is not checked for those so only a last modifed
> > >  > request doesn't com