[Wicket-user] Re: Understanding models with dynamic form elements

2006-05-26 Thread Andrew Berman
I think I figured it out.On 5/26/06, Andrew Berman <[EMAIL PROTECTED]> wrote:
I'm having problems filling in a model when I use dynamic form elements.  I have surveys which are built depending on whatever the database calls for.  So, the hierarchy is this:Page    > Form
      -> ListView
          ---> Fragment (depending on type, it creates a different Fragment)       --> (e.g.) DropDownChoice

So, basically I pass each Fragment a question which contains a list of valid responses.  I ultimately want a list of the valid responses.  I set the modelObject in the Form to be a List.  So, how do I fill in this list properly with the selected either responseid or response object?  I think I'm just getting confused by all the layers in the hierarchy, so hopefully someone can help me sort this out.
Thanks for any help,Andrew




Re: [Wicket-user] Audio in Wicket

2006-05-26 Thread Michael Welter
I have modeled an Audio class from the Image class.  The Audio class 
extends WebComponent and implements IResourceListener.  The component 
contains a byte[] aray containing the audio stream, and I am able to 
play audio from the web page.


My question is:  When are these components flushed from memory?  Is 
there something I should do to make them available for garbage collection?


Thanks,



Johan Compagner wrote:

If your Audio component implements IResourceListener and the audio component
holds the byte[]/audio from db Resource. Then just map the the audio

component

The audio component has the onComponentTag implemented
Where it writes out the src attribute to itself (the IResourceListener)

url = urlFor(IResourceListener.INTERFACE);

then:

public void onResourceRequested()
{
resource.onResourceRequested ();
}


johan


On 5/24/06, *Michael Welter* <[EMAIL PROTECTED] 
> wrote:


I have a requirement to provide a web site that allows the customer to
drill down into database detail.  At the lowest level, the web page
contains the normal text presentation along with zero to many "Play"
buttons.  Each button plays a different audio file of previously
recorded speech.  The user may or may not choose to listen to the audio.

Everything is working except the "Play" buttons.  Hibernate/Postgres is
a joy, and Wicket is great!

I've modeled the Audio and LocalizedAudioResource classes from Image and
LocalizedImageResource.  Audio implements IResourceListener.  I have the
audio streams in memory as a result of the drill down, and, for now,
I'm
just creating ByteArrayResource objects for each stream (after I get it
working, I'll create a Resource class that performs a database fetch).
BTW, an audio stream is a java.sql.Blob.

I create the Audio object using the ByteArratResource object.  The HTML
tag is .  The  tag causes
the browser to play the track with MediaPlayer or QuickTime.

In LocalizedAudioResource I create a ResourceStreamRequestTarget object
and pass that to component.urlFor( obj ).  I'm to the point where I need
to flesh-out the doEncode(RequestCycle,IRequestTarget) function within
WebRequestCodingStrategy in order to create the URL.

So here are some questions:

Will the URL in the web page reference the ResourceStreamRequestTarget?
  What will that URL look like?

Do I need to wrap the  tag in a button or a link?

Does anyone have any thoughts about the doEncode function?  Sample
code?

Am I on the right track, or there an easier way to do this?

Thanks for your help.  Thanks to compagner and chillenious.




--
Michael Welter
Introspect Telephony Corp.
Denver, Colorado US
+1.303.674.2575
[EMAIL PROTECTED] 
www.introspect.com 


---
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=lnk&kid=107521&bid=248729&dat=121642

___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net

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




--
Michael Welter
Introspect Telephony Corp.
Denver, Colorado US
+1.303.674.2575
[EMAIL PROTECTED]
www.introspect.com


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


Re: [Wicket-user] ON FORMS: How do I use get to edit an Object's property when it is another complex object?

2006-05-26 Thread Eelco Hillenius

No problem. Good to know people like to use Wicket for their hobby too! :)

Eelco

On 5/26/06, Florin Gheorghies <[EMAIL PROTECTED]> wrote:

Thanks for the reply. Between my job (construction), two kids (3 and 1) and
my wife's computer use restrictions, I only get about 2 hours a week for
wicket. I really am grateful for the help.

Florin

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Eelco
Hillenius
Sent: Friday, May 26, 2006 9:26 PM
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] ON FORMS: How do I use get to edit an Object's
property when it is another complex object?

For clarity:

The ids of the form components only matters when you use a
CompoundPropertyModel, so might just as well have written the second
example like:

static class MyForm extends Form {

