Re: [Wicket-user] i18n and SimpleFormComponentLabel

2006-12-05 Thread Erik van Oosten
Hi Rüdiger,

Although at the end of your e-mail I thought "yes, he's right!" there is 
one thing you missed: the label does not have to have the same text as 
the name of the field.

For example, in my current application I have the following components 
on a search form:
Component:label-housenumber  [field-from] [field-till]
Text/fieldname:House number[housenumber from] [housenumber till]

The label is coupled to the first field. As you can see the label is 
different from the name of the first field.
The only thing is, it is a bit weird I need to set a resource model on 
the field to get the text in the label.

Still, it would be nice to default to what you described. You could 
create an issue for it (with code to have it more quickly).
You can find Jira here: http://issues.apache.org/jira/browse/WICKET

Regards,
 Erik.



Rüdiger Schulz schreef:
> Hello everybody,
>
> I just wanted to dive a little into wicket i18n, and stumbled upon this:
>
> Say I have page with this simple form:
>
> Form form = new Form("form");
> add(form);
>   
> FeedbackPanel feedback = new FeedbackPanel("feedback");
> form.add(feedback);
>   
> TextField tx = new TextField("text");
> tx.setRequired(true);
> form.add(tx);
>
> and corresponding properties file for the page:
>
> form.text=FormTexti18n
>
> When I submit the empty form, I get the message:
>
> field 'FormTexti18n' is required.
>
> So, my label from the properties is used for the validation message. So
> far, so good.
>
> Now I'd like to have a label for the TextField, displaying the same
> string from the properties. Also, a normal Label is not enough for me,
> I'd like to change its CSS style depending on having an error.
>
> So I start with this:
>
> SimpleFormComponentLabel label =
>   new SimpleFormComponentLabel("textLabel", tx);
> form.add(label);
>
> Now I get an error:
>
> java.lang.IllegalStateException: Provided form component does not have a
> label set. Use FormComponent.setLabel(IModel) to set the model that will
> feed this label
>  at
> wicket.markup.html.form.SimpleFormComponentLabel.(SimpleFormComponentLabel.java:46)
>
> Okay, this error tells me what to do, and I could do a
>
> tx.setLabel(new ResourceModel("form.textLabel"));
>
> And everything works fine. But ... :-)
>
> Is this really necessary? This ResourceModel is only required for the
> SimpleFormComponentLabel, I already have label through the properties!
>
> The JavaDoc FormComponent#getModel() says
>
> "The value will be made available to the validator property by means of
> ${label}."
>
> Which it does, but I'm wondering why SimpleFormComponentLabel can't do
> this the same way as the validator? Or is this one of those issues which
> will be gone with the changes in 2.0?
>
> greetings,
>
>
> Rüdiger
>
>   

-- 
Erik van Oosten
http://www.day-to-day-stuff.blogspot.com/


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] i18n of booleans and enums

2006-12-05 Thread Matej Knopp
Actually I would do this using a custom converter. Then you don't have 
to decorate it.

You can have a
public class BooleanLabel {
...
IConverter getConverter() {
return new IConverter() {
...
}
}
}

In your converter decide how to display the value.
I don't think there is anything wrong with your model, just that the 
custom components like this are IMHO easier to use.

-Matej

