Re: Short Design Question

2008-02-08 Thread Alan Gutierrez


Quite often I find myself on the phone and I want to show someone a  
page.


At that point I'm saying h-t-t-p-colon-slash-slash-t-h-i-n-k-n-o-l-a- 
dot-com-slash-p-o-s-t-...


Hopefully I don't have to remember an md5 generated key to get them  
there.


I'm a developer, but I do a lot of hand-holding and other support on  
a community website. There are so many times when I'm out and about  
and the phone rings and someone wants a bit of information and I talk  
out a URL.


A meaningful URL is valuable for understanding where the user is,  
even if it is not perfectly book-markable. If more clicks are  
necessary once they get there fine, so long as I can get them there.


Alan

On Feb 5, 2008, at 1:31 PM, Johan Compagner wrote:


really?
how often do you type an url thats not just like google.com
but something more behind it?

i never do, i really cant remeber that i do that.
Its history or bookmarked.

johan



On Feb 5, 2008 6:29 PM, Eelco Hillenius <[EMAIL PROTECTED]>  
wrote:



On Feb 5, 2008 1:40 AM, Johan Compagner <[EMAIL PROTECTED]> wrote:

the question is what about the users of that client.
I think nice looking urls is greatly exaggerated normal people  
look at

the

browser contents instead of the url
How many times do i look at the url when i am browsing websites.  
I think

never.


I'm not too convinced. I regularly 'guess' URLs myself, and do notice
a nice vs an ugly URL. You may argue I'm not a regular joe here, but
who really is nowadays? I think we should keep an open mind to
improvements.

Eelco

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




--
Alan Gutierrez | [EMAIL PROTECTED] | http://blogometer.com/ | 504  
717 1428

Think New Orleans | http://thinknola.com/



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



Re: IllegalStateException with AjaxFallbackDefaultDataTable

2008-02-08 Thread jwray


Igor,

thanks for the help, I'll have to look at in detail next week. 

What is odd to me is that I'm not doing anything out of the ordinary. I add
the table to the ajax target, and I don't remove any components myself.

Jonny


igor.vaynberg wrote:
> 
> hm, i still dont see the problem spot
> 
> the error is apparent
> 
> you are adding something to the ajax request target that is then
> removed from the page, so when ajaxrequesttarget is trying to detach
> the page it cant, because it does
> 
> component.getPage().detach();
> 
> apparently the component is removed from the page, so getpage() throws
> that error you see.
> 
> if i were you i would set a breakpoint at that line, and see what
> component exactly is removed from the page, and then try to figure out
> why it is removed from the page and yet is added to the ajax target.
> 
> -igor
> 
> 
> On Feb 8, 2008 9:47 AM, jwray <[EMAIL PROTECTED]> wrote:
>>
>> Hi Igor,
>>
>> I was hoping it would be an obvious problem. Here's my table construction
>> code (is there a better way of posting code?)
>>
>> List columns = new ArrayList();
>> PostOnSubmitAction peptideUpdateAction = new PostOnSubmitAction();
>> columns.add(new AjaxEditablePropertyColumn(peptideUpdateAction, new
>> Model("Comments"), "comments", "comments", REQUIRED_ROLE));
>> PeptideDataProvider dataProvider = new PeptideDataProvider(service);
>> peptideViewTable = new AjaxFallbackDefaultDataTable("dataTable", columns,
>> dataProvider, 25);
>>
>>
>> where the PostOnSubmitAction below is called from the onSubmit method of
>> the
>> AjaxEditableLabel within the AjaxEditablePropertyColumn. I'm attempting
>> to
>> refresh the table when an OptimisticLockingFailureException occurs (and
>> so
>> load the data altered by another user).
>>
>> private class PostOnSubmitAction implements
>> AjaxEditablePropertyColumn.PostOnSubmitAction{
>>
>> public void postOnSubmit(AjaxRequestTarget target, Object value)
>> {
>> target.addComponent(getStatusPanel());
>> Peptide peptide = (Peptide)value;
>> try{
>> peptideServices.updatePeptide(peptide);
>> }
>> catch(AccessDeniedException e){
>> String message = "You don't have permission to
>> perform this operation";
>> PeptidePage.this.error(message);
>> }
>> catch(OptimisticLockingFailureException e){
>> String message = "Another user modified this data
>> before you. Review the
>> new data and resubmit changes if needed.";
>> PeptidePage.this.error(message);
>> target.addComponent(peptideViewTable);
>> }
>> catch(RuntimeException e){
>> String message = "An unexpected error occured.
>> "+e.getMessage();
>> PeptidePage.this.error(message);
>> }
>> }
>> }
>>
>> thanks
>> Jonny
>>
>>
>>
>> igor.vaynberg wrote:
>> >
>> > some code would help us help you...
>> >
>> > -igor
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/IllegalStateException-with-AjaxFallbackDefaultDataTable-tp15347366p15360512.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/IllegalStateException-with-AjaxFallbackDefaultDataTable-tp15347366p15366611.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]



AjaxTabbedPanel notworking in IE 6

2008-02-08 Thread Beyonder Unknown

Hi All,

Have you guys encountered problem with AjaxTabbedPanel? The link doesn't work. 
And when i changed it to TabbedPanel it worked!

Thoughts?

Best,
Wen Tong
 
--
The only constant in life is change.




  

Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs

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



Re: Multiple panels and back button

2008-02-08 Thread Igor Vaynberg
On Feb 8, 2008 7:44 AM, Constantin Y <[EMAIL PROTECTED]> wrote:
> Everything is ok except the "back" button.

how is the back button broken exactly?

> If i dont setResponsePage(..) in
> the onClick() method of the save button (btnSave) then wicket starts
> versioning(?) of the data entry form.

a) you shouldnt call setresponsepage in onclick
b) wicket will version the page, whats wrong with that?

> On the other hand i dont want to
> reconstruct the while page whenever i edit (or remove) a record.
> What am i missing?

like i said, not sure what is not working...and whatever you posted
didnt make it

-igor

> Thanks a lot
>   http://www.nabble.com/file/p15357597/DataPanels.java DataPanels.java
> --
> View this message in context: 
> http://www.nabble.com/Multiple-panels-and-back-button-tp15357597p15357597.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: IllegalStateException with AjaxFallbackDefaultDataTable

2008-02-08 Thread Igor Vaynberg
hm, i still dont see the problem spot

the error is apparent

you are adding something to the ajax request target that is then
removed from the page, so when ajaxrequesttarget is trying to detach
the page it cant, because it does

component.getPage().detach();

apparently the component is removed from the page, so getpage() throws
that error you see.

if i were you i would set a breakpoint at that line, and see what
component exactly is removed from the page, and then try to figure out
why it is removed from the page and yet is added to the ajax target.

-igor


On Feb 8, 2008 9:47 AM, jwray <[EMAIL PROTECTED]> wrote:
>
> Hi Igor,
>
> I was hoping it would be an obvious problem. Here's my table construction
> code (is there a better way of posting code?)
>
> List columns = new ArrayList();
> PostOnSubmitAction peptideUpdateAction = new PostOnSubmitAction();
> columns.add(new AjaxEditablePropertyColumn(peptideUpdateAction, new
> Model("Comments"), "comments", "comments", REQUIRED_ROLE));
> PeptideDataProvider dataProvider = new PeptideDataProvider(service);
> peptideViewTable = new AjaxFallbackDefaultDataTable("dataTable", columns,
> dataProvider, 25);
>
>
> where the PostOnSubmitAction below is called from the onSubmit method of the
> AjaxEditableLabel within the AjaxEditablePropertyColumn. I'm attempting to
> refresh the table when an OptimisticLockingFailureException occurs (and so
> load the data altered by another user).
>
> private class PostOnSubmitAction implements
> AjaxEditablePropertyColumn.PostOnSubmitAction{
>
> public void postOnSubmit(AjaxRequestTarget target, Object value) {
> target.addComponent(getStatusPanel());
> Peptide peptide = (Peptide)value;
> try{
> peptideServices.updatePeptide(peptide);
> }
> catch(AccessDeniedException e){
> String message = "You don't have permission to 
> perform this operation";
> PeptidePage.this.error(message);
> }
> catch(OptimisticLockingFailureException e){
> String message = "Another user modified this data 
> before you. Review the
> new data and resubmit changes if needed.";
> PeptidePage.this.error(message);
> target.addComponent(peptideViewTable);
> }
> catch(RuntimeException e){
> String message = "An unexpected error occured. 
> "+e.getMessage();
> PeptidePage.this.error(message);
> }
> }
> }
>
> thanks
> Jonny
>
>
>
> igor.vaynberg wrote:
> >
> > some code would help us help you...
> >
> > -igor
> >
>
> --
> View this message in context: 
> http://www.nabble.com/IllegalStateException-with-AjaxFallbackDefaultDataTable-tp15347366p15360512.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: PageExpired while ordering DataTable