 public MyForm(String id, Customer customer)  {
   super(id);
   add(new TextField("foo", new PropertyModel(customer, "name"));
   add(new TextField("bar", new
PropertyModel(customer, "address.streetName"));
 }
}

or

static class MyForm extends Form {

 public MyForm(String id, Customer customer)  {
   super(id);
   add(new TextField("foo", new PropertyModel(customer, "name"));
   add(new TextField("bar", new
PropertyModel(customer.getAddress(), "streetName"));
 }
}

Eelco

On 5/26/06, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
> static class MyForm extends Form {
>
>   public MyForm(String id, Customer customer)  { /* even better is to
> have a model that produces your customer object */
> super(id);
> setModel(new CompoundPropertyModel(customer);
> add(new TextField("name"); // customer name
> add(new TextField("address.streetName"); // address' street name
>   }
> }
>
> or
>
> static class MyForm extends Form {
>
>   public MyForm(String id, Customer customer)  {
> super(id);
> add(new TextField("name", new PropertyModel(customer, "name"));
> add(new TextField("address.streetName", new
> PropertyModel(customer, "address.streetName"));
>   }
> }
>
> Or whatever alternative you like.
>
> Eelco
>
> On 5/26/06, Florin Gheorghies <[EMAIL PROTECTED]> wrote:
> >
> > Customer {
> > String name;
> > Address address;
> > }
> >
> > Address {
> > String streetName;
> > String zip;
> > }
> >
> > I'd like to build a form that edits both the Customer.name and
> > Custmer.address.streetName;
> >
> >
> > Thanks.
> >
> >
> >
> > ---
> > 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=lnk&kid=107521&bid=248729&dat=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=lnk&kid=107521&bid=248729&dat=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=lnk&kid=107521&bid=248729&dat=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=lnk&kid=107521&bid=248729&dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


RE: [Wicket-user] ON FORMS: How do I use get to edit an Object's property when it is another complex object?

2006-05-26 Thread Florin Gheorghies
Thanks Eelco.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Eelco
Hillenius
Sent: Friday, May 26, 2006 9:23 PM
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] ON FORMS: How do I use get to edit an Object's
property when it is another complex object?

static class MyForm extends Form {

  public MyForm(String id, Customer customer)  { /* even better is to
have a model that produces your customer object */
super(id);
setModel(new CompoundPropertyModel(customer);
add(new TextField("name"); // customer name
add(new TextField("address.streetName"); // address' street name
  }
}

or

static class MyForm extends Form {

  public MyForm(String id, Customer customer)  {
super(id);
add(new TextField("name", new PropertyModel(customer, "name"));
add(new TextField("address.streetName", new
PropertyModel(customer, "address.streetName"));
  }
}

Or whatever alternative you like.

Eelco

On 5/26/06, Florin Gheorghies <[EMAIL PROTECTED]> wrote:
>
> Customer {
> String name;
> Address address;
> }
>
> Address {
> String streetName;
> String zip;
> }
>
> I'd like to build a form that edits both the Customer.name and
> Custmer.address.streetName;
>
>
> Thanks.
>
>
>
> ---
> 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=lnk&kid=107521&bid=248729&dat=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=lnk&kid=107521&bid=248729&dat=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=lnk&kid=107521&bid=248729&dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] ON FORMS: How do I use get to edit an Object's property when it is another complex object?

2006-05-26 Thread Eelco Hillenius

static class MyForm extends Form {

 public MyForm(String id, Customer customer)  { /* even better is to
have a model that produces your customer object */
   super(id);
   setModel(new CompoundPropertyModel(customer);
   add(new TextField("name"); // customer name
   add(new TextField("address.streetName"); // address' street name
 }
}

or

static class MyForm extends Form {

 public MyForm(String id, Customer customer)  {
   super(id);
   add(new TextField("name", new PropertyModel(customer, "name"));
   add(new TextField("address.streetName", new
PropertyModel(customer, "address.streetName"));
 }
}

Or whatever alternative you like.

Eelco

On 5/26/06, Florin Gheorghies <[EMAIL PROTECTED]> wrote:


Customer {
String name;
Address address;
}

Address {
String streetName;
String zip;
}

I'd like to build a form that edits both the Customer.name and
Custmer.address.streetName;


Thanks.



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


RE: [Wicket-user] ON FORMS: How do I use get to edit an Object's property when it is another complex object?

2006-05-26 Thread Florin Gheorghies
Thanks for the reply. Between my job (construction), two kids (3 and 1) and
my wife's computer use restrictions, I only get about 2 hours a week for
wicket. I really am grateful for the help.

Florin

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Eelco
Hillenius
Sent: Friday, May 26, 2006 9:26 PM
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] ON FORMS: How do I use get to edit an Object's
property when it is another complex object?

For clarity:

The ids of the form components only matters when you use a
CompoundPropertyModel, so might just as well have written the second
example like:

static class MyForm extends Form {

 public MyForm(String id, Customer customer)  {
   super(id);
   add(new TextField("foo", new PropertyModel(customer, "name"));
   add(new TextField("bar", new
PropertyModel(customer, "address.streetName"));
 }
}

or

static class MyForm extends Form {

 public MyForm(String id, Customer customer)  {
   super(id);
   add(new TextField("foo", new PropertyModel(customer, "name"));
   add(new TextField("bar", new
PropertyModel(customer.getAddress(), "streetName"));
 }
}

Eelco

On 5/26/06, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
> static class MyForm extends Form {
>
>   public MyForm(String id, Customer customer)  { /* even better is to
> have a model that produces your customer object */
> super(id);
> setModel(new CompoundPropertyModel(customer);
> add(new TextField("name"); // customer name
> add(new TextField("address.streetName"); // address' street name
>   }
> }
>
> or
>
> static class MyForm extends Form {
>
>   public MyForm(String id, Customer customer)  {
> super(id);
> add(new TextField("name", new PropertyModel(customer, "name"));
> add(new TextField("address.streetName", new
> PropertyModel(customer, "address.streetName"));
>   }
> }
>
> Or whatever alternative you like.
>
> Eelco
>
> On 5/26/06, Florin Gheorghies <[EMAIL PROTECTED]> wrote:
> >
> > Customer {
> > String name;
> > Address address;
> > }
> >
> > Address {
> > String streetName;
> > String zip;
> > }
> >
> > I'd like to build a form that edits both the Customer.name and
> > Custmer.address.streetName;
> >
> >
> > Thanks.
> >
> >
> >
> > ---
> > 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=lnk&kid=107521&bid=248729&dat=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=lnk&kid=107521&bid=248729&dat=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=lnk&kid=107521&bid=248729&dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] ON FORMS: How do I use get to edit an Object's property when it is another complex object?

2006-05-26 Thread Eelco Hillenius

For clarity:

The ids of the form components only matters when you use a
CompoundPropertyModel, so might just as well have written the second
example like:

static class MyForm extends Form {

public MyForm(String id, Customer customer)  {
  super(id);
  add(new TextField("foo", new PropertyModel(customer, "name"));
  add(new TextField("bar", new
PropertyModel(customer, "address.streetName"));
}
}

or

static class MyForm extends Form {

public MyForm(String id, Customer customer)  {
  super(id);
  add(new TextField("foo", new PropertyModel(customer, "name"));
  add(new TextField("bar", new
PropertyModel(customer.getAddress(), "streetName"));
}
}

Eelco

On 5/26/06, Eelco Hillenius <[EMAIL PROTECTED]> wrote:

static class MyForm extends Form {

  public MyForm(String id, Customer customer)  { /* even better is to
have a model that produces your customer object */
super(id);
setModel(new CompoundPropertyModel(customer);
add(new TextField("name"); // customer name
add(new TextField("address.streetName"); // address' street name
  }
}

or

static class MyForm extends Form {

  public MyForm(String id, Customer customer)  {
super(id);
add(new TextField("name", new PropertyModel(customer, "name"));
add(new TextField("address.streetName", new
PropertyModel(customer, "address.streetName"));
  }
}

Or whatever alternative you like.

Eelco

On 5/26/06, Florin Gheorghies <[EMAIL PROTECTED]> wrote:
>
> Customer {
> String name;
> Address address;
> }
>
> Address {
> String streetName;
> String zip;
> }
>
> I'd like to build a form that edits both the Customer.name and
> Custmer.address.streetName;
>
>
> Thanks.
>
>
>
> ---
> 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=lnk&kid=107521&bid=248729&dat=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=lnk&kid=107521&bid=248729&dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


RE: [Wicket-user] Use of Tree Component

2006-05-26 Thread David Leangen

No, no, my fault. I should have updated to the latest revision before
mentioning this.

In the revision I was using, there was something like this in Tree.html:

  

  


It was this "css" id that was causing me problems. But this is gone now...

So, no problem!


Cheers,
Dave





> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of
> Eelco Hillenius
> Sent: 27 May 2006 01:45
> To: wicket-user@lists.sourceforge.net
> Subject: Re: [Wicket-user] Use of Tree Component
>
>
> Oh wait. Maybe you were confused with "css" being a component id? I
> don't think/ can't imagine I ever used "css" as a class.
>
> If you look at Tree.html:
>
> 
> 
> 
>  
>   
>  
> 
> 
>
> and Tree$DefaultNodePanel.html:
>
> 
>  class="wicket-indent-tree-junctionlink"
>   > class="wicket-indent-tree-junctionimage"/>
>> class="wicket-indent-tree-nodeimage"/>   wicket:id="label"
> class="wicket-indent-tree-nodelabel">label
> 
>
> You can see all the classes being in there, and they are (partially)
> denoted at tree.css.
>
> Does this work for you? Are the name problematic in any way? Looking
> at it (sorry I should've done that right away before replying to this
> post) the only thing I don't like is the '-' between the names; I
> think wicketIndentTreeJunctionlink is better than
> wicket-indent-tree-junctionlink. Otoh, if this doesn't give any
> problems, I guess we're fine now.
>
> Eelco
>
>
> ---
> 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=lnk&kid=107521&bid=248729&dat=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=lnk&kid=107521&bid=248729&dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] ON FORMS: How do I use get to edit an Object's property when it is another complex object?

2006-05-26 Thread Florin Gheorghies

Customer {
String name;
Address address;
}

Address {
String streetName;
String zip;
}

I'd like to build a form that edits both the Customer.name and
Custmer.address.streetName; 


Thanks.



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


[Wicket-user] Understanding models with dynamic form elements

2006-05-26 Thread Andrew Berman
I'm having problems filling in a model when I use dynamic form elements.  I have surveys which are built depending on whatever the database calls for.  So, the hierarchy is this:Page    > Form      -> ListView
          ---> Fragment (depending on type, it creates a different Fragment)       --> (e.g.) DropDownChoice
So, basically I pass each Fragment a question which contains a list of valid responses.  I ultimately want a list of the valid responses.  I set the modelObject in the Form to be a List.  So, how do I fill in this list properly with the selected either responseid or response object?  I think I'm just getting confused by all the layers in the hierarchy, so hopefully someone can help me sort this out.
Thanks for any help,Andrew


Re: [Wicket-user] weird javascript header

2006-05-26 Thread Johan Compagner
changed it.On 5/26/06, cowwoc <[EMAIL PROTECTED]> wrote:
Johan, I am fairly sure I told you guys to use:*/notice you use // instead of /* */ which is incorrect and might be
responsible for this problem.GiliJohan Compagner wrote:> this is what we did get from the people who wants there pages completely> xhtml.> Because plain _javascript_ is not possible then so you have to escape it.
>> johan>>> On 5/26/06, *Wouter de Vaal* <[EMAIL PROTECTED]> [EMAIL PROTECTED]>> wrote:
>> Hi,>> I would like to express my concern on how wicket currently outputs> _javascript_, my page outputs this header:>> >>"> http://www.w3.org/TR/html4/strict.dtd">> >   >   <
> link href="" rel=> "stylesheet"> type="text/css" media="all">>   <> script type="text/_javascript_" src=""
> >> <> script type="text/_javascript_">>> >> Now I'm no _javascript_ expert, but this seems quite strange to me.> When I try to validate using Firefox's web developer
> (tools->validate local html),> I get a validation error:> Error /Line 14 column 6/: end tag for "HEAD" which is not finished.>> |>
> *|>> It looks to me that this originates from the strange (non-)nesting> of the interesting comments+CDATA combination, because everything> else seemds ok (right?).> I have no _javascript_ in my code/templates whatsoever.
> I also changed everything to xhtml and I get the same error.>> So, is it incorrect? If not, what's wrong then?>> Thanx,> Wouter>>



Re: [Wicket-user] Audio in Wicket

2006-05-26 Thread Johan Compagner
all wicket interfaces are registered at startup if you reuse them they are thereWhat is the full stacktrace? Can't you see what really happens?johanOn 5/26/06, 
Michael Welter <[EMAIL PROTECTED]> wrote:
Comments in RequestCycle.java refer to "registerSecureInterface", but nosuch method exists.  Has that functionality been moved elsewhere?ThanksMichael Welter wrote:> I'm getting this exception:
>> ERROR - RequestCycle   - method IResourceListener of> interface wicket.IResourceListener targetted at component [Component id> = recording, page = com.offendertechnologies.main.ViewResponse
, path => 3:navomaticBorder:responses:0:recording.Audio, isVisible = true,> isVersioned = true] threw an exception> wicket.WicketRuntimeException: method IResourceListener of interface> wicket.IResourceListener
 targetted at component [Component id => recording, page = com.offendertechnologies.main.ViewResponse, path => 3:navomaticBorder:responses:0:recording.Audio, isVisible = true,> isVersioned = true] threw an exception
> at> wicket.request.target.resource.ComponentResourceRequestTarget.respond(ComponentResourceRequestTarget.java:68)>>> Does my Audio class need to be registered with wicket?>
> Thanks,> Mike>> Johan Compagner wrote:>> If your Audio component implements IResourceListener and the audio>> component>> holds the byte[]/audio from db Resource. Then just map the >> on the audio>> component The audio component has the onComponentTag implemented>> Where it writes out the src attribute to itself (the IResourceListener)>>
>> url = ""> then: public void onResourceRequested()>> {>> resource.onResourceRequested ();>> }
>> johan>> On 5/24/06, *Michael Welter* <[EMAIL PROTECTED]>> 
[EMAIL PROTECTED]>> wrote: I have a requirement to provide a web site that allows the>> customer to>> drill down into database detail.  At the lowest level, the web page
>> contains the normal text presentation along with zero to many "Play">> buttons.  Each button plays a different audio file of previously>> recorded speech.  The user may or may not choose to listen to the
>> audio. Everything is working except the "Play" buttons.>> Hibernate/Postgres is>> a joy, and Wicket is great! I've modeled the Audio and LocalizedAudioResource classes from
>> Image and>> LocalizedImageResource.  Audio implements IResourceListener.  I>> have the>> audio streams in memory as a result of the drill down, and, for now,>> I'm
>> just creating ByteArrayResource objects for each stream (after I>> get it>> working, I'll create a Resource class that performs a database>> fetch).>> BTW, an audio stream is a 
java.sql.Blob. I create the Audio object using the ByteArratResource object.  The>> HTML>> tag is .  The  tag
>> causes>> the browser to play the track with MediaPlayer or QuickTime. In LocalizedAudioResource I create a ResourceStreamRequestTarget>> object>> and pass that to 
component.urlFor( obj ).  I'm to the point where>> I need>> to flesh-out the doEncode(RequestCycle,IRequestTarget) function>> within>> WebRequestCodingStrategy in order to create the URL.
 So here are some questions: Will the URL in the web page reference the>> ResourceStreamRequestTarget?>>   What will that URL look like?>>
>> Do I need to wrap the  tag in a button or a link? Does anyone have any thoughts about the doEncode function?  Sample>> code? Am I on the right track, or there an easier way to do this?
 Thanks for your help.  Thanks to compagner and chillenious.>> -->> Michael Welter>> Introspect Telephony Corp.
>> Denver, Colorado US>> +1.303.674.2575>> [EMAIL PROTECTED] [EMAIL PROTECTED]>
>> www.introspect.com >> ---
>> 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=lnk&kid=107521&bid=248729&dat=121642>>
>>  ___
>> Wicket-user mailing list>> Wicket-user@lists.sourceforge.net>> 
Wicket-user@lists.sourceforge.net>>> https://lists.sourceforge.net/lists/listinfo/wicket-user>
--Michael WelterIntrospect Telephony Corp.Denver, Colorado US+1.303.674.2575[EMAIL PROTECTED]www.introspect.com
---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 morehttp://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&

Re: [Wicket-user] "Choose One" disappears after submissions

2006-05-26 Thread Andrew Berman
No, didn't know it existed.  I'll give it a shot.  Thanks Martijn.On 5/26/06, Martijn Dashorst <[EMAIL PROTECTED]
> wrote:did you set 'setNullValid(true)' on your component?Martijn
On 5/26/06, Andrew Berman <
[EMAIL PROTECTED]
> wrote:I have a page and when it first loads up, the null value is there with the appropriate "Choose One."  However, if I choose a selection from the dropdown and submit the form, when validation fails (and it goes back to the form page), the null value is gone and the user cannot change it back to Choose One if they want to nullify their response.  This behavior also seems to occur in Wicket-Examples on the Comp reference for DropDownChoice.  How do you keep the null response without actually adding it to the list passed to DropDownChoice?
Thanks,Andrew

-- Download Wicket 1.2 now! Write Ajax applications without touching _javascript_!-- 
http://wicketframework.org




Re: [Wicket-user] "Choose One" disappears after submissions

2006-05-26 Thread Martijn Dashorst
did you set 'setNullValid(true)' on your component?MartijnOn 5/26/06, Andrew Berman <[EMAIL PROTECTED]
> wrote:I have a page and when it first loads up, the null value is there with the appropriate "Choose One."  However, if I choose a selection from the dropdown and submit the form, when validation fails (and it goes back to the form page), the null value is gone and the user cannot change it back to Choose One if they want to nullify their response.  This behavior also seems to occur in Wicket-Examples on the Comp reference for DropDownChoice.  How do you keep the null response without actually adding it to the list passed to DropDownChoice?
Thanks,Andrew

-- Download Wicket 1.2 now! Write Ajax applications without touching _javascript_!-- http://wicketframework.org


[Wicket-user] "Choose One" disappears after submissions

2006-05-26 Thread Andrew Berman
I have a page and when it first loads up, the null value is there with the appropriate "Choose One."  However, if I choose a selection from the dropdown and submit the form, when validation fails (and it goes back to the form page), the null value is gone and the user cannot change it back to Choose One if they want to nullify their response.  This behavior also seems to occur in Wicket-Examples on the Comp reference for DropDownChoice.  How do you keep the null response without actually adding it to the list passed to DropDownChoice?
Thanks,Andrew


Re: [Wicket-user] Re: Rating component added to wicket 1.2 branch

2006-05-26 Thread Andrew Berman
Fair enoughThe way I did it has far less CSS hacking, but it still requires some CSS knowledgeOn 5/26/06, Martijn Dashorst <
[EMAIL PROTECTED]> wrote:The ajax is primarily used to submit the score. The refresh of the component(s) is an additional bonus. And it doesn't work for 6-10 star rating systems, or alternatives such as F-A.
Also, it is possible to have different pictures for star 1, 2, 3, 4, 5, 6, 7 and so forth, depending on how far you want to go.
I like the tricks in the mentioned article, especially the way he has made it possible to show half of a star. However, I hardly find it simpler. There's some serious CSS hackery going on, and if you were to customize it to show other images than those provided by Wicket, you'll have to implement a lot of CSS yourself again.
The ajax return is still necessary, to update the width of the current-rating list item. So you won't gain much there either.Martijn

On 5/26/06, Andrew Berman <[EMAIL PROTECTED]> wrote:



I just looked in SVN at your code.  My solution is a bit simpler and I'm willing to donate it if you want.  It uses pure CSS to change the star, no AJAX involved at all.  You can customize the image by changing the CSS since it uses background-image.  It uses one image...it's based on this:
http://komodomedia.com/blog/index.php/2006/01/09/css-star-rating-part-deux/
On 5/26/06, 
Andrew Berman <[EMAIL PROTECTED]> wrote:




What does the HTML and _javascript_ look like?  I just wrote a Ratings class (requires Prototype) in _javascript_ which does it similarly to how Yahoo's ratings work, except that when you mouse over the star it not only changes colors, but it also has a tooltip with the meaning of the star.  It uses hidden radio buttons for the form so clicking a rating changes the radio button and then in Wicket I just use a standard RadioChoice object.
On 5/26/06, Jonathan Locke <




[EMAIL PROTECTED]> wrote:
awesome!  thanks!On 5/26/06, Martijn Dashorst <





[EMAIL PROTECTED]> wrote:

All,I just wanted to let you know that I implemented a rating component in wicket-extensions, and it is in the wicket 1.2 branch, as such it will be part of the next Wicket 1.2 maintenance release. It will also be added to the trunk in the near future. If you want to check it out, and see its usage, you'll have to check out the code from SVN, located under 
branches/WICKET_1_2/wicket-extensions and branches/WICKET_1_2/wicket-examplesYou can find the example in src/wicket/examples/ajax/builtin/RatingsPage.javaFeatures of the component:

 - use your own icons for the images - allow a user to vote only once (the implementation is up to you) - customize the styling - customizable rating system (it's all in the model, so ratings from 1-10, 1-5, F-A, are all possible)
 - label showing the absolute value of the rating (3.7 from 5 votes) can be turned off, or replaced with your own implementationExample code:        add(new RatingPanel("rating", new PropertyModel(rating, "rating"), 5, new PropertyModel(
                rating1, "nrOfVotes"), true)        {            protected boolean onIsStarActive(int star)            {                return RatingsPage.rating1.isActive(star);            }
            protected void onRated(int rating, AjaxRequestTarget target)            {                RatingsPage.rating1.addRating(rating);            }        });I know that Jonathan Locke was anxious to get this component, so Jonathan, this one is for you!
Martijn-- Download Wicket 1.2 now! Write Ajax applications without touching _javascript_!-- 







http://wicketframework.org








-- Download Wicket 1.2 now! Write Ajax applications without touching _javascript_!-- 


http://wicketframework.org






Re: [Wicket-user] Use of Tree Component

2006-05-26 Thread Eelco Hillenius

Oh wait. Maybe you were confused with "css" being a component id? I
don't think/ can't imagine I ever used "css" as a class.

If you look at Tree.html:





 




and Tree$DefaultNodePanel.html:



label


You can see all the classes being in there, and they are (partially)
denoted at tree.css.

Does this work for you? Are the name problematic in any way? Looking
at it (sorry I should've done that right away before replying to this
post) the only thing I don't like is the '-' between the names; I
think wicketIndentTreeJunctionlink is better than
wicket-indent-tree-junctionlink. Otoh, if this doesn't give any
problems, I guess we're fine now.

Eelco


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


Re: [Wicket-user] Re: Rating component added to wicket 1.2 branch

2006-05-26 Thread Ryan Sonnek
This is too cool!the extensions is such a great playground to showcase what wicket can do.  sure, it's easy enough with wicket to "roll your own" components, but the more suff that's available "out of the box", the more likely users are to pick up and play with wicket.
on that note, i'm still waiting for an ajax enabled tree component  =)On 5/26/06, Jonathan Locke <
[EMAIL PROTECTED]> wrote:awesome!  thanks!
On 5/26/06, Martijn Dashorst <
[EMAIL PROTECTED]> wrote:

All,I just wanted to let you know that I implemented a rating component in wicket-extensions, and it is in the wicket 1.2 branch, as such it will be part of the next Wicket 1.2 maintenance release. It will also be added to the trunk in the near future. If you want to check it out, and see its usage, you'll have to check out the code from SVN, located under 
branches/WICKET_1_2/wicket-extensions and branches/WICKET_1_2/wicket-examplesYou can find the example in src/wicket/examples/ajax/builtin/RatingsPage.javaFeatures of the component:

 - use your own icons for the images - allow a user to vote only once (the implementation is up to you) - customize the styling - customizable rating system (it's all in the model, so ratings from 1-10, 1-5, F-A, are all possible)
 - label showing the absolute value of the rating (3.7 from 5 votes) can be turned off, or replaced with your own implementationExample code:        add(new RatingPanel("rating", new PropertyModel(rating, "rating"), 5, new PropertyModel(
                rating1, "nrOfVotes"), true)        {            protected boolean onIsStarActive(int star)            {                return RatingsPage.rating1.isActive(star);            }
            protected void onRated(int rating, AjaxRequestTarget target)            {                RatingsPage.rating1.addRating(rating);            }        });I know that Jonathan Locke was anxious to get this component, so Jonathan, this one is for you!
Martijn-- Download Wicket 1.2 now! Write Ajax applications without touching _javascript_!-- 


http://wicketframework.org







Re: [Wicket-user] Re: Rating component added to wicket 1.2 branch

2006-05-26 Thread Martijn Dashorst
The ajax is primarily used to submit the score. The refresh of the component(s) is an additional bonus. And it doesn't work for 6-10 star rating systems, or alternatives such as F-A.Also, it is possible to have different pictures for star 1, 2, 3, 4, 5, 6, 7 and so forth, depending on how far you want to go.
I like the tricks in the mentioned article, especially the way he has made it possible to show half of a star. However, I hardly find it simpler. There's some serious CSS hackery going on, and if you were to customize it to show other images than those provided by Wicket, you'll have to implement a lot of CSS yourself again.
The ajax return is still necessary, to update the width of the current-rating list item. So you won't gain much there either.Martijn
On 5/26/06, Andrew Berman <[EMAIL PROTECTED]> wrote:


I just looked in SVN at your code.  My solution is a bit simpler and I'm willing to donate it if you want.  It uses pure CSS to change the star, no AJAX involved at all.  You can customize the image by changing the CSS since it uses background-image.  It uses one image...it's based on this:
http://komodomedia.com/blog/index.php/2006/01/09/css-star-rating-part-deux/
On 5/26/06, 
Andrew Berman <[EMAIL PROTECTED]> wrote:



What does the HTML and _javascript_ look like?  I just wrote a Ratings class (requires Prototype) in _javascript_ which does it similarly to how Yahoo's ratings work, except that when you mouse over the star it not only changes colors, but it also has a tooltip with the meaning of the star.  It uses hidden radio buttons for the form so clicking a rating changes the radio button and then in Wicket I just use a standard RadioChoice object.
On 5/26/06, Jonathan Locke <



[EMAIL PROTECTED]> wrote:
awesome!  thanks!On 5/26/06, Martijn Dashorst <




[EMAIL PROTECTED]> wrote:

All,I just wanted to let you know that I implemented a rating component in wicket-extensions, and it is in the wicket 1.2 branch, as such it will be part of the next Wicket 1.2 maintenance release. It will also be added to the trunk in the near future. If you want to check it out, and see its usage, you'll have to check out the code from SVN, located under 
branches/WICKET_1_2/wicket-extensions and branches/WICKET_1_2/wicket-examplesYou can find the example in src/wicket/examples/ajax/builtin/RatingsPage.javaFeatures of the component:

 - use your own icons for the images - allow a user to vote only once (the implementation is up to you) - customize the styling - customizable rating system (it's all in the model, so ratings from 1-10, 1-5, F-A, are all possible)
 - label showing the absolute value of the rating (3.7 from 5 votes) can be turned off, or replaced with your own implementationExample code:        add(new RatingPanel("rating", new PropertyModel(rating, "rating"), 5, new PropertyModel(
                rating1, "nrOfVotes"), true)        {            protected boolean onIsStarActive(int star)            {                return RatingsPage.rating1.isActive(star);            }
            protected void onRated(int rating, AjaxRequestTarget target)            {                RatingsPage.rating1.addRating(rating);            }        });I know that Jonathan Locke was anxious to get this component, so Jonathan, this one is for you!
Martijn-- Download Wicket 1.2 now! Write Ajax applications without touching _javascript_!-- 






http://wicketframework.org








-- Download Wicket 1.2 now! Write Ajax applications without touching _javascript_!-- 

http://wicketframework.org




Re: [Wicket-user] Audio in Wicket

2006-05-26 Thread Michael Welter
Comments in RequestCycle.java refer to "registerSecureInterface", but no 
such method exists.  Has that functionality been moved elsewhere?


Thanks

Michael Welter wrote:

I'm getting this exception:

ERROR - RequestCycle   - method IResourceListener of 
interface wicket.IResourceListener targetted at component [Component id 
= recording, page = com.offendertechnologies.main.ViewResponse, path = 
3:navomaticBorder:responses:0:recording.Audio, isVisible = true, 
isVersioned = true] threw an exception
wicket.WicketRuntimeException: method IResourceListener of interface 
wicket.IResourceListener targetted at component [Component id = 
recording, page = com.offendertechnologies.main.ViewResponse, path = 
3:navomaticBorder:responses:0:recording.Audio, isVisible = true, 
isVersioned = true] threw an exception
at 
wicket.request.target.resource.ComponentResourceRequestTarget.respond(ComponentResourceRequestTarget.java:68) 



Does my Audio class need to be registered with wicket?

Thanks,
Mike

Johan Compagner wrote:
If your Audio component implements IResourceListener and the audio 
component
holds the byte[]/audio from db Resource. Then just map the on the audio

component

The audio component has the onComponentTag implemented
Where it writes out the src attribute to itself (the IResourceListener)

url = urlFor(IResourceListener.INTERFACE);

then:

public void onResourceRequested()
{
resource.onResourceRequested ();
}


johan


On 5/24/06, *Michael Welter* <[EMAIL PROTECTED] 
> wrote:


I have a requirement to provide a web site that allows the 
customer to

drill down into database detail.  At the lowest level, the web page
contains the normal text presentation along with zero to many "Play"
buttons.  Each button plays a different audio file of previously
recorded speech.  The user may or may not choose to listen to the 
audio.


Everything is working except the "Play" buttons.  
Hibernate/Postgres is

a joy, and Wicket is great!

I've modeled the Audio and LocalizedAudioResource classes from 
Image and
LocalizedImageResource.  Audio implements IResourceListener.  I 
have the

audio streams in memory as a result of the drill down, and, for now,
I'm
just creating ByteArrayResource objects for each stream (after I 
get it
working, I'll create a Resource class that performs a database 
fetch).

BTW, an audio stream is a java.sql.Blob.

I create the Audio object using the ByteArratResource object.  The 
HTML
tag is .  The  tag 
causes

the browser to play the track with MediaPlayer or QuickTime.

In LocalizedAudioResource I create a ResourceStreamRequestTarget 
object
and pass that to component.urlFor( obj ).  I'm to the point where 
I need
to flesh-out the doEncode(RequestCycle,IRequestTarget) function 
within

WebRequestCodingStrategy in order to create the URL.

So here are some questions:

Will the URL in the web page reference the 
ResourceStreamRequestTarget?

  What will that URL look like?

Do I need to wrap the  tag in a button or a link?

Does anyone have any thoughts about the doEncode function?  Sample
code?

Am I on the right track, or there an easier way to do this?

Thanks for your help.  Thanks to compagner and chillenious.




--
Michael Welter
Introspect Telephony Corp.
Denver, Colorado US
+1.303.674.2575
[EMAIL PROTECTED] 
www.introspect.com 


---
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=lnk&kid=107521&bid=248729&dat=121642

 


___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net

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






--
Michael Welter
Introspect Telephony Corp.
Denver, Colorado US
+1.303.674.2575
[EMAIL PROTECTED]
www.introspect.com


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


Re: [Wicket-user] Audio in Wicket

2006-05-26 Thread Michael Welter

I'm getting this exception:

ERROR - RequestCycle   - method IResourceListener of 
interface wicket.IResourceListener targetted at component [Component id 
= recording, page = com.offendertechnologies.main.ViewResponse, path = 
3:navomaticBorder:responses:0:recording.Audio, isVisible = true, 
isVersioned = true] threw an exception
wicket.WicketRuntimeException: method IResourceListener of interface 
wicket.IResourceListener targetted at component [Component id = 
recording, page = com.offendertechnologies.main.ViewResponse, path = 
3:navomaticBorder:responses:0:recording.Audio, isVisible = true, 
isVersioned = true] threw an exception
at 
wicket.request.target.resource.ComponentResourceRequestTarget.respond(ComponentResourceRequestTarget.java:68)


Does my Audio class need to be registered with wicket?

Thanks,
Mike

Johan Compagner wrote:

If your Audio component implements IResourceListener and the audio component
holds the byte[]/audio from db Resource. Then just map the the audio

component

The audio component has the onComponentTag implemented
Where it writes out the src attribute to itself (the IResourceListener)

url = urlFor(IResourceListener.INTERFACE);

then:

public void onResourceRequested()
{
resource.onResourceRequested ();
}


johan


On 5/24/06, *Michael Welter* <[EMAIL PROTECTED] 
> wrote:


I have a requirement to provide a web site that allows the customer to
drill down into database detail.  At the lowest level, the web page
contains the normal text presentation along with zero to many "Play"
buttons.  Each button plays a different audio file of previously
recorded speech.  The user may or may not choose to listen to the audio.

Everything is working except the "Play" buttons.  Hibernate/Postgres is
a joy, and Wicket is great!

I've modeled the Audio and LocalizedAudioResource classes from Image and
LocalizedImageResource.  Audio implements IResourceListener.  I have the
audio streams in memory as a result of the drill down, and, for now,
I'm
just creating ByteArrayResource objects for each stream (after I get it
working, I'll create a Resource class that performs a database fetch).
BTW, an audio stream is a java.sql.Blob.

I create the Audio object using the ByteArratResource object.  The HTML
tag is .  The  tag causes
the browser to play the track with MediaPlayer or QuickTime.

In LocalizedAudioResource I create a ResourceStreamRequestTarget object
and pass that to component.urlFor( obj ).  I'm to the point where I need
to flesh-out the doEncode(RequestCycle,IRequestTarget) function within
WebRequestCodingStrategy in order to create the URL.

So here are some questions:

Will the URL in the web page reference the ResourceStreamRequestTarget?
  What will that URL look like?

Do I need to wrap the  tag in a button or a link?

Does anyone have any thoughts about the doEncode function?  Sample
code?

Am I on the right track, or there an easier way to do this?

Thanks for your help.  Thanks to compagner and chillenious.




--
Michael Welter
Introspect Telephony Corp.
Denver, Colorado US
+1.303.674.2575
[EMAIL PROTECTED] 
www.introspect.com 


---
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=lnk&kid=107521&bid=248729&dat=121642

___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net

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




--
Michael Welter
Introspect Telephony Corp.
Denver, Colorado US
+1.303.674.2575
[EMAIL PROTECTED]
www.introspect.com


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


Re: [Wicket-user] CheckBox.wantOnSelectionChangedNotifications

2006-05-26 Thread Igor Vaynberg
something cleaner like:class MiddlemanPanel extends Panel {   private transient IModel myModel;   IModel getModel() {  if (myModel==null) {    myModel=new CompoundPropertyModel(new PropertyModel(
super.getModel(), getId()); } return myModel;   }or do this in the constructor instead of getmodel, depends on the usecase-IgorOn 5/26/06, 
Igor Vaynberg <[EMAIL PROTECTED]> wrote:
i think what you need to set on the panel is:new CompoundPropertyModel(new PropertyModel( modelFromParent, 
this.getId() ))-IgorOn 5/26/06, 
Ralf Ebert <[EMAIL PROTECTED]> wrote:

Hi,> give the panel a model?> that sits inbetween?that's what I'm doing with the overwritten onAttach method. I found noother place to do this, because I want to get the modelobject from the
parent compoundpropertymodel and that's not possible in the
constructor (because it hasn't been added to the component treeobviously) The thing is, I want to give it a model automatically by aproperty of the parent compoundpropertymodel... If I do this only onceon the first attach, this works very well and does exactly what I
want, but it feels a bit "impure". I would rather tell the panelsomehow that I want this behaviour (or plug in a model class whichdoes this kind of resolving automatically). Maybe wicket should have a
clean way to state: a) I want property resolving like there is nopanel/component in between or b) I want to use the id of a componentin between to resolve model properties?ralf---
All the advantages of Linux Managed Hosting--Without the Cost and Risk!Fully trained technicians. The highest number of Red Hat certifications inthe hosting industry. Fanatical Support. Click to learn more

http://sel.as-us.falkag.net/sel?cmdlnk&kid7521&bid$8729&dat1642
___
Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user





Re: [Wicket-user] CheckBox.wantOnSelectionChangedNotifications

2006-05-26 Thread Igor Vaynberg
i think what you need to set on the panel is:new CompoundPropertyModel(new PropertyModel( modelFromParent, this.getId() ))-IgorOn 5/26/06, 
Ralf Ebert <[EMAIL PROTECTED]> wrote:
Hi,> give the panel a model?> that sits inbetween?that's what I'm doing with the overwritten onAttach method. I found noother place to do this, because I want to get the modelobject from theparent compoundpropertymodel and that's not possible in the
constructor (because it hasn't been added to the component treeobviously) The thing is, I want to give it a model automatically by aproperty of the parent compoundpropertymodel... If I do this only onceon the first attach, this works very well and does exactly what I
want, but it feels a bit "impure". I would rather tell the panelsomehow that I want this behaviour (or plug in a model class whichdoes this kind of resolving automatically). Maybe wicket should have a
clean way to state: a) I want property resolving like there is nopanel/component in between or b) I want to use the id of a componentin between to resolve model properties?ralf---
All the advantages of Linux Managed Hosting--Without the Cost and Risk!Fully trained technicians. The highest number of Red Hat certifications inthe hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmdlnk&kid7521&bid$8729&dat1642___
Wicket-user mailing listWicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user



Re: [Wicket-user] Re: Rating component added to wicket 1.2 branch

2006-05-26 Thread Martijn Dashorst
It is very basic in that it doesn't highlight on mouse overs, and no tooltip. There is no dependency on libraries other than Wicket and no _javascript_ trickery involved. You're welcome to supply additional functionality if you wish :-)
You can see the markup here (along with the java file and resouces):http://svn.sourceforge.net/viewcvs.cgi/wicket/branches/WICKET_1_2/wicket-extensions/src/java/wicket/extensions/
MartijnOn 5/26/06, Andrew Berman <[EMAIL PROTECTED]> wrote:
What does the HTML and _javascript_ look like?  I just wrote a Ratings class (requires Prototype) in _javascript_ which does it similarly to how Yahoo's ratings work, except that when you mouse over the star it not only changes colors, but it also has a tooltip with the meaning of the star.  It uses hidden radio buttons for the form so clicking a rating changes the radio button and then in Wicket I just use a standard RadioChoice object.
On 5/26/06, Jonathan Locke <
[EMAIL PROTECTED]> wrote:
awesome!  thanks!On 5/26/06, Martijn Dashorst <

[EMAIL PROTECTED]> wrote:

All,I just wanted to let you know that I implemented a rating component in wicket-extensions, and it is in the wicket 1.2 branch, as such it will be part of the next Wicket 1.2 maintenance release. It will also be added to the trunk in the near future. If you want to check it out, and see its usage, you'll have to check out the code from SVN, located under 
branches/WICKET_1_2/wicket-extensions and branches/WICKET_1_2/wicket-examplesYou can find the example in src/wicket/examples/ajax/builtin/RatingsPage.javaFeatures of the component:

 - use your own icons for the images - allow a user to vote only once (the implementation is up to you) - customize the styling - customizable rating system (it's all in the model, so ratings from 1-10, 1-5, F-A, are all possible)
 - label showing the absolute value of the rating (3.7 from 5 votes) can be turned off, or replaced with your own implementationExample code:        add(new RatingPanel("rating", new PropertyModel(rating, "rating"), 5, new PropertyModel(
                rating1, "nrOfVotes"), true)        {            protected boolean onIsStarActive(int star)            {                return RatingsPage.rating1.isActive(star);            }
            protected void onRated(int rating, AjaxRequestTarget target)            {                RatingsPage.rating1.addRating(rating);            }        });I know that Jonathan Locke was anxious to get this component, so Jonathan, this one is for you!
Martijn-- Download Wicket 1.2 now! Write Ajax applications without touching _javascript_!-- 



http://wicketframework.org






-- Download Wicket 1.2 now! Write Ajax applications without touching _javascript_!-- http://wicketframework.org


Re: [Wicket-user] Re: Rating component added to wicket 1.2 branch

2006-05-26 Thread Andrew Berman
I just looked in SVN at your code.  My solution is a bit simpler and I'm willing to donate it if you want.  It uses pure CSS to change the star, no AJAX involved at all.  You can customize the image by changing the CSS since it uses background-image.  It uses one image...it's based on this:
http://komodomedia.com/blog/index.php/2006/01/09/css-star-rating-part-deux/On 5/26/06, 
Andrew Berman <[EMAIL PROTECTED]> wrote:
What does the HTML and _javascript_ look like?  I just wrote a Ratings class (requires Prototype) in _javascript_ which does it similarly to how Yahoo's ratings work, except that when you mouse over the star it not only changes colors, but it also has a tooltip with the meaning of the star.  It uses hidden radio buttons for the form so clicking a rating changes the radio button and then in Wicket I just use a standard RadioChoice object.
On 5/26/06, Jonathan Locke <
[EMAIL PROTECTED]> wrote:
awesome!  thanks!On 5/26/06, Martijn Dashorst <

[EMAIL PROTECTED]> wrote:

All,I just wanted to let you know that I implemented a rating component in wicket-extensions, and it is in the wicket 1.2 branch, as such it will be part of the next Wicket 1.2 maintenance release. It will also be added to the trunk in the near future. If you want to check it out, and see its usage, you'll have to check out the code from SVN, located under 
branches/WICKET_1_2/wicket-extensions and branches/WICKET_1_2/wicket-examplesYou can find the example in src/wicket/examples/ajax/builtin/RatingsPage.javaFeatures of the component:

 - use your own icons for the images - allow a user to vote only once (the implementation is up to you) - customize the styling - customizable rating system (it's all in the model, so ratings from 1-10, 1-5, F-A, are all possible)
 - label showing the absolute value of the rating (3.7 from 5 votes) can be turned off, or replaced with your own implementationExample code:        add(new RatingPanel("rating", new PropertyModel(rating, "rating"), 5, new PropertyModel(
                rating1, "nrOfVotes"), true)        {            protected boolean onIsStarActive(int star)            {                return RatingsPage.rating1.isActive(star);            }
            protected void onRated(int rating, AjaxRequestTarget target)            {                RatingsPage.rating1.addRating(rating);            }        });I know that Jonathan Locke was anxious to get this component, so Jonathan, this one is for you!
Martijn-- Download Wicket 1.2 now! Write Ajax applications without touching _javascript_!-- 



http://wicketframework.org









Re: [Wicket-user] Re: Rating component added to wicket 1.2 branch

2006-05-26 Thread Andrew Berman
What does the HTML and _javascript_ look like?  I just wrote a Ratings class (requires Prototype) in _javascript_ which does it similarly to how Yahoo's ratings work, except that when you mouse over the star it not only changes colors, but it also has a tooltip with the meaning of the star.  It uses hidden radio buttons for the form so clicking a rating changes the radio button and then in Wicket I just use a standard RadioChoice object.
On 5/26/06, Jonathan Locke <[EMAIL PROTECTED]> wrote:
awesome!  thanks!On 5/26/06, Martijn Dashorst <
[EMAIL PROTECTED]> wrote:

All,I just wanted to let you know that I implemented a rating component in wicket-extensions, and it is in the wicket 1.2 branch, as such it will be part of the next Wicket 1.2 maintenance release. It will also be added to the trunk in the near future. If you want to check it out, and see its usage, you'll have to check out the code from SVN, located under 
branches/WICKET_1_2/wicket-extensions and branches/WICKET_1_2/wicket-examplesYou can find the example in src/wicket/examples/ajax/builtin/RatingsPage.javaFeatures of the component:

 - use your own icons for the images - allow a user to vote only once (the implementation is up to you) - customize the styling - customizable rating system (it's all in the model, so ratings from 1-10, 1-5, F-A, are all possible)
 - label showing the absolute value of the rating (3.7 from 5 votes) can be turned off, or replaced with your own implementationExample code:        add(new RatingPanel("rating", new PropertyModel(rating, "rating"), 5, new PropertyModel(
                rating1, "nrOfVotes"), true)        {            protected boolean onIsStarActive(int star)            {                return RatingsPage.rating1.isActive(star);            }
            protected void onRated(int rating, AjaxRequestTarget target)            {                RatingsPage.rating1.addRating(rating);            }        });I know that Jonathan Locke was anxious to get this component, so Jonathan, this one is for you!
Martijn-- Download Wicket 1.2 now! Write Ajax applications without touching _javascript_!-- 


http://wicketframework.org







Re: [Wicket-user] CheckBox.wantOnSelectionChangedNotifications

2006-05-26 Thread Ralf Ebert

Hi,


give the panel a model?
that sits inbetween?

that's what I'm doing with the overwritten onAttach method. I found no
other place to do this, because I want to get the modelobject from the
parent compoundpropertymodel and that's not possible in the
constructor (because it hasn't been added to the component tree
obviously) The thing is, I want to give it a model automatically by a
property of the parent compoundpropertymodel... If I do this only once
on the first attach, this works very well and does exactly what I
want, but it feels a bit "impure". I would rather tell the panel
somehow that I want this behaviour (or plug in a model class which
does this kind of resolving automatically). Maybe wicket should have a
clean way to state: a) I want property resolving like there is no
panel/component in between or b) I want to use the id of a component
in between to resolve model properties?

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


[Wicket-user] Re: Rating component added to wicket 1.2 branch

2006-05-26 Thread Jonathan Locke
awesome!  thanks!On 5/26/06, Martijn Dashorst <[EMAIL PROTECTED]> wrote:
All,I just wanted to let you know that I implemented a rating component in wicket-extensions, and it is in the wicket 1.2 branch, as such it will be part of the next Wicket 1.2 maintenance release. It will also be added to the trunk in the near future. If you want to check it out, and see its usage, you'll have to check out the code from SVN, located under 
branches/WICKET_1_2/wicket-extensions and branches/WICKET_1_2/wicket-examplesYou can find the example in src/wicket/examples/ajax/builtin/RatingsPage.javaFeatures of the component:

 - use your own icons for the images - allow a user to vote only once (the implementation is up to you) - customize the styling - customizable rating system (it's all in the model, so ratings from 1-10, 1-5, F-A, are all possible)
 - label showing the absolute value of the rating (3.7 from 5 votes) can be turned off, or replaced with your own implementationExample code:        add(new RatingPanel("rating", new PropertyModel(rating, "rating"), 5, new PropertyModel(
                rating1, "nrOfVotes"), true)        {            protected boolean onIsStarActive(int star)            {                return RatingsPage.rating1.isActive(star);            }
            protected void onRated(int rating, AjaxRequestTarget target)            {                RatingsPage.rating1.addRating(rating);            }        });I know that Jonathan Locke was anxious to get this component, so Jonathan, this one is for you!
Martijn-- Download Wicket 1.2 now! Write Ajax applications without touching _javascript_!-- 

http://wicketframework.org





Re: [Wicket-user] weird javascript header

2006-05-26 Thread cowwoc

Johan, I am fairly sure I told you guys to use:

*/

notice you use // instead of /* */ which is incorrect and might be
responsible for this problem.

Gili

Johan Compagner wrote:
> this is what we did get from the people who wants there pages completely
> xhtml.
> Because plain javascript is not possible then so you have to escape it.
> 
> johan
> 
> 
> On 5/26/06, *Wouter de Vaal* <[EMAIL PROTECTED]
> > wrote:
> 
> Hi,
> 
> I would like to express my concern on how wicket currently outputs
> JavaScript, my page outputs this header:
> 
>  
>"
> http://www.w3.org/TR/html4/strict.dtd";>
> 
>   
>   <
> link href="/mycss.css" rel=
> "stylesheet" 
> type="text/css" media="all">
>   <
> script type="text/javascript" 
> src="/shop/app/resources/wicket.markup.html.WebPage/cookies.js"
> >
> <
> script type="text/javascript">
> 
> 
> 
> Now I'm no JavaScript expert, but this seems quite strange to me.
> When I try to validate using Firefox's web developer
> (tools->validate local html),
> I get a validation error:
> Error /Line 14 column 6/: end tag for "HEAD" which is not finished.
> 
> |
> 
> *|
> 
> It looks to me that this originates from the strange (non-)nesting
> of the interesting comments+CDATA combination, because everything
> else seemds ok (right?).
> I have no JavaScript in my code/templates whatsoever.
> I also changed everything to xhtml and I get the same error.
> 
> So, is it incorrect? If not, what's wrong then?
> 
> Thanx,
> Wouter
> 
> 



signature.asc
Description: OpenPGP digital signature


Re: [Wicket-user] weird javascript header

2006-05-26 Thread Johan Compagner
this is what we did get from the people who wants there pages completely xhtml.Because plain _javascript_ is not possible then so you have to escape it.johanOn 5/26/06, 
Wouter de Vaal <[EMAIL PROTECTED]> wrote:
Hi,I would like to express my concern on how wicket currently outputs _javascript_, my page outputs this header:   "
http://www.w3.org/TR/html4/strict.dtd">				<
script type="text/_javascript_" src="/shop/app/resources/wicket.markup.html.WebPage/cookies.js">script><
script type="text/_javascript_">script>head>Now I'm no _javascript_ expert, but this seems quite strange to me. When I try to validate using Firefox's web developer (tools->validate local html),
I get a validation error:Error
Line 14 column 6:
end tag for "HEAD" which is not finished.>It looks to me that this originates from the strange (non-)nesting of the interesting comments+CDATA combination, because everything else seemds ok (right?). 
I have no _javascript_ in my code/templates whatsoever.I also changed everything to xhtml and I get the same error.So, is it incorrect? If not, what's wrong then?Thanx,
Wouter 




Re: [Wicket-user] CheckBox.wantOnSelectionChangedNotifications

2006-05-26 Thread Johan Compagner
give the panel a model?that sits inbetween?johanOn 5/26/06, Ralf Ebert <[EMAIL PROTECTED]
> wrote:Hi,> use the bounded compound property model?> Then the give give the panel a string on which its textfield should be
> bound.no, that's not the problem (I think). An example: I have a form with 3panels (_same general panel class_, no difference between them). Let'ssay they are called house, window, door. On each panel are form
components like name, size etc. The exact same structure is mirroredin the model, so it should not be neccessary to bind anything (I havea bean with properties house, window, door, and these are beans with
properties like name, size). The only problem is that I need the modelto use the panel name to lookup the components below it as well, butthat doesn't happen by default (which is right because you don't wantthat in every situation). The panel has actually the right
modelobject, but the panel's components are not looked up in thatmodelobject but in the "root" modelobject of the form... I'm lookingfor a way to tell the panel that it's sub components modelobjects
should be looked up in the panel modelobject and not in the rootmodelobject.Ralf---All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications inthe hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmdlnk&kid7521&bid$8729&dat1642___Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Re: Rating component added to wicket 1.2 branch

2006-05-26 Thread Johan Compagner
2.0?On 5/26/06, Martijn Dashorst <[EMAIL PROTECTED]> wrote:
Here's a sceenshot of the rating panel.MartijnOn 5/26/06, 
Martijn Dashorst <[EMAIL PROTECTED]
> wrote:All,I just wanted to let you know that I implemented a rating component in wicket-extensions, and it is in the wicket 
1.2 branch, as such it will be part of the next Wicket 1.2 maintenance release. It will also be added to the trunk in the near future. If you want to check it out, and see its usage, you'll have to check out the code from SVN, located under 
branches/WICKET_1_2/wicket-extensions and branches/WICKET_1_2/wicket-examplesYou can find the example in src/wicket/examples/ajax/builtin/RatingsPage.javaFeatures of the component:

 - use your own icons for the images - allow a user to vote only once (the implementation is up to you) - customize the styling - customizable rating system (it's all in the model, so ratings from 1-10, 1-5, F-A, are all possible)
 - label showing the absolute value of the rating (3.7 from 5 votes) can be turned off, or replaced with your own implementationExample code:        add(new RatingPanel("rating", new PropertyModel(rating, "rating"), 5, new PropertyModel(
                rating1, "nrOfVotes"), true)        {            protected boolean onIsStarActive(int star)            {                return RatingsPage.rating1.isActive(star);            }
            protected void onRated(int rating, AjaxRequestTarget target)            {                RatingsPage.rating1.addRating(rating);            }        });I know that Jonathan Locke was anxious to get this component, so Jonathan, this one is for you!
Martijn-- Download Wicket 1.2 now! Write Ajax applications without touching _javascript_!-- 


http://wicketframework.org


-- Download Wicket 1.2 now! Write Ajax applications without touching _javascript_!-- 
http://wicketframework.org




[Wicket-user] Re: Rating component added to wicket 1.2 branch

2006-05-26 Thread Martijn Dashorst
Here's a sceenshot of the rating panel.MartijnOn 5/26/06, Martijn Dashorst <[EMAIL PROTECTED]
> wrote:All,I just wanted to let you know that I implemented a rating component in wicket-extensions, and it is in the wicket 
1.2 branch, as such it will be part of the next Wicket 1.2 maintenance release. It will also be added to the trunk in the near future. If you want to check it out, and see its usage, you'll have to check out the code from SVN, located under 
branches/WICKET_1_2/wicket-extensions and branches/WICKET_1_2/wicket-examplesYou can find the example in src/wicket/examples/ajax/builtin/RatingsPage.javaFeatures of the component:

 - use your own icons for the images - allow a user to vote only once (the implementation is up to you) - customize the styling - customizable rating system (it's all in the model, so ratings from 1-10, 1-5, F-A, are all possible)
 - label showing the absolute value of the rating (3.7 from 5 votes) can be turned off, or replaced with your own implementationExample code:        add(new RatingPanel("rating", new PropertyModel(rating, "rating"), 5, new PropertyModel(
                rating1, "nrOfVotes"), true)        {            protected boolean onIsStarActive(int star)            {                return RatingsPage.rating1.isActive(star);            }
            protected void onRated(int rating, AjaxRequestTarget target)            {                RatingsPage.rating1.addRating(rating);            }        });I know that Jonathan Locke was anxious to get this component, so Jonathan, this one is for you!
Martijn-- Download Wicket 1.2 now! Write Ajax applications without touching _javascript_!-- 

http://wicketframework.org


-- Download Wicket 1.2 now! Write Ajax applications without touching _javascript_!-- http://wicketframework.org


rating.gif
Description: GIF image


[Wicket-user] Rating component added to wicket 1.2 branch

2006-05-26 Thread Martijn Dashorst
All,I just wanted to let you know that I implemented a rating component in wicket-extensions, and it is in the wicket 1.2 branch, as such it will be part of the next Wicket 1.2 maintenance release. It will also be added to the trunk in the near future. If you want to check it out, and see its usage, you'll have to check out the code from SVN, located under 
branches/WICKET_1_2/wicket-extensions and branches/WICKET_1_2/wicket-examplesYou can find the example in src/wicket/examples/ajax/builtin/RatingsPage.javaFeatures of the component:

 - use your own icons for the images - allow a user to vote only once (the implementation is up to you) - customize the styling - customizable rating system (it's all in the model, so ratings from 1-10, 1-5, F-A, are all possible)
 - label showing the absolute value of the rating (3.7 from 5 votes) can be turned off, or replaced with your own implementationExample code:        add(new RatingPanel("rating", new PropertyModel(rating, "rating"), 5, new PropertyModel(
                rating1, "nrOfVotes"), true)        {            protected boolean onIsStarActive(int star)            {                return RatingsPage.rating1.isActive(star);            }
            protected void onRated(int rating, AjaxRequestTarget target)            {                RatingsPage.rating1.addRating(rating);            }        });I know that Jonathan Locke was anxious to get this component, so Jonathan, this one is for you!
Martijn-- Download Wicket 1.2 now! Write Ajax applications without touching _javascript_!-- 
http://wicketframework.org



Re: [Wicket-user] CheckBox.wantOnSelectionChangedNotifications

2006-05-26 Thread Ralf Ebert

Hi,


use the bounded compound property model?
Then the give give the panel a string on which its textfield should be
bound.

no, that's not the problem (I think). An example: I have a form with 3
panels (_same general panel class_, no difference between them). Let's
say they are called house, window, door. On each panel are form
components like name, size etc. The exact same structure is mirrored
in the model, so it should not be neccessary to bind anything (I have
a bean with properties house, window, door, and these are beans with
properties like name, size). The only problem is that I need the model
to use the panel name to lookup the components below it as well, but
that doesn't happen by default (which is right because you don't want
that in every situation). The panel has actually the right
modelobject, but the panel's components are not looked up in that
modelobject but in the "root" modelobject of the form... I'm looking
for a way to tell the panel that it's sub components modelobjects
should be looked up in the panel modelobject and not in the root
modelobject.

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


[Wicket-user] weird javascript header

2006-05-26 Thread Wouter de Vaal
Hi,I would like to express my concern on how wicket currently outputs _javascript_, my page outputs this header:   "http://www.w3.org/TR/html4/strict.dtd">			<
link href="/mycss.css" rel="stylesheet" 
type="text/css" media="all">	<
script type="text/_javascript_" src="/shop/app/resources/wicket.markup.html.WebPage/cookies.js"
>script>