Logi Ragnarsson wrote:
> Hello everyone,
> 
> I'm relatively new to wicket, but I'm building a web application where 
> several 
> forms are backed by compound models with boolean and enum constituent models. 
> The straight-forward implementation of this would display true/false values, 
> and the names of the enum values in the code, which is generally not very 
> user friendly (peopel say "yes" and "no" and they don't generally put choices 
> in all upper case) and not internationalized, so Something Must Be Done.
> 
> I'd like to show my solution, with input from Igor Vaynberg, for comment and 
> perhaps re-use. I've only got the boolean case implemented, but the enum case 
> is basically more of the same with more localization resources needing to be 
> loaded.
> 
> The simplest case (and one not worth all this effort) is when displaying a 
> boolean value in a ListView:
>   new Label("active");
> which becomes:
>   new Label("active", new I18nBooleanModelDecorator(item.getModel()));
> where the (attached) I18nBooleanModelDecorator has been applied to the model. 
> This will display "yes" or "no" for the boolean values unless those strings 
> have been replaced by setting the I18nBooleanModelDecorator.TRUE and 
> I18nBooleanModelDecorator.FALSE licalization strings to something else.
> 
> Usually on a form you'd use a check-box for setting boolean values, such as 
> this:
>   new CheckBox("active");
> but for illustrative purposes suppose we have this text field instead:
>   new TextField("active");
> The following will work if the component's compound model has been set before 
> the form is populated with fields and will not be changed later:
>   new TextField("active", new I18nBooleanModelDecorator(getModel()));
> but in reality getModel() is likely to return null or to return a model which 
> is later replaced with another in response to user or application events, so 
> the text field would now either have no underlying model or an out-dated one.
> 
> For this I wrote a ComponentModelDelegator which takes a Component and 
> delegates all model operations to the current model of that component like 
> so:
>   IModel model = new ComponentModelDelegator(this)
>   new TextField("active", new I18nBooleanModelDecorator(model));
> 
> This works like a charm and you can write "nei" in my Icelandic locale to set 
> the value of the active property of my underlying model to false... before 
> you then change the code back to using the much more reasonable CheckBox 
> class.
> 
> Is there anything terribly wrong with this? Would this be useful for other 
> wicket users, probably in combination with the similar decorator for 
> enumerations?
> 
> PS The attached code is hereby published under the Apache license.
> 
> 
> 
> 
> package is.gig.wicket.models;
> 
> import org.apache.log4j.Logger;
> import wicket.Component;
> import wicket.model.IModel;
> 
> /** Model which delegates to the model of a given component. */
> public class ComponentModelDelegator/*T*/
> implements IModel/*T*/
> {
> private static final Logger LOG = 
> Logger.getLogger(ComponentModelDelegator.class);
> 
> private Component component;
> 
> /** Create a new delegator to the model of the givne component. */
> public ComponentModelDelegator(Component component) {
> this.component = component;
> }
> 
> public Component getComponent() {
> return component;
> }
> 
> public void setComponent(Component component) {
> this.component = component;
> }
> 
> public IModel /*T*/ getNestedModel() {
> return component.getModel();
> }
> 
> public Object getObject(final Component component) {
> IModel nested = getNestedModel();
> if (nested != null) {
> return nested.getObject(component);
> } else {
> return null;
> }
> }
> 
> public void setObject(final Component component, final Object object) {
> IModel nested = getNestedModel();
> if (nested != null) {
> nested.setObject(component, object);
> }
> }
> 
> public void detach() {
> IModel nested = getNestedModel();
> if (nested != null) nested.detach();
> }
> }
> 
> 
> 
> 
> package is.gig.wicket.models.i18n;
> 
> import wicket.Component;
> import wicket.model.IModel;
> 
> /**
>  * Decorator for a boolean model which converts to and fro

Re: [Wicket-user] ListChoice changes appearance from dropdown to listbox

2006-12-05 Thread TH Lim

I came to the same conclusion as Nino. What I have observed was this,

1. For,

ListChoice selection = new ListChoice("disciplineSelection", new Model(),
disciplines)

, a list box is created in the web page.

2. For, 

ListChoice selection = new ListChoice("disciplineSelection", disciplines)

, a dropdown box is created in the web page.

3. For, 

ListChoice selection = new ListChoice("disciplineSelection",
disciplines);selection.setMaxRow(8);

,  a list box is created in the web page.

I find it strange because I used ListChoice instead of DropDownChoice but
yet it shows a dropdown box instead of a list box for case no. 2. Is it a
bug or am I missing something? Btw, there are 2 items in my discipline list.
Thanks



Johan Compagner wrote:
> 
> A ListChoice should always be a List instead of a DropDown (for a drop
> down
> we have the DropDownChoice)
> 
> I don't know why you see a difference it shouldn't look at all to the
> model
> that holds the selection.
> It only looks at the choices:
> 
> tag.put("size", Math.min(maxRows, getChoices().size()));
> 
> so i guess if maxRows of size() == 1 then it becomes a dropdown?
> 
> johan
> 
> 
> On 5/9/06, Nino Wael <[EMAIL PROTECTED]> wrote:
>>
>>  Hi
>>
>>
>>
>> Im not sure if this is the intended functionality, but I belive I've
>> discovered an oddity or featureJ.
>>
>>
>>
>> When I use the constructor which also takes a model
>> (ListChoice("dropdown_job", new Model(),myList, new myRenderer)) my
>> listchoice is no longer displayed as a dropdown but as a listbox.
>>
>>
>>
>> If I instead of using the constructor with the model property call the
>> set
>> model method (listChoice_job.setModel(new Model())) then it remains
>> displayed as a dropdown
>>
>>
>>
>> Code snipplet:
>>
>> // this gives a listbox
>>
>> listChoice_job = new
>> ListChoice("dropdown_job",new Model(),jobcenter.toArray().getList(), new
>> DataItemRenderer())
>>
>>
>>
>> //this gives a dropdown
>>
>> listChoice_job = new
>> ListChoice("dropdown_job", jobcenter.toArray().getList(), new
>> DataItemRenderer())
>>
>> listChoice_job.setModel(new
>> Model());
>>
>> Code snipplet end
>>
>>
>>
>>
>>
>> It's that latter I want displayed.
>>
>>
>>
>>
>>
>> -regards Nino
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/ListChoice-changes-appearance-from-dropdown-to-listbox-tf1583106.html#a7714179
Sent from the Wicket - User mailing list archive at Nabble.com.


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Wicket Shared

2006-12-05 Thread Renan Camponez

I am trying to use the same page instance for different tabs in a Panel, so
I can make an ajax request in one to update the fields of the other
Is there any "wicket-way" to do this?

Regards,
Renan
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] leprosy professionalism

2006-12-05 Thread Crow Ottilia

I still think the size of the team needs to be as small as possible, even to 
the point of emaciation.
This RSS file is offered to individuals and non-commercial organizations only.
Or, if this isn't what Mark was getting at, then it does at least clarify my 
own thoughts on the matter. But I also didn't agree with him.
But the example does give a clear starting point.
Obviously using simple triangulation, etc. These are the bits that produces the 
magic slightly transparent background.
But I also didn't agree with him.
Mark's example focuses a lot on interface generalization but there's much more 
to REST, and the web, than this.
Prentice Hall Publishing sent me a copy of a book I did a technical review for 
some time ago. I can agree with Mark that REST does a great deal more to 
separate concerns compared to SOAP and WSDL but I'd say this goes far beyond 
fuzzy notions of generic interfaces. They said it had gone missing. It's a good 
read but it's also a bit confusing. Once such a precipitous cliff is identified 
it can be carefully avoided it and all is well again.
I have a hard time imaging any way to effectively manage a group of people that 
size working on a single project in any industry.
This article explains how to achieve this functionality.
I still think the size of the team needs to be as small as possible, even to 
the point of emaciation.
This assumption is also the source of the nausea. I understood just what Mark 
he was saying but the words didn't really compute.
This assumption is also the source of the nausea. Both will probably survive.
Thrid and the point of this post is can the old BBS days trick of Wardialing to 
find connections help in a war? Big Bang projects always seem to attract huge 
budgets and massive headcount, but there are few companies out there who could 
even field such a large workforce and invest so many billions. Both will 
probably survive.
This fixes things up.
This RSS file is offered to individuals and non-commercial organizations only.
This erroneous assumption leads to the broken example and his strange notion of 
generalization.
Which operations invalidate which resources; which PUTs are idempotent, etc. 
"They were moving slowly over the houses," she said.
This assumption is also the source of the nausea. But say this out loud and 
there's a definitely an uncanniness that hangs in the air. So, programming 
language is not a set of features, it is a set of restrictions".
This assumption is also the source of the nausea. But the example does give a 
clear starting point. He talks about how he is pleased with Sun's decision and 
how they're implementing it and how he thinks that Kaffe, GCJ, etc will 
continue to thrive. The important question is whether REST does separate 
concerns and, if so, precisely how it achieves such separation.
But the example does give a clear starting point. It's been explored by many 
people in many places at many times. But after the feeling of vertigo induced 
by Mark's essay it occured to me that perhaps there's still something here. 

audience.gif
Description: GIF image
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] i18n of booleans and enums

2006-12-05 Thread Logi Ragnarsson
Hello everyone,

I'm relatively new to wicket, but I'm building a web application where several 
forms are backed by compound models with boolean and enum constituent models. 
The straight-forward implementation of this would display true/false values, 
and the names of the enum values in the code, which is generally not very 
user friendly (peopel say "yes" and "no" and they don't generally put choices 
in all upper case) and not internationalized, so Something Must Be Done.

I'd like to show my solution, with input from Igor Vaynberg, for comment and 
perhaps re-use. I've only got the boolean case implemented, but the enum case 
is basically more of the same with more localization resources needing to be 
loaded.

The simplest case (and one not worth all this effort) is when displaying a 
boolean value in a ListView:
  new Label("active");
which becomes:
  new Label("active", new I18nBooleanModelDecorator(item.getModel()));
where the (attached) I18nBooleanModelDecorator has been applied to the model. 
This will display "yes" or "no" for the boolean values unless those strings 
have been replaced by setting the I18nBooleanModelDecorator.TRUE and 
I18nBooleanModelDecorator.FALSE licalization strings to something else.

Usually on a form you'd use a check-box for setting boolean values, such as 
this:
  new CheckBox("active");
but for illustrative purposes suppose we have this text field instead:
  new TextField("active");
The following will work if the component's compound model has been set before 
the form is populated with fields and will not be changed later:
  new TextField("active", new I18nBooleanModelDecorator(getModel()));
but in reality getModel() is likely to return null or to return a model which 
is later replaced with another in response to user or application events, so 
the text field would now either have no underlying model or an out-dated one.

For this I wrote a ComponentModelDelegator which takes a Component and 
delegates all model operations to the current model of that component like 
so:
  IModel model = new ComponentModelDelegator(this)
  new TextField("active", new I18nBooleanModelDecorator(model));

This works like a charm and you can write "nei" in my Icelandic locale to set 
the value of the active property of my underlying model to false... before 
you then change the code back to using the much more reasonable CheckBox 
class.

Is there anything terribly wrong with this? Would this be useful for other 
wicket users, probably in combination with the similar decorator for 
enumerations?

PS The attached code is hereby published under the Apache license.
-- 
Logi Ragnarsson
package is.gig.wicket.models;

import org.apache.log4j.Logger;
import wicket.Component;
import wicket.model.IModel;

/** Model which delegates to the model of a given component. */
public class ComponentModelDelegator/*T*/
implements IModel/*T*/
{
private static final Logger LOG = Logger.getLogger(ComponentModelDelegator.class);

private Component component;

/** Create a new delegator to the model of the givne component. */
public ComponentModelDelegator(Component component) {
this.component = component;
}

public Component getComponent() {
return component;
}

public void setComponent(Component component) {
this.component = component;
}

public IModel /*T*/ getNestedModel() {
return component.getModel();
}

public Object getObject(final Component component) {
IModel nested = getNestedModel();
if (nested != null) {
return nested.getObject(component);
} else {
return null;
}
}

public void setObject(final Component component, final Object object) {
IModel nested = getNestedModel();
if (nested != null) {
nested.setObject(component, object);
}
}

public void detach() {
IModel nested = getNestedModel();
if (nested != null) nested.detach();
}
}
package is.gig.wicket.models.i18n;

