Re: Generated drop down list of countries in Wicket - any better way?

2013-11-18 Thread Martin Grigorov
Hi,

I think you can use IModel for the dropdown. This will be the
country code.
The transformation from id to name and back (if needed) can be moved to a
custom IChoiceRenderer. There you have access to the current locale for
each rendering.
CountryChoiceRenderer can delegate the actual work to
CountryDatabase/CountryProvider/...


On Tue, Nov 19, 2013 at 12:51 AM, Marcin Zajączkowski  wrote:

> Hi,
>
> Working on Wicket frontend for AppFuse I had to implement a drop down
> choice of countries. I did it, but don't like the solution and I wonder
> if it could be done easier/prettier?
>
> Issues:
> 1. In domain model there is a country represented as a String field (a
> country code) in an address class. In my Wicket component I wanted to
> use a Country class with a code and name. It forced me to create
> CountryDropDownChoice component which embed String model into Country
> model(with EmbeddedCountryModel):
>
> public class CountryDropDownChoice extends DropDownChoice {
> public CountryDropDownChoice(String id, PropertyModel
> country, Locale locale) {
> super(id, new EmbeddedCountryModel(country, locale), new
> CountriesModel(locale), new ChoiceRenderer<>("name", "locale"));
> }
> }
>
> with a call in my panel/fragment:
> add(new CountryDropDownChoice("country", new
> PropertyModel(getDefaultModel(), "country"), getLocale()));
>
> 2. I would like to have country names depending on current user locales.
> I don't have access to Session in a model and there for I needed to pass
> current locale to both models (they call CountryService implemented as
> String bean using given locale). Could it be simplified?
>
> My files:
>
> https://gist.github.com/szpak/b5c5ae36e7d170f3676c#file-countrydropdownchoice-java
> https://gist.github.com/szpak/b5c5ae36e7d170f3676c#file-countriesmodel-java
>
> https://gist.github.com/szpak/b5c5ae36e7d170f3676c#file-embeddedcountrymodel-java
> https://gist.github.com/szpak/b5c5ae36e7d170f3676c#file-country-java
>
> https://gist.github.com/szpak/b5c5ae36e7d170f3676c#file-usereditpanel-java-L19
>
> https://gist.github.com/szpak/b5c5ae36e7d170f3676c#file-javalocalecountryservice-java
>
> Thanks in advance
> Marcin
>
> --
> http://blog.solidsoft.info/ - Working code is not enough
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: searching for a Rich text editor

2013-11-18 Thread Maxim Solodovnik
We are using this one:
http://www.7thweb.net/wicket-jquery-ui/plugins/wysiwyg/WysiwygEditorPage?0
seems to work as expected :)


On Tue, Nov 19, 2013 at 4:30 AM, Sebastien  wrote:

> Hi Dirk,
>
> For the Kendo one, this is because Kendo has released a new version
> (kendoui.web.2013.2.716), whereas wicket-kendo-ui-12.0.0 is still based on
> the previous.
> you can try out wicket-kendo-ui-6.12.1-SNAPSHOT.
>
> Remember to clean your browser's cache.
> https://github.com/sebfz1/wicket-jquery-ui/issues/75
>
> Best regards,
> Sebastien.
>
>
>
> On Mon, Nov 18, 2013 at 10:13 PM, Dirk Wichmann  >wrote:
>
> > Hi,
> >
> > I'm searching for Rich text editor to integrate in my page, but at the
> > moment nothing seems to work.
> > Found
> > Tynimce
> > Wicket-jQuery (Kendo)
> > Visural Wicket
> > and examples, but they dont work with wicket 6.12 maybe.
> > Have you maybe any hint for me??
> >
> > Thanks in advance
> > Cheers
> > Dirk
> >
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
>



-- 
WBR
Maxim aka solomax


Generated drop down list of countries in Wicket - any better way?

2013-11-18 Thread Marcin Zajączkowski
Hi,

Working on Wicket frontend for AppFuse I had to implement a drop down
choice of countries. I did it, but don't like the solution and I wonder
if it could be done easier/prettier?

