Re: Internationalization with Wicket

2015-04-09 Thread Martin Grigorov
Hi,

Yes.
MyApplication.properties
Put it next to MyApplication.java
On Apr 9, 2015 4:30 PM, "Hasan Çelik"  wrote:

> Hi,
>
> Before I created  properties class for every class, for example,
>
> HomePage.html
> HomePage.java
> HomePage.properties
> HomePage_tr.properties
> SecondPage.html
> SecondPage.java
> SecondPage.properties
> SecondPage_tr.properties
>
> In this way, It caused visual pollution and takes a few times while
> loading... after that I decided to create one properties file instead of
> above..And I located it into the /resource directory...
>
> When I run the program, I am getting an error... As I understand program
> doesn't find the properties file in the /resource directory...I think I
> should refer it in somewhere??
>
> My question is; Is there a way to create one properties file like that for
> Internationalization ?
>


Re: Internationalization with Wicket

2015-04-09 Thread Ernesto Reinaldo Barreiro
by "library" I mean they will be exported inside a re-usable jar file and
used by different projects.

On Thu, Apr 9, 2015 at 3:35 PM, Ernesto Reinaldo Barreiro <
reier...@gmail.com> wrote:

> You have to instruct maven or whatever other build tool to include things
> on resources... Also you can place a file MyApplication.properties next to
> your application class and fetch localization from there. I tend to use
> this last approach and only use APanel.properties or APage.properties if
> those components are part of a library.
>
>
> On Thu, Apr 9, 2015 at 3:28 PM, Hasan Çelik  wrote:
>
>> Hi,
>>
>> Before I created  properties class for every class, for example,
>>
>> HomePage.html
>> HomePage.java
>> HomePage.properties
>> HomePage_tr.properties
>> SecondPage.html
>> SecondPage.java
>> SecondPage.properties
>> SecondPage_tr.properties
>>
>> In this way, It caused visual pollution and takes a few times while
>> loading... after that I decided to create one properties file instead of
>> above..And I located it into the /resource directory...
>>
>> When I run the program, I am getting an error... As I understand program
>> doesn't find the properties file in the /resource directory...I think I
>> should refer it in somewhere??
>>
>> My question is; Is there a way to create one properties file like that for
>> Internationalization ?
>>
>
>
>
> --
> Regards - Ernesto Reinaldo Barreiro
>



-- 
Regards - Ernesto Reinaldo Barreiro


Re: Internationalization with Wicket

2015-04-09 Thread Ernesto Reinaldo Barreiro
You have to instruct maven or whatever other build tool to include things
on resources... Also you can place a file MyApplication.properties next to
your application class and fetch localization from there. I tend to use
this last approach and only use APanel.properties or APage.properties if
those components are part of a library.


On Thu, Apr 9, 2015 at 3:28 PM, Hasan Çelik  wrote:

> Hi,
>
> Before I created  properties class for every class, for example,
>
> HomePage.html
> HomePage.java
> HomePage.properties
> HomePage_tr.properties
> SecondPage.html
> SecondPage.java
> SecondPage.properties
> SecondPage_tr.properties
>
> In this way, It caused visual pollution and takes a few times while
> loading... after that I decided to create one properties file instead of
> above..And I located it into the /resource directory...
>
> When I run the program, I am getting an error... As I understand program
> doesn't find the properties file in the /resource directory...I think I
> should refer it in somewhere??
>
> My question is; Is there a way to create one properties file like that for
> Internationalization ?
>



-- 
Regards - Ernesto Reinaldo Barreiro


Re: Header contribution ordering

2015-04-09 Thread Nick Pratt
Thanks Martin, ill check that out.

Is it possible to have a FilteredHeaderContainer in the head section of our
base page so that we can have all the regular Wicket includes (JS and CSS)
added, and then a special bucket for our global css?

I keep running in to: "there was an error processing the header response -
you tried to render a bucket of response from FilteringHeaderResponse, but
it had not yet run and been closed."

Can header items be manipulated this way, or only within the body contents
(for late loading JS)


On Thu, Apr 9, 2015 at 2:29 PM, Martin Grigorov 
wrote:

> Hi,
>
>
> On Thu, Apr 9, 2015 at 9:23 PM, Nick Pratt  wrote:
>
> > Based on the wicket guide, since 1.5 the header contributions of children
> > should occur before that of the Page they are contained in so that the
> Page
> > can override any component contributions.
> >
> > Is this still valid?  We've got a case where a Panel is contributing a
> CSS
> >
>
> Yes.
>
>
> > file that's appearing in the final markup after that of the Page (which
> > prevents our application level style sheet from overriding the
> component's
> > added styles)  - is there a likely reason for this that we've overlooked?
> >
>
> A dependency?
> See HeaderItem#getDependencies() and ResourceReference#getDependencies()
>
>
> >
> > N
> >
>


wicket:for does not work if used after the referenced component

2015-04-09 Thread Andreas Kappler

Hi,

in Wicket 6.18 this code works as expected ("for" attribute of  
is set to id of  and id of input is written to HTML):


Label wicket:id="cb"/>


However if reversed, the id of the  is not written to the HTML 
and therefore the  does not work properly:


 Label

My guess is that the AutoLabelResolver calls the getMarkupId method of 
the referenced FormComponent too late. A workaround is to call 
setOutputMarkupId explictily on the FormComponent.


I can create a JIRA issue and quickstart (should be easily reproducible) 
if needed.


Thanks!

Best Regards,
Andreas


Re: FormComponentPanel and propagating model value to components

2015-04-09 Thread mscoon
Well the code is a bit more complex that what I originally pasted.
ComponentA is instantiated in an overridable method so that subclasses can
provide a different implementation. Furthermore, the model cannot be
decided at initialization time, so you can't simply call
componentA.setModel() right after it is constructed. So I thought about
using a behavior which can be added after the component is constructed and
which can change the model whenever needed.

Nonetheless, based on  your feedback, I think I have found a way to
refactor it such that the model is provided at initialization time.

But I guess the question still stands - can Behavior#onConfigure change a
component's model or is this not a valid operation?

On Wed, Apr 8, 2015 at 12:13 PM, Patrick Davids <
patrick.dav...@nubologic.com> wrote:

> Hi,
> quite unusal to me using a behavior to set a model.
>
> Why dont you delegate to your inner textfiled by implementing an own
> setXYZModel()-method?
>
> Or bind your inner textfield direct by providing a particular model in
> your Constructor of your custom MyFormComponentPanel?
> And no onInitialize()-method...
>
> public class MyFormComponentPanel extends FormComponentPanel {
>   public MyFormComponentPanel(IModel myModel){
> add(new TextField("id", myModel));
>   }
> }
> (add generics if needed)
>
>
> Patrick
>
>
> Am 08.04.2015 um 09:27 schrieb mscoon:
>
>> Hi all,
>>
>> I have a FormComponentPanel. Is it okay if I set its components models
>> using a behavior that overrides onConfigure() as below?
>>
>> public class MyFormComponentPanel extends FormComponentPanel {
>>
>>  protected void onInitialize() {
>> super.onInitialize();
>>  componentA = new TextField...
>>  componentA.add(new Behavior() {
>>   @Override
>> public void onConfigure(Component component) {
>>   componentA.setModel(...);
>>   }
>>  });
>> }
>>
>> thanks
>>
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: AutoComplete suggestion list disappear when I click on scrollbar in IE

2015-04-09 Thread Martin Grigorov
Hi,

Please file a ticket at JIRA with a quickstart that reproduces the issue.
Thanks!

Martin Grigorov
Freelancer, available for hire!
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Wed, Apr 8, 2015 at 4:24 PM, ravala  wrote:

> Hi,
>
> I am using Wicket's(version ) AutoCompleteTextField in my application to a
> form component,
> when I type something I will get the suggestion list, the suggestion list
> container width
> is 300px, so when the text inside the container exceeds the width of the
> container,
> we will get a horizontal scroll bar for the suggestion list, the problem is
> when I scroll
> to view the text the suggestion list is disappearing. This happens in all
> IE
> browser
> versions IE8, IE9, IE10 and IE11. I am using wicket version 6.19.
> I have attached the image to show suggestion list with scroll bar.
> <
> http://apache-wicket.1842946.n4.nabble.com/file/n4670222/autocompleteScroll.png
> >
>
> Regards
> Ramesh V.
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/AutoComplete-suggestion-list-disappear-when-I-click-on-scrollbar-in-IE-tp4670222.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: Header contribution ordering

2015-04-09 Thread Martin Grigorov
Hi,


On Thu, Apr 9, 2015 at 9:23 PM, Nick Pratt  wrote:

> Based on the wicket guide, since 1.5 the header contributions of children
> should occur before that of the Page they are contained in so that the Page
> can override any component contributions.
>
> Is this still valid?  We've got a case where a Panel is contributing a CSS
>

Yes.


> file that's appearing in the final markup after that of the Page (which
> prevents our application level style sheet from overriding the component's
> added styles)  - is there a likely reason for this that we've overlooked?
>