import wicket.Component;
import wicket.model.IModel;

/**
 * Decorator for a boolean model which converts to and from localized and human-friendly display values, falling back to
 * "yes" and "no".
 *
 * The display values are taken from the localization strings with keys I18nBooleanModelDecorator.TRUE
 * and I18nBooleanModelDecorator.FALSE respectively.
 */
public class I18nBooleanModelDecorator
implements IModel/*Boolean*/
{
private static final String I18N_KEY_PREFIX = "I18nBooleanModelDecorator";

private IModel /*Boolean*/  nestedModel;
private Boolean defaultValue = Boolean.FALSE;

// CONSTRUCTION AND CONFIGURATION

/**
 * Create a new i18n decorator.
 *
 * @param nestedModel  the model to decorate
 * @param defaultValue the value to set in the nested model if the display string being set is not recognized.
 */
public I18nBooleanModelDecorator(IModel /*Boolean*/ nestedModel, 

[Wicket-user] i18n and SimpleFormComponentLabel

2006-12-05 Thread Rüdiger Schulz
Hello everybody,

I just wanted to dive a little into wicket i18n, and stumbled upon this:

Say I have page with this simple form:

Form form = new Form("form");
add(form);

FeedbackPanel feedback = new FeedbackPanel("feedback");
form.add(feedback);

TextField tx = new TextField("text");
tx.setRequired(true);
form.add(tx);

and corresponding properties file for the page:

form.text=FormTexti18n

When I submit the empty form, I get the message:

field 'FormTexti18n' is required.

So, my label from the properties is used for the validation message. So
far, so good.

Now I'd like to have a label for the TextField, displaying the same
string from the properties. Also, a normal Label is not enough for me,
I'd like to change its CSS style depending on having an error.

So I start with this:

SimpleFormComponentLabel label =
new SimpleFormComponentLabel("textLabel", tx);
form.add(label);

Now I get an error:

java.lang.IllegalStateException: Provided form component does not have a
label set. Use FormComponent.setLabel(IModel) to set the model that will
feed this label
 at
wicket.markup.html.form.SimpleFormComponentLabel.(SimpleFormComponentLabel.java:46)

Okay, this error tells me what to do, and I could do a

tx.setLabel(new ResourceModel("form.textLabel"));

And everything works fine. But ... :-)

Is this really necessary? This ResourceModel is only required for the
SimpleFormComponentLabel, I already have label through the properties!

The JavaDoc FormComponent#getModel() says

"The value will be made available to the validator property by means of
${label}."

Which it does, but I'm wondering why SimpleFormComponentLabel can't do
this the same way as the validator? Or is this one of those issues which
will be gone with the changes in 2.0?

greetings,


Rüdiger



-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] updating page contents before and after long process

2006-12-05 Thread Eelco Hillenius
You could do the processing in a separate thread, and return the page
immediately with the progress component that polls (e.g. using Ajax,
though doesn't have to) for the progress. Or like Igor said, put your
progress bar on the page to begin with, make your form submit an ajax
submit, on the submit start that other thread and make the progress
component visible (and it will thus automatically start polling).

Eelco


On 12/5/06, Jaime De La Jara <[EMAIL PROTECTED]> wrote:
> Thanks, though I'm not sure if this is what I need, maybe I didn't explained
> my problem clearly. First, some code may help :
>
> The html :
> ..
> ..
> 
> 
>   
> var bar1=
> createBar(300,15,'white',1,'#215dc6','#428eff',85,17,3,"");
> 
>  
> .
>  . OK SubmitLink
>
> Java :
>
> ... Page constructor
>  
>  final WebMarkupContainer bar = new
> WebMarkupContainer("progressBar");
>  final Label msg = new Label("msg", "Processing Vendors Load");
>  bar.add(msg);
>  add(bar.setVisible(false));
> ...
> add(new SubmitLink("okLink")
> {
>   public void onSubmit()
>   {
> // Here I should make the progressBar visible and it should be
> displayed
>  bar.setVisible(true);  (*)
>  // This is the process that takes some time (~ 15 sec)
>  getVendorDao().loadVendors(); (*)
> // Here I should display a message informing the load results
> // Here I should make the bar invisible again.
>  bar.setVisible(false);
>   }
> }
> .
>
> The problem is, that the page is not reloaded until (*) is completed so the
> bar
> is not made visible before the loading process begins.
> Any hints are greatly appreciated,
>
> Jaime.
>
>
>
> Igor Vaynberg <[EMAIL PROTECTED]> wrote:
>  if you dont mind using ajax then search for ajax poller, that might be
> useful to you. initially make the components that take a long time to load
> their model invisible, then in ajax poller once they are loaded make them
> visible and add them to the ajax target so they will be painted.
>
> -igor
>
>
> On 12/5/06, Jaime De La Jara <[EMAIL PROTECTED]> wrote:
> > Hi, I'm looking for advice in the following situation : I have a page that
> lets the users to load the DB information from an external DB, this takes
> some time so I was thinking to display a progress bar while the process
> completes, this progress bar is initially invisible. The problem is : How
> can I make this bar visible, begin the loading process (in parallel) and
> then refresh the contents of the page with the results of the process?
> >
> > Thanks,
> >
> > Jaime.
> >
> > 
> Any questions? Get answers on any topic at Yahoo! Answers. Try it now.
> >
> >
> -
> > Take Surveys. Earn Cash. Influence the Future of IT
> > Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> > opinions on IT & business topics through brief surveys - and earn cash
> >
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> >
> > ___
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
> >
> >
>
> -
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>
>
>  
> Cheap Talk? Check out Yahoo! Messenger's low PC-to-Phone call rates.
>
>
> -
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>
>

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
http

Re: [Wicket-user] SortableDataProvider, size() & iterator(int first, int count), Correct execution order?

2006-12-05 Thread Igor Vaynberg

well in the example i gave you there should only be one query to the
database

-igor


On 12/5/06, Manuel Barzi <[EMAIL PROTECTED]> wrote:


Yes, I have already followed your sample, doing two queries to
database...  ;)

On 12/5/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> no its not possible there is logic that ties the return call of size()
to a
> few things that need to happen before the call to iterator()
>
> all it takes is your own subclass that i have shown you, i dont think
its a
> big deal.
>
> -igor
>
>
>
>
>
> On 12/5/06, Manuel Barzi <[EMAIL PROTECTED]> wrote:
> >
> > My question is, nevertheless, would it be a significant implementation
> > change to swap calls order from to current to iterator(...) first and
> > size() later? then adding support for both cases in a
> > SortableDataProvider (Case 1: Big databases - 2 Calls, Case 2: Small
> > databases - 1 Call)...
> >
> > >From my point of view, if supporting both cases, just by swapping
> > those method calls (if so easy is it...), then it would be great, no
> > worries to look for another impl... all-in-one...
> >
> > Just wondering... ;)
> >
> > Thank you for all your answers...
> >
> >
>
-
> > Take Surveys. Earn Cash. Influence the Future of IT
> > Join SourceForge.net 's Techsay panel and you'll get the chance to
share
> your
> > opinions on IT & business topics through brief surveys - and earn cash
> >
>
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > ___
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
>
>
>
-
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
your
> opinions on IT & business topics through brief surveys - and earn cash
>
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>
>

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] SortableDataProvider, size() & iterator(int first, int count), Correct execution order?

