Re: Ajax calls loads my server

2008-09-24 Thread walnutmon

While this javascript behavior doesn't qualify as Ajax, how else could you
get that behavior without making an ajax component so that you can get form
element objects to submit without a page refresh?  Do you need to write
javascript in the Wicket code?  I suppose you could write javascript in the
html files, but can you do things like div resizing, and other useful
javascript functions using wicket?



Matej Knopp-2 wrote:
> 
> If it doesn't call the server than it's not Ajax...
> 
> Anyway, you can accomplish what you want by writing the javascript by
> yourself. Or use Check, CheckGroup and CheckGroupSelector components
> that user client side javascript to change the state of checkboxes.
> 
> -Matej
> 
> On Wed, Sep 24, 2008 at 6:12 PM, Benny Weingarten <[EMAIL PROTECTED]>
> wrote:
>>
>> Hello.
>>
>> In my application I have a panel with a list of users and a checkbox next
>> to
>> each user.
>> [] user 1
>> [] user 2
>> [] user 3
>> ..
>> [] user n
>>
>> I also have an ajaxlink called "select all", which selects all the
>> checkboxes.
>>
>> Problem: when there are a lot of checkboxes, the operations takes a long
>> time - more than is tolerable. Is there a way to make the ajax do its
>> work
>> COMPLETELY on the client side, without accessing the server?
>>
>> In general, does wicket provide a way have pages that have ajax behavior
>> that doesn't make calls to the server at all?
>>
>> thanks,
>> Benny.
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Ajax-calls-loads-my-server-tp19652337p19652337.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Ajax-calls-loads-my-server-tp19652337p19662089.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Wizard in Modalwindow getting alert message upon using the Wizard buttons

2008-09-24 Thread Kuga

Hi,
I have added a jira issue for this. Can you please let me know?
thanks
kuga