Issues:
1. In domain model there is a country represented as a String field (a
country code) in an address class. In my Wicket component I wanted to
use a Country class with a code and name. It forced me to create
CountryDropDownChoice component which embed String model into Country
model(with EmbeddedCountryModel):

public class CountryDropDownChoice extends DropDownChoice {
public CountryDropDownChoice(String id, PropertyModel
country, Locale locale) {
super(id, new EmbeddedCountryModel(country, locale), new
CountriesModel(locale), new ChoiceRenderer<>("name", "locale"));
}
}

with a call in my panel/fragment:
add(new CountryDropDownChoice("country", new
PropertyModel(getDefaultModel(), "country"), getLocale()));

2. I would like to have country names depending on current user locales.
I don't have access to Session in a model and there for I needed to pass
current locale to both models (they call CountryService implemented as
String bean using given locale). Could it be simplified?

My files:
https://gist.github.com/szpak/b5c5ae36e7d170f3676c#file-countrydropdownchoice-java
https://gist.github.com/szpak/b5c5ae36e7d170f3676c#file-countriesmodel-java
https://gist.github.com/szpak/b5c5ae36e7d170f3676c#file-embeddedcountrymodel-java
https://gist.github.com/szpak/b5c5ae36e7d170f3676c#file-country-java
https://gist.github.com/szpak/b5c5ae36e7d170f3676c#file-usereditpanel-java-L19
https://gist.github.com/szpak/b5c5ae36e7d170f3676c#file-javalocalecountryservice-java

Thanks in advance
Marcin

-- 
http://blog.solidsoft.info/ - Working code is not enough

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: searching for a Rich text editor

2013-11-18 Thread Sebastien
Hi Dirk,

For the Kendo one, this is because Kendo has released a new version
(kendoui.web.2013.2.716), whereas wicket-kendo-ui-12.0.0 is still based on
the previous.
you can try out wicket-kendo-ui-6.12.1-SNAPSHOT.

Remember to clean your browser's cache.
https://github.com/sebfz1/wicket-jquery-ui/issues/75

Best regards,
Sebastien.



On Mon, Nov 18, 2013 at 10:13 PM, Dirk Wichmann wrote:

> Hi,
>
> I'm searching for Rich text editor to integrate in my page, but at the
> moment nothing seems to work.
> Found
> Tynimce
> Wicket-jQuery (Kendo)
> Visural Wicket
> and examples, but they dont work with wicket 6.12 maybe.
> Have you maybe any hint for me??
>
> Thanks in advance
> Cheers
> Dirk
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: searching for a Rich text editor

2013-11-18 Thread Adam Hammer
For the most part you just integrate any rich text editor at the HTML/JS
layer with a TextArea in wicket.

There might need to be JS hooks in there in order to ensure that the Editor
content is in the TextArea when the user submits the form.

Overall though you don't need special integration for your average rte.

Sincerely,
  Adam


On Mon, Nov 18, 2013 at 1:13 PM, Dirk Wichmann wrote:

> Hi,
>
> I'm searching for Rich text editor to integrate in my page, but at the
> moment nothing seems to work.
> Found
> Tynimce
> Wicket-jQuery (Kendo)
> Visural Wicket
> and examples, but they dont work with wicket 6.12 maybe.
> Have you maybe any hint for me??
>
> Thanks in advance
> Cheers
> Dirk
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


searching for a Rich text editor

2013-11-18 Thread Dirk Wichmann
Hi,

I'm searching for Rich text editor to integrate in my page, but at the
moment nothing seems to work.
Found
Tynimce
Wicket-jQuery (Kendo)
Visural Wicket
and examples, but they dont work with wicket 6.12 maybe.
Have you maybe any hint for me??

Thanks in advance
Cheers
Dirk


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Filtered feedback message cleanup

2013-11-18 Thread meduolis
attaching quickstart:  feedbackI18n.zip
  



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Filtered-feedback-message-cleanup-tp4662503p4662505.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



RE: DownloadLink and ProgressBar