2006-12-05 Thread Manuel Barzi
Yes, I have already followed your sample, doing two queries to database...  ;)

On 12/5/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> no its not possible there is logic that ties the return call of size() to a
> few things that need to happen before the call to iterator()
>
> all it takes is your own subclass that i have shown you, i dont think its a
> big deal.
>
> -igor
>
>
>
>
>
> On 12/5/06, Manuel Barzi <[EMAIL PROTECTED]> wrote:
> >
> > My question is, nevertheless, would it be a significant implementation
> > change to swap calls order from to current to iterator(...) first and
> > size() later? then adding support for both cases in a
> > SortableDataProvider (Case 1: Big databases - 2 Calls, Case 2: Small
> > databases - 1 Call)...
> >
> > >From my point of view, if supporting both cases, just by swapping
> > those method calls (if so easy is it...), then it would be great, no
> > worries to look for another impl... all-in-one...
> >
> > Just wondering... ;)
> >
> > Thank you for all your answers...
> >
> >
> -
> > Take Surveys. Earn Cash. Influence the Future of IT
> > Join SourceForge.net 's Techsay panel and you'll get the chance to share
> your
> > opinions on IT & business topics through brief surveys - and earn cash
> >
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > ___
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
>
>
> -
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>
>

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] SortableDataProvider, size() & iterator(int first, int count), Correct execution order?

2006-12-05 Thread Igor Vaynberg

no its not possible there is logic that ties the return call of size() to a
few things that need to happen before the call to iterator()

all it takes is your own subclass that i have shown you, i dont think its a
big deal.

-igor




On 12/5/06, Manuel Barzi <[EMAIL PROTECTED]> wrote:


My question is, nevertheless, would it be a significant implementation
change to swap calls order from to current to iterator(...) first and
size() later? then adding support for both cases in a
SortableDataProvider (Case 1: Big databases - 2 Calls, Case 2: Small
databases - 1 Call)...

>From my point of view, if supporting both cases, just by swapping
those method calls (if so easy is it...), then it would be great, no
worries to look for another impl... all-in-one...

Just wondering... ;)

Thank you for all your answers...

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] updating page contents before and after long process

2006-12-05 Thread Jaime De La Jara
Thanks, though I'm not sure if this is what I need, maybe I didn't explained my 
problem clearly. First, some code may help :

The html :
..
..


  
var bar1= 
createBar(300,15,'white',1,'#215dc6','#428eff',85,17,3,"");

 
.
 . OK SubmitLink

Java :

... Page constructor
 
 final WebMarkupContainer bar = new WebMarkupContainer("progressBar");
 final Label msg = new Label("msg", "Processing Vendors Load");
 bar.add(msg);
 add(bar.setVisible(false));
...
add(new SubmitLink("okLink")
{
  public void onSubmit()
  {
// Here I should make the progressBar visible and it should be displayed
 bar.setVisible(true);  (*)
 // This is the process that takes some time (~ 15 sec)
 getVendorDao().loadVendors(); (*)
// Here I should display a message informing the load results
// Here I should make the bar invisible again.
 bar.setVisible(false);
  }
}
.

The problem is, that the page is not reloaded until (*) is completed so the bar
is not made visible before the loading process begins. 
Any hints are greatly appreciated, 

Jaime.


Igor Vaynberg <[EMAIL PROTECTED]> wrote: if you dont mind using ajax then 
search for ajax poller, that might be useful to you. initially make the 
components that take a long time to load their model invisible, then in ajax 
poller once they are loaded make them visible and add them to the ajax target 
so they will be painted. 

-igor


On 12/5/06, Jaime De La Jara <[EMAIL PROTECTED]> wrote: Hi, I'm looking for 
advice in the following situation : I have a page that lets the users to load 
the DB information from an external DB, this takes some time so I was thinking 
to display a progress bar while the process completes, this progress bar is 
initially invisible. The problem is : How can I make this bar visible, begin 
the loading process (in parallel) and then refresh the contents of the page 
with the results of the process? 

Thanks,

Jaime.
   

-
Any questions?  Get answers on any topic at  Yahoo! Answers. Try it now. 

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your 
opinions on IT & business topics through brief surveys - and earn cash
 http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

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




 -
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


 
-
Cheap Talk? Check out Yahoo! Messenger's low PC-to-Phone call rates.-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] SortableDataProvider, size() & iterator(int first, int count), Correct execution order?

2006-12-05 Thread Manuel Barzi
My question is, nevertheless, would it be a significant implementation
change to swap calls order from to current to iterator(...) first and
size() later? then adding support for both cases in a
SortableDataProvider (Case 1: Big databases - 2 Calls, Case 2: Small
databases - 1 Call)...

>From my point of view, if supporting both cases, just by swapping
those method calls (if so easy is it...), then it would be great, no
worries to look for another impl... all-in-one...

Just wondering... ;)

Thank you for all your answers...

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Show a disabled ImageButton

2006-12-05 Thread NickCanada

I have an ImageButton used to submit a form. I extended the
RenderedDynamicImageResource class so that I have a transparent background
but now I want to show the button in a disabled state. 
It seems when the FormComponent class launches onDisabled(ComponentTag tag)
my ImageButton is not drawn at all.

Is there a way of rendering an alternative dynamic image resource that would
allow me to render a disabled button look? (The Button class does this by
default)


Any help appreciated.
Thanks 

Nick 

-- 
View this message in context: 
http://www.nabble.com/Show-a-disabled-ImageButton-tf2762825.html#a7703129
Sent from the Wicket - User mailing list archive at Nabble.com.


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] updating page contents before and after long process

2006-12-05 Thread Igor Vaynberg

if you dont mind using ajax then search for ajax poller, that might be
useful to you. initially make the components that take a long time to load
their model invisible, then in ajax poller once they are loaded make them
visible and add them to the ajax target so they will be painted.

-igor


On 12/5/06, Jaime De La Jara <[EMAIL PROTECTED]> wrote:


Hi, I'm looking for advice in the following situation : I have a page that
lets the users to load the DB information from an external DB, this takes
some time so I was thinking to display a progress bar while the process
completes, this progress bar is initially invisible. The problem is : How
can I make this bar visible, begin the loading process (in parallel) and
then refresh the contents of the page with the results of the process?

Thanks,

Jaime.

--
Any questions? Get answers on any topic at Yahoo! 
Answers.
Try it now.


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

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



-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Sortable Headers - Default sort

2006-12-05 Thread Igor Vaynberg

SortableListViewHeaderGroup has a protected setSortedColumn so if you
subclass it and create a public method that calls this one you should be
good to go

something to keep in mind is that that particular example was created before
the repeaters package, so i think it is pretty much deprecated. see
repeaters/datatable example for something that works nicer.

-igor


On 12/5/06, Robert Thullner <[EMAIL PROTECTED]> wrote:


Hi

I am using the classes SortableListViewHeader, SortableListViewHeaders and
SortableListViewHeaderGroup for doing my sorting in my webapplication.

But the sorting only works, when I click on the header of my table.
Is there a way to set the sorting without clicking on the header of my
table?

The background is, that I want to remember what column was sorted last and
when the user goes back to the overview page, the sorting should be the same
as when he left the page.

Thanks for any help
Robert
--
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] updating page contents before and after long process

2006-12-05 Thread Jaime De La Jara
Hi, I'm looking for advice in the following situation : I have a page that lets 
the users to load the DB information from an external DB, this takes some time 
so I was thinking to display a progress bar while the process completes, this 
progress bar is initially invisible. The problem is : How can I make this bar 
visible, begin the loading process (in parallel) and then refresh the contents 
of the page with the results of the process?

Thanks,

Jaime.

 
-
Any questions?  Get answers on any topic at Yahoo! Answers. Try it now.-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Terracotta open source and tested with wicket-examples

2006-12-05 Thread Johan Compagner

But this just seems a bug.
Can you add an issue to jira for this?

johan


On 12/5/06, Ingram Chen <[EMAIL PROTECTED]> wrote:


Thanks for the tips, I turn on "Honor transient" and finally my webapp
startup successfully.

after playing some pages and I  switch  from  one  server to another
server. I encounter another exception caused by transient:

WicketMessage: unable to get object, model: Model:classname=[
wicket.feedback.FeedbackMessagesModel]:attached=true, called with
component [MarkupContainer [Component id = messages, page =
ngc.wicket.pages.MainPage , path = 7:globalFeedback:feedbackul:
messages.FeedbackPanel$MessageListView, isVisible = true, isVersioned =
false]]

Root cause:

java.lang.NullPointerException
at wicket.util.concurrent.CopyOnWriteArrayList.size (
CopyOnWriteArrayList.java:152)
at wicket.feedback.FeedbackMessages.messages(FeedbackMessages.java:258)
at wicket.feedback.FeedbackMessagesModel.onGetObject(
FeedbackMessagesModel.java:101)
at wicket.model.AbstractDetachableModel.getObject (
AbstractDetachableModel.java:104)
at wicket.Component.getModelObject(Component.java:990)
at wicket.markup.html.panel.FeedbackPanel.updateFeedback(
FeedbackPanel.java:234)
at wicket.Page$2.component (Page.java:372)
at wicket.MarkupContainer.visitChildren(MarkupContainer.java:744)
at wicket.Page.renderPage(Page.java:368)

.

by default feedbackMessages utilize
wicket.util.concurrent.CopyOnWriteArrayList . But it internally use an
 transient Object[] array_ without checking null and lazy initialization.

anyway, I may try simpler wicket  application for evaluating terracotta...
It's hard to figure out what's going on for deep objects graph.


On 12/5/06, Johan Compagner <[EMAIL PROTECTED] > wrote:
>
> is the option that transient fields must be left alone (not serialized)
> on by default?
>
> johan
>
>
> On 12/5/06, Ingram Chen < [EMAIL PROTECTED]> wrote:
> >
> > hhmm as Wicket always check serializable, I think my app's session
> > does not refererence to non-serializable WebApplication. but  the stack
> > trace shows:
> >
> >   
com.tc.object.ClientObjectManagerImpl.lookupOrCreate(ClientObjectManagerImpl.java
> > :306)
> >   
com.tc.object.tx.ClientTransactionManagerImpl.fieldChanged(ClientTransactionManagerImpl.java:507)
> >   com.tc.object.TCObjectImpl.objectFieldChanged
> >
> >
> > (TCObjectImpl.java:272)
> >   wicket.Session.__tc_setsessionStore(
> > Session.java)
> >   wicket.Session.getSessionStore(Session.java:900)
> >   wicket.Session.getAttributeNames(Session.java:881)
> >   wicket.Session.visitPageMaps
> >
> >
> > (Session.java:753)
> >   wicket.Session.init(Session.java:581)
> >   wicket.RequestCycle.prepare
> > (RequestCycle.java:911)
> >   wicket.RequestCycle.step(RequestCycle.java:986)
> >   wicket.RequestCycle.steps(RequestCycle.java
> >
> > :1084)
> >
> >   wicket.RequestCycle.request(RequestCycle.java:454)
> >   wicket.protocol.http.WicketServlet.doGet
> > (WicketServlet.java:219)
> >   javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
> >
> > I use Wicket 1.2.3 so Session.java:900 is
> >
> > public class Session {
> >
> > protected ISessionStore getSessionStore()
> > {
> > if (sessionStore == null)
> > {
> > sessionStore = getApplication().getSessionStore();  //
> > line no 900
> > }
> > return sessionStore;
> > }
> > }
> >
> > it looks like terracotta intercept assignment "sessionStore = " and
> > add a setter
> >
> > wicket.Session.__tc_setsessionStore(Session.java)
> >
> > but sessionStore referenced by Application
> >
> >
> > On 12/5/06, Eelco Hillenius < [EMAIL PROTECTED] > wrote:
> > >
> > > Why would you put a reference to the application in your session
> > > anyway? You can get the current app like Application.get().
> > > Otherwise,
> > > you can make the field transient, though when it gets deserialized,
> > > you'd have to set the field yourself somehow.
> > >
> > > Eelco
> > >
> > >
> > > On 12/4/06, Ingram Chen < [EMAIL PROTECTED]> wrote:
> > > > I just test terracotta-session, but it report error:
> > > >
> > > >
> > > > com.tc.exception.TCNonPortableObjectError:
> > > >
> > > 
***
> > >
> > > > Attempt to share an instance of a non-portable class referenced by
> > > a
> > > > portable class. This
> > > > unshareable class is a subclass of a JVM- or host machine-specific
> > > resource.
> > > > Please either
> > > > modify the class hierarchy or ensure that instances of this class
> > > don't
> > > > enter the shared object
> > > > graph.
> > > >
> > > > Referring class : com.myapp.MyWebApplication
> > > > Referring field :
> > > > wicket.protocol.http.WebApplication.wicketServlet
> > > > Thread  : http-9081-Processor3
> > > > JVM ID  : VM(0)
> > > > Unshareable superclass names: javax.servlet.Generic

[Wicket-user] Wicket Stuff SVN repository change

2006-12-05 Thread Martijn Dashorst
Sourceforge has changed the connection policy. If you work on a Wicket
Stuff project, please follow these instructions:

= taken from [1] =
Users new to the SourceForge.net Subversion Service should skip this
section, it only covers changes that affect users who have been using
Subversion prior to the switchover date

On November 31, 2006 the access method for Subversion changed. This
document reflects those changes. The old method had numerous problems,
including spurious 50x error messages and other issues that kept it
from functioning fully. This newly documented access method solves
many, if not all of the issues with the old mechanism.

Users of the old method
(https://svn.sourceforge.net/svnroot/PROJECTNAME) should switch to the
new access method
(https://PROJECTNAME.svn.sourceforge.net/svnroot/PROJECTNAME) using
these steps:

Make a copy of your local working copy.
Run 'svn info' at the root of the repository content, it should
display a line that appears similar to: URL:
https://svn.sourceforge.net/svnroot/PROJECTNAME/trunk
Run the following command at the root of the working copy: svn switch
--relocate https://svn.sourceforge.net/svnroot/PROJECTNAME/trunk
https://PROJECTNAME.svn.sourceforge.net/svnroot/PROJECTNAME/trunk
===

[1] https://sourceforge.net/docs/E09#notice

-- 
http://www.thebeststuffintheworld.com/vote_for/wicket";>Vote
for http://www.thebeststuffintheworld.com/stuff/wicket";>Wicket
at the http://www.thebeststuffintheworld.com/";>Best Stuff in
the World!

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Can I prevent wicket specific URL parameters

2006-12-05 Thread Carfield Yim
Have tried but look like it work at some servers but at some server it
just forward back to homepage for all links. How can I have more
verbose logging information so that I can know what going wrong?

On 12/1/06, Dirk Markert <[EMAIL PROTECTED]> wrote:
> http://cwiki.apache.org/WICKET/obfuscating-urls.html
>
> Dirk
>
> 2006/12/1, Carfield Yim < [EMAIL PROTECTED]>:
> > Is there way to not having parameters like "?wicket:interface=:4::" at the
> URL?
> >
> >
> -
> > Take Surveys. Earn Cash. Influence the Future of IT
> > Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> > opinions on IT & business topics through brief surveys - and earn cash
> >
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > ___
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
>
>
> -
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>
>

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Terracotta open source and tested with wicket-examples

2006-12-05 Thread Ingram Chen

Thanks for the tips, I turn on "Honor transient" and finally my webapp
startup successfully.

after playing some pages and I  switch  from  one  server to another server.
I encounter another exception caused by transient:

WicketMessage: unable to get object, model: Model:classname=[
wicket.feedback.FeedbackMessagesModel]:attached=true, called with component
[MarkupContainer [Component id = messages, page =
ngc.wicket.pages.MainPage, path = 7:globalFeedback:feedbackul:
messages.FeedbackPanel$MessageListView, isVisible = true, isVersioned =
false]]

Root cause:

java.lang.NullPointerException
at wicket.util.concurrent.CopyOnWriteArrayList.size (
CopyOnWriteArrayList.java:152)
at wicket.feedback.FeedbackMessages.messages(FeedbackMessages.java:258)
at wicket.feedback.FeedbackMessagesModel.onGetObject(
FeedbackMessagesModel.java:101)
at wicket.model.AbstractDetachableModel.getObject (
AbstractDetachableModel.java:104)
at wicket.Component.getModelObject(Component.java:990)
at wicket.markup.html.panel.FeedbackPanel.updateFeedback(FeedbackPanel.java
:234)
at wicket.Page$2.component (Page.java:372)
at wicket.MarkupContainer.visitChildren(MarkupContainer.java:744)
at wicket.Page.renderPage(Page.java:368)

.

by default feedbackMessages utilize
wicket.util.concurrent.CopyOnWriteArrayList . But it internally use an
transient Object[] array_ without checking null and lazy initialization.

anyway, I may try simpler wicket  application for evaluating terracotta...
It's hard to figure out what's going on for deep objects graph.


On 12/5/06, Johan Compagner <[EMAIL PROTECTED]> wrote:


is the option that transient fields must be left alone (not serialized) on
by default?

johan


On 12/5/06, Ingram Chen < [EMAIL PROTECTED]> wrote:
>
> hhmm as Wicket always check serializable, I think my app's session
> does not refererence to non-serializable WebApplication. but  the stack
> trace shows:
>
>
com.tc.object.ClientObjectManagerImpl.lookupOrCreate(ClientObjectManagerImpl.java
> :306)
>
com.tc.object.tx.ClientTransactionManagerImpl.fieldChanged(ClientTransactionManagerImpl.java:507)
>com.tc.object.TCObjectImpl.objectFieldChanged
>
> (TCObjectImpl.java:272)
>wicket.Session.__tc_setsessionStore(
> Session.java)
>wicket.Session.getSessionStore(Session.java:900)
>wicket.Session.getAttributeNames(Session.java:881)
>wicket.Session.visitPageMaps
>
> (Session.java:753)
>wicket.Session.init(Session.java:581)
>wicket.RequestCycle.prepare
> (RequestCycle.java:911)
>wicket.RequestCycle.step(RequestCycle.java:986)
>wicket.RequestCycle.steps(RequestCycle.java
> :1084)
>
>wicket.RequestCycle.request(RequestCycle.java:454)
>wicket.protocol.http.WicketServlet.doGet
> (WicketServlet.java:219)
>javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
>
> I use Wicket 1.2.3 so Session.java:900 is
>
> public class Session {
>
> protected ISessionStore getSessionStore()
> {
> if (sessionStore == null)
> {
> sessionStore = getApplication().getSessionStore();  // line
> no 900
> }
> return sessionStore;
> }
> }
>
> it looks like terracotta intercept assignment "sessionStore = " and add
> a setter
>
> wicket.Session.__tc_setsessionStore(Session.java)
>
> but sessionStore referenced by Application
>
>
> On 12/5/06, Eelco Hillenius < [EMAIL PROTECTED] > wrote:
> >
> > Why would you put a reference to the application in your session
> > anyway? You can get the current app like Application.get(). Otherwise,
> > you can make the field transient, though when it gets deserialized,
> > you'd have to set the field yourself somehow.
> >
> > Eelco
> >
> >
> > On 12/4/06, Ingram Chen < [EMAIL PROTECTED]> wrote:
> > > I just test terracotta-session, but it report error:
> > >
> > >
> > > com.tc.exception.TCNonPortableObjectError:
> > >
> > 
***
> >
> > > Attempt to share an instance of a non-portable class referenced by a
> > > portable class. This
> > > unshareable class is a subclass of a JVM- or host machine-specific
> > resource.
> > > Please either
> > > modify the class hierarchy or ensure that instances of this class
> > don't
> > > enter the shared object
> > > graph.
> > >
> > > Referring class : com.myapp.MyWebApplication
> > > Referring field :
> > > wicket.protocol.http.WebApplication.wicketServlet
> > > Thread  : http-9081-Processor3
> > > JVM ID  : VM(0)
> > > Unshareable superclass names: javax.servlet.GenericServlet
> > >
> > 
***
> > >
> > > It seems that I can't store any WebApplication reference in
> > session...
> > >
> > >
> > >
> > > On 12/5/06, [EMAIL PROTECTED] < [EMAIL PROTECTED] >
> > wrote:
> > > > Hi,
> > > >
> > > > I also have just tested terracotta with my springframework /
> > wicket
> > > app

[Wicket-user] Sortable Headers - Default sort

2006-12-05 Thread Robert Thullner
Hi

I am using the classes SortableListViewHeader, SortableListViewHeaders and 
SortableListViewHeaderGroup for doing my sorting in my webapplication.

But the sorting only works, when I click on the header of my table.
Is there a way to set the sorting without clicking on the header of my table?

The background is, that I want to remember what column was sorted last and when 
the user goes back to the overview page, the sorting should be the same as when 
he left the page.

Thanks for any help
Robert
-- 
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Lazy mans fix for a cancel button

2006-12-05 Thread Nino Wael
Hey



Sometime ago we discussed that I needed a cancel button. The need was there 
because of a certain page had long loading times, not because of wicket though. 
We talked about a worker thread so I could start the report generation and then 
the wicket page could come and ask the worker thread once in a while if it were 
done, if the user in the mean time had pressed cancel we could just cancel the 
worker thread. While pretty easy to describe in theory it does require some 
effort to create and theres a lot of stuff to take in consideration(could we 
really stop the report generation and if we forced a stop what would our 
backend server say? ++ more).



As by default im pretty lazy. So I'll call this the lazy mans fix for a cancel 
button.



So since wicket has a singular model for page requests processing per session 
this requires that we go out side of wicket, to a pretty simple jsp page that 
invalidates the session and then returns the user to what ever page the user 
came from (or as close as it can be if it's a wizard, with some effort you 
could get the user back to the correct page).



So to recap:



1.  Wicket Page that has cancel button forwards to an JSP page
2.  JSP page invalidates session and forwards back to wicket page
3.  Wicket interprets the user as being a new user(since the other users 
session are invalidated) and processes request as normal.



Do note that the original page(the page that the user pressed cancel on) will 
still have to be processed, since the page thread aren't cancelled.





Regards Nino

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Terracotta open source and tested with wicket-examples

2006-12-05 Thread Johan Compagner

is the option that transient fields must be left alone (not serialized) on
by default?

johan


On 12/5/06, Ingram Chen <[EMAIL PROTECTED]> wrote:


hhmm as Wicket always check serializable, I think my app's session
does not refererence to non-serializable WebApplication. but  the stack
trace shows:


com.tc.object.ClientObjectManagerImpl.lookupOrCreate(ClientObjectManagerImpl.java
:306)

com.tc.object.tx.ClientTransactionManagerImpl.fieldChanged(ClientTransactionManagerImpl.java:507)
com.tc.object.TCObjectImpl.objectFieldChanged(TCObjectImpl.java:272)
wicket.Session.__tc_setsessionStore(
Session.java)
wicket.Session.getSessionStore(Session.java:900)
wicket.Session.getAttributeNames(Session.java:881)
wicket.Session.visitPageMaps(Session.java:753)
wicket.Session.init(Session.java:581)
wicket.RequestCycle.prepare
(RequestCycle.java:911)
wicket.RequestCycle.step(RequestCycle.java:986)
wicket.RequestCycle.steps(RequestCycle.java:1084)
wicket.RequestCycle.request(RequestCycle.java:454)
wicket.protocol.http.WicketServlet.doGet
(WicketServlet.java:219)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)

I use Wicket 1.2.3 so Session.java:900 is

public class Session {

protected ISessionStore getSessionStore()
{
if (sessionStore == null)
{
sessionStore = getApplication().getSessionStore();  // line no
900
}
return sessionStore;
}
}

it looks like terracotta intercept assignment "sessionStore = " and add a
setter

wicket.Session.__tc_setsessionStore(Session.java)

but sessionStore referenced by Application


On 12/5/06, Eelco Hillenius <[EMAIL PROTECTED] > wrote:
>
> Why would you put a reference to the application in your session
> anyway? You can get the current app like Application.get(). Otherwise,
> you can make the field transient, though when it gets deserialized,
> you'd have to set the field yourself somehow.
>
> Eelco
>
>
> On 12/4/06, Ingram Chen < [EMAIL PROTECTED]> wrote:
> > I just test terracotta-session, but it report error:
> >
> >
> > com.tc.exception.TCNonPortableObjectError:
> >
> 
***
>
> > Attempt to share an instance of a non-portable class referenced by a
> > portable class. This
> > unshareable class is a subclass of a JVM- or host machine-specific
> resource.
> > Please either
> > modify the class hierarchy or ensure that instances of this class
> don't
> > enter the shared object
> > graph.
> >
> > Referring class : com.myapp.MyWebApplication
> > Referring field :
> > wicket.protocol.http.WebApplication.wicketServlet
> > Thread  : http-9081-Processor3
> > JVM ID  : VM(0)
> > Unshareable superclass names: javax.servlet.GenericServlet
> >
> 
***
> >
> > It seems that I can't store any WebApplication reference in session...
>
> >
> >
> >
> > On 12/5/06, [EMAIL PROTECTED] <[EMAIL PROTECTED] > wrote:
> > > Hi,
> > >
> > > I also have just tested terracotta with my springframework / wicket
> > application.
> > > It works perfect. I think, that teracotta meets wicket needs for
> parallel
> > and
> > > loadbalanced execution envoronement the way we are looking for.
> > >
> > > Maciej
> > >
> > > > -Ursprüngliche Nachricht-
> > > > Von: wicket-user@lists.sourceforge.net
> > > > Gesendet: 04.12.06 20:50:41
> > > > An: "Wicket User List" <
> > wicket-user@lists.sourceforge.net>
> > > > Betreff: [Wicket-user] Terracotta open source and tested with
> > wicket-examples
> > >
> > >
> > > > Hi all,
> > > >
> > > > Sorry to spam you with this, but you might be interested in this
> > > > announcement
> > http://www.infoq.com/news/2006/12/terracotta-jvm-clustering.
> > > > We successfully tested wicket-examples (with the help of some
> people
> > > > from Terracotta), and it looks like Terracotta is very promising
> > > > indeed - certainly now that it is open sourced!
> > > >
> > > > Anyway, just FYI, and I'd be interested to learn the experiences
> of
> > others.
> > > >
> > > > Eelco
> > > >
> > > >
> >
> -
> > > > Take Surveys. Earn Cash. Influence the Future of IT
> > > > Join SourceForge.net 's Techsay panel and you'll get the chance to
> share
> > your
> > > > opinions on IT & business topics through brief surveys - and earn
> cash
> > > >
> >
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > > > ___
> > > > Wicket-user mailing list
> > > > Wicket-user@lists.sourceforge.net
> > > >
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> > > >
> > >
> > > --
> > > mfG
> > >
> > > Bednarz, Hannover
> > >
> > >
> >
> 

Re: [Wicket-user] Terracotta open source and tested with wicket-examples

2006-12-05 Thread Ingram Chen

hhmm as Wicket always check serializable, I think my app's session does
not refererence to non-serializable WebApplication. but  the stack trace
shows:


com.tc.object.ClientObjectManagerImpl.lookupOrCreate(ClientObjectManagerImpl.java:306)

com.tc.object.tx.ClientTransactionManagerImpl.fieldChanged(ClientTransactionManagerImpl.java:507)
com.tc.object.TCObjectImpl.objectFieldChanged(TCObjectImpl.java:272)
wicket.Session.__tc_setsessionStore(Session.java)
wicket.Session.getSessionStore(Session.java:900)
wicket.Session.getAttributeNames(Session.java:881)
wicket.Session.visitPageMaps(Session.java:753)
wicket.Session.init(Session.java:581)
wicket.RequestCycle.prepare(RequestCycle.java:911)
wicket.RequestCycle.step(RequestCycle.java:986)
wicket.RequestCycle.steps(RequestCycle.java:1084)
wicket.RequestCycle.request(RequestCycle.java:454)
wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:219)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)