2008-02-08 Thread Igor Vaynberg
second level session store holds x number of previous versions. some
implementations like disk store hold quiet a few versions.

i cant reproduce your error here:
http://wicketstuff.org/wicket13/repeater/?wicket:bookmarkablePage=%3Aorg.apache.wicket.examples.repeater.DataTablePage
can you try?

-igor


On Feb 8, 2008 3:50 AM, Federico Fanton <[EMAIL PROTECTED]> wrote:
> Hi everyone!
> I'm looking for a little help please..
> I have a search page with a form and a custom DataTable (with 
> SortableDataProvider).
> Everything works fine: I can set filters from the form, order the table by 
> clicking on column headers, browse through the table pages, etc.. My problem 
> is that if I _quickly_ doubleclick on a column header (even with no data in 
> the table), i get a PageExpiredException. I tried debugging this, so I saw 
> that WicketServlet receives two calls, and the second one triggers the 
> exception.. What method should I try to debug this? Is there a guide 
> somewhere on how to track down page expired errors?
> Many thanks for your time!
>
>
> -
> 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: Settings focus to window opened by javascript appended to AjaxLink

2008-02-08 Thread Igor Vaynberg
dont know, i think calling focus() on the window should work as long
as it is the last focus call that happens, not sure why it doesnt for
you

-igor