2013-11-18 Thread seyaw
Yes Paul, getting the progress of the file generation is one of my challenge
right now. The file generation is, in my case is not linear. For example,
the time it takes for different procedures is depend on the project size.
Currently, I just make a rough estimation so that the user at least can see
the file generation is in progress. 



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/DownloadLink-and-ProgressBar-tp4662451p4662504.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Filtered feedback message cleanup

2013-11-18 Thread meduolis
Hello,

I am not sure if it's a Wicket bug, or a lack of my wicket knowledge , but I
really need an assistance here.

I have a simple form with two different input fields: RequiredTextField and
PasswordTextField. Also there is a feedback panel, but it filters out
PasswordTextField feedback message and displays it inline to its' field.
When submiting the form, we got one message in feedback panel and one
message after password field.
 
Later we trigger model update by setting new locale.
 
Feedback message for username got cleared, but filtered feedback message -
not.

Is there any manual way to clear filtered messages? Or it should be done  by
Wicket itself?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Filtered-feedback-message-cleanup-tp4662503.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Filtered feedback message cleanup

2013-11-18 Thread meduolis
Hello,

I am not sure if it's a Wicket bug, or a lack of my wicket knowledge , but I
really need an assistance here.

I have a simple form with two different input fields: RequiredTextField and
PasswordTextField. Also there is a feedback panel, but it filters out
PasswordTextField feedback message and displays it inline to its' field.
When submiting the form, we got one message in feedback panel and one
message after password field.
 
Later we trigger model update by setting new locale.

Feedback message for username got cleared, but filtered feedback message -
not.

Is there any manual way to clear filtered messages? Or it should be done  by
Wicket itself?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Filtered-feedback-message-cleanup-tp4662502.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: DownloadLink and ProgressBar

2013-11-18 Thread Ernesto Reinaldo Barreiro
What do you mean? How to compute how much has been generated? Or how to
pass this info to the client? Or something else?


On Mon, Nov 18, 2013 at 8:00 PM, Paul Bors  wrote:

> How do you track the progress of your file generation in order to show the
> status bar?
>
> ~ Thank you,
>   Paul Bors
>
> -Original Message-
> From: seyaw [mailto:seidy...@gmail.com]
> Sent: Monday, November 18, 2013 3:52 AM
> To: users@wicket.apache.org
> Subject: Re: DownloadLink and ProgressBar
>
> Hi Ernesto,
> A working example might be helpful.
> Thank you
>
>
>
> --
> View this message in context:
>
> http://apache-wicket.1842946.n4.nabble.com/DownloadLink-and-ProgressBar-tp46
> 62451p4662485.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Regards - Ernesto Reinaldo Barreiro


RE: DownloadLink and ProgressBar

2013-11-18 Thread Paul Bors
How do you track the progress of your file generation in order to show the
status bar?

~ Thank you,
  Paul Bors

-Original Message-
From: seyaw [mailto:seidy...@gmail.com] 
Sent: Monday, November 18, 2013 3:52 AM
To: users@wicket.apache.org
Subject: Re: DownloadLink and ProgressBar

Hi Ernesto,
A working example might be helpful.
Thank you



--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/DownloadLink-and-ProgressBar-tp46
62451p4662485.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: upgrade from 1.5 to Wicket 6 Form field issue and Ajax Link

2013-11-18 Thread Peter Henderson
Hi,

Another approach. Add OnChangeAjaxBehavior or
AjaxFormComponentUpdatingBehavior to the fields to keep the server side up
to date.

Peter.


On 18 November 2013 12:57, Martin Grigorov  wrote:

> Hi,
>
> AjaxLink does not submit values.
> Use AjaxSubmitLink or AjaxButton instead.
>
>
> On Mon, Nov 18, 2013 at 2:51 PM, lucast  wrote:
>
> > Dear Forum,
> > I have a main form and within this form, I have two fields: a drop-down
> > list
> > and a text field followed by an ajax-link which is meant to add the
> values
> > from two fields to a list (scenario described in previous
> > AjaxFormComponentUpdatingBehavior( "change" ) on a DropDownChoice
> > <
> >
> http://apache-wicket.1842946.n4.nabble.com/AjaxFormComponentUpdatingBehavior-quot-change-quot-on-a-DropDownChoice-td4660065.html
> > >
> > post).
> >
> > On the form, I change the value of the drop down list and the integer
> text
> > field.
> > But when I click on the ajax-link, the value from the integer text field
> is
> > set to its original value (of 1). Even after I have manually changed the
> > value on the form, I still get the default value of 1.
> > The drop-down list behaves with no problem, though.
> >
> > I have tried every single function available on wicket, from
> > getConvertedInput() to getValue().
> >
> > This only occurs on wicket 6.
> >
> > If I click on the submit button, instead of the ajax-link, then I get the
> > updated value from the form and not the default value from the integer
> text
> > field.
> >
> > How can I get the updated value that I enter on the form, when I click on
> > the ajax-link?
> >
> > Thanks in advance,
> > Lucas
> >
> >
> >
> > --
> > View this message in context:
> >
> http://apache-wicket.1842946.n4.nabble.com/upgrade-from-1-5-to-Wicket-6-Form-field-issue-and-Ajax-Link-tp4662497.html
> > Sent from the Users forum mailing list archive at Nabble.com.
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
>



-- 
Peter Henderson

Director
Starjar Ltd.
0330 088 1662
www.starjar.com


Re: upgrade from 1.5 to Wicket 6 Form field issue and Ajax Link

2013-11-18 Thread Martin Grigorov
Hi,

AjaxLink does not submit values.
Use AjaxSubmitLink or AjaxButton instead.


On Mon, Nov 18, 2013 at 2:51 PM, lucast  wrote:

> Dear Forum,
> I have a main form and within this form, I have two fields: a drop-down
> list
> and a text field followed by an ajax-link which is meant to add the values
> from two fields to a list (scenario described in previous
> AjaxFormComponentUpdatingBehavior( "change" ) on a DropDownChoice
> <
> http://apache-wicket.1842946.n4.nabble.com/AjaxFormComponentUpdatingBehavior-quot-change-quot-on-a-DropDownChoice-td4660065.html
> >
> post).
>
> On the form, I change the value of the drop down list and the integer text
> field.
> But when I click on the ajax-link, the value from the integer text field is
> set to its original value (of 1). Even after I have manually changed the
> value on the form, I still get the default value of 1.
> The drop-down list behaves with no problem, though.
>
> I have tried every single function available on wicket, from
> getConvertedInput() to getValue().
>
> This only occurs on wicket 6.
>
> If I click on the submit button, instead of the ajax-link, then I get the
> updated value from the form and not the default value from the integer text
> field.
>
> How can I get the updated value that I enter on the form, when I click on
> the ajax-link?
>
> Thanks in advance,
> Lucas
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/upgrade-from-1-5-to-Wicket-6-Form-field-issue-and-Ajax-Link-tp4662497.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


upgrade from 1.5 to Wicket 6 Form field issue and Ajax Link

2013-11-18 Thread lucast
Dear Forum,
I have a main form and within this form, I have two fields: a drop-down list
and a text field followed by an ajax-link which is meant to add the values
from two fields to a list (scenario described in previous 
AjaxFormComponentUpdatingBehavior( "change" ) on a DropDownChoice

   
post).

On the form, I change the value of the drop down list and the integer text
field. 
But when I click on the ajax-link, the value from the integer text field is
set to its original value (of 1). Even after I have manually changed the
value on the form, I still get the default value of 1.  
The drop-down list behaves with no problem, though.

I have tried every single function available on wicket, from
getConvertedInput() to getValue().

This only occurs on wicket 6. 

If I click on the submit button, instead of the ajax-link, then I get the
updated value from the form and not the default value from the integer text
field.

How can I get the updated value that I enter on the form, when I click on
the ajax-link?

Thanks in advance,
Lucas



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/upgrade-from-1-5-to-Wicket-6-Form-field-issue-and-Ajax-Link-tp4662497.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: CSS reference order

2013-11-18 Thread Martin Grigorov
Hi,