I use Wicket 1.2.3 so Session.java:900 is

public class Session {

   protected ISessionStore getSessionStore()
   {
   if (sessionStore == null)
   {
   sessionStore = getApplication().getSessionStore();  // line no
900
   }
   return sessionStore;
   }
}

it looks like terracotta intercept assignment "sessionStore = " and add a
setter

wicket.Session.__tc_setsessionStore(Session.java)

but sessionStore referenced by Application


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


Why would you put a reference to the application in your session
anyway? You can get the current app like Application.get(). Otherwise,
you can make the field transient, though when it gets deserialized,
you'd have to set the field yourself somehow.

Eelco


On 12/4/06, Ingram Chen <[EMAIL PROTECTED]> wrote:
> I just test terracotta-session, but it report error:
>
>
> com.tc.exception.TCNonPortableObjectError:
>
***
> Attempt to share an instance of a non-portable class referenced by a
> portable class. This
> unshareable class is a subclass of a JVM- or host machine-specific
resource.
> Please either
> modify the class hierarchy or ensure that instances of this class don't
> enter the shared object
> graph.
>
> Referring class : com.myapp.MyWebApplication
> Referring field :
> wicket.protocol.http.WebApplication.wicketServlet
> Thread  : http-9081-Processor3
> JVM ID  : VM(0)
> Unshareable superclass names: javax.servlet.GenericServlet
>
***
>
> It seems that I can't store any WebApplication reference in session...
>
>
>
> On 12/5/06, [EMAIL PROTECTED] <[EMAIL PROTECTED] > wrote:
> > Hi,
> >
> > I also have just tested terracotta with my springframework / wicket
> application.
> > It works perfect. I think, that teracotta meets wicket needs for
parallel
> and
> > loadbalanced execution envoronement the way we are looking for.
> >
> > Maciej
> >
> > > -Ursprüngliche Nachricht-
> > > Von: wicket-user@lists.sourceforge.net
> > > Gesendet: 04.12.06 20:50:41
> > > An: "Wicket User List" <
> wicket-user@lists.sourceforge.net>
> > > Betreff: [Wicket-user] Terracotta open source and tested with
> wicket-examples
> >
> >
> > > Hi all,
> > >
> > > Sorry to spam you with this, but you might be interested in this
> > > announcement
> http://www.infoq.com/news/2006/12/terracotta-jvm-clustering.
> > > We successfully tested wicket-examples (with the help of some people
> > > from Terracotta), and it looks like Terracotta is very promising
> > > indeed - certainly now that it is open sourced!
> > >
> > > Anyway, just FYI, and I'd be interested to learn the experiences of
> others.
> > >
> > > Eelco
> > >
> > >
>
-
> > > Take Surveys. Earn Cash. Influence the Future of IT
> > > Join SourceForge.net's Techsay panel and you'll get the chance to
share
> your
> > > opinions on IT & business topics through brief surveys - and earn
cash
> > >
>
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > > ___
> > > Wicket-user mailing list
> > > Wicket-user@lists.sourceforge.net
> > >
> https://lists.sourceforge.net/lists/listinfo/wicket-user
> > >
> >
> > --
> > mfG
> >
> > Bednarz, Hannover
> >
> >
>
-
> > Take Surveys. Earn Cash. Influence the Future of IT
> > Join SourceForge.net's Techsay panel and you'll get the chance to
share
> your
> > opinions on IT & business topics through brief surveys - and earn cash
> >
>
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > ___