Matej Knopp-2 wrote:
> 
> Please create jira issue for this. Quickstart project to demonstrate
> the behavior would be welcome.
> 
> -Matej
> 
> On Wed, Sep 24, 2008 at 7:45 AM, Kuga <[EMAIL PROTECTED]> wrote:
>>
>> Can anyone please help me with any possible solution or hints?
>> Greatly appreciate your comments, help.
>> Thanks
>> kuga
>>
>> Kuga wrote:
>>>
>>> Hi,
>>>
>>> I was browsing through the wicket forums, for one of the problems I am
>>> having using Wicket wizard in ModalWindow.
>>>
>>> I am iusing Wicket 1.3.4
>>>
>>> Wondering if anyone could help me with any possible solutions. Greatly
>>> appreciate you time and response.
>>>
>>> I have changed the WizardButtons to use Ajax buttons. The following is
>>> the
>>> behavior:
>>>
>>> In the wizard Ajax button I added the following:
>>>
>>> protected void onSubmit(AjaxRequestTarget target, Form form) {
>>> onClick(target);
>>> target.addComponent((Wizard)wizard);
>>>   }
>>>
>>> 1. I have added 3 IWizardStep to the model
>>> 2. Added the wizard to a panel, and then added this panel as
>>> setContent()
>>> to the ModalWindow.
>>> 3. Lauched the modalwindow,
>>> a. Observed the right behavior (button enabled state) of the
>>> buttons at launch
>>> b. Now Clicked on "Next" button – traverses to the next
>>> step.
>>> c. Now clicked on the "Previous" button – instead of going
>>> to
>>> Previous – I got the annoying alert message.
>>> d. added the javascript (Wicket.windo.unloadConfirmatoin =
>>> false;
>>> e. Adding the above scrip was just suppressing the alert
>>> message, and just closes the wizard window without going to the previous
>>> screen.
>>>
>>> Not really sure where I am going wrong. Have been trying to Debug, but
>>> since the previous button doesn't get the onClick() due to closing,
>>> could
>>> not even debug this issue.
>>>
>>> Can you please let me know about your experience in solving this issue,
>>> and also if you feel that I am doing any mistake, please let me know.
>>> Thanks & Best Regards
>>> Kuga
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Wizard-in-Modalwindow-getting-alert-message-upon-using-the-Wizard-buttons-tp19631049p19642382.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Wizard-in-Modalwindow-getting-alert-message-upon-using-the-Wizard-buttons-tp19631049p19661874.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Render multiple images with only one model?

2008-09-24 Thread metalotus

Hi,

I have multiple images in panel. I have one LoadableDetachableModel that I
use for all the images. I notice that my model is attached/detached X + 1
times, where X is the number of images I have. The excessive attach/detach
is my problem.

More info:
The images are NonCachingImage. They use a RenderedDynamicImageResource
subclass that in turn gets the image data from a IModel. The idea is that
RenderedDynamicImageResource.render(Graphics2D) gets the drawing data from
the model. The model only needs to be loaded once for all X images. Loading
the model is expensive.

Since each image sends a GET request, it seems my model is detached after
every GET :(

I found this bug: https://issues.apache.org/jira/browse/WICKET-175
"Page.onDetach is called by each ComponentResourceRequestTarget"

Did I made some bad design choices? Hopefully this is easy to fix.
-- 
View this message in context: 
http://www.nabble.com/Render-multiple-images-with-only-one-model--tp19660221p19660221.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



RE: bookmarkable URL and sortable data table

2008-09-24 Thread Alexandre Lenoir
Happy to follow a known way!

-Original Message-
From: Monica D'Arcy [mailto:[EMAIL PROTECTED] 
Sent: Thursday, 25 September, 2008 00:57
To: users@wicket.apache.org
Subject: Re: bookmarkable URL and sortable data table

Thanks for the reply!  Your solution seems similar to what I thought  
might need to happen.  Monica

On Sep 24, 2008, at 6:43 PM, Xhelas wrote:

>
> I have encountered the same problem as you.
> I have solved it thsi way:
>
> The page that contains the table has parameters that reflects the  
> state of
> the table.
> Then I created the class :
> public class BookmarkableOrderByBorder extends Border
>
> that is created by the overriden newSortableHader of mytable.
>
> This BookmarkableOrderByBorder includes a BookmarkablePageLink that  
> include
> the sort state of my
> BookmarkableTable. I don't know if this is the ideal solution.
>
> Well, you can check the result here where several  
> BookmarkableTables can be
> in a page:
>
> http://cubefactory.selfip.com/globalparanoia/clan.html/clan/PARANOIA/
> http://cubefactory.selfip.com/globalparanoia/clan.html/clan/PARANOIA/
>
> I hope you get the idea. I found it by carefully reading the wicket  
> code.
>
> Regards
>
> Alexandre
>
>
> Monica D'Arcy wrote:
>>
>> Hi,
>>
>> I have an application that uses primarily Bookmarkable pages.  On the
>> main Search page there is also a DefaultDataTable that uses a
>> SortableDataProvider.  When clicking on  sortable column, the URL
>> becomes "wicketized".  Is there a way to easily override this
>> behavior so that the URLs produced by sorting data in the DataTable
>> are also of a Bookmarkable form.
>>
>> Thanks in advance for any help,
>> Monica
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>
> -- 
> View this message in context: http://www.nabble.com/bookmarkable- 
> URL-and-sortable-data-table-tp19518388p19659583.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


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



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



Re: bookmarkable URL and sortable data table

2008-09-24 Thread Monica D'Arcy
Thanks for the reply!  Your solution seems similar to what I thought  
might need to happen.  Monica


On Sep 24, 2008, at 6:43 PM, Xhelas wrote:



I have encountered the same problem as you.
I have solved it thsi way:

The page that contains the table has parameters that reflects the  
state of

the table.
Then I created the class :
public class BookmarkableOrderByBorder extends Border

that is created by the overriden newSortableHader of mytable.

This BookmarkableOrderByBorder includes a BookmarkablePageLink that  
include

the sort state of my
BookmarkableTable. I don't know if this is the ideal solution.

Well, you can check the result here where several  
BookmarkableTables can be

in a page:

http://cubefactory.selfip.com/globalparanoia/clan.html/clan/PARANOIA/
http://cubefactory.selfip.com/globalparanoia/clan.html/clan/PARANOIA/

I hope you get the idea. I found it by carefully reading the wicket  
code.


Regards

Alexandre


Monica D'Arcy wrote:


Hi,

I have an application that uses primarily Bookmarkable pages.  On the
main Search page there is also a DefaultDataTable that uses a
SortableDataProvider.  When clicking on  sortable column, the URL
becomes "wicketized".  Is there a way to easily override this
behavior so that the URLs produced by sorting data in the DataTable
are also of a Bookmarkable form.

Thanks in advance for any help,
Monica

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





--
View this message in context: http://www.nabble.com/bookmarkable- 
URL-and-sortable-data-table-tp19518388p19659583.html

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


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





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



Re: bookmarkable URL and sortable data table

2008-09-24 Thread Xhelas

I have encountered the same problem as you. 
I have solved it thsi way:

The page that contains the table has parameters that reflects the state of
the table. 
Then I created the class :
public class BookmarkableOrderByBorder extends Border

that is created by the overriden newSortableHader of mytable. 

This BookmarkableOrderByBorder includes a BookmarkablePageLink that include
the sort state of my
BookmarkableTable. I don't know if this is the ideal solution. 

Well, you can check the result here where several BookmarkableTables can be
in a page:

http://cubefactory.selfip.com/globalparanoia/clan.html/clan/PARANOIA/
http://cubefactory.selfip.com/globalparanoia/clan.html/clan/PARANOIA/ 

I hope you get the idea. I found it by carefully reading the wicket code. 

Regards

Alexandre


Monica D'Arcy wrote:
> 
> Hi,
> 
> I have an application that uses primarily Bookmarkable pages.  On the  
> main Search page there is also a DefaultDataTable that uses a  
> SortableDataProvider.  When clicking on  sortable column, the URL  
> becomes "wicketized".  Is there a way to easily override this  
> behavior so that the URLs produced by sorting data in the DataTable  
> are also of a Bookmarkable form.
> 
> Thanks in advance for any help,
> Monica
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/bookmarkable-URL-and-sortable-data-table-tp19518388p19659583.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Checkbox and enum value

2008-09-24 Thread Igor Vaynberg
see abstractcheckboxmodel

-igor

On Wed, Sep 24, 2008 at 11:37 AM, Cédric Thiébault
<[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm trying to use a checkbox to set an enum value on my form object
> but I always get a type mismatch error (boolean is not an enum and
> vice versa).
>
> My form object has an enum and I want to display a list of checkboxes
> to allow the user to select the value.
> I don't want to use a radio because my enum can be null and I can't
> unselect my radio group once a radio is selected.
>
> I tried to extends Checkbox to convert teh boolean to the specified
> enum... it works only in one way (to set the enum value) but it does
> not work when my enum has a value and the checkbox need to render
> itself (the value must be a boolean).
>
>
> public class CheckBoxEnum extends CheckBox {
>
>  private final Enum enumValue;
>
>  public CheckBoxEnum(String id, IModel model, String property,
> Enum enumValue) {
>super(id, new PropertyModel(model, property));
>this.enumValue = enumValue;
>  }
>
>  @Override
>  protected void convertInput() {
>String value = getValue();
>if (value != null && BooleanUtils.toBoolean(value))
> setConvertedInput(enumValue);
>  }
> }
>
> Any ideas ?
>
> Thanks
>
> Cedric
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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



Checkbox and enum value

2008-09-24 Thread Cédric Thiébault
Hi,

I'm trying to use a checkbox to set an enum value on my form object
but I always get a type mismatch error (boolean is not an enum and
vice versa).

My form object has an enum and I want to display a list of checkboxes
to allow the user to select the value.
I don't want to use a radio because my enum can be null and I can't
unselect my radio group once a radio is selected.

I tried to extends Checkbox to convert teh boolean to the specified
enum... it works only in one way (to set the enum value) but it does
not work when my enum has a value and the checkbox need to render
itself (the value must be a boolean).


public class CheckBoxEnum extends CheckBox {

  private final Enum enumValue;

  public CheckBoxEnum(String id, IModel model, String property,
Enum enumValue) {
super(id, new PropertyModel(model, property));
this.enumValue = enumValue;
  }

  @Override
  protected void convertInput() {
String value = getValue();
if (value != null && BooleanUtils.toBoolean(value))
setConvertedInput(enumValue);
  }
}

Any ideas ?

Thanks

Cedric

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



Re: new url strategy

2008-09-24 Thread Ladislav Thon
This could be useful to you:
http://wicketstuff.org/confluence/display/STUFFWIKI/wicketstuff-annotation
LT

2008/9/24 Some user <[EMAIL PROTECTED]>

>
> Hello,
>
> I am designing my application java packages in order to keep related
> programs grouped in sections :
>
> myenterprise/myapplication/section1/program1.java
> myenterprise/myapplication/section1/program2.java
> myenterprise/myapplication/section1/program3.java
>
> myenterprise/myapplication/section2/program1.java
> myenterprise/myapplication/section2/program2.java
> myenterprise/myapplication/section2/program3.java
>
> I want to use a url strategy in order to make a call like
> http://myserver/section1/program1 , http://myserver/section2/program3,
> etc.
> but I do not want to modify the webapplication init in order to add an
> "entry mount" each time I add a section or a program. Can you post an
> example of how to do this other way?
>
> Thanks in advance for your help
> 
> David J.
>
> -
> --
> http://www.vic-fontaine.com/ http://www.vic-fontaine.com/
> --
> View this message in context:
> http://www.nabble.com/new-url-strategy-tp19644584p19644584.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Ajax calls loads my server

2008-09-24 Thread Matej Knopp
If it doesn't call the server than it's not Ajax...

Anyway, you can accomplish what you want by writing the javascript by
yourself. Or use Check, CheckGroup and CheckGroupSelector components
that user client side javascript to change the state of checkboxes.

-Matej

On Wed, Sep 24, 2008 at 6:12 PM, Benny Weingarten <[EMAIL PROTECTED]> wrote:
>
> Hello.
>
> In my application I have a panel with a list of users and a checkbox next to
> each user.
> [] user 1
> [] user 2
> [] user 3
> ..
> [] user n
>
> I also have an ajaxlink called "select all", which selects all the
> checkboxes.
>
> Problem: when there are a lot of checkboxes, the operations takes a long
> time - more than is tolerable. Is there a way to make the ajax do its work
> COMPLETELY on the client side, without accessing the server?
>
> In general, does wicket provide a way have pages that have ajax behavior
> that doesn't make calls to the server at all?
>
> thanks,
> Benny.
>
> --
> View this message in context: 
> http://www.nabble.com/Ajax-calls-loads-my-server-tp19652337p19652337.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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



Ajax calls loads my server

2008-09-24 Thread Benny Weingarten

Hello.

In my application I have a panel with a list of users and a checkbox next to
each user.
[] user 1
[] user 2
[] user 3
..
[] user n

I also have an ajaxlink called "select all", which selects all the
checkboxes. 

Problem: when there are a lot of checkboxes, the operations takes a long
time - more than is tolerable. Is there a way to make the ajax do its work
COMPLETELY on the client side, without accessing the server?

In general, does wicket provide a way have pages that have ajax behavior
that doesn't make calls to the server at all?

thanks,
Benny.

-- 
View this message in context: 
http://www.nabble.com/Ajax-calls-loads-my-server-tp19652337p19652337.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: customizing PagingNavigator

2008-09-24 Thread eyalbenamram

Thanks!!


Serkan Camurcuoglu wrote:
> 
> Here's an example of how I extend paging navigator:
> 
> /**
>  * Overridden to make links invisible.
>  */
> @Override
> protected Link newPagingNavigationLink(String id, IPageable 
> pageable, int pageNumber) {
> Link l = super.newPagingNavigationLink(id, pageable, pageNumber);
> // we don't want first/last links..
> l.setVisible(false);
> return l;
> }
> 
> as you see, I call l.setVisible(false) to make the first/last links 
> invisible. You should also provide markup with your extended navigator 
> (for example, my class is SimplePagingNavigator and I have a 
> corresponding SimplePagingNavigator.html) and you can change < and > to 
> prev and next within your new markup . You should copy the original 
> PagingNavigator.html from wicket source, rename it and modify it for 
> yourself.
> 
> hth,
> 
> SerkanC
> 
> 
> 
> eyalbenamram wrote:
>> Hi
>> I need to have a PagingNavigator that has only the "next" and "previous"
>> links visible,
>> and in addition, to change their looks from "<" to "prev"  and from ">"
>> to
>> "next"
>> Can you please add code? I searched the forum and found some messy stuff
>> that didn't work..
>>
>> Thaks, Eyal.
>>   
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

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


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



Re: customizing PagingNavigator

2008-09-24 Thread Serkan Camurcuoglu

Here's an example of how I extend paging navigator:

   /**
* Overridden to make links invisible.
*/
   @Override
   protected Link newPagingNavigationLink(String id, IPageable 
pageable, int pageNumber) {

   Link l = super.newPagingNavigationLink(id, pageable, pageNumber);
   // we don't want first/last links..
   l.setVisible(false);
   return l;
   }

as you see, I call l.setVisible(false) to make the first/last links 
invisible. You should also provide markup with your extended navigator 
(for example, my class is SimplePagingNavigator and I have a 
corresponding SimplePagingNavigator.html) and you can change < and > to 
prev and next within your new markup . You should copy the original 
PagingNavigator.html from wicket source, rename it and modify it for 
yourself.


hth,

SerkanC



eyalbenamram wrote:

Hi
I need to have a PagingNavigator that has only the "next" and "previous"
links visible,
and in addition, to change their looks from "<" to "prev"  and from ">" to
"next"
Can you please add code? I searched the forum and found some messy stuff
that didn't work..

Thaks, Eyal.
  



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



Re: Need help fixing bug #1816

2008-09-24 Thread cowwoc

Johan,

The fix looks good. I no longer get warnings under Glassfish.

Thank you,
Gili


cowwoc wrote:
> 
> According to
> http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletRequest.html#setCharacterEncoding(java.lang.String):
> 
> "This method must be called prior to reading request parameters or reading
> input using getReader()."
> 
> My interpretation is that requesting the context path is okay, so long as
> you do not request the query parameters. I'll test your commit to be sure.
> 
> Gili
> 
> 
> Johan Compagner wrote:
>> 
>> is only getParameters() a problem?
>> or cant we also ask for the context path/url?
>> 
>> see my commit i just did it should fix your problem if it is only the
>> getParameters of the getLastModified wat is a problem
>> 
>> 
>> johan
>> 
>> 
>> On Wed, Sep 24, 2008 at 6:53 AM, cowwoc <[EMAIL PROTECTED]> wrote:
>> 
>>>
>>> Hi,
>>>
>>> I spent a few hours tracking down the cause of
>>> https://issues.apache.org/jira/browse/WICKET-1816 but now I need someone
>>> from the Wicket team to help me fix it.
>>>
>>> Can someone please fix the lines of code I mention in the report and
>>> then
>>> send me back a patched version for testing?
>>>
>>> To be clear: this bug affects *all* platforms. Tomcat fails silently,
>>> which
>>> is even worse.
>>>
>>> Gili
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Need-help-fixing-bug--1816-tp19641982p19641982.html
>>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>>
>>>
>>> -
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Need-help-fixing-bug--1816-tp19641982p19651029.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: How to change the representation of a Date in a DateField

2008-09-24 Thread Igor Vaynberg
override getconverter()

-igor

On Wed, Sep 24, 2008 at 2:32 AM, SantiagoA <[EMAIL PROTECTED]> wrote:
>
> I have a Problem with the representation of a Date in a DateField.
>
> the years is shown as YY, how can i change this to ?
> Problem is, if the year of the Date is 1941 it is represented as 41.
> if a user puts in a date like 1.1.41 (means 1941) it would be computed as
> 2041.
> To avoid that i want the user to use  instead.
>
> Is there something like dateField.setDateFormat(DateFormat.MEDIUM)?
>
> Any clues?
> --
> View this message in context: 
> http://www.nabble.com/How-to-change-the-representation-of-a-Date-in-a-DateField-tp19645209p19645209.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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



customizing PagingNavigator

2008-09-24 Thread eyalbenamram

Hi
I need to have a PagingNavigator that has only the "next" and "previous"
links visible,
and in addition, to change their looks from "<" to "prev"  and from ">" to
"next"
Can you please add code? I searched the forum and found some messy stuff
that didn't work..

Thaks, Eyal.
-- 
View this message in context: 
http://www.nabble.com/customizing-PagingNavigator-tp19649504p19649504.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Need help fixing bug #1816

2008-09-24 Thread cowwoc

According to
http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletRequest.html#setCharacterEncoding(java.lang.String):

"This method must be called prior to reading request parameters or reading
input using getReader()."

My interpretation is that requesting the context path is okay, so long as
you do not request the query parameters. I'll test your commit to be sure.

Gili


Johan Compagner wrote:
> 
> is only getParameters() a problem?
> or cant we also ask for the context path/url?
> 
> see my commit i just did it should fix your problem if it is only the
> getParameters of the getLastModified wat is a problem
> 
> 
> johan
> 
> 
> On Wed, Sep 24, 2008 at 6:53 AM, cowwoc <[EMAIL PROTECTED]> wrote:
> 
>>
>> Hi,
>>
>> I spent a few hours tracking down the cause of
>> https://issues.apache.org/jira/browse/WICKET-1816 but now I need someone
>> from the Wicket team to help me fix it.
>>
>> Can someone please fix the lines of code I mention in the report and then
>> send me back a patched version for testing?
>>
>> To be clear: this bug affects *all* platforms. Tomcat fails silently,
>> which
>> is even worse.
>>
>> Gili
>> --
>> View this message in context:
>> http://www.nabble.com/Need-help-fixing-bug--1816-tp19641982p19641982.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Need-help-fixing-bug--1816-tp19641982p19648988.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Conceptual Ajax problem?

2008-09-24 Thread Nino Saturnino Martinez Vazquez Wael
Yeah, I solved this by adding a veil over the "offending" 
component(AjaxEventBehavior) so that it cant be clicked while updating 
with the timer(AbstractAjaxTimerBehavior). And the one with remove got 
solved by adding a new clean label instead..


Johan Compagner wrote:

maybe adding removeBehavior wasnt such a good idea afterall ;)

the problem with nino will not be solved i think with reversing it...
because what then? then it suddenly executes a behavior on position 0 that
inst really the behavior you wanted?
thats even more dangerous

It should fail like it does below.. The problem is that the second ajax
request is being blocked by the first
and the first removes the behavior of the second so the second ajax request
should (that would be the best)
be terminated completely on the client side. The problem is we have no idea
that that did happen..

johan


On Wed, Sep 24, 2008 at 1:47 PM, Matej Knopp <[EMAIL PROTECTED]> wrote:

  

Well, you can reverse the order of behaviors. Unfortunately currently
in wicket behavior index identifies the behavior which doesn't seem to
be the most solid approach. Maybe we could do something better in 1.5.

-Matej

On Wed, Sep 24, 2008 at 1:26 PM, Nino Saturnino Martinez Vazquez Wael
<[EMAIL PROTECTED]> wrote:


Hi

Im working on something where I have an onclick AjaxEventBehavior and
  

also


an AbstractAjaxTimerBehavior, the timer behavior can remove the
  

AjaxEvent.


Sometimes I manage to fire the AjaxEventBehavior apparently when it's
removed but before the markup is updated  because I get this error:

No behavior listener found with behaviorId 1; Component: [Component id =
cell, page = com.jayway.WicketReactionGamePage, path =
0:rowView:2:cells:0:cell.Label, isVisible = true, isVersioned = true]

So would the right way be to Veil the Component holding the
AjaxEventBehavior while its being updated?



--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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


  

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





  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: Conceptual Ajax problem?

2008-09-24 Thread Johan Compagner
maybe adding removeBehavior wasnt such a good idea afterall ;)

the problem with nino will not be solved i think with reversing it...
because what then? then it suddenly executes a behavior on position 0 that
inst really the behavior you wanted?
thats even more dangerous

It should fail like it does below.. The problem is that the second ajax
request is being blocked by the first
and the first removes the behavior of the second so the second ajax request
should (that would be the best)
be terminated completely on the client side. The problem is we have no idea
that that did happen..

johan


On Wed, Sep 24, 2008 at 1:47 PM, Matej Knopp <[EMAIL PROTECTED]> wrote:

> Well, you can reverse the order of behaviors. Unfortunately currently
> in wicket behavior index identifies the behavior which doesn't seem to
> be the most solid approach. Maybe we could do something better in 1.5.
>
> -Matej
>
> On Wed, Sep 24, 2008 at 1:26 PM, Nino Saturnino Martinez Vazquez Wael
> <[EMAIL PROTECTED]> wrote:
> > Hi
> >
> > Im working on something where I have an onclick AjaxEventBehavior and
> also
> > an AbstractAjaxTimerBehavior, the timer behavior can remove the
> AjaxEvent.
> > Sometimes I manage to fire the AjaxEventBehavior apparently when it's
> > removed but before the markup is updated  because I get this error:
> >
> > No behavior listener found with behaviorId 1; Component: [Component id =
> > cell, page = com.jayway.WicketReactionGamePage, path =
> > 0:rowView:2:cells:0:cell.Label, isVisible = true, isVersioned = true]
> >
> > So would the right way be to Veil the Component holding the
> > AjaxEventBehavior while its being updated?
> >
> >
> >
> > --
> > -Wicket for love
> >
> > Nino Martinez Wael
> > Java Specialist @ Jayway DK
> > http://www.jayway.dk
> > +45 2936 7684
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Need help fixing bug #1816

2008-09-24 Thread Johan Compagner
is only getParameters() a problem?
or cant we also ask for the context path/url?

see my commit i just did it should fix your problem if it is only the
getParameters of the getLastModified wat is a problem


johan


On Wed, Sep 24, 2008 at 6:53 AM, cowwoc <[EMAIL PROTECTED]> wrote:

>
> Hi,
>
> I spent a few hours tracking down the cause of
> https://issues.apache.org/jira/browse/WICKET-1816 but now I need someone
> from the Wicket team to help me fix it.
>
> Can someone please fix the lines of code I mention in the report and then
> send me back a patched version for testing?
>
> To be clear: this bug affects *all* platforms. Tomcat fails silently, which
> is even worse.
>
> Gili
> --
> View this message in context:
> http://www.nabble.com/Need-help-fixing-bug--1816-tp19641982p19641982.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Conceptual Ajax problem?

2008-09-24 Thread Matej Knopp
Well, you can reverse the order of behaviors. Unfortunately currently
in wicket behavior index identifies the behavior which doesn't seem to
be the most solid approach. Maybe we could do something better in 1.5.

-Matej

On Wed, Sep 24, 2008 at 1:26 PM, Nino Saturnino Martinez Vazquez Wael
<[EMAIL PROTECTED]> wrote:
> Hi
>
> Im working on something where I have an onclick AjaxEventBehavior and also
> an AbstractAjaxTimerBehavior, the timer behavior can remove the AjaxEvent.
> Sometimes I manage to fire the AjaxEventBehavior apparently when it's
> removed but before the markup is updated  because I get this error:
>
> No behavior listener found with behaviorId 1; Component: [Component id =
> cell, page = com.jayway.WicketReactionGamePage, path =
> 0:rowView:2:cells:0:cell.Label, isVisible = true, isVersioned = true]
>
> So would the right way be to Veil the Component holding the
> AjaxEventBehavior while its being updated?
>
>
>
> --
> -Wicket for love
>
> Nino Martinez Wael
> Java Specialist @ Jayway DK
> http://www.jayway.dk
> +45 2936 7684
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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



Re: Wizard in Modalwindow getting alert message upon using the Wizard buttons

2008-09-24 Thread Matej Knopp
Please create jira issue for this. Quickstart project to demonstrate
the behavior would be welcome.

-Matej

On Wed, Sep 24, 2008 at 7:45 AM, Kuga <[EMAIL PROTECTED]> wrote:
>
> Can anyone please help me with any possible solution or hints?
> Greatly appreciate your comments, help.
> Thanks
> kuga
>
> Kuga wrote:
>>
>> Hi,
>>
>> I was browsing through the wicket forums, for one of the problems I am
>> having using Wicket wizard in ModalWindow.
>>
>> I am iusing Wicket 1.3.4
>>
>> Wondering if anyone could help me with any possible solutions. Greatly
>> appreciate you time and response.
>>
>> I have changed the WizardButtons to use Ajax buttons. The following is the
>> behavior:
>>
>> In the wizard Ajax button I added the following:
>>
>> protected void onSubmit(AjaxRequestTarget target, Form form) {
>> onClick(target);
>> target.addComponent((Wizard)wizard);
>>   }
>>
>> 1. I have added 3 IWizardStep to the model
>> 2. Added the wizard to a panel, and then added this panel as setContent()
>> to the ModalWindow.
>> 3. Lauched the modalwindow,
>> a. Observed the right behavior (button enabled state) of the
>> buttons at launch
>> b. Now Clicked on "Next" button – traverses to the next step.
>> c. Now clicked on the "Previous" button – instead of going to
>> Previous – I got the annoying alert message.
>> d. added the javascript (Wicket.windo.unloadConfirmatoin =
>> false;
>> e. Adding the above scrip was just suppressing the alert
>> message, and just closes the wizard window without going to the previous
>> screen.
>>
>> Not really sure where I am going wrong. Have been trying to Debug, but
>> since the previous button doesn't get the onClick() due to closing, could
>> not even debug this issue.
>>
>> Can you please let me know about your experience in solving this issue,
>> and also if you feel that I am doing any mistake, please let me know.
>> Thanks & Best Regards
>> Kuga
>>
>>
>
> --
> View this message in context: 
> http://www.nabble.com/Wizard-in-Modalwindow-getting-alert-message-upon-using-the-Wizard-buttons-tp19631049p19642382.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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



Conceptual Ajax problem?

2008-09-24 Thread Nino Saturnino Martinez Vazquez Wael

Hi

Im working on something where I have an onclick AjaxEventBehavior and 
also an AbstractAjaxTimerBehavior, the timer behavior can remove the 
AjaxEvent. Sometimes I manage to fire the AjaxEventBehavior apparently 
when it's removed but before the markup is updated  because I get this 
error:


No behavior listener found with behaviorId 1; Component: [Component id = 
cell, page = com.jayway.WicketReactionGamePage, path = 
0:rowView:2:cells:0:cell.Label, isVisible = true, isVersioned = true]


So would the right way be to Veil the Component holding the 
AjaxEventBehavior while its being updated?




--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: How to customize error message in SignInPanel

2008-09-24 Thread James Carman
If you want to fix those model binding errors, you'll want to just
write your own (copy the code) and set the type manually (the text
fields are bound to a ValueMap I believe, which isn't typed of
course).  If you do that, you can provide your own messages, of
course.

2008/9/24 Łukasz Lipka <[EMAIL PROTECTED]>:
> Hi,
> not perfect solution is to make your ownSignInPanel that extends
> SignInPanel than put your own properties file, or build your own
> sources with proper properties file.
>
> Best regards,
> --
> Pozdrowienia
> Łukasz Lipka
> http://lukaszlipka.blogspot.com/
>
> 2008/9/23 wiki <[EMAIL PROTECTED]>:
>>
>> Does any one knows how to customize error message "login failed" to our own
>> message using SignInPanel.
>> In my project  I am using acegi so I want two different messages
>> 1 for user whose account is locked
>> 2 for user whose account is active but password or email entered wrong
>>
>> Thanks
>>
>> --
>> View this message in context: 
>> http://www.nabble.com/How-to-customize-error-message-in-SignInPanel-tp19624142p19624142.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>


Re: Need help fixing bug #1816

2008-09-24 Thread James Carman
It would also be wise to include a test case that exhibits the bug and
that your code change actually fixes it (the test should fail before
you change the actual source code).

On Wed, Sep 24, 2008 at 2:42 AM, Erik van Oosten <[EMAIL PROTECTED]> wrote:
> Hello Gili,
>
> It is maybe best if you checkout the code from svn and modify the code
> yourself. When you're satisfied with the changes, you can attach a patch to
> the issue. Issues with patches are more likely to be solved then others.
>
> Regards,
>Erik.
>
>
> cowwoc schreef:
>>
>> Hi,
>>
>> I spent a few hours tracking down the cause of
>> https://issues.apache.org/jira/browse/WICKET-1816 but now I need someone
>> from the Wicket team to help me fix it.
>>
>> Can someone please fix the lines of code I mention in the report and then
>> send me back a patched version for testing?
>>
>> To be clear: this bug affects *all* platforms. Tomcat fails silently,
>> which
>> is even worse.
>>
>> Gili
>>
>
>
> --
> Erik van Oosten
> http://www.day-to-day-stuff.blogspot.com/
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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



How to change the representation of a Date in a DateField

2008-09-24 Thread SantiagoA

I have a Problem with the representation of a Date in a DateField.

the years is shown as YY, how can i change this to ?
Problem is, if the year of the Date is 1941 it is represented as 41.
if a user puts in a date like 1.1.41 (means 1941) it would be computed as
2041.
To avoid that i want the user to use  instead.

Is there something like dateField.setDateFormat(DateFormat.MEDIUM)?

Any clues?
-- 
View this message in context: 
http://www.nabble.com/How-to-change-the-representation-of-a-Date-in-a-DateField-tp19645209p19645209.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



new url strategy

2008-09-24 Thread Some user

Hello,

I am designing my application java packages in order to keep related
programs grouped in sections :

myenterprise/myapplication/section1/program1.java
myenterprise/myapplication/section1/program2.java
myenterprise/myapplication/section1/program3.java

myenterprise/myapplication/section2/program1.java
myenterprise/myapplication/section2/program2.java
myenterprise/myapplication/section2/program3.java

I want to use a url strategy in order to make a call like
http://myserver/section1/program1 , http://myserver/section2/program3, etc.
but I do not want to modify the webapplication init in order to add an
"entry mount" each time I add a section or a program. Can you post an
example of how to do this other way?

Thanks in advance for your help

David J.

-
-- 
http://www.vic-fontaine.com/ http://www.vic-fontaine.com/ 
-- 
View this message in context: 
http://www.nabble.com/new-url-strategy-tp19644584p19644584.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Associating a request to a Session

2008-09-24 Thread David Leangen
> >> I've thought of doing some components for openid as it would be nice to 
> >> have some for it... But maybe you can do it instead? :)
> >> 
> >
> > I'd be happy to share my work, but I don't know how valid it would be
> > for general use.
> Great I can maybe snag something of it and build a general component 
> then...

Ok, then. I'll ping you offlist when I get a little further along with
this.


Cheers,
=David.Leangen



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



Re: How to customize error message in SignInPanel

2008-09-24 Thread Łukasz Lipka
Hi,
not perfect solution is to make your ownSignInPanel that extends
SignInPanel than put your own properties file, or build your own
sources with proper properties file.

Best regards,
-- 
Pozdrowienia
Łukasz Lipka
http://lukaszlipka.blogspot.com/

2008/9/23 wiki <[EMAIL PROTECTED]>:
>
> Does any one knows how to customize error message "login failed" to our own
> message using SignInPanel.
> In my project  I am using acegi so I want two different messages
> 1 for user whose account is locked
> 2 for user whose account is active but password or email entered wrong
>
> Thanks
>
> --
> View this message in context: 
> http://www.nabble.com/How-to-customize-error-message-in-SignInPanel-tp19624142p19624142.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Associating a request to a Session

2008-09-24 Thread Nino Saturnino Martinez Vazquez Wael



David Leangen wrote:

Hi, Nino!

  
I believe it's also the servlet container that handles this, with either 
a cookie or an url rewrite...



Yeah... I've decided to take another route on this, since I don't like
relying on the servlet container.

Thanks again for your comments, though. :-)
  