Override ResourceReference#getDependencies() for the reference that
contribute bootstrap-override.css.
It should depend on
CssHeaderItem.forRefernce(de.agilecoders.wicket.core.markup.html.themes.bootstrap.BootstrapCssReference)
See http://wicketinaction.com/2012/07/wicket-6-resource-management/


On Mon, Nov 18, 2013 at 2:31 PM, mac  wrote:

> I have integrated in my application wicket-bootstrap library. I also have
> my
> own bootstrap-override.css which is added in renderHead method as a
> CssHeaderItem.
> Wicket renders bootstrap-override reference first in a head section. How
> can
> I change the reference order that my file will be loaded as the last one?
>
> Thanks,
> mac
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/CSS-reference-order-tp4662495.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


CSS reference order

2013-11-18 Thread mac
I have integrated in my application wicket-bootstrap library. I also have my
own bootstrap-override.css which is added in renderHead method as a
CssHeaderItem.
Wicket renders bootstrap-override reference first in a head section. How can
I change the reference order that my file will be loaded as the last one?

Thanks,
mac



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/CSS-reference-order-tp4662495.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: DownloadLink and ProgressBar

2013-11-18 Thread Ernesto Reinaldo Barreiro
Thanks for the pointer!


On Mon, Nov 18, 2013 at 10:54 AM, Martin Grigorov wrote:

> I think
>
> https://github.com/wicketstuff/core/tree/master/jdk-1.6-parent/progressbar-parent
> has
> such examples
>
>
> On Mon, Nov 18, 2013 at 10:52 AM, seyaw  wrote:
>
> > Hi Ernesto,
> > A working example might be helpful.
> > Thank you
> >
> >
> >
> > --
> > View this message in context:
> >
> http://apache-wicket.1842946.n4.nabble.com/DownloadLink-and-ProgressBar-tp4662451p4662485.html
> > Sent from the Users forum mailing list archive at Nabble.com.
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
>



-- 
Regards - Ernesto Reinaldo Barreiro


Re: DownloadLink and ProgressBar

2013-11-18 Thread Martin Grigorov
I think
https://github.com/wicketstuff/core/tree/master/jdk-1.6-parent/progressbar-parent
has
such examples


On Mon, Nov 18, 2013 at 10:52 AM, seyaw  wrote:

> Hi Ernesto,
> A working example might be helpful.
> Thank you
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/DownloadLink-and-ProgressBar-tp4662451p4662485.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: PackageResource

2013-11-18 Thread Martin Grigorov
Hi,

It is a caching problem.
Use NonCachingImage component instead of Image.


On Mon, Nov 18, 2013 at 11:19 AM, MartinoSuperman
wrote:

> Hi
>
> For my website, I am using a ResourceReference, in which a PNG file is
> loaded to show it on the web page.
>
> The PNG picture shown well, but when I change that PNG picture by redrawing
> it in Java with the help of Graphics2D, you still see the former PNG
> picture
> on the web page, whereas the newest PNG picture is drawn behind the scenes.
> That redrawing works fine.
>
> What I want, is the following:
>
> Each time, when the PNG picture is redrawn that new PNG picture must be
> shown on the web page, immediately after that, when you refreshes the page.
> Now, you only get that new PNG picture, when you close your browser and
> reopens it and goed to the webpage again.
>
> Does someone know how to 'refresh' that newly redrawn PNG picture in the
> webpage?
>
>
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/PackageResource-tp4662486.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Rendering a component into a String

2013-11-18 Thread MartinoSuperman
What I do in solving such problems, is making my own custom component class
in Java, in which extension takes place.

Example:

I wanted to get text out of a TextField. 

Example code:

TextField tfExample = new TextField("name", Model.of*""))

This example code generates an empty text field.

It is easier to make your own textfield that extends TextField

Here:

public class OpenTextField extends TextField
{
public OpenTextField(String id, String text)
{
  super(id);
  

Etc.
}

Here you make your own setText and getText. Then, you do not have to convert
to or back from Model again. That is much easier!




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Rendering-a-component-into-a-String-tp4662391p4662490.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Advice for upgrading from an old version of Wicket

2013-11-18 Thread MartinoSuperman
When you use a different version of Wicket, check, if the version is the same
in NetBeans.

Otherwise, it will be get stuck...



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Advice-for-upgrading-from-an-old-version-of-Wicket-tp4662469p4662488.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Refreshing PNG picture in web page after redrawing it.

2013-11-18 Thread Ernesto Reinaldo Barreiro
NonCachingImage?


On Mon, Nov 18, 2013 at 10:20 AM, MartinoSuperman
wrote:

> Hi
>
> For my website, I am using a ResourceReference, in which a PNG file is
> loaded to show it on the web page.
>
> The PNG picture shown well, but when I change that PNG picture by redrawing
> it in Java with the help of Graphics2D, you still see the former PNG
> picture
> on the web page, whereas the newest PNG picture is drawn behind the scenes.
> That redrawing works fine.
>
> What I want, is the following:
>
> Each time, when the PNG picture is redrawn that new PNG picture must be
> shown on the web page, immediately after that, when you refreshes the page.
> Now, you only get that new PNG picture, when you close your browser and
> reopens it and goed to the webpage again.
>
> Does someone know how to 'refresh' that newly redrawn PNG picture in the
> webpage?
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Refreshing-PNG-picture-in-web-page-after-redrawing-it-tp4662487.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Regards - Ernesto Reinaldo Barreiro


Refreshing PNG picture in web page after redrawing it.

2013-11-18 Thread MartinoSuperman
Hi

For my website, I am using a ResourceReference, in which a PNG file is
loaded to show it on the web page.

The PNG picture shown well, but when I change that PNG picture by redrawing
it in Java with the help of Graphics2D, you still see the former PNG picture
on the web page, whereas the newest PNG picture is drawn behind the scenes.
That redrawing works fine.

What I want, is the following:

Each time, when the PNG picture is redrawn that new PNG picture must be
shown on the web page, immediately after that, when you refreshes the page.
Now, you only get that new PNG picture, when you close your browser and
reopens it and goed to the webpage again.

Does someone know how to 'refresh' that newly redrawn PNG picture in the
webpage? 



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Refreshing-PNG-picture-in-web-page-after-redrawing-it-tp4662487.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



PackageResource

2013-11-18 Thread MartinoSuperman
Hi

For my website, I am using a ResourceReference, in which a PNG file is
loaded to show it on the web page.

The PNG picture shown well, but when I change that PNG picture by redrawing
it in Java with the help of Graphics2D, you still see the former PNG picture
on the web page, whereas the newest PNG picture is drawn behind the scenes.
That redrawing works fine.

What I want, is the following:

Each time, when the PNG picture is redrawn that new PNG picture must be
shown on the web page, immediately after that, when you refreshes the page.
Now, you only get that new PNG picture, when you close your browser and
reopens it and goed to the webpage again.

Does someone know how to 'refresh' that newly redrawn PNG picture in the
webpage?





--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/PackageResource-tp4662486.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: DownloadLink and ProgressBar

2013-11-18 Thread seyaw
Hi Ernesto,
A working example might be helpful.
Thank you



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/DownloadLink-and-ProgressBar-tp4662451p4662485.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: DownloadLink and ProgressBar

2013-11-18 Thread Martin Grigorov
I didn't read the question correctly.
It indeed talks about showing progress for the generation process, not the
download.


On Mon, Nov 18, 2013 at 10:39 AM, Ernesto Reinaldo Barreiro <
reier...@gmail.com> wrote:

> Martin,
>
> Thanks for your comments.
>
> On Mon, Nov 18, 2013 at 9:10 AM, Martin Grigorov  >wrote:
>
> > Hi,
> >
> > I haven't seen a web application that shows progress bar for download.
> > The browser itself shows such information - Google Chrome in the
> > bottom-left corner, Firefox in its download window/manager.
> >
>
> I'm not talking of a progress bar for download. I'm talking of showing a
> progress bar for file generation (a file that takes too long to generate).
> Once file is generated download will be triggered.  I have implemented a
> similar use case several times before.
>
>
> > > 1-Replace the download link by an AJAX link.
> > > 2-Launch file generation on a background thread. Pass a class to this
> > > thread that serves as context fro passing information from generating
> > > thread with web threads (keeping a reference to thisi context on the
> > page).
> > > 3-Make a progress panel visible + an AJAX timer that pols the server
> for
> > > progress.
> > >
> >
> > Point 3) won't work if the file download is from a resource linked to the
> > page. And it is thru DownloadLink.
> > In this case the ajax timer won't be able to reach the page at all.
> >
>
> ? Not following you. Page and thread generating the file will share a
> context the file generating thread will use to update WEB threads about
> status of generation (e.g. progress info). All the AJAX timer will do is
> poll the page and ask for this information. Once file is generated timer
> will disable itself and trigger download (or display a new panel with
> download link). Again I have implemented something similar more than once
> in my life.
>
>
> >
> > The app should use a mounted/shared resource.
> > see wicket-extensions' UploadProgressBar and/or follow the progress of
> > https://github.com/l0rdn1kk0n/wicket-bootstrap/issues/262 for example.
> > Both
> > are related to *upload*, not download.
> >
>
> Yes I know the limitation of serving resources from pages. Maybe one
> variation of this is that the timer just points to the mounted resource in
> order to trigger the actual download. That is not more difficult to achieve
> that downloading from page.
>
> Shall I build a small mini app illustrating this? Maybe it can be useful to
> other users?
>
> --
> Regards - Ernesto Reinaldo Barreiro
>