Re: [Wicket-user] Terracotta open source and tested with wicket-examples

2006-12-05 Thread Eelco Hillenius
Why would you put a reference to the application in your session
anyway? You can get the current app like Application.get(). Otherwise,
you can make the field transient, though when it gets deserialized,
you'd have to set the field yourself somehow.

Eelco


On 12/4/06, Ingram Chen <[EMAIL PROTECTED]> wrote:
> I just test terracotta-session, but it report error:
>
>
> com.tc.exception.TCNonPortableObjectError:
> ***
> Attempt to share an instance of a non-portable class referenced by a
> portable class. This
> unshareable class is a subclass of a JVM- or host machine-specific resource.
> Please either
> modify the class hierarchy or ensure that instances of this class don't
> enter the shared object
> graph.
>
> Referring class : com.myapp.MyWebApplication
> Referring field :
> wicket.protocol.http.WebApplication.wicketServlet
> Thread  : http-9081-Processor3
> JVM ID  : VM(0)
> Unshareable superclass names: javax.servlet.GenericServlet
> ***
>
> It seems that I can't store any WebApplication reference in session...
>
>
>
> On 12/5/06, [EMAIL PROTECTED] <[EMAIL PROTECTED] > wrote:
> > Hi,
> >
> > I also have just tested terracotta with my springframework / wicket
> application.
> > It works perfect. I think, that teracotta meets wicket needs for parallel
> and
> > loadbalanced execution envoronement the way we are looking for.
> >
> > Maciej
> >
> > > -Ursprüngliche Nachricht-
> > > Von: wicket-user@lists.sourceforge.net
> > > Gesendet: 04.12.06 20:50:41
> > > An: "Wicket User List" <
> wicket-user@lists.sourceforge.net>
> > > Betreff: [Wicket-user] Terracotta open source and tested with
> wicket-examples
> >
> >
> > > Hi all,
> > >
> > > Sorry to spam you with this, but you might be interested in this
> > > announcement
> http://www.infoq.com/news/2006/12/terracotta-jvm-clustering.
> > > We successfully tested wicket-examples (with the help of some people
> > > from Terracotta), and it looks like Terracotta is very promising
> > > indeed - certainly now that it is open sourced!
> > >
> > > Anyway, just FYI, and I'd be interested to learn the experiences of
> others.
> > >
> > > Eelco
> > >
> > >
> -
> > > Take Surveys. Earn Cash. Influence the Future of IT
> > > Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> > > opinions on IT & business topics through brief surveys - and earn cash
> > >
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > > ___
> > > Wicket-user mailing list
> > > Wicket-user@lists.sourceforge.net
> > >
> https://lists.sourceforge.net/lists/listinfo/wicket-user
> > >
> >
> > --
> > mfG
> >
> > Bednarz, Hannover
> >
> >
> -
> > Take Surveys. Earn Cash. Influence the Future of IT
> > Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> > opinions on IT & business topics through brief surveys - and earn cash
> >
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > ___
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
>
>
>
> --
> Ingram Chen
> Java [EMAIL PROTECTED]
> Institue of BioMedical Sciences Academia Sinica Taiwan
> blog: http://www.javaworld.com.tw/roller/page/ingramchen
> -
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>
>

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user