No problem:)
  
I've thought of doing some components for openid as it would be nice to 
have some for it... But maybe you can do it instead? :)



I'd be happy to share my work, but I don't know how valid it would be
for general use.
Great I can maybe snag something of it and build a general component 
then...

 I rely heavily upon OSGi. I think those of us who
combine Wicket+OSGi are still very limited in number.
  




Cheers,
=David.Leangen




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

  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: onmouseover image

2008-09-24 Thread Tim Squires
Thanks Alastair, that's a good idea. AjaxEventBehavior would give the
effect but with a round trip to the server.  It would be nice to have a
javascript only onmouseover where the images are pre-loaded.

I'm currently using the wicketstuff-dojo onmouseover-highlight, which is
good enough for now.

http://wicketstuff.org/wicketdojo13/?wicket:bookmarkablePage=%3Aorg.wicketstuff.dojo.examples.lfx.DojoFXTestPage

Thanks again,
Tim

> Have a look at AjaxEventBehavior. You can either combine this with an
> Image
> component or add an AttributeModifier and manually tweak the 's src
> attribute.
>
> Alastair
>
> 2008/9/19 Tim Squires <[EMAIL PROTECTED]>
>
>> Hi All,
>>
>> Before I go and write my own component to change the src of an img
>> onouseover, I just wanted to make sure that there is no standard
>> component.  I don't want to re-invent the wheel.
>>
>> Is there a standard component for changing the Image or ImageButton
>> image
>> onmouseover?
>>
>> Thanks,
>> Tim
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>



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