Re: DownloadLink and ProgressBar

2013-11-18 Thread Ernesto Reinaldo Barreiro
Martin,

Thanks for your comments.

On Mon, Nov 18, 2013 at 9:10 AM, Martin Grigorov wrote:

> Hi,
>
> I haven't seen a web application that shows progress bar for download.
> The browser itself shows such information - Google Chrome in the
> bottom-left corner, Firefox in its download window/manager.
>

I'm not talking of a progress bar for download. I'm talking of showing a
progress bar for file generation (a file that takes too long to generate).
Once file is generated download will be triggered.  I have implemented a
similar use case several times before.


> > 1-Replace the download link by an AJAX link.
> > 2-Launch file generation on a background thread. Pass a class to this
> > thread that serves as context fro passing information from generating
> > thread with web threads (keeping a reference to thisi context on the
> page).
> > 3-Make a progress panel visible + an AJAX timer that pols the server for
> > progress.
> >
>
> Point 3) won't work if the file download is from a resource linked to the
> page. And it is thru DownloadLink.
> In this case the ajax timer won't be able to reach the page at all.
>

? Not following you. Page and thread generating the file will share a
context the file generating thread will use to update WEB threads about
status of generation (e.g. progress info). All the AJAX timer will do is
poll the page and ask for this information. Once file is generated timer
will disable itself and trigger download (or display a new panel with
download link). Again I have implemented something similar more than once
in my life.


>
> The app should use a mounted/shared resource.
> see wicket-extensions' UploadProgressBar and/or follow the progress of
> https://github.com/l0rdn1kk0n/wicket-bootstrap/issues/262 for example.
> Both
> are related to *upload*, not download.
>

Yes I know the limitation of serving resources from pages. Maybe one
variation of this is that the timer just points to the mounted resource in
order to trigger the actual download. That is not more difficult to achieve
that downloading from page.

Shall I build a small mini app illustrating this? Maybe it can be useful to
other users?

-- 
Regards - Ernesto Reinaldo Barreiro


Re: DownloadLink and ProgressBar

2013-11-18 Thread Martin Grigorov
Hi,

I haven't seen a web application that shows progress bar for download.
The browser itself shows such information - Google Chrome in the
bottom-left corner, Firefox in its download window/manager.


On Sat, Nov 16, 2013 at 11:40 AM, Ernesto Reinaldo Barreiro <
reier...@gmail.com> wrote:

> Hi,
>
>
> 1-Replace the download link by an AJAX link.
> 2-Launch file generation on a background thread. Pass a class to this
> thread that serves as context fro passing information from generating
> thread with web threads (keeping a reference to thisi context on the page).
> 3-Make a progress panel visible + an AJAX timer that pols the server for
> progress.
>

Point 3) won't work if the file download is from a resource linked to the
page. And it is thru DownloadLink.
In this case the ajax timer won't be able to reach the page at all.

The app should use a mounted/shared resource.
see wicket-extensions' UploadProgressBar and/or follow the progress of
https://github.com/l0rdn1kk0n/wicket-bootstrap/issues/262 for example. Both
are related to *upload*, not download.


> 4-Once file is generated replace progress panel with a download link (or
> use trick in [1] to trigger file dowmload)
>
> References
>
> 1-
>
> https://cwiki.apache.org/confluence/display/WICKET/AJAX+update+and+file+download+in+one+blow
>
>
> On Sat, Nov 16, 2013 at 10:29 AM, seyaw  wrote:
>
> > Hi All,
> > I have a wicket DownloadLink where I generate file dynamically and
> download
> > it. It works.
> > The process of dynamic File generation might take some time and like to
> > show
> > ProgressBar which show how much the generation has progressed. How Can I
> do
> > that.
> >
> > I am using wicket 1.5.8
> > Thank you very much.
> >
> >  add(new DownloadLink("export", new LoadableDetachableModel()
> > {
> > private static final long serialVersionUID =
> > 840863954694163375L;
> >
> > @Override
> > protected File load()
> > {
> > File exportTempDir = getGeneratedFile();
> > }
> > }
> >
> >
> >
> > --
> > View this message in context:
> >
> http://apache-wicket.1842946.n4.nabble.com/DownloadLink-and-ProgressBar-tp4662451.html
> > Sent from the Users forum mailing list archive at Nabble.com.
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
>
>
> --
> Regards - Ernesto Reinaldo Barreiro
>


Re: Advice for upgrading from an old version of Wicket

2013-11-18 Thread Martin Grigorov
Hi,

I'd advice you to read the migration guides 1.4->1.5 and 1.5->6.0.
Then start migrating the app and ask here if you have specific problems.


On Sun, Nov 17, 2013 at 11:33 PM, Scott Carpenter wrote:

> Hi -- I've inherited a wicket site that was first developed four years ago.
> It is running on version 1.4 and I've been asked to estimate an upgrade to
> a more current version, and I was hoping to get some advice from this list
> about gotchas and so on.
>
> I've been working on the site for several months but consider myself a
> newcomer to Wicket. That is, I haven't done a deep dive into learning the
> framework yet. I've been updating things based on what I find in the
> existing code base. So please forgive me my newbieness and let me know what
> details would be helpful.
>
> Furthermore, I'm a newcomer to Java web frameworks in general. There is
> Spring and Hibernate involved with this thing, which I've also been able to
> update based on the existing state of affairs. The backend is an Oracle
> database.
>
> Your thoughts and advice would be greatly appreciated.
>
> Thank you!
>
> Scott
>


Re: wicket "library" example, but with tabs

2013-11-18 Thread Martin Grigorov
Hi Erik,

Thanks for offering your code!
Unfortunately we cannot add every use case to the examples. This will make
it even harder to understand for the users and hard to maintain for us.

I hope you like what you have learnt from Wicket so far!
Have fun!


On Sun, Nov 17, 2013 at 11:47 PM, eostermueller wrote:

> replying to self here.
>
> Finally got this worked out here:
> https://github.com/eostermueller/wicket-librarywithtabs
>
> This code is a copy of the wicket library example, but it displays the book
> detail in 3 different tabs on a single page.
>
> Would you all consider including it in the distribution of wicket examples?
> Other than the filter in web.xml, you'd just need to copy:
>
> wicket-examples/src/main/java/org/apache/wicket/examples/librarywithtabs/
>
> ...from the above repo.
>
> Thanks,
> --Erik
>
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/wicket-library-example-but-with-tabs-tp4662343p4662470.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>