A dependency?
See HeaderItem#getDependencies() and ResourceReference#getDependencies()


>
> N
>


Re: wicket:for does not work if used after the referenced component

2015-04-09 Thread Martin Grigorov
Hi,
On Apr 9, 2015 2:46 PM, "Andreas Kappler" <
andreas.kapp...@jato-consulting.de> wrote:
>
> Hi,
>
> in Wicket 6.18 this code works as expected ("for" attribute of  is
set to id of  and id of input is written to HTML):
>
> Label 
>
> However if reversed, the id of the  is not written to the HTML and
therefore the  does not work properly:
>
>  Label
>
> My guess is that the AutoLabelResolver calls the getMarkupId method of
the referenced FormComponent too late. A workaround is to call
setOutputMarkupId explictily on the FormComponent.
>
> I can create a JIRA issue and quickstart (should be easily reproducible)
if needed.

Yes, please attach a quickstart app to a ticket if it is reproducible.

Thanks!

>
> Thanks!
>
> Best Regards,
> Andreas


Re: Header contribution ordering

2015-04-09 Thread Martin Grigorov
Filtering can be used only in the .
The idea is that any non-filtered Js/CSS resource will go in the 
anyway.

Martin Grigorov
Freelancer, available for hire!
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Thu, Apr 9, 2015 at 11:24 PM, Nick Pratt  wrote:

> Thanks Martin, ill check that out.
>
> Is it possible to have a FilteredHeaderContainer in the head section of our
> base page so that we can have all the regular Wicket includes (JS and CSS)
> added, and then a special bucket for our global css?
>
> I keep running in to: "there was an error processing the header response -
> you tried to render a bucket of response from FilteringHeaderResponse, but
> it had not yet run and been closed."
>
> Can header items be manipulated this way, or only within the body contents
> (for late loading JS)
>
>
> On Thu, Apr 9, 2015 at 2:29 PM, Martin Grigorov 
> wrote:
>
> > Hi,
> >
> >
> > On Thu, Apr 9, 2015 at 9:23 PM, Nick Pratt  wrote:
> >
> > > Based on the wicket guide, since 1.5 the header contributions of
> children
> > > should occur before that of the Page they are contained in so that the
> > Page
> > > can override any component contributions.
> > >
> > > Is this still valid?  We've got a case where a Panel is contributing a
> > CSS
> > >
> >
> > Yes.
> >
> >
> > > file that's appearing in the final markup after that of the Page (which
> > > prevents our application level style sheet from overriding the
> > component's
> > > added styles)  - is there a likely reason for this that we've
> overlooked?
> > >
> >
> > A dependency?
> > See HeaderItem#getDependencies() and ResourceReference#getDependencies()
> >
> >
> > >
> > > N
> > >
> >
>


Header contribution ordering

2015-04-09 Thread Nick Pratt
Based on the wicket guide, since 1.5 the header contributions of children
should occur before that of the Page they are contained in so that the Page
can override any component contributions.

Is this still valid?  We've got a case where a Panel is contributing a CSS
file that's appearing in the final markup after that of the Page (which
prevents our application level style sheet from overriding the component's
added styles)  - is there a likely reason for this that we've overlooked?

N


Internationalization with Wicket

2015-04-09 Thread Hasan Çelik
Hi,

Before I created  properties class for every class, for example,

HomePage.html
HomePage.java
HomePage.properties
HomePage_tr.properties
SecondPage.html
SecondPage.java
SecondPage.properties
SecondPage_tr.properties

In this way, It caused visual pollution and takes a few times while
loading... after that I decided to create one properties file instead of
above..And I located it into the /resource directory...

When I run the program, I am getting an error... As I understand program
doesn't find the properties file in the /resource directory...I think I
should refer it in somewhere??

My question is; Is there a way to create one properties file like that for
Internationalization ?