On Feb 8, 2008 6:50 AM, Grzel <[EMAIL PROTECTED]> wrote:
>
> Thanks, I tried this already.
> It minimizes the window though.
> Is there any way to keep window displayed at the back, but allow popup
> (javascript generated) window to be displayed at front?
>
> I tried different javascript options with
> protected IAjaxCallDecorator getAjaxCallDecorator()
> {
>  return new AjaxCallDecorator()
>  {
>  private static final long serialVersionUID = 1L;
>
>  @Override
>  public CharSequence decorateScript(CharSequence script)
>  {
>   ...
>  }
> @Override
>  public CharSequence decorateOnSuccessScript(CharSequence script)
>  {
>   ...
>  }
>
>  @Override
>  public CharSequence decorateOnFailureScript(CharSequence script)
>  {
>  ..
> }
>
> };
>
> Nothing gave the results I was hoping for
> Thanks
>
>
>
>
> igor.vaynberg wrote:
> >
> > also try calling target.focuscomponent(null). by default target will
> > try to refocus the component that cause the ajax request.
> >
> > -igor
> >
> >
> > On Feb 7, 2008 7:57 AM, Grzel <[EMAIL PROTECTED]> wrote:
> >>
> >> Hello,
> >> I am using AjaxLink to open a new window using javascript.
> >> The problem is that the focus is not set on the new window (it is opened
> >> but
> >> stays behind, not visible to the user)
> >>
> >> Code
> >> add(new AjaxLink("btn") {
> >> @Override
> >> public void onClick(AjaxRequestTarget target) {
> >> target.appendJavascript("generateReport('params')");
> >> }
> >>
> >> The actual javascript
> >> function  generateReport(paramStr) {
> >> window.open('/portal/report?' + paramStr,
> >> 'report','menubar=0,status=0,scrollbars =
> >> 1,resizable=1,width=640,height=480');
> >> }
> >>
> >> I tried changing javascript, using focus() method, nothing helped.
> >> Seems like javascript is executed and then focus returned to 'calling
> >> page'
> >> Any solution to this?
> >> Thanks,
> >>
> >>
> >> --
> >> View this message in context:
> >> http://www.nabble.com/Settings-focus-to-window-opened-by-javascript-appended-to-AjaxLink-tp15336895p15336895.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/Settings-focus-to-window-opened-by-javascript-appended-to-AjaxLink-tp15336895p15356494.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: Delaying AutoCompleteTextField by n characters?

2008-02-08 Thread Igor Vaynberg
you can use the iajaxcalldecorator to decorate the call and wrap it
around some javascript that does this...

-igor


On Feb 8, 2008 1:31 AM, Dmitry Kandalov <[EMAIL PROTECTED]> wrote:
> On Tuesday 05 February 2008 23:16:03 Igor Vaynberg wrote:
> > wicket has a throttle which works on time not on number of
> > characthers, for that you need to roll your own javascript
>
> How can I "roll" my javascript which doesn't use ajax before n characters for
> AutoCompleteTextField? I could only do it by copying three classes from
> extensions :(
>
>
> Dima
>
>
> -
> 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: IllegalStateException with AjaxFallbackDefaultDataTable

2008-02-08 Thread jwray

Hi Igor,

I was hoping it would be an obvious problem. Here's my table construction
code (is there a better way of posting code?)

List columns = new ArrayList();
PostOnSubmitAction peptideUpdateAction = new PostOnSubmitAction();
columns.add(new AjaxEditablePropertyColumn(peptideUpdateAction, new
Model("Comments"), "comments", "comments", REQUIRED_ROLE));
PeptideDataProvider dataProvider = new PeptideDataProvider(service);
peptideViewTable = new AjaxFallbackDefaultDataTable("dataTable", columns,
dataProvider, 25);


where the PostOnSubmitAction below is called from the onSubmit method of the
AjaxEditableLabel within the AjaxEditablePropertyColumn. I'm attempting to
refresh the table when an OptimisticLockingFailureException occurs (and so
load the data altered by another user).

private class PostOnSubmitAction implements
AjaxEditablePropertyColumn.PostOnSubmitAction{

public void postOnSubmit(AjaxRequestTarget target, Object value) {
target.addComponent(getStatusPanel());
Peptide peptide = (Peptide)value;
try{
peptideServices.updatePeptide(peptide);
}
catch(AccessDeniedException e){
String message = "You don't have permission to perform 
this operation";
PeptidePage.this.error(message);
}
catch(OptimisticLockingFailureException e){
String message = "Another user modified this data 
before you. Review the
new data and resubmit changes if needed.";
PeptidePage.this.error(message);
target.addComponent(peptideViewTable);
}
catch(RuntimeException e){
String message = "An unexpected error occured. 
"+e.getMessage();
PeptidePage.this.error(message);
}
}
}

thanks
Jonny



igor.vaynberg wrote:
> 
> some code would help us help you...
> 
> -igor
> 

-- 
View this message in context: 
http://www.nabble.com/IllegalStateException-with-AjaxFallbackDefaultDataTable-tp15347366p15360512.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: CompoundModel based on proxies

2008-02-08 Thread Johan Compagner
don't worry about creating the models
That will happen anyway in 1.3 (that needs to be done for example to get the
right object especially when we generify stuff)

see CompoundPropertyModel.wrapOnInheritance()

joan



On Feb 8, 2008 5:41 PM, Scott Swank <[EMAIL PROTECTED]> wrote:

> Interesting.  So
>
>   model.getFirstName()
>
> would return a PropetyModel based on the results of proxy.eval()?  If
> I understand you correctly that creates many models (one per
> component) instead of reusing a single model, but that may well not be
> the end of the world.  Or does getFirstName() return a CompoundModel
> that is properly bound this this component?  Intriguing none the less.
>  I hadn't considered this option, but I'm going to play with it a bit.
>  I rather like that direction.
>
>
> On Feb 8, 2008 8:29 AM, Johan Compagner <[EMAIL PROTECTED]> wrote:
> > i try to look at this this weekend, but i have a quick question
> > I find it a bit verbose can't it be a bit shorter like this (just an
> > example)
> >
> > SharedPropertyModel model = new
> > SharedPropertyModel(customer);
> > this.setModel(model);
> >
> > FormComponent firstName = new CustomerNameField("firstName",
> > model.getFirstName()).setRequired(true);
> > add(firstName);
> >
> > where getFirstName() returns the model
> >
> > johan
> >
> >
> >
> >
> >
> > On Feb 6, 2008 6:57 PM, Scott Swank <[EMAIL PROTECTED]> wrote:
> >
> > > One of our more clever developers created a CompoundPropertyModel that
> > > uses a cglib proxy to strongly bind the mutators to the model.  It
> > > looks like this:
> > >
> > >SharedPropertyModel model = new
> > > SharedPropertyModel(customer);
> > >this.setModel(model);
> > >
> > >FormComponent firstName = new
> > > CustomerNameField("firstName").setRequired(true);
> > >model.bind(firstName).to().getFirstName();
> > >add(firstName);
> > >
> > >FormComponent lastName = new
> > > CustomerNameField("lastName").setRequired(true);
> > >model.bind(lastName).to().getLastName();
> > >add(lastName);
> > >
> > >FormComponent addr1 = new
> > > AddressField("address1").setRequired(true);
> > >model.bind(addr1).to().getAddress().getAddress1();
> > >add(addr1);
> > >
> > >FormComponent addr2 = new AddressField("address2");
> > >model.bind(addr2).to().getAddress().getAddress2();
> > >add(addr2);
> > >
> > >FormComponent city = new CityField("city");
> > >model.bind(city).to().getAddress().getCity();
> > >add(city);
> > >
> > > We're happy to share if folk like this approach.  N.B. that the .to()
> > > call is for readability rather than out of any necessity.
> > >
> > > Cheers,
> > > Scott
> > >
> > > --
> > > Scott Swank
> > > reformed mathematician
> > >
> >
> > > -
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
>
>
>
> --
>  Scott Swank
> reformed mathematician
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: [WicketStuff-Scriptaculous] DragNDrop problem in IE6/IE7.

2008-02-08 Thread Edward Yakop
Committed at
https://scm.ops4j.org/repos/ops4j/laboratory/users/efy/wicket-contrib-scriptaculous

The examples can be found at
https://scm.ops4j.org/repos/ops4j/laboratory/users/efy/wicket-contrib-scriptaculous-examples.

Regards,
Edward Yakop

Note: The wicket dependency version is now set to 1.3.1

On Feb 1, 2008 11:59 PM, Edward Yakop <[EMAIL PROTECTED]> wrote:
> On Feb 1, 2008 11:47 PM, Ryan Sonnek <[EMAIL PROTECTED]> wrote:
> > On Feb 1, 2008 3:26 AM, Lan Boon Ping <[EMAIL PROTECTED]> wrote:
> > > My colleague (Edward Yakop) found out the cause root and have a
> > > solution for it. The reason why this is only occured in IE is because
> > > wicket-ajax.js uses Element.removeChild and Element.addChild to
> > > replace component during ajax callback.
> >
> > Is this an issue with all wicket ajax requests on IE, or just with
> > scriptaculous projects?
> I believe this is a combination.
> Scriptaculous cached the element when "Droppables.add" and "new
> Draggable"  is invoked and
> Wicket ajax behavior handling AjaxRequestTarget#addComponent( ), where
> it remove the old element and add
> the new element during ajax response.
>
> Regards,
> Edward Yakop
> Note: OPS4j server is just backed up, so I haven't have time to update
> the code yet.
>

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



Re: CompoundModel based on proxies

2008-02-08 Thread Scott Swank
Interesting.  So

   model.getFirstName()

would return a PropetyModel based on the results of proxy.eval()?  If
I understand you correctly that creates many models (one per
component) instead of reusing a single model, but that may well not be
the end of the world.  Or does getFirstName() return a CompoundModel
that is properly bound this this component?  Intriguing none the less.
 I hadn't considered this option, but I'm going to play with it a bit.
 I rather like that direction.


On Feb 8, 2008 8:29 AM, Johan Compagner <[EMAIL PROTECTED]> wrote:
> i try to look at this this weekend, but i have a quick question
> I find it a bit verbose can't it be a bit shorter like this (just an
> example)
>
> SharedPropertyModel model = new
> SharedPropertyModel(customer);
> this.setModel(model);
>
> FormComponent firstName = new CustomerNameField("firstName",
> model.getFirstName()).setRequired(true);
> add(firstName);
>
> where getFirstName() returns the model
>
> johan
>
>
>
>
>
> On Feb 6, 2008 6:57 PM, Scott Swank <[EMAIL PROTECTED]> wrote:
>
> > One of our more clever developers created a CompoundPropertyModel that
> > uses a cglib proxy to strongly bind the mutators to the model.  It
> > looks like this:
> >
> >SharedPropertyModel model = new
> > SharedPropertyModel(customer);
> >this.setModel(model);
> >
> >FormComponent firstName = new
> > CustomerNameField("firstName").setRequired(true);
> >model.bind(firstName).to().getFirstName();
> >add(firstName);
> >
> >FormComponent lastName = new
> > CustomerNameField("lastName").setRequired(true);
> >model.bind(lastName).to().getLastName();
> >add(lastName);
> >
> >FormComponent addr1 = new
> > AddressField("address1").setRequired(true);
> >model.bind(addr1).to().getAddress().getAddress1();
> >add(addr1);
> >
> >FormComponent addr2 = new AddressField("address2");
> >model.bind(addr2).to().getAddress().getAddress2();
> >add(addr2);
> >
> >FormComponent city = new CityField("city");
> >model.bind(city).to().getAddress().getCity();
> >add(city);
> >
> > We're happy to share if folk like this approach.  N.B. that the .to()
> > call is for readability rather than out of any necessity.
> >
> > Cheers,
> > Scott
> >
> > --
> > Scott Swank
> > reformed mathematician
> >
>
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>



-- 
Scott Swank
reformed mathematician

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



Re: CompoundModel based on proxies

2008-02-08 Thread Johan Compagner
i try to look at this this weekend, but i have a quick question
I find it a bit verbose can't it be a bit shorter like this (just an
example)

SharedPropertyModel model = new
SharedPropertyModel(customer);
this.setModel(model);

FormComponent firstName = new CustomerNameField("firstName",
model.getFirstName()).setRequired(true);
add(firstName);

where getFirstName() returns the model

johan




On Feb 6, 2008 6:57 PM, Scott Swank <[EMAIL PROTECTED]> wrote:

> One of our more clever developers created a CompoundPropertyModel that
> uses a cglib proxy to strongly bind the mutators to the model.  It
> looks like this:
>
>SharedPropertyModel model = new
> SharedPropertyModel(customer);
>this.setModel(model);
>
>FormComponent firstName = new
> CustomerNameField("firstName").setRequired(true);
>model.bind(firstName).to().getFirstName();
>add(firstName);
>
>FormComponent lastName = new
> CustomerNameField("lastName").setRequired(true);
>model.bind(lastName).to().getLastName();
>add(lastName);
>
>FormComponent addr1 = new
> AddressField("address1").setRequired(true);
>model.bind(addr1).to().getAddress().getAddress1();
>add(addr1);
>
>FormComponent addr2 = new AddressField("address2");
>model.bind(addr2).to().getAddress().getAddress2();
>add(addr2);
>
>FormComponent city = new CityField("city");
>model.bind(city).to().getAddress().getCity();
>add(city);
>
> We're happy to share if folk like this approach.  N.B. that the .to()
> call is for readability rather than out of any necessity.
>
> Cheers,
> Scott
>
> --
> Scott Swank
> reformed mathematician
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


RE: Applet problem

2008-02-08 Thread Maeder Thomas

...
> 
> How should i set the codebase in this situation? I guess code 
> is still com.someapplication.somepackage.AppletClass
> 
> I still get com.someapplication.somepackage.AppletClass not 
> found exception.
> 
> Any ideas how the applet tag should be written?
> 

The reason you can't figure out how to write the codebase is that you're
not supposed to do it that way. The codebase must point to a location
that is accessible to a client of the web server (i.e. the browser).
Web-inf is not accessible for good reasons. Build a jar, put it with
your other web resources!

Thomas

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



Multiple panels and back button

2008-02-08 Thread Constantin Y

hi all,

i am posting a simple page with 2 panels. The first panel maintains a
DataView supported by a custom data provider and the second panel contains a
form which is responsible to edit the currently selected record from the
data view panel.
The data view panel updates the data entry form with the currenty selected
record using an ajax link.
The data entry form in the second panel edits the properties of the
currently selected object and the data view displays automatically the
updated values.
Everything is ok except the "back" button. If i dont setResponsePage(..) in
the onClick() method of the save button (btnSave) then wicket starts
versioning(?) of the data entry form. On the other hand i dont want to
reconstruct the while page whenever i edit (or remove) a record. 
What am i missing?
Thanks a lot
  http://www.nabble.com/file/p15357597/DataPanels.java DataPanels.java 
-- 
View this message in context: 
http://www.nabble.com/Multiple-panels-and-back-button-tp15357597p15357597.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: Adding Panel(s) at Runtime (dynamically)

2008-02-08 Thread Ayodeji Aladejebi
//HTML




your ListView model which is expected to be a List, determines the number of
Panels to be dynamically created
//Java

ListView panelListView= new ListView("panelListView", model){
   public void populateItem(ListItem item){
  SomeModelObject object = item.getModelObject();
  if(bla bla bla)
  item.add(new MyRuntimePanel("runtimePanelItem"));
  else
  item.add(new MyOtherRuntimePanel("runtimePanelItem");
   }
}

infact you can insert some logic inside the ListView to determine which
specific panel to add dynamically.



On 2/8/08, Edvin Syse <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> Use a ListView or some other Repeater-component and implement a model
> that returns a list of the classes that should be created as panels. If
> you need a wicket:id on the surrounding div, that's fine, but not
> needed. You would then do
>
> WebMarkupContainer cont = new WebMarkupContainer("cont");
>
> Then you add the ListView to cont component istead of the page.
>
> Also, you would use the div with class a as the "base" for each listItem:
>
> Panels here
>
> -- Edvin
>
> mehdi b skrev:
> > Hi all,
> >
> > I want to add some panels to my web page and the number of panels is
> unknown. I want a  in my template page and add
> needed panels to this div (the number of panels is determined at run time).
> > Besides, I want a surrounding  for each dynamic
> panel on adding it to the page.
> >
> > Thanks
> >
> >
> > -
> > Looking for last minute shopping deals?  Find them fast with Yahoo!
> Search.
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: PageExpired while ordering DataTable

2008-02-08 Thread Federico Fanton
On Fri, 8 Feb 2008 15:49:58 +0100
"Maurice Marrink" <[EMAIL PROTECTED]> wrote:

> If I recall correctly we had a similar problem a little while ago.
> As it turned out the page was requested twice but only the first was rendered.
> The reason the page was requested twice was because we had something
> like this on our page 
> For some reason the absence of a valid source tag triggers the browser
> into requesting the page again which it then tries to use as the image
> (which will fail offcourse).
> This behavior is documented somewhere but i forgot where.
> 
> Maybe this is the case with your page as well.

I see.. My case is different though, since I receive (as expected) one request 
per click.. If I click one time and wait for the page to refresh, then click 
again, everything is fine.. I get the exception when I click twice quickly on 
the same page.
Thanks for your time anyway :)


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



Re: Autocomplete on a modal window

2008-02-08 Thread Cristi Manole
Hello,

I managed to get around this. It was indeed just a caching issue.

In order to get the autocomplete on top of the modal window, i changed the
zindex in the *autocomplete's javascript*. (don't change anything in the
modal. I found that does not work).

Cristi

On Feb 8, 2008 3:36 PM, Don Hass <[EMAIL PROTECTED]> wrote:

>
> I agree that it sounds like a caching issue.  I know that happens in FF
> quite
> a bit and IE even worse.
>
> The new Modal + AutoComplete problem I have encountered these days is you
> have a panel inside your Modal and it has a vertical scrollbar.  The
> Autocomplete popup div does not get placed properly if the panel is
> scrolled
> down from its original position.
>
> You will have your autocomplete text field higher on the panel due to
> scrolling (e.g. to see the bottom of the panel) and the autocomplete popup
> div will still be in the original text field spot even though the text
> field
> has moved.
>
> Have not found workable solution for that issue either related to
> autocompletes in modals.
>
>
> Dmitry Kandalov wrote:
> >
> >
> > Cristi Manole wrote:
> >>
> >> thank you both for your answers, but there are still problems...
> >>
> >> I already tried what Don suggested, but that only allows for the
> >> autocomplete text to be displayed correctly in IE, but not in FF (at
> >> least not in 2.0.0.9).
> >>
> >> I really cannot figure out why.
> >>
> >
> > I had very similar problem. I solved it by cleaning FF cache every time
> I
> > changed javascript (Edit-Preference-Network-Clean Now).
> >
>
> --
> View this message in context:
> http://www.nabble.com/Autocomplete-on-a-modal-window-tp13662912p15355337.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]
>
>


Applet problem

2008-02-08 Thread Cristi Manole
Hello,

I am trying to add an applet to a html page. I want it to be displayed in a
modal window, but i don't think this matters.

The applet code is part of the wicket application, it is not implemented as
a jar. The applet class is in WEB-INF\classes\
com.someapplication.somepackage.AppletClass

It also is suppose to use a jar that's inside web-inf\lib\some-jar.

My problem is that i've tried everything in order to write the applet tag
correctly but it still fails misserably... i searched nabble but I could not
find a solution for this situation.

How should i set the codebase in this situation? I guess code is still
com.someapplication.somepackage.AppletClass

I still get com.someapplication.somepackage.AppletClass not found exception.

Any ideas how the applet tag should be written?

Thank you very much in advance,
Cristi Manole


Re: Settings focus to window opened by javascript appended to AjaxLink

2008-02-08 Thread Grzel

Thanks, I tried this already.
It minimizes the window though.
Is there any way to keep window displayed at the back, but allow popup
(javascript generated) window to be displayed at front?

I tried different javascript options with
protected IAjaxCallDecorator getAjaxCallDecorator()
{
 return new AjaxCallDecorator()
 {
 private static final long serialVersionUID = 1L;
 
 @Override
 public CharSequence decorateScript(CharSequence script)
 {
  ...
 }
@Override
 public CharSequence decorateOnSuccessScript(CharSequence script)
 {
  ...
 }
 
 @Override
 public CharSequence decorateOnFailureScript(CharSequence script)
 {
 ..
}
 
};

Nothing gave the results I was hoping for
Thanks



igor.vaynberg wrote:
> 
> also try calling target.focuscomponent(null). by default target will
> try to refocus the component that cause the ajax request.
> 
> -igor
> 
> 
> On Feb 7, 2008 7:57 AM, Grzel <[EMAIL PROTECTED]> wrote:
>>
>> Hello,
>> I am using AjaxLink to open a new window using javascript.
>> The problem is that the focus is not set on the new window (it is opened
>> but
>> stays behind, not visible to the user)
>>
>> Code
>> add(new AjaxLink("btn") {
>> @Override
>> public void onClick(AjaxRequestTarget target) {
>> target.appendJavascript("generateReport('params')");
>> }
>>
>> The actual javascript
>> function  generateReport(paramStr) {
>> window.open('/portal/report?' + paramStr,
>> 'report','menubar=0,status=0,scrollbars =
>> 1,resizable=1,width=640,height=480');
>> }
>>
>> I tried changing javascript, using focus() method, nothing helped.
>> Seems like javascript is executed and then focus returned to 'calling
>> page'
>> Any solution to this?
>> Thanks,
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Settings-focus-to-window-opened-by-javascript-appended-to-AjaxLink-tp15336895p15336895.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/Settings-focus-to-window-opened-by-javascript-appended-to-AjaxLink-tp15336895p15356494.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: PageExpired while ordering DataTable

2008-02-08 Thread Maurice Marrink
If I recall correctly we had a similar problem a little while ago.
As it turned out the page was requested twice but only the first was rendered.
The reason the page was requested twice was because we had something
like this on our page 
For some reason the absence of a valid source tag triggers the browser
into requesting the page again which it then tries to use as the image
(which will fail offcourse).
This behavior is documented somewhere but i forgot where.

Maybe this is the case with your page as well.

Maurice

On Feb 8, 2008 2:35 PM, Federico Fanton <[EMAIL PROTECTED]> wrote:
> On Fri, 8 Feb 2008 12:50:34 +0100
> Federico Fanton <[EMAIL PROTECTED]> wrote:
>
> > My problem is that if I _quickly_ doubleclick
> > on a column header (even with no data in the table),
> > I get a PageExpiredException. I tried debugging
> > this, so I saw that WicketServlet receives two
> > calls, and the second one triggers the exception..
>
> I see that every click on the column header triggers a request for a 
> different version of the current page, but SecondLevelCacheSessionStore holds 
> only the last one.. Am I right? So, a doubleclick generates two requests for 
> the same version, but the first one "removes" it, so the second one misses.. 
> Am I doing something wrong?
>
>
>
> -
> 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: Adding Panel(s) at Runtime (dynamically)

2008-02-08 Thread Edvin Syse

Hi,

Use a ListView or some other Repeater-component and implement a model 
that returns a list of the classes that should be created as panels. If 
you need a wicket:id on the surrounding div, that's fine, but not 
needed. You would then do


WebMarkupContainer cont = new WebMarkupContainer("cont");

Then you add the ListView to cont component istead of the page.

Also, you would use the div with class a as the "base" for each listItem:

Panels here

-- Edvin

mehdi b skrev:

Hi all,

I want to add some panels to my web page and the number of panels is unknown. I want a  in my template page and add needed panels to this div (the 
number of panels is determined at run time).
Besides, I want a surrounding  for each dynamic panel on 
adding it to the page.

Thanks

   
-

Looking for last minute shopping deals?  Find them fast with Yahoo! Search.


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



Re: Autocomplete on a modal window

2008-02-08 Thread Don Hass

I agree that it sounds like a caching issue.  I know that happens in FF quite
a bit and IE even worse.

The new Modal + AutoComplete problem I have encountered these days is you
have a panel inside your Modal and it has a vertical scrollbar.  The
Autocomplete popup div does not get placed properly if the panel is scrolled
down from its original position.

You will have your autocomplete text field higher on the panel due to
scrolling (e.g. to see the bottom of the panel) and the autocomplete popup
div will still be in the original text field spot even though the text field
has moved.

Have not found workable solution for that issue either related to
autocompletes in modals.


Dmitry Kandalov wrote:
> 
> 
> Cristi Manole wrote:
>> 
>> thank you both for your answers, but there are still problems...
>> 
>> I already tried what Don suggested, but that only allows for the
>> autocomplete text to be displayed correctly in IE, but not in FF (at
>> least not in 2.0.0.9).
>> 
>> I really cannot figure out why.
>> 
> 
> I had very similar problem. I solved it by cleaning FF cache every time I
> changed javascript (Edit-Preference-Network-Clean Now).
> 

-- 
View this message in context: 
http://www.nabble.com/Autocomplete-on-a-modal-window-tp13662912p15355337.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: PageExpired while ordering DataTable

2008-02-08 Thread Federico Fanton
On Fri, 8 Feb 2008 12:50:34 +0100
Federico Fanton <[EMAIL PROTECTED]> wrote:

> My problem is that if I _quickly_ doubleclick
> on a column header (even with no data in the table),
> I get a PageExpiredException. I tried debugging
> this, so I saw that WicketServlet receives two
> calls, and the second one triggers the exception..

I see that every click on the column header triggers a request for a different 
version of the current page, but SecondLevelCacheSessionStore holds only the 
last one.. Am I right? So, a doubleclick generates two requests for the same 
version, but the first one "removes" it, so the second one misses.. Am I doing 
something wrong?


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



Adding Panel(s) at Runtime (dynamically)

2008-02-08 Thread mehdi b
Hi all,

I want to add some panels to my web page and the number of panels is unknown. I 
want a  in my template page and add needed panels 
to this div (the number of panels is determined at run time).
Besides, I want a surrounding  for each dynamic panel on 
adding it to the page.

Thanks

   
-
Looking for last minute shopping deals?  Find them fast with Yahoo! Search.

Re: Autocomplete on a modal window

2008-02-08 Thread Dmitry Kandalov


Cristi Manole wrote:
> 
> thank you both for your answers, but there are still problems...
> 
> I already tried what Don suggested, but that only allows for the
> autocomplete text to be displayed correctly in IE, but not in FF (at
> least not in 2.0.0.9).
> 
> I really cannot figure out why.
> 

I had very similar problem. I solved it by cleaning FF cache every time I
changed javascript (Edit-Preference-Network-Clean Now).
-- 
View this message in context: 
http://www.nabble.com/Autocomplete-on-a-modal-window-tp13662912p15354234.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]



PageExpired while ordering DataTable

2008-02-08 Thread Federico Fanton
Hi everyone!
I'm looking for a little help please..
I have a search page with a form and a custom DataTable (with 
SortableDataProvider).
Everything works fine: I can set filters from the form, order the table by 
clicking on column headers, browse through the table pages, etc.. My problem is 
that if I _quickly_ doubleclick on a column header (even with no data in the 
table), i get a PageExpiredException. I tried debugging this, so I saw that 
WicketServlet receives two calls, and the second one triggers the exception.. 
What method should I try to debug this? Is there a guide somewhere on how to 
track down page expired errors?
Many thanks for your time!


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



International char

2008-02-08 Thread Pierre Gilquin
Hi all,

I have legacy html files, I trying to insert in a Wicket app.

The charset is iso-8859-1


The special character (French and German) and not html coded in theses files.
Everything work perfectly on my dev machine. I have try to deploy on a 
www.eatj.com account and I get garbage for theses chars.

What can be possibly wrong ?

Thanks in advance



Pierre Gilquin

NB:  

I have in my WebApplication :

public void init() {

getRequestCycleSettings().setResponseRequestEncoding("iso-8859-1");

}


Re: Passing list of POJOs to AutoCompleteTextField?

2008-02-08 Thread Alan Romaniuc
Hi

I ve read this discussion before (AutoComplete returning a list of
POJOs) and just a silly question: Shouldn't it be a new component? I
mean, if a dev wants a really text box that suggests a autocomplete,
but not enforce it, how would he use your component ?
A new component, like "TextFilterComboBox", would not be better?

Looking forward



On Feb 6, 2008 10:53 PM, Sam Barnum <[EMAIL PROTECTED]> wrote:
> I've committed a ticket for this, should have mentioned it here:
>
> https://issues.apache.org/jira/browse/WICKET-1324
>
> -sam
>
>
> On Feb 6, 2008, at 2:47 PM, Michael Mehrle wrote:
>
> > I would be happy to - what is the URL for this? (first time - new
> > contributor).
> >
> > In that context - I recently grepped through the Wicket source and
> > noticed that all the javascript event calls (onchange, onclick, etc.)
> > are all in the code as plain strings, which is bad practice. Thus I
> > wrote a *JavaScriptUtil* class that has String constants like CHANGE,
> > BLUR, DRAG_DROP, etc. (and can be statically imported jdk1.5
> > style). The
> > class also includes Javadoc that describes each event in detail. I
> > thought that this might be a little contribution to Wicket if you want
> > it. Let me know and I can submit the source (again, would need the URL
> > and procedure).
> >
> > Thanks,
> >
> > Michael
> >
> > -Original Message-
> > From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, February 05, 2008 5:31 PM
> > To: users@wicket.apache.org
> > Subject: Re: Passing list of POJOs to AutoCompleteTextField?
> >
> > please add an rfe into jira for this.
> >
> > -igor
> >
> >
> > On Feb 5, 2008 4:38 PM, Michael Mehrle <[EMAIL PROTECTED]> wrote:
> >> That's exactly what I wound up doing. I wrote my custom renderer that
> >> grabs the name field of my POJO for rendering. Of course that is what
> >> I'm getting back from getModelObjectAsString(). It's a work-around
> >> and
> > I
> >> was hoping for a more elegant way of doing this...
> >>
> >> Michael
> >>
> >>
> >> -Original Message-
> >> From: Sam Barnum [mailto:[EMAIL PROTECTED]
> >> Sent: Tuesday, February 05, 2008 4:01 PM
> >> To: users@wicket.apache.org
> >> Subject: Re: Passing list of POJOs to AutoCompleteTextField?
> >>
> >> I don't think it is, the getMmodelObject() returns the selected
> >> String.  I've gotten around this by saving the last query string sent
> >> via AJAX.  When the user makes a selection, I iterate over the
> >> options for that query string one more time, and take the POJO whose
> >> rendered string matches the user-selected text.
> >>
> >> I'm probably missing something obvious, but I don't think
> >> getModelObject() is it...
> >>
> >>
> >>
> >>
> >> --
> >> Sam Barnum
> >> 360 Works
> >> http://www.360works.com
> >> 415.865.0952
> >>
> >>
> >>
> >> On Feb 5, 2008, at 2:12 PM, Igor Vaynberg wrote:
> >>
> >>> shouldnt the pojo be availble from getmodelobject()?
> >>>
> >>> -igor
> >>>
> >>>
> >>> On Jan 29, 2008 11:55 AM, Michael Mehrle <[EMAIL PROTECTED]>
> >>> wrote:
>  I could - if it was a simple matter of extracting the strings from
>  the
>  POJOs. Problem is that, once an option is selected, I need the
>  underlying POJOs to become the model for the rest of the form. Yes,
>  there's probably a way to hack this, but I would prefer to do this
>  in a
>  clean fashion.
> 
>  I already got the custom renderer working, so I'm making progress.
>  Task
>  #2 now is to grab the underlying POJO after selecting it and
> > populate
>  the remainder of the form. This seems to be the tough part...
>  Again, any
>  help would be appreciated.
> 
>  Thanks!!
> 
>  Michael
> 
> 
>  -Original Message-
>  From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
>  Sent: Tuesday, January 29, 2008 11:47 AM
>  To: users@wicket.apache.org
>  Subject: Re: Passing list of POJOs to AutoCompleteTextField?
> 
>  can you not create an iterator adapter that takes an iterator of
>  pojos
>  and translates the pojo to some string?
> 
>  -igor
> 
> 
>  On Jan 29, 2008 11:14 AM, Michael Mehrle <[EMAIL PROTECTED]>
>  wrote:
> > I have a working test page containing an AutoCompleteTextField.
> > Thus
>  far
> > the data feeding it has been an Iterator of strings which is being
> > passed to its overridden getChoices method. So far so good.
> >
> > What I need to do now is to pass in an Iterator of POJOs instead
> > and
> > have the AutoCompleteTextField render the 'name' field inside
> > each of
> > those beans. After some digging in the Wicket source I suspect
> > that I
> > need to create a custom renderer that does this - am I on the
> > right
> > track here or would you guys suggest a different approach?
> >
> > Another challenge will be to populate other form fields in the
> > page
> > after selecting an option from t

Re: Delaying AutoCompleteTextField by n characters?

2008-02-08 Thread Dmitry Kandalov
On Tuesday 05 February 2008 23:16:03 Igor Vaynberg wrote:
> wicket has a throttle which works on time not on number of
> characthers, for that you need to roll your own javascript

How can I "roll" my javascript which doesn't use ajax before n characters for 
AutoCompleteTextField? I could only do it by copying three classes from 
extensions :(


Dima

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



Re: Serialization question

2008-02-08 Thread Sebastiaan van Erk

Hi,

I'm glad you found it... Since inner classes are used so frequently in 
Wicket they're also frequently the ones that cause these problems.


Unfortunately it is impossible to define static anonymous inner classes 
which means that instances of inner classes always keep a (hidden) 
reference to the instance of the outer class.


Regards,
Sebastiaan

Martijn Lindhout wrote:

I solved it, it is the anonymous subclass of DatePicker. Because it is
defined in the decorator class, it belongs to it. I created a separate
DatePickerExt class that enables month/year selection.


2008/2/8, Martijn Lindhout <[EMAIL PROTECTED]>:

SOrry, it is the DateTextFieldDecorator that's causing the problem, and
its code is:

public class DateTextFieldDecorator {

private DateTextField widget;

public DateTextFieldDecorator(DateTextField widget) {
this.widget = widget;
}

public DateTextField from(DateType dateType) {
widget.setRequired(dateType.isRequired());
widget.add(new DatePicker() {
protected boolean enableMonthYearSelection() {
return true;
}
});
widget.setLabel(new Model(dateType.getFieldName()));
return widget;
}
}

2008/2/8, Martijn Lindhout <[EMAIL PROTECTED]>:

Here it is:

ERROR - Objects- Error serializing object class
nl.je.obs.web.admin.medewerkers.EditMedewerker [object=[Page class =
nl.je.obs.web.admin.medewerkers.EditMedewerker, id = 3, version = 0]]

org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException:Unable
 to serialize class:
nl.je.ddd.ui.wicket.DateTextFieldDecorator
Field hierarchy is:
  3 [class=nl.je.obs.web.admin.medewerkers.EditMedewerker, path=3]
private java.lang.Object org.apache.wicket.MarkupContainer.children[class=[
Ljava.lang.Object;]
  private
org.apache.wicket.markup.html.ContainerWithAssociatedMarkupHelper
org.apache.wicket.markup.html.WebMarkupContainerWithAssociatedMarkup.markupHelper[2]
[class=nl.je.obs.web.admin.medewerkers.EditMedewerker$2,
path=3:mwpwForm]
private java.lang.Object
org.apache.wicket.MarkupContainer.children [class=[Ljava.lang.Object;]
  private java.lang.Object
org.apache.wicket.MarkupContainer.children[0] [class=
org.apache.wicket.extensions.markup.html.tabs.TabbedPanel,
path=3:mwpwForm:mw-tabs]
private java.lang.Object
org.apache.wicket.MarkupContainer.children [class=[Ljava.lang.Object;]
  private org.apache.wicket.markup.html.link.PopupSettings
org.apache.wicket.markup.html.link.Link.popupSettings[1] [class=
nl.je.obs.web.admin.medewerkers.PersoonsGegevensPanel,
path=3:mwpwForm:mw-tabs:panel]
private java.lang.Object
org.apache.wicket.MarkupContainer.children [class=[Ljava.lang.Object;]
  private java.lang.Object
org.apache.wicket.markup.html.form.FormComponent.validators[3] [class=
org.apache.wicket.datetime.markup.html.form.DateTextField,
path=3:mwpwForm:mw-tabs:panel:geboorted]
java.lang.Object org.apache.wicket.Component.data[class=[
Ljava.lang.Object;]
  java.lang.Object org.apache.wicket.Component.data[0][1]
[class=nl.je.ddd.ui.wicket.DateTextFieldDecorator$1]
final nl.je.ddd.ui.wicket.DateTextFieldDecorator
nl.je.ddd.ui.wicket.DateTextFieldDecorator$1.this$0 [class=
nl.je.ddd.ui.wicket.DateTextFieldDecorator] <- field that is not
serializable
at org.apache.wicket.util.io.SerializableChecker.check(
SerializableChecker.java:342)
at org.apache.wicket.util.io.SerializableChecker.checkFields(
SerializableChecker.java:610)
at org.apache.wicket.util.io.SerializableChecker.check(
SerializableChecker.java:533)
at org.apache.wicket.util.io.SerializableChecker.check(
SerializableChecker.java:388)
at org.apache.wicket.util.io.SerializableChecker.checkFields(
SerializableChecker.java:610)
at org.apache.wicket.util.io.SerializableChecker.check(
SerializableChecker.java:533)
at org.apache.wicket.util.io.SerializableChecker.check(
SerializableChecker.java:388)
at org.apache.wicket.util.io.SerializableChecker.checkFields(
SerializableChecker.java:610)
at org.apache.wicket.util.io.SerializableChecker.check(
SerializableChecker.java:533)
at org.apache.wicket.util.io.SerializableChecker.check(
SerializableChecker.java:388)
at org.apache.wicket.util.io.SerializableChecker.checkFields(
SerializableChecker.java:610)
at org.apache.wicket.util.io.SerializableChecker.check(
SerializableChecker.java:533)
at org.apache.wicket.util.io.SerializableChecker.check(
SerializableChecker.java:388)
at org.apache.wicket.util.io.SerializableChecker.checkFields(
SerializableChecker.java:610)
at org.apache.wicket.util.io.SerializableChecker.check(
SerializableChecker.java:533)
at org.apache.wicket.util.io.SerializableChecker.check(
SerializableChecker.java:388)
at org.apache.wicket.util.io.SerializableChecker.checkFields(
Serializab

Thanks for the fixes about serialization

2008-02-08 Thread Fabrizio Giudici
It looks that disabling versioning and changing the store made all of  
my problems to disappear, including the deterministic session  
expiration with my popups.


Thanks.


--
Fabrizio Giudici, Ph.D. - Java Architect, Project Manager
Tidalwave s.a.s. - "We make Java work. Everywhere."
weblogs.java.net/blog/fabriziogiudici - www.tidalwave.it/blog
[EMAIL PROTECTED] - mobile: +39 348.150.6941




Re: Serialization question

2008-02-08 Thread Martijn Lindhout
I solved it, it is the anonymous subclass of DatePicker. Because it is
defined in the decorator class, it belongs to it. I created a separate
DatePickerExt class that enables month/year selection.


2008/2/8, Martijn Lindhout <[EMAIL PROTECTED]>:
>
> SOrry, it is the DateTextFieldDecorator that's causing the problem, and
> its code is:
>
> public class DateTextFieldDecorator {
>
> private DateTextField widget;
>
> public DateTextFieldDecorator(DateTextField widget) {
> this.widget = widget;
> }
>
> public DateTextField from(DateType dateType) {
> widget.setRequired(dateType.isRequired());
> widget.add(new DatePicker() {
> protected boolean enableMonthYearSelection() {
> return true;
> }
> });
> widget.setLabel(new Model(dateType.getFieldName()));
> return widget;
> }
> }
>
> 2008/2/8, Martijn Lindhout <[EMAIL PROTECTED]>:
> >
> > Here it is:
> >
> > ERROR - Objects- Error serializing object class
> > nl.je.obs.web.admin.medewerkers.EditMedewerker [object=[Page class =
> > nl.je.obs.web.admin.medewerkers.EditMedewerker, id = 3, version = 0]]
> >
> > org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException:Unable
> >  to serialize class:
> > nl.je.ddd.ui.wicket.DateTextFieldDecorator
> > Field hierarchy is:
> >   3 [class=nl.je.obs.web.admin.medewerkers.EditMedewerker, path=3]
> > private java.lang.Object 
> > org.apache.wicket.MarkupContainer.children[class=[
> > Ljava.lang.Object;]
> >   private
> > org.apache.wicket.markup.html.ContainerWithAssociatedMarkupHelper
> > org.apache.wicket.markup.html.WebMarkupContainerWithAssociatedMarkup.markupHelper[2]
> > [class=nl.je.obs.web.admin.medewerkers.EditMedewerker$2,
> > path=3:mwpwForm]
> > private java.lang.Object
> > org.apache.wicket.MarkupContainer.children [class=[Ljava.lang.Object;]
> >   private java.lang.Object
> > org.apache.wicket.MarkupContainer.children[0] [class=
> > org.apache.wicket.extensions.markup.html.tabs.TabbedPanel,
> > path=3:mwpwForm:mw-tabs]
> > private java.lang.Object
> > org.apache.wicket.MarkupContainer.children [class=[Ljava.lang.Object;]
> >   private org.apache.wicket.markup.html.link.PopupSettings
> > org.apache.wicket.markup.html.link.Link.popupSettings[1] [class=
> > nl.je.obs.web.admin.medewerkers.PersoonsGegevensPanel,
> > path=3:mwpwForm:mw-tabs:panel]
> > private java.lang.Object
> > org.apache.wicket.MarkupContainer.children [class=[Ljava.lang.Object;]
> >   private java.lang.Object
> > org.apache.wicket.markup.html.form.FormComponent.validators[3] [class=
> > org.apache.wicket.datetime.markup.html.form.DateTextField,
> > path=3:mwpwForm:mw-tabs:panel:geboorted]
> > java.lang.Object 
> > org.apache.wicket.Component.data[class=[
> > Ljava.lang.Object;]
> >   java.lang.Object 
> > org.apache.wicket.Component.data[0][1]
> > [class=nl.je.ddd.ui.wicket.DateTextFieldDecorator$1]
> > final nl.je.ddd.ui.wicket.DateTextFieldDecorator
> > nl.je.ddd.ui.wicket.DateTextFieldDecorator$1.this$0 [class=
> > nl.je.ddd.ui.wicket.DateTextFieldDecorator] <- field that is not
> > serializable
> > at org.apache.wicket.util.io.SerializableChecker.check(
> > SerializableChecker.java:342)
> > at org.apache.wicket.util.io.SerializableChecker.checkFields(
> > SerializableChecker.java:610)
> > at org.apache.wicket.util.io.SerializableChecker.check(
> > SerializableChecker.java:533)
> > at org.apache.wicket.util.io.SerializableChecker.check(
> > SerializableChecker.java:388)
> > at org.apache.wicket.util.io.SerializableChecker.checkFields(
> > SerializableChecker.java:610)
> > at org.apache.wicket.util.io.SerializableChecker.check(
> > SerializableChecker.java:533)
> > at org.apache.wicket.util.io.SerializableChecker.check(
> > SerializableChecker.java:388)
> > at org.apache.wicket.util.io.SerializableChecker.checkFields(
> > SerializableChecker.java:610)
> > at org.apache.wicket.util.io.SerializableChecker.check(
> > SerializableChecker.java:533)
> > at org.apache.wicket.util.io.SerializableChecker.check(
> > SerializableChecker.java:388)
> > at org.apache.wicket.util.io.SerializableChecker.checkFields(
> > SerializableChecker.java:610)
> > at org.apache.wicket.util.io.SerializableChecker.check(
> > SerializableChecker.java:533)
> > at org.apache.wicket.util.io.SerializableChecker.check(
> > SerializableChecker.java:388)
> > at org.apache.wicket.util.io.SerializableChecker.checkFields(
> > SerializableChecker.java:610)
> > at org.apache.wicket.util.io.SerializableChecker.check(
> > SerializableChecker.java:533)
> > at org.apache.wicket.util.io.SerializableChecker.check(
> > SerializableChecker.java:388)
> > at org.apache.wicket.util.io.SerializableChecker.checkFields(
> > SerializableChecker.

Re: Serialization question

2008-02-08 Thread Martijn Lindhout
SOrry, it is the DateTextFieldDecorator that's causing the problem, and its
code is:

public class DateTextFieldDecorator {

private DateTextField widget;

public DateTextFieldDecorator(DateTextField widget) {
this.widget = widget;
}

public DateTextField from(DateType dateType) {
widget.setRequired(dateType.isRequired());
widget.add(new DatePicker() {
protected boolean enableMonthYearSelection() {
return true;
}
});
widget.setLabel(new Model(dateType.getFieldName()));
return widget;
}
}

2008/2/8, Martijn Lindhout <[EMAIL PROTECTED]>:
>
> Here it is:
>
> ERROR - Objects- Error serializing object class
> nl.je.obs.web.admin.medewerkers.EditMedewerker [object=[Page class =
> nl.je.obs.web.admin.medewerkers.EditMedewerker, id = 3, version = 0]]
>
> org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException:Unable
>  to serialize class:
> nl.je.ddd.ui.wicket.DateTextFieldDecorator
> Field hierarchy is:
>   3 [class=nl.je.obs.web.admin.medewerkers.EditMedewerker, path=3]
> private java.lang.Object 
> org.apache.wicket.MarkupContainer.children[class=[
> Ljava.lang.Object;]
>   private
> org.apache.wicket.markup.html.ContainerWithAssociatedMarkupHelper
> org.apache.wicket.markup.html.WebMarkupContainerWithAssociatedMarkup.markupHelper[2]
> [class=nl.je.obs.web.admin.medewerkers.EditMedewerker$2, path=3:mwpwForm]
> private java.lang.Object
> org.apache.wicket.MarkupContainer.children [class=[Ljava.lang.Object;]
>   private java.lang.Object
> org.apache.wicket.MarkupContainer.children[0] [class=
> org.apache.wicket.extensions.markup.html.tabs.TabbedPanel,
> path=3:mwpwForm:mw-tabs]
> private java.lang.Object
> org.apache.wicket.MarkupContainer.children [class=[Ljava.lang.Object;]
>   private org.apache.wicket.markup.html.link.PopupSettings
> org.apache.wicket.markup.html.link.Link.popupSettings[1] [class=
> nl.je.obs.web.admin.medewerkers.PersoonsGegevensPanel,
> path=3:mwpwForm:mw-tabs:panel]
> private java.lang.Object
> org.apache.wicket.MarkupContainer.children [class=[Ljava.lang.Object;]
>   private java.lang.Object
> org.apache.wicket.markup.html.form.FormComponent.validators[3] [class=
> org.apache.wicket.datetime.markup.html.form.DateTextField,
> path=3:mwpwForm:mw-tabs:panel:geboorted]
> java.lang.Object org.apache.wicket.Component.data[class=[
> Ljava.lang.Object;]
>   java.lang.Object org.apache.wicket.Component.data[0][1]
> [class=nl.je.ddd.ui.wicket.DateTextFieldDecorator$1]
> final nl.je.ddd.ui.wicket.DateTextFieldDecorator
> nl.je.ddd.ui.wicket.DateTextFieldDecorator$1.this$0 [class=
> nl.je.ddd.ui.wicket.DateTextFieldDecorator] <- field that is not
> serializable
> at org.apache.wicket.util.io.SerializableChecker.check(
> SerializableChecker.java:342)
> at org.apache.wicket.util.io.SerializableChecker.checkFields(
> SerializableChecker.java:610)
> at org.apache.wicket.util.io.SerializableChecker.check(
> SerializableChecker.java:533)
> at org.apache.wicket.util.io.SerializableChecker.check(
> SerializableChecker.java:388)
> at org.apache.wicket.util.io.SerializableChecker.checkFields(
> SerializableChecker.java:610)
> at org.apache.wicket.util.io.SerializableChecker.check(
> SerializableChecker.java:533)
> at org.apache.wicket.util.io.SerializableChecker.check(
> SerializableChecker.java:388)
> at org.apache.wicket.util.io.SerializableChecker.checkFields(
> SerializableChecker.java:610)
> at org.apache.wicket.util.io.SerializableChecker.check(
> SerializableChecker.java:533)
> at org.apache.wicket.util.io.SerializableChecker.check(
> SerializableChecker.java:388)
> at org.apache.wicket.util.io.SerializableChecker.checkFields(
> SerializableChecker.java:610)
> at org.apache.wicket.util.io.SerializableChecker.check(
> SerializableChecker.java:533)
> at org.apache.wicket.util.io.SerializableChecker.check(
> SerializableChecker.java:388)
> at org.apache.wicket.util.io.SerializableChecker.checkFields(
> SerializableChecker.java:610)
> at org.apache.wicket.util.io.SerializableChecker.check(
> SerializableChecker.java:533)
> at org.apache.wicket.util.io.SerializableChecker.check(
> SerializableChecker.java:388)
> at org.apache.wicket.util.io.SerializableChecker.checkFields(
> SerializableChecker.java:610)
> at org.apache.wicket.util.io.SerializableChecker.check(
> SerializableChecker.java:533)
> at org.apache.wicket.util.io.SerializableChecker.writeObjectOverride(
> SerializableChecker.java:678)
> at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:322)
> at
> org.apache.wicket.util.io.IObjectStreamFactory$2.writeObjectOverride(
> IObjectStreamFactory.java:125)
> at java.io.ObjectOutputStream.writeObject(ObjectOutputS

Re: Serialization question

2008-02-08 Thread Martijn Lindhout
Here it is:

ERROR - Objects- Error serializing object class
nl.je.obs.web.admin.medewerkers.EditMedewerker [object=[Page class =
nl.je.obs.web.admin.medewerkers.EditMedewerker, id = 3, version = 0]]
org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException:Unable
to serialize class:
nl.je.ddd.ui.wicket.DateTextFieldDecorator
Field hierarchy is:
  3 [class=nl.je.obs.web.admin.medewerkers.EditMedewerker, path=3]
private java.lang.Object org.apache.wicket.MarkupContainer.children[class=[
Ljava.lang.Object;]
  private
org.apache.wicket.markup.html.ContainerWithAssociatedMarkupHelper
org.apache.wicket.markup.html.WebMarkupContainerWithAssociatedMarkup.markupHelper[2]
[class=nl.je.obs.web.admin.medewerkers.EditMedewerker$2, path=3:mwpwForm]
private java.lang.Object
org.apache.wicket.MarkupContainer.children[class=[
Ljava.lang.Object;]
  private java.lang.Object
org.apache.wicket.MarkupContainer.children[0] [class=
org.apache.wicket.extensions.markup.html.tabs.TabbedPanel,
path=3:mwpwForm:mw-tabs]
private java.lang.Object
org.apache.wicket.MarkupContainer.children [class=[Ljava.lang.Object;]
  private org.apache.wicket.markup.html.link.PopupSettings
org.apache.wicket.markup.html.link.Link.popupSettings[1] [class=
nl.je.obs.web.admin.medewerkers.PersoonsGegevensPanel,
path=3:mwpwForm:mw-tabs:panel]
private java.lang.Object
org.apache.wicket.MarkupContainer.children [class=[Ljava.lang.Object;]
  private java.lang.Object
org.apache.wicket.markup.html.form.FormComponent.validators[3] [class=
org.apache.wicket.datetime.markup.html.form.DateTextField,
path=3:mwpwForm:mw-tabs:panel:geboorted]
java.lang.Object org.apache.wicket.Component.data[class=[
Ljava.lang.Object;]
  java.lang.Object org.apache.wicket.Component.data[0][1]
[class=nl.je.ddd.ui.wicket.DateTextFieldDecorator$1]
final nl.je.ddd.ui.wicket.DateTextFieldDecorator
nl.je.ddd.ui.wicket.DateTextFieldDecorator$1.this$0 [class=
nl.je.ddd.ui.wicket.DateTextFieldDecorator] <- field that is not
serializable
at org.apache.wicket.util.io.SerializableChecker.check(
SerializableChecker.java:342)
at org.apache.wicket.util.io.SerializableChecker.checkFields(
SerializableChecker.java:610)
at org.apache.wicket.util.io.SerializableChecker.check(
SerializableChecker.java:533)
at org.apache.wicket.util.io.SerializableChecker.check(
SerializableChecker.java:388)
at org.apache.wicket.util.io.SerializableChecker.checkFields(
SerializableChecker.java:610)
at org.apache.wicket.util.io.SerializableChecker.check(
SerializableChecker.java:533)
at org.apache.wicket.util.io.SerializableChecker.check(
SerializableChecker.java:388)
at org.apache.wicket.util.io.SerializableChecker.checkFields(
SerializableChecker.java:610)
at org.apache.wicket.util.io.SerializableChecker.check(
SerializableChecker.java:533)
at org.apache.wicket.util.io.SerializableChecker.check(
SerializableChecker.java:388)
at org.apache.wicket.util.io.SerializableChecker.checkFields(
SerializableChecker.java:610)
at org.apache.wicket.util.io.SerializableChecker.check(
SerializableChecker.java:533)
at org.apache.wicket.util.io.SerializableChecker.check(
SerializableChecker.java:388)
at org.apache.wicket.util.io.SerializableChecker.checkFields(
SerializableChecker.java:610)
at org.apache.wicket.util.io.SerializableChecker.check(
SerializableChecker.java:533)
at org.apache.wicket.util.io.SerializableChecker.check(
SerializableChecker.java:388)
at org.apache.wicket.util.io.SerializableChecker.checkFields(
SerializableChecker.java:610)
at org.apache.wicket.util.io.SerializableChecker.check(
SerializableChecker.java:533)
at org.apache.wicket.util.io.SerializableChecker.writeObjectOverride(
SerializableChecker.java:678)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:322)
at org.apache.wicket.util.io.IObjectStreamFactory$2.writeObjectOverride(
IObjectStreamFactory.java:125)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:322)
at org.apache.wicket.util.lang.Objects.objectToByteArray(Objects.java
:1085)
at
org.apache.wicket.protocol.http.pagestore.AbstractPageStore.serializePage(
AbstractPageStore.java:197)
at org.apache.wicket.protocol.http.pagestore.DiskPageStore.storePage(
DiskPageStore.java:806)
at
org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLevelCachePageMap.put
(SecondLevelCacheSessionStore.java:332)
at org.apache.wicket.Session.requestDetached(Session.java:1364)
at org.apache.wicket.RequestCycle.detach(RequestCycle.java:1091)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1334)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java
:354)
at org.apache.wicket.proto

Re: Serialization question

2008-02-08 Thread Sebastiaan van Erk

Hi,

I don't see any problem with the code below, that is, from what you 
pasted I don't see any references to a TextFieldDecorator being kept.


However when Wicket says that something is not serializable it gives you 
the entire object graph path to the object that is causing the problem, 
so seeing the full exception would help debug the problem.


Regards,
Sebastiaan

Martijn Lindhout wrote:

Hi all,

I have this code in a Panel:

TextField name = new TextField("name", new PropertyModel(person, "name.value
"));
add(WidgetDecorator.decorate(name).from(person.getName());

I have domain objects (person) with rich type definities. getName() returns
a Text object that contains all constraints imposed on the field (required,
min, max, etc).

WidgetDecorator is a class I build that enriches a particular Wicket
component, based on the type information from the domain object. All
decorate methods on the WidgetDecorator are static and return a component
specific decorator, so in the sample above a new TextFieldDecorator will be
instantiated and returned. It looks like this:

public class TextFieldDecorator {

private TextField widget;

public TextFieldDecorator(TextField textField) {
this.widget = textField;
}

public TextField from(Text textType) {
widget.setRequired(textType.isRequired());
widget.add(StringValidator.lengthBetween(textType.getMinLength(),
textType.getMaxLength()));
widget.setLabel(new Model(textType.getFieldName()));
return widget;
}
}

Now the problem: Wicket complains that my TextFieldDecorator is not
serializable. But why? IMO it is not added to the component hierarchy. The
argument to the panel.add(...) method is the result of evaluating:
WidgetDecorator.decorate(name).from(person.getName(), which returns the
TextField widget.

Should I redo my Java programmers exam?

Thanx,



smime.p7s
Description: S/MIME Cryptographic Signature