Re: Running a local process using Wicket

2015-03-23 Thread Richter, Marvin
I’m not sure if I understood it right but if you actually want to start a 
command on the machine the browser is running on the answer is no, and should 
never be possible for security reasons. But that has nothing to do with Wicket 
but with a webpage in the browser which is sandboxed and therefore not allowed 
to run any process outside this sandbox.

But another question would be, why do you even want to start a local process?

Best,
Marvin


> Am 23.03.2015 um 10:41 schrieb drf :
> 
> We want to replace our fat client application (developed using C#) with a web
> application.
> Wicket is one of the technology options we are considering.
> Our question: Is it possible, and if so, how, to run a local process on the
> users machine (normally run from the command line) from Wicket.
> Thanks
> 
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/Running-a-local-process-using-Wicket-tp4670070.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: Wicketstuff "filename too long" error

2015-03-23 Thread Richter, Marvin
It doesn’t necessarily mean that the filename itself is too long but the entire 
path.

Maybe try to clone the repo in a directory which is higher in the hierarchy 
(like C:\dev for example).

Best,
Marvin

> Am 22.03.2015 um 16:59 schrieb Hasan Çelik :
> 
> I could find this
> 
> https://support.microsoft.com/en-us/kb/177665
> 
> but there is no setting for windows filename limitation :(
> 
> 
> Web Sitesi : www.ab-hibe.com
> E-mail: hasance...@berkadem.com
> E-mail: i...@ab-hibe.com
> Gsm1: 0 544 640 96 25
> Adres : 1271. Sokak 33/14 Sabri Mermutlu İş Merkezi Balgat Ankara
> 
> 2015-03-22 17:19 GMT+02:00 Martin Grigorov :
> 
>> Hi,
>> 
>> You hit some weird Windows limit.
>> What version is this Windows ? I don't use Windows since a while and I am
>> not sure what 6.1 maps to.
>> Search in the web about other similar problems. I guess there is a setting
>> to allow it longer file names.
>> 
>> Martin Grigorov
>> Freelancer, available for hire!
>> Wicket Training and Consulting
>> https://twitter.com/mtgrigorov
>> 
>> On Sun, Mar 22, 2015 at 4:54 PM, Hasan Çelik  wrote:
>> 
>>> Hi,
>>> 
>>> When I clone the wicketstuff repository, I am getting "filename too long"
>>> error. Is that a problem???
>>> 
>>> https://gist.github.com/cortix/49d380f418c316d8fb58
>>> 
>> 


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



RE: submenu in NavbarDropDownButton

2014-12-16 Thread Richter, Marvin
Hey, I have something like that implemented in the following way:

@Override
protected List newSubMenuButtons(String 
buttonMarkupId) {
List languages = new 
ArrayList();
languages.add(newLanguageOption(buttonMarkupId, "de"));
languages.add(newLanguageOption(buttonMarkupId, "en"));
return languages;
}

And the newLanguageOption method looks like this:

private Link newLanguageOption(final String buttonMarkupId, final String 
localeString) {
Link languageOptionLink = new Link(buttonMarkupId) {

private static final long serialVersionUID = 
-1704794810431937803L;

@Override
public void onClick() {
Locale locale = new Locale(localeString);

CcaWebApplication.get().getCookieUtils().save(CcaWebApplication.CCA_LANGUAGE_COOKIE_NAME,
locale.toString());
getSession().setLocale(locale);
}

@Override
public void onComponentTagBody(MarkupStream markupStream, 
ComponentTag openTag) {
replaceComponentTagBody(markupStream, openTag, 
getString(localeString));
}
};
return languageOptionLink;
}

Hope that helps.

Best,
Marvin

-Original Message-
From: Hasan Çelik [mailto:hsnclk1...@gmail.com] 
Sent: Wednesday, December 17, 2014 7:46 AM
To: users@wicket.apache.org
Subject: submenu in NavbarDropDownButton

Hi,

I have a question about usage of navbar components.. I tried to make 
Multilingual website, actually I did... when I put language buttons in a wicket 
panel, It works...In this example I try to put these language buttons into 
dropdown submenu.. First I did one Multilanguage class and this class was 
taking a parameter...This parameter was about Locale String(like "en")..In this 
way I didn't succeed to take parameter in the submenu declaration,like that

subMenu.add(new MenuBookmarkablePageLink(new
MultiLanguage("en"),
Model.of("Turkish")).setIconType(GlyphIconType.refresh));

I know that declaration (new MultiLanguage("en")) is wrong but I wanted to do 
like that...Anyway After that I have changed the method construction as the 
following.. But in this way I have to create different  Multilanguage class for 
every diffent language. My question is, Is there a way to create construction 
for submenu declaration like that..(*subMenu.add(new 
MenuBookmarkablePageLink(new
MultiLanguage("en"),
Model.of("Turkish")).setIconType(GlyphIconType.refresh));*)


DropDownButton dropdown = new NavbarDropDownButton(Model.of("Choose
Language")) {
@Override
public boolean isActive(Component item) {
return false;
}

@Override
protected List newSubMenuButtons(final String
buttonMarkupId) {
final List subMenu = new ArrayList();
subMenu.add(new
MenuBookmarkablePageLink(MultiLanguage.class,
Model.of("Turkish")).setIconType(GlyphIconType.*flag*));
subMenu.add(new
MenuBookmarkablePageLink(MultiLanguage2.class,
Model.of("English")).setIconType(GlyphIconType.*flag*));

return subMenu;
 }
 }.setIconType(GlyphIconType.book);

 navbar.addComponents(new ImmutableNavbarComponent(dropdown,
Navbar.ComponentPosition.RIGHT));

 return navbar;


--


public class MultiLanguage extends BasePage2 {
public MultiLanguage(){
super(new PageParameters());
changeUserLocaleTo("en");
}
private void changeUserLocaleTo(String localeString) {
getSession().setLocale(new Locale(localeString));

Cookie languageCookie = new
Cookie(WicketApplication.LANGUAGE_COOKIE_NAME, localeString);
languageCookie.setMaxAge(WicketApplication.LANGUAGE_COOKIE_AGE);
((WebResponse)getResponse()).addCookie(languageCookie);
}
}

public class MultiLanguage1 extends BasePage2 {
public MultiLanguage(){
super(new PageParameters());
changeUserLocaleTo("tr");
}
private void changeUserLocaleTo(String localeString) {
getSession().setLocale(new Locale(localeString));

Cookie languageCookie = new
Cookie(WicketApplication.LANGUAGE_COOKIE_NAME, localeString);
languageCookie.setMaxAge(WicketApplication.LANGUAGE_COOKIE_AGE);
((WebResponse)getResponse()).addCookie(languageCookie);
}
}

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



RE: Bug in wicket-bootstrap's Navbar

2014-11-03 Thread Richter, Marvin
Done https://github.com/l0rdn1kk0n/wicket-bootstrap/issues/460

If you need more information please let me know.

-Original Message-
From: Martin Grigorov [mailto:mgrigo...@apache.org] 
Sent: Monday, November 03, 2014 3:27 PM
To: users@wicket.apache.org
Subject: Re: Bug in wicket-bootstrap's Navbar

Create an issue at https://github.com/l0rdn1kk0n/wicket-bootstrap please

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Mon, Nov 3, 2014 at 4:22 PM, Richter, Marvin < 
marvin.rich...@freenetdigital.com> wrote:

> Ah no. It's because of this:
>
> @Override
> protected void onInitialize() {
> super.onInitialize();
>
> this.setRenderBodyOnly(true);
> }
>
> In the NavbarDropDownButton.
>
>
> -Original Message-
> From: Richter, Marvin
> Sent: Monday, November 03, 2014 3:21 PM
> To: users@wicket.apache.org
> Subject: RE: Bug in wicket-bootstrap's Navbar
>
> That's the thing, I couldn't find a solution that seems to be the 
> right way to fix it.
>
> My dirty workaround is to override the newIntitializerScript function 
> and just remove the 'this'.
>
> Because applying setOutputMarkupId(true) doesn't have the expected 
> effect, neither on the ListView nor the Component itself. I think that 
> is because of the wicket:enclosure.
>
>
> -Original Message-
> From: Martin Grigorov [mailto:mgrigo...@apache.org]
> Sent: Monday, November 03, 2014 2:55 PM
> To: users@wicket.apache.org
> Subject: Re: Bug in wicket-bootstrap's Navbar
>
> Hi,
>
> Thanks for reporting!
> Do you have a GitHub account ? Send us a Pull Request please !
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Mon, Nov 3, 2014 at 3:46 PM, Richter, Marvin < 
> marvin.rich...@freenetdigital.com> wrote:
>
> > Hi Martin & Michael,
> >
> > There is a bug in the Navbar Component which causes 
> > NavbarDropDownButtons to not work.
> >
> > DropDownButton's newInitializerScript function uses 'this' so in the 
> > header it renders: $('#component2 .dropdown-toggle').dropdown();
> >
> > But the Navbar component does not call setOutputMarkupId(true) on 
> > the components contained in the alignedComponentListViews.
> >
> > Best,
> > Marvin
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


RE: Bug in wicket-bootstrap's Navbar

2014-11-03 Thread Richter, Marvin
Ah no. It's because of this:

@Override
protected void onInitialize() {
super.onInitialize();

this.setRenderBodyOnly(true);
}

In the NavbarDropDownButton.


-Original Message-
From: Richter, Marvin 
Sent: Monday, November 03, 2014 3:21 PM
To: users@wicket.apache.org
Subject: RE: Bug in wicket-bootstrap's Navbar

That's the thing, I couldn't find a solution that seems to be the right way to 
fix it.

My dirty workaround is to override the newIntitializerScript function and just 
remove the 'this'.

Because applying setOutputMarkupId(true) doesn't have the expected effect, 
neither on the ListView nor the Component itself. I think that is because of 
the wicket:enclosure.


-Original Message-
From: Martin Grigorov [mailto:mgrigo...@apache.org]
Sent: Monday, November 03, 2014 2:55 PM
To: users@wicket.apache.org
Subject: Re: Bug in wicket-bootstrap's Navbar

Hi,

Thanks for reporting!
Do you have a GitHub account ? Send us a Pull Request please !

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Mon, Nov 3, 2014 at 3:46 PM, Richter, Marvin < 
marvin.rich...@freenetdigital.com> wrote:

> Hi Martin & Michael,
>
> There is a bug in the Navbar Component which causes 
> NavbarDropDownButtons to not work.
>
> DropDownButton's newInitializerScript function uses 'this' so in the 
> header it renders: $('#component2 .dropdown-toggle').dropdown();
>
> But the Navbar component does not call setOutputMarkupId(true) on the 
> components contained in the alignedComponentListViews.
>
> Best,
> Marvin
>

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



RE: Bug in wicket-bootstrap's Navbar

2014-11-03 Thread Richter, Marvin
That's the thing, I couldn't find a solution that seems to be the right way to 
fix it.

My dirty workaround is to override the newIntitializerScript function and just 
remove the 'this'.

Because applying setOutputMarkupId(true) doesn't have the expected effect, 
neither on the ListView nor the Component itself. I think that is because of 
the wicket:enclosure.


-Original Message-
From: Martin Grigorov [mailto:mgrigo...@apache.org] 
Sent: Monday, November 03, 2014 2:55 PM
To: users@wicket.apache.org
Subject: Re: Bug in wicket-bootstrap's Navbar

Hi,

Thanks for reporting!
Do you have a GitHub account ? Send us a Pull Request please !

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Mon, Nov 3, 2014 at 3:46 PM, Richter, Marvin < 
marvin.rich...@freenetdigital.com> wrote:

> Hi Martin & Michael,
>
> There is a bug in the Navbar Component which causes 
> NavbarDropDownButtons to not work.
>
> DropDownButton's newInitializerScript function uses 'this' so in the 
> header it renders: $('#component2 .dropdown-toggle').dropdown();
>
> But the Navbar component does not call setOutputMarkupId(true) on the 
> components contained in the alignedComponentListViews.
>
> Best,
> Marvin
>


Bug in wicket-bootstrap's Navbar

2014-11-03 Thread Richter, Marvin
Hi Martin & Michael,

There is a bug in the Navbar Component which causes NavbarDropDownButtons to 
not work.

DropDownButton's newInitializerScript function uses 'this' so in the header it 
renders: $('#component2 .dropdown-toggle').dropdown();

But the Navbar component does not call setOutputMarkupId(true) on the 
components contained in the alignedComponentListViews.

Best,
Marvin


RE: Global Ajax Event Handler

2014-09-09 Thread Richter, Marvin
>Page page = (Page) WebSession.get().getPageManager()
>>>>>>.getPage(i.get());
>>>>>> 
>>>>>>AjaxRequestTarget newAjaxRequestTarget =
>>> ((WebApplication)
>>>>>> Application.get())
>>>>>>.newAjaxRequestTarget(page);
>>>>>> 
>>>>>>RequestCycle.get().scheduleRequestHandlerAfterCurrent(
>>>>>>newAjaxRequestTarget);
>>>>>> 
>>>>>> I dont know how to get the current pageId but from the Session. 
>>>>>> The
>>>> page
>>>>> at
>>>>>> this place is null. :-(
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 2014-09-09 13:53 GMT+02:00 Martin Grigorov :
>>>>>> 
>>>>>>> On Tue, Sep 9, 2014 at 2:05 PM, Tobias Soloschenko < 
>>>>>>> tobiassolosche...@googlemail.com> wrote:
>>>>>>> 
>>>>>>>> Hi again,
>>>>>>>> 
>>>>>>>> I tried out that code you mentioned here.
>>>>>>>> WebSession.get().getPageManager().getPage(int i) returns
>>>>>> IManageablePage
>>>>>>>> which is not applicable as argument for newAjaxRequestTarget.
>>>>>>> 
>>>>>>> cast it
>>>>>>> it is known that in your environment you don't use any custom 
>>>>>>> IManageablePage/IRequestablePage impls (see IPageFactory)
>>>>>>> 
>>>>>>> 
>>>>>>>> 
>>>>>>>> The second thing is how do I get the instance of a page by
>> class
>>>> with
>>>>>> the
>>>>>>>> last page id not from within a component (this would be simple
>>>>>>> getPage())?
>>>>>>> 
>>>>>>> I didn't get this
>>>>>>> Please re-phrase
>>>>>>> 
>>>>>>> 
>>>>>>>> 
>>>>>>>> 2014-09-09 11:51 GMT+02:00 Martin Grigorov <
>> mgrigo...@apache.org
>>>> :
>>>>>>>> 
>>>>>>>>> I've re-read the message and I think I got it.
>>>>>>>>> What you really need is a mounted resource
>>>>>>>>> (WebApplication#mountResource(someResourceReference))
>>>>>>>>> To get a url to it use: theUrl =
>>> requestCycle.urlFor(sameResRef,
>>>>>>>>> parametersWithPageId)
>>>>>>>>> Wicket.Ajax.get({"u": theUrl, ...}) In IResource#respond() you 
>>>>>>>>> can create AjaxRequestTarget with:
>>>>>>>>> 
>>>>>>>>> Page page =
>>>> session.getPageManager().get(parameters.get("pageId"))
>>>>>>>>> target = webApplication.newAjaxRequestTarget(page)
>>>>>>>>> requestCycle.scheduleRequestHandlerAfterCurrent(target);
>>>>>>>>> page.send(page, Broadcast.BREADTH, new SomeEvent(target))
>>>>>>>>> 
>>>>>>>>> in SomeComponent#onEvent() use
>> someEvent.getTarget().add(this)
>>> to
>>>>> add
>>>>>>> the
>>>>>>>>> component when SomeEvent is broadcasted
>>>>>>>>> 
>>>>>>>>> Martin Grigorov
>>>>>>>>> Wicket Training and Consulting https://twitter.com/mtgrigorov
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> On Tue, Sep 9, 2014 at 12:40 PM, Richter, Marvin < 
>>>>>>>>> marvin.rich...@freenetdigital.com> wrote:
>>>>>>>>> 
>>>>>>>>>> What you are looking for is the Wicket Event mechanism.
>>>>>>>>>> 
>>>>>>>>>> This allows you to send a broadcast to a specified
>> Component
>>>>> (e.g.
>>>>>>> the
>>>>>>>>>> current page) and a payload (e.g. your custom event type
>>> which
>>>>>>> contains
>>>>>>>>>> information).
>>>>>>>>>> 
>>>>>>>>>> In the Components which should react on the event you
>>> override
>>>>> the
>>>>>>>> method
>>>>>>>>>> onEvent, check if the event is of your type and if so, do
>>> with
>>>>> the
>>>>>>>> event
>>>>>>>>>> payload whatever you want.
>>>>>>>>>> 
>>>>>>>>>> Check out
>> http://www.wicket-library.com/wicket-examples/events/wicket/bookmarka
>> ble/org.apache.wicket.examples.source.SourcesPage?1&SourcesPage_class
>> =org.apache.wicket.examples.events.DecoupledAjaxUpdatePage
>>>>>>>>>> for a good example.
>>>>>>>>>> 
>>>>>>>>>> Best,
>>>>>>>>>> Marvin
>>>>>>>>>> 
>>>>>>>>>> -Original Message-
>>>>>>>>>> From: Tobias Soloschenko [mailto:
>>>>> tobiassolosche...@googlemail.com]
>>>>>>>>>> Sent: Tuesday, September 09, 2014 11:31 AM
>>>>>>>>>> To: users@wicket.apache.org
>>>>>>>>>> Subject: Re: Global Ajax Event Handler
>>>>>>>>>> 
>>>>>>>>>> Hi,
>>>>>>>>>> 
>>>>>>>>>> thanks for the answer, but this is only a client side event
>>>> hook
>>>>>> not
>>>>>>>> for
>>>>>>>>>> processing a request to the Server. I added a pseudo code
>> to
>>>> the
>>>>>>>> question
>>>>>>>>>> of martin who asked me what I exactly want to do.
>>>>>>>>>> 
>>>>>>>>>> Thanks anyway for the fast answer!
>>>>>>>>>> 
>>>>>>>>>> kind regards,
>>>>>>>>>> 
>>>>>>>>>> Tobias
>>>>>>>>>> 
>>>>>>>>>>> Am 09.09.2014 um 11:06 schrieb Tom Götz >> :
>>>>>>>>>>> 
>>>>>>>>>>> See
>>>>>> https://cwiki.apache.org/confluence/display/WICKET/Wicket+Ajax
>>>>>>> ,
>>>>>>>>>> section "Global Ajax call listeners“.
>>>>>>>>>>> 
>>>>>>>>>>> Cheers,
>>>>>>>>>>>  -Tom
>>>>>>>>>>> 
>>>>>>>>>>> 
>>>>>>>>>>>> On 09.09.2014, at 10:58, Tobias Soloschenko <
>>>>>>>>>> tobiassolosche...@googlemail.com> wrote:
>>>>>>>>>>>> 
>>>>>>>>>>>> Hi all,
>>>>>>>>>>>> 
>>>>>>>>>>>> is there a way to register a global ajax event handler
>>>> within
>>>>>>>> Wicket?
>>>>>>>>>> For normal there is the AbstractDefaultAjaxBehavior which
>> is
>>>>> added
>>>>>>> to a
>>>>>>>>>> component. And then the CallbackScript can be obtained and
>>> used
>>>>>>> within
>>>>>>>> a
>>>>>>>>>> OnDomReadyHeaderItem for example.
>>>>>>>>>>>> 
>>>>>>>>>>>> Is there a way to do this on application level so that
>> Im
>>>> able
>>>>>> to
>>>>>>>> get
>>>>>>>>>> the CallbackScript from the instantiated Application?
>>>>>>>>>>>> 
>>>>>>>>>>>> kind regards
>>>>>>>>>>>> 
>>>>>>>>>>>> Tobias
>>>> ---
>>>> --
>>>>>>>>>>>> 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
>> 

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



RE: Global Ajax Event Handler

2014-09-09 Thread Richter, Marvin
What you are looking for is the Wicket Event mechanism.

This allows you to send a broadcast to a specified Component (e.g. the current 
page) and a payload (e.g. your custom event type which contains information).

In the Components which should react on the event you override the method 
onEvent, check if the event is of your type and if so, do with the event 
payload whatever you want.

Check out 
http://www.wicket-library.com/wicket-examples/events/wicket/bookmarkable/org.apache.wicket.examples.source.SourcesPage?1&SourcesPage_class=org.apache.wicket.examples.events.DecoupledAjaxUpdatePage
 for a good example.

Best,
Marvin

-Original Message-
From: Tobias Soloschenko [mailto:tobiassolosche...@googlemail.com] 
Sent: Tuesday, September 09, 2014 11:31 AM
To: users@wicket.apache.org
Subject: Re: Global Ajax Event Handler

Hi,

thanks for the answer, but this is only a client side event hook not for 
processing a request to the Server. I added a pseudo code to the question of 
martin who asked me what I exactly want to do.

Thanks anyway for the fast answer!

kind regards,

Tobias 

> Am 09.09.2014 um 11:06 schrieb Tom Götz :
> 
> See https://cwiki.apache.org/confluence/display/WICKET/Wicket+Ajax, section 
> "Global Ajax call listeners“.
> 
> Cheers,
>   -Tom
> 
> 
>> On 09.09.2014, at 10:58, Tobias Soloschenko 
>>  wrote:
>> 
>> Hi all, 
>> 
>> is there a way to register a global ajax event handler within Wicket? For 
>> normal there is the AbstractDefaultAjaxBehavior which is added to a 
>> component. And then the CallbackScript can be obtained and used within a 
>> OnDomReadyHeaderItem for example.
>> 
>> Is there a way to do this on application level so that Im able to get the 
>> CallbackScript from the instantiated Application? 
>> 
>> kind regards 
>> 
>> Tobias
>> -
>> 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: Wicket 1.6.7 TabbedPanel URL Access

2014-04-08 Thread Richter, Marvin
Like Sven mentioned, you could pass a parameter to a page e.g. tabIndex and in 
the constructor you get the parameter with name tabIndex and later on when you 
initialize the TabbedPanel you call setSelectedTab(tabIndex)

Marvin Richter


-Original Message-
From: Sven Meier [mailto:s...@meiers.net] 
Sent: Monday, April 07, 2014 8:22 PM
To: users@wicket.apache.org
Subject: Re: Wicket 1.6.7 TabbedPanel URL Access

Hi,

do you want to your url parameters? Are you looking for bookmarkable urls?

You can analyse page parameters in a page's constructor and change its contents 
accordingly.

Sven

On 04/07/2014 06:57 PM, Jeremie wrote:
> Hello,
>
> I would like to know if it is possible to use a URL to open a tab 
> using Wicket's TabbedPanel component.
>
> For example, I want to generate links to wicket classes that contain 
> parameters and place the link in an HTML href tag so that when the 
> users click the individual links, they are redirected to another 
> TabbedPanel tab that displays customized content based on the parameters 
> passed in the URL.
>
> Any help would be appreciated.
> Thanks,
Jeremie
>
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/Wicket-1-6-7-TabbedPanel-UR
> L-Access-tp4665280.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: One field enabled in a disabled container

2014-03-27 Thread Richter, Marvin
Maybe split this one form in two, one with these 2 fields and one with the rest.
Depending on the state, you enable either all, just the one with the 2 fields 
or none.


Best,
Marvin Richter

-Original Message-
From: Entropy [mailto:blmulholl...@gmail.com] 
Sent: Thursday, March 27, 2014 4:38 PM
To: users@wicket.apache.org
Subject: One field enabled in a disabled container

A wierd requirement was just handed to me.  We have a form that gets 
enabled/disabled depending on business rules as normal.  However, now I am 
being told to disable ALL BUT TWO fields in a particular state.  Is my only 
option here to leave the form enabled and then disable EVERY other control 
explicitly like:

form.get("A").setEnabled(true);
form.get("B").setEnabled(true);
form.get("C").setEnabled(true);
form.get("D").setEnabled(true);
[...etc]

Or is there a way to disable the container, and spare specific fields?  I 
suspect I'll have to do the former, but there's quite a few fields and I am 
hoping there's some wicket trick.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/One-field-enabled-in-a-disabled-container-tp4665156.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: http://wicketinaction.com/ not reachable

2014-03-27 Thread Richter, Marvin
I get the same message from the Hoster (Germany)


-Original Message-
From: grsm...@atlanticbb.net [mailto:grsm...@atlanticbb.net] 
Sent: Thursday, March 27, 2014 2:49 PM
To: users@wicket.apache.org
Subject: Re: http://wicketinaction.com/ not reachable

I can get to in. Am in the United States.
George

-Original Message-
From: Bert
Sent: Thursday, March 27, 2014 8:44 AM
To: users
Subject: http://wicketinaction.com/ not reachable 

Hallo wicketeers,

I can not currently reach the blog http://wicketinaction.com/

I get an error from the hoster bhosted.nl:

De bHosted.nl server is benaderd met een domein dat niet bekend is op deze 
server. Om veiligheidsredenen wordt deze pagina ook getoond indien deze server 
benaderd wordt met alleen een IP adres.


Is this just me?

Bert

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



RE: custom bootstrap stylesheet

2014-03-24 Thread Richter, Marvin
That does not override the CSS file used by wicket-bootstrap. It just renders 
an additional CSS reference in the head section. So it might happen that either 
my custom or the original Style Sheet will be used depending on which one will 
be rendered first.

Marvin Richter

-Original Message-
From: Gabriel Landon [mailto:glan...@piti.pf] 
Sent: Friday, March 21, 2014 7:34 PM
To: users@wicket.apache.org
Subject: Re: custom bootstrap stylesheet

Here's what I'm doing with a "less" reference (would be the same for css).

public abstract class AbstractPage extends WebPage {
/** Less/css reference. */
private static final LessResourceReference MY_LESS_REFERENCE = new 
LessResourceReference(AbstractPage .class,  "css/style.less");

@Override
public void renderHead(final IHeaderResponse response) {
super.renderHead(response);
Bootstrap.renderHead(response);
// Your CSS/LESS reference
response.render(CssHeaderItem.forReference(MY_LESS_REFERENCE));
}
}

Regards,
Gabriel.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/custom-bootstrap-stylesheet-tp4665044p4665079.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: custom bootstrap stylesheet

2014-03-21 Thread Richter, Marvin
Thanks ... but still I find it too complicated to just use my custom css.
I mean the Theme thingy is ok and makes sense but why wrapping this with an 
extra theme provider?
And why having an api method setCssResource when it's never called? Quite 
confusing isn't it?

Best Regards,

Marvin Richter


-Original Message-
From: Michael Haitz [mailto:michael.ha...@1und1.de] 
Sent: Friday, March 21, 2014 12:15 PM
To: users@wicket.apache.org
Subject: Re: custom bootstrap stylesheet

it's a bit simpler... ;)

class CcaTheme extends Theme {
public CcaTheme() {
super("cca-theme", new 
PackageResourceReference(CcaWebApplication.class, "customized-bootstrap.css"));
}
}

and during application initialization:

settings.setThemeProvider(new SingleThemeProvider(new CcaTheme())); 
Bootstrap.install(this, settings);


cheers,
Michael

Am 20.03.2014 um 16:47 schrieb Richter, Marvin 
:

> So I do have to override DefaultThemeProvider and return a 
> BootstrapTheme(ISettings), where in Settings is my custom 
> CssResourceReference?
> 
> And then set this ThemeProvider as activeThemeProvider in the Settings?
> 
> That sounds really strange to me.
> 
> Marvin Richter
> 
> 
> -Original Message-
> From: Martin Grigorov [mailto:mgrigo...@apache.org]
> Sent: Thursday, March 20, 2014 3:35 PM
> To: users@wicket.apache.org
> Subject: Re: custom bootstrap stylesheet
> 
> See https://github.com/l0rdn1kk0n/wicket-bootstrap/issues/339 for an 
> example
> 
> Martin Grigorov
> Wicket Training and Consulting
> 
> 
> On Thu, Mar 20, 2014 at 4:29 PM, Richter, Marvin < 
> marvin.rich...@jestadigital.com> wrote:
> 
>> Where should I set this?
>> The BootstrapSettings only provide the method :
>> setThemeProvider(ThemeProvider t);
>> 
>> but not:
>> setTheme(Theme t);
>> 
>> Marvin Richter
>> 
>> -Original Message-
>> From: Martin Grigorov [mailto:mgrigo...@apache.org]
>> Sent: Thursday, March 20, 2014 3:23 PM
>> To: users@wicket.apache.org
>> Subject: Re: custom bootstrap stylesheet
>> 
>> Hi,
>> 
>> Set BootstrapTheme(IBootstrapSettings) as a default theme.
>> 
>> Martin Grigorov
>> Wicket Training and Consulting
>> 
>> 
>> On Thu, Mar 20, 2014 at 4:11 PM, Richter, Marvin < 
>> marvin.rich...@jestadigital.com> wrote:
>> 
>>> Hi,
>>> 
>>> How do I use a customized Bootstrap CCS file in wicket-bootstrap?
>>> 
>>> I tried this:
>>> new BootstrapSettings().setCssResourceReference(new
>>> PackageResourceReference(CcaWebApplication.class,
>>> "customized-bootstrap.css"));
>>> 
>>> Unfortunately getCssResourceReference will never be called, instead 
>>> the reference from the DefaultThemeProvider will be used.
>>> 
>>> But I don't really want to write my own ThemeProvider just to 
>>> replace the CssResourceReference
>>> 
>>> Best Regards,
>>> 
>>> Marvin Richter
>>> 
>>> 
>> 


-
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: custom bootstrap stylesheet

2014-03-20 Thread Richter, Marvin
Ok, I'll think about a better solution and will open a ticket.

When will you expect your first final Major release?
So maybe we could implement a better Configuration but with API breaks?

Marvin Richter


-Original Message-
From: Martin Grigorov [mailto:mgrigo...@apache.org] 
Sent: Thursday, March 20, 2014 4:52 PM
To: users@wicket.apache.org
Subject: Re: custom bootstrap stylesheet

I don't like it either but I see no other way at the moment.
Feel free to file a ticket for improvement.

Martin Grigorov
Wicket Training and Consulting


On Thu, Mar 20, 2014 at 5:47 PM, Richter, Marvin < 
marvin.rich...@jestadigital.com> wrote:

> So I do have to override DefaultThemeProvider and return a 
> BootstrapTheme(ISettings), where in Settings is my custom 
> CssResourceReference?
>
> And then set this ThemeProvider as activeThemeProvider in the Settings?
>
> That sounds really strange to me.
>
> Marvin Richter
>
>
> -Original Message-
> From: Martin Grigorov [mailto:mgrigo...@apache.org]
> Sent: Thursday, March 20, 2014 3:35 PM
> To: users@wicket.apache.org
> Subject: Re: custom bootstrap stylesheet
>
> See https://github.com/l0rdn1kk0n/wicket-bootstrap/issues/339 for an 
> example
>
> Martin Grigorov
> Wicket Training and Consulting
>
>
> On Thu, Mar 20, 2014 at 4:29 PM, Richter, Marvin < 
> marvin.rich...@jestadigital.com> wrote:
>
> > Where should I set this?
> > The BootstrapSettings only provide the method :
> > setThemeProvider(ThemeProvider t);
> >
> > but not:
> > setTheme(Theme t);
> >
> > Marvin Richter
> >
> > -Original Message-
> > From: Martin Grigorov [mailto:mgrigo...@apache.org]
> > Sent: Thursday, March 20, 2014 3:23 PM
> > To: users@wicket.apache.org
> > Subject: Re: custom bootstrap stylesheet
> >
> > Hi,
> >
> > Set BootstrapTheme(IBootstrapSettings) as a default theme.
> >
> > Martin Grigorov
> > Wicket Training and Consulting
> >
> >
> > On Thu, Mar 20, 2014 at 4:11 PM, Richter, Marvin < 
> > marvin.rich...@jestadigital.com> wrote:
> >
> > > Hi,
> > >
> > > How do I use a customized Bootstrap CCS file in wicket-bootstrap?
> > >
> > > I tried this:
> > > new BootstrapSettings().setCssResourceReference(new
> > > PackageResourceReference(CcaWebApplication.class,
> > > "customized-bootstrap.css"));
> > >
> > > Unfortunately getCssResourceReference will never be called, 
> > > instead the reference from the DefaultThemeProvider will be used.
> > >
> > > But I don't really want to write my own ThemeProvider just to 
> > > replace the CssResourceReference
> > >
> > > Best Regards,
> > >
> > > Marvin Richter
> > >
> > >
> >
>


RE: custom bootstrap stylesheet

2014-03-20 Thread Richter, Marvin
So I do have to override DefaultThemeProvider and return a 
BootstrapTheme(ISettings), where in Settings is my custom CssResourceReference?

And then set this ThemeProvider as activeThemeProvider in the Settings?

That sounds really strange to me.

Marvin Richter


-Original Message-
From: Martin Grigorov [mailto:mgrigo...@apache.org] 
Sent: Thursday, March 20, 2014 3:35 PM
To: users@wicket.apache.org
Subject: Re: custom bootstrap stylesheet

See https://github.com/l0rdn1kk0n/wicket-bootstrap/issues/339 for an example

Martin Grigorov
Wicket Training and Consulting


On Thu, Mar 20, 2014 at 4:29 PM, Richter, Marvin < 
marvin.rich...@jestadigital.com> wrote:

> Where should I set this?
> The BootstrapSettings only provide the method :
> setThemeProvider(ThemeProvider t);
>
> but not:
> setTheme(Theme t);
>
> Marvin Richter
>
> -Original Message-
> From: Martin Grigorov [mailto:mgrigo...@apache.org]
> Sent: Thursday, March 20, 2014 3:23 PM
> To: users@wicket.apache.org
> Subject: Re: custom bootstrap stylesheet
>
> Hi,
>
> Set BootstrapTheme(IBootstrapSettings) as a default theme.
>
> Martin Grigorov
> Wicket Training and Consulting
>
>
> On Thu, Mar 20, 2014 at 4:11 PM, Richter, Marvin < 
> marvin.rich...@jestadigital.com> wrote:
>
> > Hi,
> >
> > How do I use a customized Bootstrap CCS file in wicket-bootstrap?
> >
> > I tried this:
> > new BootstrapSettings().setCssResourceReference(new
> > PackageResourceReference(CcaWebApplication.class,
> > "customized-bootstrap.css"));
> >
> > Unfortunately getCssResourceReference will never be called, instead 
> > the reference from the DefaultThemeProvider will be used.
> >
> > But I don't really want to write my own ThemeProvider just to 
> > replace the CssResourceReference
> >
> > Best Regards,
> >
> > Marvin Richter
> >
> >
>


RE: custom bootstrap stylesheet

2014-03-20 Thread Richter, Marvin
Where should I set this?
The BootstrapSettings only provide the method :
setThemeProvider(ThemeProvider t);

but not:
setTheme(Theme t);

Marvin Richter

-Original Message-
From: Martin Grigorov [mailto:mgrigo...@apache.org] 
Sent: Thursday, March 20, 2014 3:23 PM
To: users@wicket.apache.org
Subject: Re: custom bootstrap stylesheet

Hi,

Set BootstrapTheme(IBootstrapSettings) as a default theme.

Martin Grigorov
Wicket Training and Consulting


On Thu, Mar 20, 2014 at 4:11 PM, Richter, Marvin < 
marvin.rich...@jestadigital.com> wrote:

> Hi,
>
> How do I use a customized Bootstrap CCS file in wicket-bootstrap?
>
> I tried this:
> new BootstrapSettings().setCssResourceReference(new
> PackageResourceReference(CcaWebApplication.class,
> "customized-bootstrap.css"));
>
> Unfortunately getCssResourceReference will never be called, instead 
> the reference from the DefaultThemeProvider will be used.
>
> But I don't really want to write my own ThemeProvider just to replace 
> the CssResourceReference
>
> Best Regards,
>
> Marvin Richter
>
>


custom bootstrap stylesheet

2014-03-20 Thread Richter, Marvin
Hi,

How do I use a customized Bootstrap CCS file in wicket-bootstrap?

I tried this:
new BootstrapSettings().setCssResourceReference(new 
PackageResourceReference(CcaWebApplication.class, "customized-bootstrap.css"));

Unfortunately getCssResourceReference will never be called, instead the 
reference from the DefaultThemeProvider will be used.

But I don't really want to write my own ThemeProvider just to replace the 
CssResourceReference

Best Regards,

Marvin Richter



RE: Radiobutton with one choice that has Textfield

2014-02-26 Thread Richter, Marvin
You have to add an input field in your HTML markup



Marvin Richter

-Original Message-
From: zelelbien [mailto:karimbelkhi...@gmail.com] 
Sent: Wednesday, February 26, 2014 3:05 PM
To: users@wicket.apache.org
Subject: Re: Radiobutton with one choice that has Textfield

So.. I'm getting the whole time an exception! 

Here is my code: 

PackageRelatedExternalPanel:

.

public PackageRelatedExternalPanel(String id, IModel model) {
super(id, model);
 setOutputMarkupId(true); 

final IModel packageModel = Model.of(model.getObject()
.getPackage());

otherTextField = new TextArea("other", new 
PropertyModel(packageModel, "mounting") {

private static final long serialVersionUID = 
-7666109097677060257L;

protected void onConfigure() {

setVisible(MOUNTING_CHOICES.get(3).equals("other")); 
  } 
}); 
add(otherTextField); 

packageMounting = new RadioChoice("mounting", new 
PropertyModel(packageModel, 
"package.mounting"), 
MOUNTING_CHOICES); 
packageMounting.add(new 
AjaxFormChoiceComponentUpdatingBehavior()
{

private static final long 
serialVersionUID = 1L;

protected void 
onUpdate(AjaxRequestTarget target) { 
target.add(PackageRelatedExternalPanel.this); 
  } 
}); 
add(packageMounting); 

 
} 

HTML of PackageRelatedExternalPanel:


...

 Mounting
 
  
 

.
..

PackageObj.java:


...
@Transient
private String mounting;// because not yet in the database.. 
works for all
other components like that, even for the old version of mounting (normal 
radiochoice without the case of this "other" with textfield 
..


ObjectCommonValues.java:

public static final List MOUNTING_CHOICES = Arrays.asList(new String[] 
{ "unknown", "sell", "hole", "other"});


And here is the Exception:

Unexpected Exception:
Last cause: The component(s) below failed to render. Possible reasons could be 
that: 1) you have added a component in code but forgot to reference it in the 
markup (thus the component will never be rendered), 2) if your components were 
added in a parent container then make sure the markup for the child container 
includes them in .

1. [TextArea [Component id = other]]



Thankyou for your help!! 



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Radiobutton-with-one-choice-that-has-Textfield-tp4664665p4664690.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: new wicket-bootstrap version in mvn central

2014-02-18 Thread Richter, Marvin
I didn't have the time either but will do so in the next days.
Will let you know if I face some problems.

Marvin Richter


-Original Message-
From: Martin Grigorov [mailto:mgrigo...@apache.org] 
Sent: Tuesday, February 18, 2014 1:57 PM
To: users@wicket.apache.org
Subject: Re: new wicket-bootstrap version in mvn central

Hi Marvin,

Have you tested your app with the -SNAPSHOT version ?
I didn't have much time to read carefully the release notes of TB 3.1.0 and
3.1.1 and I am not sure that everything is stable.

Martin Grigorov
Wicket Training and Consulting


On Tue, Feb 18, 2014 at 1:46 PM, Richter, Marvin < 
marvin.rich...@jestadigital.com> wrote:

> Hi Martin, Michael,
>
> Did you already scheduled when will be the next version of 
> wicket-bootstrap in mvn central including Twitter Bootstrap 3.1.1?
> I would love to have the new feature for resize the Modal.
>
> Best,
> Marvin Richter
>
>


new wicket-bootstrap version in mvn central

2014-02-18 Thread Richter, Marvin
Hi Martin, Michael,

Did you already scheduled when will be the next version of wicket-bootstrap in 
mvn central including Twitter Bootstrap 3.1.1?
I would love to have the new feature for resize the Modal.

Best,
Marvin Richter



RE: DP for GUI interaction

2014-02-17 Thread Richter, Marvin
It depends ...
I'm a big fan of loose coupling so I do almost all interaction between 
components with AJAX events.
For this you just override the onEvent method in your panels which should react 
on AJAX events.

Check out:
http://www.wicket-library.com/wicket-examples/events/wicket/bookmarkable/org.apache.wicket.examples.events.DecoupledAjaxUpdatePage

Best Regards,
Marvin 

-Original Message-
From: Farrukh SATTOROV [mailto:fireda...@gmail.com] 
Sent: Monday, February 17, 2014 4:37 PM
To: users@wicket.apache.org
Subject: DP for GUI interaction

what design pattern you use for interaction between gui components in wicket. 
For instance, showing modal window from toolbar, manipulating with table fom 
another panel, first of all in presentation tier.

--
Regards, Farrukh

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



Re: understanding looking for wicket:id

2014-02-14 Thread Richter, Marvin
That is definitely not a good way to do inheritance. This way you force 
everyone who extends from MyBasePage to know that he has to have a tag in his 
markup file with a wicket:id he might not know.

The right way would be to have a markup file for MyBasePage.java and include 
the  tag.

MyBasePage.html


 }
> }
> 
> no MyBasePage.html, i remove it.
> 
> SubPage.java:
> public class SubPage extends MyBasePage {
> public SubPage() {
> }
> 
> }
> 
> SubPage.html:
> 
> 
> 
> 
> 
> 
> MyPanel.html
> 
> 
> MyPanel
> 
> 
> 
> 
> On Fri, Feb 14, 2014 at 10:56 PM, Sven Meier  wrote:
> 
>> With a wicket:id declared in Html markup, a corresponding component with
>> the same id has to present as child.
>> 
>> It doesn't matter when the child component is added: in the constructor or
>> one of its super constructors (or even later).
>> This does not have anything to do with markup inheritance.
>> 
>> Hope this helps
>> Sven
>> 
>> 
>> On 02/14/2014 07:34 PM, Farrukh SATTOROV wrote:
>> 
>>> Hi everyone. I confused when i look to standard wicket heloworld example
>>> and try understanding  snippet of . How
>>> HelloWorld.html works without  while id mainNavigation
>>> located in superclass (WicketExamplePage). Explain to me mechanism of
>>> looking for wicket:id in this case.
>>> 
>>> 
>> 
>> -
>> 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: getting values from FormComponentPanel outside form.onSubmit()

2014-02-14 Thread Richter, Marvin
Why wouldn’t you just use the defaultFormProcessing an add the converted value 
of the FormComponentPanel to the list inside your onSubmit method?

Best,
Marvin


Am 14.02.2014 um 18:14 schrieb lucast :

> Dear forum,
> 
> I have implemented a FormComponentPanel as suggested both in the Apache
> Wicket Cookbook (chapter 2) and  wicket guide (chapter 12.8)
>   .
> 
> Before I submit the form, I would like to have the option of adding the
> content from FormComponentPanel to a list.
> 
> I have made use of AjaxButton and  I have set 
> AjaxButton.setDefaultFormProcessing( false).
> 
> In order to get value from FormComponentPanel when performing 
> form.onSubmit(), one calls FormComponentPanel.getConvertedInput(), which in
> turns calls FormComponentPanel.convertInput().
> 
> The problem is that if I call FormComponentPanel.getConvertedInput() from
> inside AjaxButton.onSubmit(), FormComponentPanel.convertInput() is never
> called.
> 
> My question is, how can I get the contents from FormComponentPanel using a
> AjaxSubmitLink or AjaxButton without having to go via form.onSubmit()?
> 
> Is there, perhaps another form component that I could use to achieve my
> goal?
> 
> Thanks in advance,
> Lucas
> 
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/getting-values-from-FormComponentPanel-outside-form-onSubmit-tp4664462.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: AjaxFormSubmitBehavior and FilterForm problem

2014-02-13 Thread Richter, Marvin
I implemented a Search for a simple ListView but could be used also for any 
DataView.
This solution also highlights the found String if you add the class 
'highlighted' to you CSS.

The table part:

final WebMarkupContainer table = new WebMarkupContainer("table");
table.setOutputMarkupId(true);
table.add(new TableBehavior().condensed().striped());
add(table);
final TextField searchQuery = new 
TextField("searchQuery", Model.of(""));
searchQuery.add(new AjaxFormComponentUpdatingBehavior("onkeyup") {
 
private static final long serialVersionUID = 
314186226258079912L;
 
@Override
protected void onUpdate(AjaxRequestTarget target) {
target.add(table);
target.appendJavaScript(
"$('.searchResult').find('td:contains(' + 
$('.searchQuery').val() + ')').each(function () {\n"
+ "
$(this).html($(this).html().replace($('.searchQuery').val(), '' + $('.searchQuery').val() + ''));\n"
+ "});");
}
});
add(searchQuery);
 
IModel> filteredHistoryEntries = new 
AbstractReadOnlyModel>() {
 
private static final long serialVersionUID = 
6375514913998162927L;
 
@Override
public List getObject() {
if ((searchQuery.getInput() == null) || 
StringUtils.EMPTY.equals(searchQuery.getInput())) {
return model.getObject();
} else {
List filtered = model.getObject();
CollectionUtils.filter(filtered, new 
HistoryFilter(searchQuery.getInput()));
return filtered;
}
}
};
 
ListView historyEntries = new 
ListView("historyEntries", filteredHistoryEntries) {
 
private static final long serialVersionUID = 
389308185477622395L;
 
@Override
protected void populateItem(ListItem item) {
item.setDefaultModel(new 
CompoundPropertyModel(item.getModel()));
item.add(new DateLabel("created", new CcaDateConverter()));
item.add(new Label("createdByLogin"));
item.add(new Label("contactChannel.name"));
item.add(new Label("action.name"));
item.add(new Label("reason.name"));
item.add(new Label("actionText"));
}
};
table.add(historyEntries);
 
 The Predicate for comparsion (you need to replace the evaluation to check for 
your object fields)
private final class HistoryFilter implements Predicate {
 
private final String searchQuery;
 
private HistoryFilter(String searchQuery) {
this.searchQuery = searchQuery;
}
 
@Override
public boolean evaluate(Object object) {
if (object instanceof ActionJournal) {
ActionJournal entry = (ActionJournal) object;
String q = searchQuery.toLowerCase();
if ((entry.getCreatedByLogin() != null)
&& 
StringUtils.contains(entry.getCreatedByLogin().toLowerCase(), q)) {
return true;
} else if ((entry.getActionText() != null)
&& 
StringUtils.contains(entry.getActionText().toLowerCase(), q)) {
return true;
} else if ((entry.getContactChannel() != null)
&& 
StringUtils.contains(entry.getContactChannel().getName().toLowerCase(), q)) {
return true;
} else if ((entry.getAction() != null)
&& 
StringUtils.contains(entry.getAction().getName().toLowerCase(), q)) {
return true;
} else if ((entry.getReason() != null)
&& 
StringUtils.contains(entry.getReason().getName().toLowerCase(), q)) {
return true;
}
}
return false;
}
}

Marvin Richter

-Original Message-
From: Sandor Feher [mailto:sfe...@bluesystem.hu] 
Sent: Thursday, February 13, 2014 10:45 AM
To: users@wicket.apache.org
Subject: Re: AjaxFormSubmitBehavior and FilterForm problem

Yes, I use TextFilteredPropertyColumn and FilterToolbar.
So it might better to use js to solve this.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AjaxFormSubmitBehavior-and-FilterForm-problem-tp4664422p4664429.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: Wicket Wizzard Question / Custom Overview Bars

2014-02-10 Thread Richter, Marvin
It's just a design decision ... the default design is that the steps are 
displayed on the left side (like in Jira's Wizard for example).
But like Paul described you are free to change this like it fits for you.

Best Regards,
Marvin Richter

-Original Message-
From: Patrick Davids [mailto:patrick.dav...@nubologic.com] 
Sent: Monday, February 10, 2014 10:06 AM
To: users@wicket.apache.org
Subject: Re: Wicket Wizzard Question / Custom Overview Bars

Hi Paul,
thanx a lot for your detailed answer. :-) Helped much, but my primary question 
was, why the overviewbar is on the left hand side, not on the top.

Possibly the header is what I am looking for, showing the current step 
information(?).

But then, I still do not know, what the overviewbar was originally meant for.

Patrick :-)

Am 08.02.2014 19:36, schrieb Paul Bors:
> Find the panel you want to modify, say the WizardButtonBar and extend it:
>
> public class MyWizardButtonBar extends WizardButtonBar {
>  private static final long serialVersionUID = 1L;
>
>  public MyWizardButtonBar(String id, Wizard wizard, final boolean
> finishOnAnyStep) {
>  super(id, wizard);
>  addOrReplace(new MyFinishButton("finish", wizard) {
>  private static final long serialVersionUID = 1L;
>  @Override
>  public boolean isEnabled() {
>  return (super.isEnabled() || finishOnAnyStep);
>  }
>  });
>  }
> }
>
> Then change its HTML to whatever you want, ie MyWizardButtonBar.html I 
> have
> as:
> http://wicket.apache.org";>
>   
>   
> class="toolbox-form-submit" value="[Previous]" />
> class="toolbox-form-submit" value="[Next]" />
> class="toolbox-form-submit" value="[Last]" />
> class="toolbox-form-submit" value="[Cancel]" />
> class="toolbox-form-submit" value="[Finish]" />
>
>   
> 
>
> Finally, extend the Wizard itself and override the factory method you 
> need
> changed:
>
> public class MyWizard extends Wizard { ...
> @Override
>  protected Component newButtonBar(String id) {
>  return new MyWizardButtonBar(id, this, finishOnAnyStep());
>  }
> ...
> }
>
> Then change the Wizard's HTML as you please but preserve the Wicket 
> component tree hirarachy.
> Something like this:
>
> http://wicket.apache.org";>
>  
>  
>  
>  
>  
>  [[Overview]]
>  
>  
>  
>  
>   class="wicketExtensionsWizardHeader"> wicket:id="header">[[Header]]
>  
>  
>   class="wicketExtensionsWizardView"> class="wicketExtensionsWizardViewInner">[[View]]
>  
>  
>   class="wicketExtensionsWizardFeedback"> wicket:id="feedback">[[Feeback]]
>  
>  
>   class="wicketExtensionsWizardButtonBar"> wicket:id="buttons">[[Buttons]]
>  
>  
>  
>  
>  
>  
>  
> 
>
> On a side note, I didn't like the default of the Finish button so I 
> changed that too:
>
> public class MyFinishButton extends WizardButton {
>  private static final long serialVersionUID = 1L;
>
>  public MyFinishButton(String id, IWizard wizard) {
>  super(id, wizard, "org.apache.wicket.extensions.wizard.finish");
>  }
>
>  /**
>   * @see org.apache.wicket.Component#isEnabled()
>   */
>  public boolean isEnabled() {
>  IWizardStep activeStep = getWizardModel().getActiveStep();
>  return (activeStep != null && 
> getWizardModel().isLastStep(activeStep));
>  }
>
>  /**
>   * @see org.apache.wicket.extensions.wizard.WizardButton#onClick()
>   */
>  public final void onClick() {
>  IWizardModel wizardModel = getWizardModel();
>  IWizardStep step = wizardModel.getActiveStep();
>
>  // let the step apply any state
>  step.applyState();
>
>  // if the step completed after applying the state, notify the wizard
>  if(step.isComplete()) {
>  getWizardModel().finish();
>  } else {
>  error(getLocalizer().getString(
>
> "org.apache.wicket.extensions.wizard.FinishButton.step.did.not.complet
> e",
> this)
>  );
>  }
>  }
> }
>
>
> On Fri, Feb 7, 2014 at 9:04 AM, Patrick Davids 
> > wrote:
>
>> Hi all,
>> did someone already noticed, a custom overriden overview-bar of 
>> wickets wizzard is displayed in a  left of the Step contents ?
>>
>> I thought it would be on the top...
>>
>> Or did I misunderstood the meaning of the overview bar?
>> Is it meant a

RE: Best strategy for having login page without navigation

2014-02-07 Thread Richter, Marvin
Or just create a BasePage which implements onRenderHead where you add your 
CSS/JS resources
Then, implement a NavigationPage which extends BasePage and has its Navigation 
and a SignInPage which extends BasePage.

Marvin Richter


-Original Message-
From: Martin Grigorov [mailto:mgrigo...@apache.org] 
Sent: Friday, February 07, 2014 2:12 PM
To: users@wicket.apache.org
Subject: Re: Best strategy for having login page without navigation

Hi,

The simplest way is to make the navigation invisible:
navigation.setVisible(false)
Another way is to extract BasePageWithHeader that extends BasePage.

Martin Grigorov
Wicket Training and Consulting


On Fri, Feb 7, 2014 at 1:31 PM, crestfallen wrote:

> Hi,
>
> ich have a basepage with all styles defined in it. This basepage also 
> holds the navigation of my application.
> Now I want to add a login page. Problem is, I want to extend it from 
> basepage, but avoid to have a navigation there.
> How to you deal with such requirement?
>
> crestfallen
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Best-strategy-for-having-lo
> gin-page-without-navigation-tp4664298.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: Other Component than link in TabbedPanel's newLink

2014-02-07 Thread Richter, Marvin
This is not my only problem ... bootstrap itself doesn't even support what I 
was trying to do  :-/
Cause this is just a small page to support some configs, this would be too much 
effort for now to write all this by myself.

I'll create a pull request for the BootstrapTabbedPanel improvement at the 
weekend.

Thanks,
Marvin


-Original Message-
From: Martin Grigorov [mailto:mgrigo...@apache.org] 
Sent: Friday, February 07, 2014 9:39 AM
To: users@wicket.apache.org
Subject: Re: Other Component than link in TabbedPanel's newLink

Yes, it won't work so easy ...
You use new component for the "link", but then the "title" is not needed.
The easiest is to add MyTabbedPanel extends BootstrapTabbedPanel and in 
MyTabbedPanel.html provide whatever markup fits best for your use case.
Feel free to file an issue to wicket-bootstrap for improvement.

Martin Grigorov
Wicket Training and Consulting


On Fri, Feb 7, 2014 at 9:25 AM, Richter, Marvin < 
marvin.rich...@jestadigital.com> wrote:

> Hmmm unfortunately that didn't do the job  :( I'm quite sure that 
> I just overlooked something ...
>
> Error:
> Close tag not found for tag: . For  
> Components only raw markup is allow in between the tags but not other 
> Wicket Component. Component: [SplitButtonContainer [Component id = 
> link]]
>  MarkupStream: [markup =
> jar:file:/home/mrichter/.m2/repository/de/agilecoders/wicket/wicket-bo
> otstrap-core/0.8.4/wicket-bootstrap-core-0.8.4.jar!/de/agilecoders/wic
> ket/core/markup/html/bootstrap/tabs/BootstrapTabbedPanel.html
> [[tab 
> title]], index = 1, current =  '' 
> (line 0, column 0)]
>
> final BootstrapTabbedPanel configTypes = new 
> BootstrapTabbedPanel("configTypes",
> tabs) {
>
> @Override
> protected WebMarkupContainer newLink(final String 
> linkId, final int index) {
> return new SplitButtonContainer(linkId,
> tabs.get(index).getConfigType().getObject().getName()) {
>
> @Override
> protected void onBaseButtonClick() {
> setSelectedTab(index);
> }
>
> @Override
> protected List 
> onNewSubMenuButtons(String buttonMarkupId) {
> List subMenuLinks = new 
> ArrayList();
> subMenuLinks.add(new
> AjaxLink(buttonMarkupId) {
>
> @Override
> public void 
> onComponentTagBody(MarkupStream markupStream,
> ComponentTag openTag) 
> {
>
> replaceComponentTagBody(markupStream, openTag, "Edit");
> }
>
> @Override
> public void 
> onClick(AjaxRequestTarget target) {
>
> LOG.debug(tabs.get(index).getConfigType().getObject().toString());
> }
> });
> return subMenuLinks;
> }
> };
> }
> };
>
>
> private abstract static class SplitButtonContainer extends Panel {
>
> public SplitButtonContainer(final String id, final String title) {
> super(id);
> IModel label = Model.of(title);
> SplitButton splitButton = new SplitButton("splitButton",
> label) {
>
> @Override
> protected AbstractLink newBaseButton(String 
> markupId, IModel labelModel,
> IModel iconTypeModel) {
> return new Link(markupId) {
>
> private static final long 
> serialVersionUID = 1L;
>
> @Override
> public void onClick() {
> onBaseButtonClick();
> }
> };
> }
>
> @Override
> protected List 
> newSubMenuButtons(String
> buttonMarkupId) {
> return onNewSubMenuButtons(buttonMarkupId);
> }
> };
> }
>
> protected abstract void onBaseButtonClick();
> protected abstract List 
> onNewSubMenuButtons(String buttonMarkupId);
> }
>
> Thanks in advance,
> Marvin
>
&g

RE: Other Component than link in TabbedPanel's newLink

2014-02-07 Thread Richter, Marvin
Hmmm unfortunately that didn't do the job  :(
I'm quite sure that I just overlooked something ...

Error:
Close tag not found for tag: . For  Components 
only raw markup is allow in between the tags but not other Wicket Component. 
Component: [SplitButtonContainer [Component id = link]]
 MarkupStream: [markup = 
jar:file:/home/mrichter/.m2/repository/de/agilecoders/wicket/wicket-bootstrap-core/0.8.4/wicket-bootstrap-core-0.8.4.jar!/de/agilecoders/wicket/core/markup/html/bootstrap/tabs/BootstrapTabbedPanel.html
[[tab title]], 
index = 1, current =  '' (line 0, column 0)]

final BootstrapTabbedPanel configTypes = new 
BootstrapTabbedPanel("configTypes",
tabs) {

@Override
protected WebMarkupContainer newLink(final String linkId, final 
int index) {
return new SplitButtonContainer(linkId, 
tabs.get(index).getConfigType().getObject().getName()) {

@Override
protected void onBaseButtonClick() {
setSelectedTab(index);
}

@Override
protected List 
onNewSubMenuButtons(String buttonMarkupId) {
List subMenuLinks = new 
ArrayList();
subMenuLinks.add(new AjaxLink(buttonMarkupId) {

@Override
public void 
onComponentTagBody(MarkupStream markupStream,
ComponentTag openTag) {

replaceComponentTagBody(markupStream, openTag, "Edit");
}

@Override
public void onClick(AjaxRequestTarget 
target) {

LOG.debug(tabs.get(index).getConfigType().getObject().toString());
}
});
return subMenuLinks;
}
};
}
};


private abstract static class SplitButtonContainer extends Panel {

public SplitButtonContainer(final String id, final String title) {
super(id);
IModel label = Model.of(title);
SplitButton splitButton = new SplitButton("splitButton", label) {

@Override
protected AbstractLink newBaseButton(String markupId, 
IModel labelModel,
IModel iconTypeModel) {
return new Link(markupId) {

private static final long serialVersionUID = 1L;

@Override
public void onClick() {
onBaseButtonClick();
}
};
}

@Override
protected List newSubMenuButtons(String 
buttonMarkupId) {
return onNewSubMenuButtons(buttonMarkupId);
}
};
}

protected abstract void onBaseButtonClick();
protected abstract List onNewSubMenuButtons(String 
buttonMarkupId);
}

Thanks in advance,
Marvin


-Original Message-
From: Richter, Marvin [mailto:marvin.rich...@jestadigital.com] 
Sent: Friday, February 07, 2014 9:07 AM
To: users@wicket.apache.org
Subject: RE: Other Component than link in TabbedPanel's newLink

OMFG ... that was too easy ... I missed the forest for the trees

Thanks

Marvin Richter
Software Developer
T  +49 (0) 30 69 538 1099
M  +49 (0) 174 744 4991
marvin.rich...@jestadigital.com  

JESTA DIGITAL GmbH   Karl-Liebknecht-Str. 32   10178 Berlin, Germany 
Gesellschaft mit beschränkter Haftung mit Sitz in Berlin HRB Nr. 97990 
Amtsgericht Charlottenburg
Geschäftsführer: Markus Peuler


-Original Message-
From: Martin Grigorov [mailto:mgrigo...@apache.org]
Sent: Friday, February 07, 2014 9:04 AM
To: users@wicket.apache.org
Subject: Re: Other Component than link in TabbedPanel's newLink

You a component that has its own markup, i.e. a Panel with SplitButton inside.

Martin Grigorov
Wicket Training and Consulting


On Fri, Feb 7, 2014 at 9:00 AM, Richter, Marvin < 
marvin.rich...@jestadigital.com> wrote:

> Hey,
>
> I'm trying to use a Component which itself contains a Component in the 
> TabbedPanel's newLink method.
> Unfortunately that's not allowed  Cause "... only raw markup is 
> allowed ..."
>
> Any ideas how can still achieve this?
>
> Code:
>
> final BootstrapTabbedPanel configTypes = new 
> BootstrapTabbedPanel("co

RE: Other Component than link in TabbedPanel's newLink

2014-02-07 Thread Richter, Marvin
OMFG ... that was too easy ... I missed the forest for the trees

Thanks

Marvin Richter
Software Developer
T  +49 (0) 30 69 538 1099
M  +49 (0) 174 744 4991
marvin.rich...@jestadigital.com  

JESTA DIGITAL GmbH   Karl-Liebknecht-Str. 32   10178 Berlin, Germany
Gesellschaft mit beschränkter Haftung mit Sitz in Berlin
HRB Nr. 97990 Amtsgericht Charlottenburg
Geschäftsführer: Markus Peuler


-Original Message-
From: Martin Grigorov [mailto:mgrigo...@apache.org] 
Sent: Friday, February 07, 2014 9:04 AM
To: users@wicket.apache.org
Subject: Re: Other Component than link in TabbedPanel's newLink

You a component that has its own markup, i.e. a Panel with SplitButton inside.

Martin Grigorov
Wicket Training and Consulting


On Fri, Feb 7, 2014 at 9:00 AM, Richter, Marvin < 
marvin.rich...@jestadigital.com> wrote:

> Hey,
>
> I'm trying to use a Component which itself contains a Component in the 
> TabbedPanel's newLink method.
> Unfortunately that's not allowed  Cause "... only raw markup is 
> allowed ..."
>
> Any ideas how can still achieve this?
>
> Code:
>
> final BootstrapTabbedPanel configTypes = new 
> BootstrapTabbedPanel("configTypes",
> tabs) {
>
> @Override
> protected WebMarkupContainer newLink(final String 
> linkId, final int index) {
> IModel label = 
> Model.of(tabs.get(index).getConfigType().getObject().getName());
> SplitButton splitButton = new SplitButton(linkId,
> label) {
>
> @Override
> protected AbstractLink 
> newBaseButton(String markupId, IModel labelModel,
> IModel iconTypeModel) {
> return new Link(markupId) {
>
> private static final long 
> serialVersionUID = 1L;
>
> @Override
> public void onClick() {
> setSelectedTab(index);
> }
> };
> }
>
> @Override
> protected List 
> newSubMenuButtons(String buttonMarkupId) {
> List subMenuLinks = new 
> ArrayList();
> subMenuLinks.add(new
> AjaxLink(buttonMarkupId) {
>
> @Override
> public void 
> onComponentTagBody(MarkupStream markupStream,
> ComponentTag openTag) 
> {
>
> replaceComponentTagBody(markupStream, openTag, "Edit");
> }
>
> @Override
> public void 
> onClick(AjaxRequestTarget target) {
>
> LOG.debug(tabs.get(index).getConfigType().getObject().toString());
> }
> });
> return subMenuLinks;
> }
> };
> return splitButton;
> }
> };
>
> Marvin Richter
> Software Developer
> T  +49 (0) 30 69 538 1099
> M  +49 (0) 174 744 4991
> marvin.rich...@jestadigital.com<mailto:marvin.rich...@jestadigital.com
> >
>
> JESTA DIGITAL GmbH   Karl-Liebknecht-Str. 32   10178 Berlin, Germany
> Gesellschaft mit beschränkter Haftung mit Sitz in Berlin HRB Nr. 97990 
> Amtsgericht Charlottenburg
> Geschäftsführer: Markus Peuler
>
>

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



Other Component than link in TabbedPanel's newLink

2014-02-07 Thread Richter, Marvin
Hey,

I'm trying to use a Component which itself contains a Component in the 
TabbedPanel's newLink method.
Unfortunately that's not allowed  Cause "... only raw markup is allowed ..."

Any ideas how can still achieve this?

Code:

final BootstrapTabbedPanel configTypes = new 
BootstrapTabbedPanel("configTypes",
tabs) {

@Override
protected WebMarkupContainer newLink(final String linkId, final 
int index) {
IModel label = 
Model.of(tabs.get(index).getConfigType().getObject().getName());
SplitButton splitButton = new SplitButton(linkId, label) {

@Override
protected AbstractLink newBaseButton(String 
markupId, IModel labelModel,
IModel iconTypeModel) {
return new Link(markupId) {

private static final long 
serialVersionUID = 1L;

@Override
public void onClick() {
setSelectedTab(index);
}
};
}

@Override
protected List 
newSubMenuButtons(String buttonMarkupId) {
List subMenuLinks = new 
ArrayList();
subMenuLinks.add(new AjaxLink(buttonMarkupId) {

@Override
public void 
onComponentTagBody(MarkupStream markupStream,
ComponentTag openTag) {

replaceComponentTagBody(markupStream, openTag, "Edit");
}

@Override
public void onClick(AjaxRequestTarget 
target) {

LOG.debug(tabs.get(index).getConfigType().getObject().toString());
}
});
return subMenuLinks;
}
};
return splitButton;
}
};

Marvin Richter
Software Developer
T  +49 (0) 30 69 538 1099
M  +49 (0) 174 744 4991
marvin.rich...@jestadigital.com

JESTA DIGITAL GmbH   Karl-Liebknecht-Str. 32   10178 Berlin, Germany
Gesellschaft mit beschränkter Haftung mit Sitz in Berlin
HRB Nr. 97990 Amtsgericht Charlottenburg
Geschäftsführer: Markus Peuler



RE: Precondition Check

2014-02-06 Thread Richter, Marvin
No problem ... I have to thank you, you pointed me in the right direction.
Finding such DOM problems while the Browser renders them just fine and even 
calling JQuery selector on console returns the element can be pain in the ass 
...

Marvin Richter


-Original Message-
From: Martin Grigorov [mailto:mgrigo...@apache.org] 
Sent: Thursday, February 06, 2014 3:40 PM
To: users@wicket.apache.org
Subject: Re: Precondition Check

So the check fails here
https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js?source=c#L511
the form is not there ...

Thanks for sharing!

Martin Grigorov
Wicket Training and Consulting


On Thu, Feb 6, 2014 at 3:35 PM, Richter, Marvin < 
marvin.rich...@jestadigital.com> wrote:

> Ok, that would be a valid scenario where that makes sense but that's 
> not the case.
>
> But I found the problem:
> Because of the the childing of my panels the one that was not working 
> was inside a  tag but this panel also contains a form.
>
> As of the HTML specification it is not allowed to nest forms ...
>
> Chrome and FF are so failure tolerant that while rendering they just 
> ignore it. But the Submit will not work anymore ...
>
> Marvin Richter
> Software Developer
> T  +49 (0) 30 69 538 1099
> M  +49 (0) 174 744 4991
> marvin.rich...@jestadigital.com
>
> JESTA DIGITAL GmbH   Karl-Liebknecht-Str. 32   10178 Berlin, Germany
> Gesellschaft mit beschränkter Haftung mit Sitz in Berlin HRB Nr. 97990 
> Amtsgericht Charlottenburg
> Geschäftsführer: Markus Peuler
>
>
> -Original Message-
> From: Martin Grigorov [mailto:mgrigo...@apache.org]
> Sent: Thursday, February 06, 2014 3:22 PM
> To: users@wicket.apache.org
> Subject: Re: Precondition Check
>
> you can click on it and the event listener can delay the actual Ajax 
> call as much as it wants (Wicket's AjaxChannel.QUEUE does exactly this).
>
> E.g. click two times on the link, the first click fires Ajax call (the 
> second click waits), its response removes the link from the DOM (or 
> replaces it), then the second click event will be prevented because 
> its event.target is no more in the DOM
>
>
> Martin Grigorov
> Wicket Training and Consulting
>
>
> On Thu, Feb 6, 2014 at 3:13 PM, Richter, Marvin < 
> marvin.rich...@jestadigital.com> wrote:
>
> > That is the point I don't get ... how can an element doesn't exist 
> > in DOM but I can click on it?
> >
> > Marvin Richter
> >
> >
> > -Original Message-
> > From: Martin Grigorov [mailto:mgrigo...@apache.org]
> > Sent: Thursday, February 06, 2014 3:05 PM
> > To: users@wicket.apache.org
> > Subject: Re: Precondition Check
> >
> > Hi,
> >
> > I see you don't have custom AjaxRequestAttributes, so no custom 
> > preconditions.
> > Wicket has just one default precondition - it will execute the Ajax 
> > call only if the related HTML element (the link) is in the current
> document.
> >
> >
> > https://github.com/apache/wicket/blob/master/wicket-core/src/main/ja
> > va
> > /org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js?source=c#L508
> >
> > Put a breakpoint in Dev Tools/Firebug and see why the link is not in 
> > the document.
> >
> > Martin Grigorov
> > Wicket Training and Consulting
> >
> >
> > On Thu, Feb 6, 2014 at 2:50 PM, Richter, Marvin < 
> > marvin.rich...@jestadigital.com> wrote:
> >
> > > Args ... I already had this problem some time ago but I can't 
> > > remember what it was exactly.
> > >
> > > Wicket Ajax Debug:
> > > INFO: Ajax request stopped because of precondition check, url:
> > > ./admin?1-5.IBehaviorListener.1-configTypes-panel-dialog-footer-bu
> > > tt
> > > on
> > > s-0-button
> > >
> > > I have two different Panels with almost the same functionality ...
> > > creating a new Object and persist it. One is working fine but the 
> > > other one not.
> > >
> > > Works:
> > > private Component save(final Form form) {
> > > return new AjaxSubmitLink(BUTTON_MARKUP_ID, form) {
> > >
> > > @Override
> > > protected void onSubmit(AjaxRequestTarget 
> > > target, Form f) {
> > > Logger log = 
> > > LoggerFactory.getLogger(EditConfigTypeDialog.class);
> > > ConfigManager cm = 
> > > EjbSupportImpl.getInstance().getConfigManager();
> > > ConfigType configType = f

RE: Precondition Check

2014-02-06 Thread Richter, Marvin
Ok, that would be a valid scenario where that makes sense but that's not the 
case.

But I found the problem:
Because of the the childing of my panels the one that was not working was 
inside a  tag but this panel also contains a form.

As of the HTML specification it is not allowed to nest forms ... 

Chrome and FF are so failure tolerant that while rendering they just ignore it. 
But the Submit will not work anymore ... 

Marvin Richter
Software Developer
T  +49 (0) 30 69 538 1099
M  +49 (0) 174 744 4991
marvin.rich...@jestadigital.com  

JESTA DIGITAL GmbH   Karl-Liebknecht-Str. 32   10178 Berlin, Germany
Gesellschaft mit beschränkter Haftung mit Sitz in Berlin
HRB Nr. 97990 Amtsgericht Charlottenburg
Geschäftsführer: Markus Peuler


-Original Message-
From: Martin Grigorov [mailto:mgrigo...@apache.org] 
Sent: Thursday, February 06, 2014 3:22 PM
To: users@wicket.apache.org
Subject: Re: Precondition Check

you can click on it and the event listener can delay the actual Ajax call as 
much as it wants (Wicket's AjaxChannel.QUEUE does exactly this).

E.g. click two times on the link, the first click fires Ajax call (the second 
click waits), its response removes the link from the DOM (or replaces it), then 
the second click event will be prevented because its event.target is no more in 
the DOM


Martin Grigorov
Wicket Training and Consulting


On Thu, Feb 6, 2014 at 3:13 PM, Richter, Marvin < 
marvin.rich...@jestadigital.com> wrote:

> That is the point I don't get ... how can an element doesn't exist in 
> DOM but I can click on it?
>
> Marvin Richter
>
>
> -Original Message-
> From: Martin Grigorov [mailto:mgrigo...@apache.org]
> Sent: Thursday, February 06, 2014 3:05 PM
> To: users@wicket.apache.org
> Subject: Re: Precondition Check
>
> Hi,
>
> I see you don't have custom AjaxRequestAttributes, so no custom 
> preconditions.
> Wicket has just one default precondition - it will execute the Ajax 
> call only if the related HTML element (the link) is in the current document.
>
>
> https://github.com/apache/wicket/blob/master/wicket-core/src/main/java
> /org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js?source=c#L508
>
> Put a breakpoint in Dev Tools/Firebug and see why the link is not in 
> the document.
>
> Martin Grigorov
> Wicket Training and Consulting
>
>
> On Thu, Feb 6, 2014 at 2:50 PM, Richter, Marvin < 
> marvin.rich...@jestadigital.com> wrote:
>
> > Args ... I already had this problem some time ago but I can't 
> > remember what it was exactly.
> >
> > Wicket Ajax Debug:
> > INFO: Ajax request stopped because of precondition check, url:
> > ./admin?1-5.IBehaviorListener.1-configTypes-panel-dialog-footer-butt
> > on
> > s-0-button
> >
> > I have two different Panels with almost the same functionality ...
> > creating a new Object and persist it. One is working fine but the 
> > other one not.
> >
> > Works:
> > private Component save(final Form form) {
> > return new AjaxSubmitLink(BUTTON_MARKUP_ID, form) {
> >
> > @Override
> > protected void onSubmit(AjaxRequestTarget 
> > target, Form f) {
> > Logger log = 
> > LoggerFactory.getLogger(EditConfigTypeDialog.class);
> > ConfigManager cm = 
> > EjbSupportImpl.getInstance().getConfigManager();
> > ConfigType configType = form.getModelObject();
> > if (configType.getId() != null) {
> > try {
> > ConfigType updated = 
> > cm.updateConfigType(configType);
> > form.success("Successfully updated 
> > the ConfigType.");
> > form.setModelObject(updated);
> > } catch (CcaException ex) {
> > form.error("Failed to update
> ConfigType");
> > log.error("Failed to update 
> > ConfigType", ex);
> > }
> > } else {
> > try {
> > ConfigType created = 
> > cm.addConfigType(configType);
> > form.success("Successfully created 
> > the ConfigType.");
> > form.setModelObject(created);
> > } catch (CcaException ex) {
> > form.error("Failed to create
> ConfigType");
> >   

RE: Precondition Check

2014-02-06 Thread Richter, Marvin
That is the point I don't get ... how can an element doesn't exist in DOM but I 
can click on it?

Marvin Richter


-Original Message-
From: Martin Grigorov [mailto:mgrigo...@apache.org] 
Sent: Thursday, February 06, 2014 3:05 PM
To: users@wicket.apache.org
Subject: Re: Precondition Check

Hi,

I see you don't have custom AjaxRequestAttributes, so no custom preconditions.
Wicket has just one default precondition - it will execute the Ajax call only 
if the related HTML element (the link) is in the current document.

https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js?source=c#L508

Put a breakpoint in Dev Tools/Firebug and see why the link is not in the 
document.

Martin Grigorov
Wicket Training and Consulting


On Thu, Feb 6, 2014 at 2:50 PM, Richter, Marvin < 
marvin.rich...@jestadigital.com> wrote:

> Args ... I already had this problem some time ago but I can't remember 
> what it was exactly.
>
> Wicket Ajax Debug:
> INFO: Ajax request stopped because of precondition check, url:
> ./admin?1-5.IBehaviorListener.1-configTypes-panel-dialog-footer-button
> s-0-button
>
> I have two different Panels with almost the same functionality ...
> creating a new Object and persist it. One is working fine but the 
> other one not.
>
> Works:
> private Component save(final Form form) {
> return new AjaxSubmitLink(BUTTON_MARKUP_ID, form) {
>
> @Override
> protected void onSubmit(AjaxRequestTarget target, 
> Form f) {
> Logger log =
> LoggerFactory.getLogger(EditConfigTypeDialog.class);
> ConfigManager cm = 
> EjbSupportImpl.getInstance().getConfigManager();
> ConfigType configType = form.getModelObject();
> if (configType.getId() != null) {
> try {
> ConfigType updated = 
> cm.updateConfigType(configType);
> form.success("Successfully updated the 
> ConfigType.");
> form.setModelObject(updated);
> } catch (CcaException ex) {
> form.error("Failed to update ConfigType");
> log.error("Failed to update 
> ConfigType", ex);
> }
> } else {
> try {
> ConfigType created = 
> cm.addConfigType(configType);
> form.success("Successfully created the 
> ConfigType.");
> form.setModelObject(created);
> } catch (CcaException ex) {
> form.error("Failed to create ConfigType");
> log.error("Failed to create 
> ConfigType", ex);
> }
> }
> target.add(form);
> }
>
> @Override
> protected void onError(AjaxRequestTarget target, 
> Form form) {
> target.add(form);
> }
>
> @Override
> public void onComponentTagBody(MarkupStream 
> markupStream, ComponentTag openTag) {
> replaceComponentTagBody(markupStream, openTag, 
> "Save");
> }
> }.add(new ButtonBehavior(Buttons.Type.Primary));
> }
>
> Doesn't work:
> private Component save(final Form form) {
> return new AjaxSubmitLink(BUTTON_MARKUP_ID, form) {
>
> @Override
> protected void onSubmit(AjaxRequestTarget target, 
> Form f) {
> Logger log =
> LoggerFactory.getLogger(EditConfigKeyDialog.class);
> ConfigManager cm = 
> EjbSupportImpl.getInstance().getConfigManager();
> ConfigKey configKey = form.getModelObject();
> if (configKey.getId() != null) {
> try {
> ConfigKey updated = 
> cm.updateConfigKey(configKey);
> form.success("Successfully updated the 
> ConfigKey");
> form.setModelObject(updated);
> } catch (CcaException ex) {
> form.error("Failed to update ConfigKey");
>   

Precondition Check

2014-02-06 Thread Richter, Marvin
Args ... I already had this problem some time ago but I can't remember what it 
was exactly.

Wicket Ajax Debug:
INFO: Ajax request stopped because of precondition check, url: 
./admin?1-5.IBehaviorListener.1-configTypes-panel-dialog-footer-buttons-0-button

I have two different Panels with almost the same functionality ... creating a 
new Object and persist it. One is working fine but the other one not.

Works:
private Component save(final Form form) {
return new AjaxSubmitLink(BUTTON_MARKUP_ID, form) {

@Override
protected void onSubmit(AjaxRequestTarget target, Form 
f) {
Logger log = 
LoggerFactory.getLogger(EditConfigTypeDialog.class);
ConfigManager cm = 
EjbSupportImpl.getInstance().getConfigManager();
ConfigType configType = form.getModelObject();
if (configType.getId() != null) {
try {
ConfigType updated = 
cm.updateConfigType(configType);
form.success("Successfully updated the 
ConfigType.");
form.setModelObject(updated);
} catch (CcaException ex) {
form.error("Failed to update ConfigType");
log.error("Failed to update ConfigType", ex);
}
} else {
try {
ConfigType created = 
cm.addConfigType(configType);
form.success("Successfully created the 
ConfigType.");
form.setModelObject(created);
} catch (CcaException ex) {
form.error("Failed to create ConfigType");
log.error("Failed to create ConfigType", ex);
}
}
target.add(form);
}

@Override
protected void onError(AjaxRequestTarget target, Form 
form) {
target.add(form);
}

@Override
public void onComponentTagBody(MarkupStream markupStream, 
ComponentTag openTag) {
replaceComponentTagBody(markupStream, openTag, "Save");
}
}.add(new ButtonBehavior(Buttons.Type.Primary));
}

Doesn't work:
private Component save(final Form form) {
return new AjaxSubmitLink(BUTTON_MARKUP_ID, form) {

@Override
protected void onSubmit(AjaxRequestTarget target, Form 
f) {
Logger log = 
LoggerFactory.getLogger(EditConfigKeyDialog.class);
ConfigManager cm = 
EjbSupportImpl.getInstance().getConfigManager();
ConfigKey configKey = form.getModelObject();
if (configKey.getId() != null) {
try {
ConfigKey updated = 
cm.updateConfigKey(configKey);
form.success("Successfully updated the 
ConfigKey");
form.setModelObject(updated);
} catch (CcaException ex) {
form.error("Failed to update ConfigKey");
log.error("Failed to update ConfigKey", ex);
}
} else {
try {
ConfigKey created = cm.addConfigKey(configKey);
form.success("Successfully created the 
ConfigKey");
form.setModelObject(created);
} catch (CcaException ex) {
form.error("Failed to create ConfigKey");
log.error("Failed to create ConfigKey", ex);
}
}
target.add(form);
}

@Override
protected void onError(AjaxRequestTarget target, Form 
form) {
target.add(form);
}

@Override
public void onComponentTagBody(MarkupStream markupStream, 
ComponentTag openTag) {
replaceComponentTagBody(markupStream, openTag, "Save");
}
}.add(new ButtonBehavior(Buttons.Type.Primary));
}

I don't see a big difference why the other wouldn't work. You?


Marvin Richter
Software Developer
T  +49 (0) 30 69 538 1099
M  +49 (0) 174 744 4991
marvin.rich...@jestadigital.com

JESTA DIGITAL GmbH   Karl-Liebknecht-Str. 32   10178 Berlin, Ger

RE: Memory leaks best practices

2014-02-06 Thread Richter, Marvin
If you have Models or Components as fields in you classes you should override 
the classes method onDetach.

Example:

Public class MyPanel extends Panel  {

private final IModel objectModel;

public MyPanel(String id, IModel objectModel) {
super(id,objectModel);
this.objectModel = objectModel;
}

@Override
protected void onDetach() {
super.onDetach();
objectModel.detach();
 }
}

Marvin Richter


-Original Message-
From: Maxim Solodovnik [mailto:solomax...@gmail.com] 
Sent: Thursday, February 06, 2014 1:09 PM
To: users@wicket.apache.org
Subject: Memory leaks best practices

Hello All,

Recently we have deployed our project to wicket project to production server.
And start getting OutOfMemory PermGenSpace.

I believe we have memory leak in our application maybe there is best practices 
how to deal with Models and JPA entities to resolve this?

Thanks in advance

--
WBR
Maxim aka solomax


Re: Modularity in Wicket Application

2014-02-05 Thread Richter, Marvin
Thanks Martin,

sometimes I’m astonished how fast you reply … ;)

The wicket-plugin project is exactly what I was looking for.

Am 05.02.2014 um 23:37 schrieb Martin Grigorov :

> Hi,
> 
> Look in the archives for "plugin" and "IInitializer".
> Wicket's IInitializer is very simple solution for this.
> Also Decebal Suiu have implemented https://github.com/decebals/wicket-plugin
> 
> Martin Grigorov
> Wicket Training and Consulting
> 
> 
> On Wed, Feb 5, 2014 at 11:17 PM, Richter, Marvin <
> marvin.rich...@jestadigital.com> wrote:
> 
>> Hey guys,
>> 
>> hope you can help me with this.
>> 
>> I’m currently in the preparation phase of a new Project and evaluating
>> possible technologies.
>> What I already know: the Web part will be done with Wicket.
>> 
>> The application will be some kind of management tool for others
>> applications configuration.
>> To support future applications configuration it would be nice to just need
>> to develop „Plugins“ for the new application and just drop them into the
>> management tool.
>> 
>> Did anyone something like this already? If so, how did you do this? Which
>> technology did you use to support modularity in a wicket application?
>> 
>> I’m thankful for any advice.
>> 
>> Marvin
>> -
>> 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



Modularity in Wicket Application

2014-02-05 Thread Richter, Marvin
Hey guys,

hope you can help me with this.

I’m currently in the preparation phase of a new Project and evaluating possible 
technologies.
What I already know: the Web part will be done with Wicket.

The application will be some kind of management tool for others applications 
configuration.
To support future applications configuration it would be nice to just need to 
develop „Plugins“ for the new application and just drop them into the 
management tool.

Did anyone something like this already? If so, how did you do this? Which 
technology did you use to support modularity in a wicket application?

I’m thankful for any advice.

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



RE: Wicket-bootstrap Bootstrap 3 support

2014-02-05 Thread Richter, Marvin
There might be breaking changes with Modals. Not sure if you provide support 
for the remote function of the Bootstrap Modals.

Marvin Richter


-Original Message-
From: Martin Grigorov [mailto:mgrigo...@apache.org] 
Sent: Wednesday, February 05, 2014 8:54 AM
To: users@wicket.apache.org
Subject: Re: Wicket-bootstrap Bootstrap 3 support

Right, the correct way is to use Maven for this.
Another way is via IBootstrapSettings#setCssResourceReference() -
https://github.com/l0rdn1kk0n/wicket-bootstrap/blob/master/bootstrap-core/src/main/java/de/agilecoders/wicket/core/settings/IBootstrapSettings.java?source=c#L53

We will upgrade to 3.1.0 soon. We have to see whether there are breaking 
migration changes first.

Martin Grigorov
Wicket Training and Consulting


On Wed, Feb 5, 2014 at 8:41 AM, Richter, Marvin < 
marvin.rich...@jestadigital.com> wrote:

> In Maven you can just exclude transitive dependecies from a dependency 
> and add the version you prefer. But be aware of possible version conflicts.
>
> 
> de.agilecoders.wicket
> wicket-bootstrap-core
> ${wicket.bootstrap.version}
> 
> 
> org.webjars
> bootstrap
> 
> 
> 
> 
> org.webjars
> bootstrap
> 3.1.0
> 
>
> Best,
> Marvin
>
> -Original Message-
> From: danjee [mailto:daniel.j...@asf.ro]
> Sent: Wednesday, February 05, 2014 8:32 AM
> To: users@wicket.apache.org
> Subject: Re: Wicket-bootstrap Bootstrap 3 support
>
> On 02/05/2014 09:13 AM, danjee [via Apache Wicket] wrote:
> > I found out that I could put the dependency in my pom.xml and no 
> > need to alter the one from your release.
> > Sorry for the confusion, I am pretty new to maven.
> > Best regards,
> > Daniel
> >
> > 
> > --
> > -- If you reply to this email, your message will be added to the 
> > discussion below:
> > http://apache-wicket.1842946.n4.nabble.com/Wicket-bootstrap-Bootstra
> > p-
> > 3-support-tp4661497p4664171.html
> >
> > To unsubscribe from Wicket-bootstrap Bootstrap 3 support, click here 
> > <
> http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?ma
> cro=unsubscribe_by_code&node=4661497&code=ZGFuaWVsLmppcGFAYXNmLnJvfDQ2
> NjE0OTd8LTIwNDU1Njg5NTY=
> >.
> > NAML
> > 
> ><http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?
> >m  
> >acro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.n
> >a
> > 
> >ml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace
> >-  
> >nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers
> >%  
> >21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_insta
> >n
> > t_email%21nabble%3Aemail.naml>
> >
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Wicket-bootstrap-Bootstrap-
> 3-support-tp4661497p4664173.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: Wicket-bootstrap Bootstrap 3 support

2014-02-04 Thread Richter, Marvin
In Maven you can just exclude transitive dependecies from a dependency and add 
the version you prefer. But be aware of possible version conflicts.


de.agilecoders.wicket
wicket-bootstrap-core
${wicket.bootstrap.version}


org.webjars
bootstrap




org.webjars
bootstrap
3.1.0


Best,
Marvin

-Original Message-
From: danjee [mailto:daniel.j...@asf.ro] 
Sent: Wednesday, February 05, 2014 8:32 AM
To: users@wicket.apache.org
Subject: Re: Wicket-bootstrap Bootstrap 3 support

On 02/05/2014 09:13 AM, danjee [via Apache Wicket] wrote:
> I found out that I could put the dependency in my pom.xml and no need 
> to alter the one from your release.
> Sorry for the confusion, I am pretty new to maven.
> Best regards,
> Daniel
>
> --
> -- If you reply to this email, your message will be added to the 
> discussion below:
> http://apache-wicket.1842946.n4.nabble.com/Wicket-bootstrap-Bootstrap-
> 3-support-tp4661497p4664171.html
>
> To unsubscribe from Wicket-bootstrap Bootstrap 3 support, click here 
> .
> NAML
>  acro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.na
> ml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-
> nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%
> 21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instan
> t_email%21nabble%3Aemail.naml>
>



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-bootstrap-Bootstrap-3-support-tp4661497p4664173.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: multiple path parameters in path segment

2014-01-31 Thread Richter, Marvin
Too damn bad, but as long as there is possible solution ...

For now I'll stick with my solution which is a bit more dirty. I'm actually 
handling the 2 parameters as one and working with a regex to separate these two 
in the Constructor.

Thanks for your fast reply.

Best,
Marvin

-Original Message-
From: Martin Grigorov [mailto:mgrigo...@apache.org] 
Sent: Friday, January 31, 2014 4:20 PM
To: users@wicket.apache.org
Subject: Re: multiple path parameters in path segment

Hi geek,

I'm afraid this is not supported at the moment.
Placeholder can only be a complete path segment.
E.g. : .../${identifierType}/...
A segment cannot contain mixes of 'fixed' text, mandatory placeholder and/or 
optional placeholders.
You will need custom IRequestMapper impl for your scheme.
See MountedMapper and its super classes for inspiration.


Martin Grigorov
Wicket Training and Consulting


On Fri, Jan 31, 2014 at 3:33 PM, Richter, Marvin < 
marvin.rich...@jestadigital.com> wrote:

> Hey geeks,
>
> Hope you can help me.
> I'm actually trying to mount a page including 2 path parameters in 
> path segment.
> What I try:
> mountPage("/customer/${IdentifierType}:${Identifier}/",
> ManageCustomerPage.class);
>
> è Should result into /customer/ID:10001/ or /customer/EMAIL:ilove% 
> 40wicket.org/
>
> Note the colon between the two parameters.
>
> But unfortunately this will result in not mounting the page and 
> appending all parameters as query parameters
>
> è /com.company.ManageCustomerPage?IdentifierType=ID&Identifier=10001
>
> Did anyone try something like this before?
>
> Thanks in advance,
> Marvin
>


multiple path parameters in path segment

2014-01-31 Thread Richter, Marvin
Hey geeks,

Hope you can help me.
I'm actually trying to mount a page including 2 path parameters in path segment.
What I try:
mountPage("/customer/${IdentifierType}:${Identifier}/", 
ManageCustomerPage.class);

è Should result into /customer/ID:10001/ or /customer/EMAIL:ilove%40wicket.org/

Note the colon between the two parameters.

But unfortunately this will result in not mounting the page and appending all 
parameters as query parameters

è /com.company.ManageCustomerPage?IdentifierType=ID&Identifier=10001

Did anyone try something like this before?

Thanks in advance,
Marvin


Re: timing for Wicket 7?

2014-01-28 Thread Richter, Marvin
Ah ok. Didn't know that. Thanks

On Di, 2014-01-28 at 13:21 +0100, Martin Grigorov wrote:
> On Tue, Jan 28, 2014 at 1:14 PM, Richter, Marvin <
> marvin.rich...@jestadigital.com> wrote:
> 
> > I'm a bit confused, because of 'There are no other planned big changes
> > for 7.x'
> >
> 
> At the moment we have no plans for more changes/features.
> 
> 
> >
> > I thought with 7.x Servlet API v3 will be used ... Am I wrong?
> >
> 
> JDK7 and Servlet 3.0 are mandatory for Wicket 7 already. This has been done
> several months ago.
> 
> 
> >
> > Best,
> > Marvin Richter
> >
> > On Fr, 2014-01-24 at 11:04 +0200, Martin Grigorov wrote:
> > > Hi Ernesto,
> > >
> > > There won't be 7.0.0 in the next month.
> > >
> > > We will make a milestone release so users can try it and give feedback.
> > > The only thing to do before the milestone is to make the voted
> > experimental
> > > modules stable.
> > > With this milestone release we want to get feedback for the small API
> > > changes we did.
> > >
> > > There are no other planned big changes for 7.x.
> > > I am working on markup driven component tree construction in a branch. We
> > > discuss it in dev@ but unless it is super stable and simple and
> > approved by
> > > other devs it won't be added to 7.0.0.
> > >
> > > Martin Grigorov
> > > Wicket Training and Consulting
> > >
> > >
> > > On Fri, Jan 24, 2014 at 10:55 AM, Ernesto Reinaldo Barreiro <
> > > reier...@gmail.com> wrote:
> > >
> > > > Hi,
> > > >
> > > > What's the estimated release date for Wicket 7? Why? In a couple of
> > weeks I
> > > > will start a new Wicket project and the estimated time to complete it
> > is
> > > > one month (at least for the initial release). I've thought maybe I
> > could
> > > > start it using current Wicket 7 and 1) provide feedback, 2) contribute
> > to
> > > > make wicket 7 stable 3) start migrating libraries I will use. But I
> > would
> > > > like to have my first release with an official version of Wicket 7. Is
> > that
> > > > too risky?
> > > >
> > > > --
> > > > Regards - Ernesto Reinaldo Barreiro
> > > >
> >
> >
> > -
> > 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: timing for Wicket 7?

2014-01-28 Thread Richter, Marvin
I'm a bit confused, because of 'There are no other planned big changes
for 7.x'

I thought with 7.x Servlet API v3 will be used ... Am I wrong?

Best,
Marvin Richter

On Fr, 2014-01-24 at 11:04 +0200, Martin Grigorov wrote:
> Hi Ernesto,
> 
> There won't be 7.0.0 in the next month.
> 
> We will make a milestone release so users can try it and give feedback.
> The only thing to do before the milestone is to make the voted experimental
> modules stable.
> With this milestone release we want to get feedback for the small API
> changes we did.
> 
> There are no other planned big changes for 7.x.
> I am working on markup driven component tree construction in a branch. We
> discuss it in dev@ but unless it is super stable and simple and approved by
> other devs it won't be added to 7.0.0.
> 
> Martin Grigorov
> Wicket Training and Consulting
> 
> 
> On Fri, Jan 24, 2014 at 10:55 AM, Ernesto Reinaldo Barreiro <
> reier...@gmail.com> wrote:
> 
> > Hi,
> >
> > What's the estimated release date for Wicket 7? Why? In a couple of weeks I
> > will start a new Wicket project and the estimated time to complete it is
> > one month (at least for the initial release). I've thought maybe I could
> > start it using current Wicket 7 and 1) provide feedback, 2) contribute to
> > make wicket 7 stable 3) start migrating libraries I will use. But I would
> > like to have my first release with an official version of Wicket 7. Is that
> > too risky?
> >
> > --
> > Regards - Ernesto Reinaldo Barreiro
> >


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



RE: Handling exceptions thrown by a model

2014-01-22 Thread Richter, Marvin
Just my few cents to this.
I'm using something very similar to what Sebastien wrote but because I have 
several different ModelObject Types where I need this, I wrote it a bit more 
generic:

/**
 * @param Type of Object
 *
 * @author  mrichter
 */
public abstract class ExceptionHandledModel extends 
LoadableDetachableModel> {

private static final Logger LOG = 
LoggerFactory.getLogger(ExceptionHandledModel.class);

@Override
protected List load() {
try {
return this.onLoad();
} catch (Exception e) {
LOG.error("Failed to load List of Type " + T, e);
this.onError(e.getMessage());
}
return Collections.emptyList();
}

protected abstract List onLoad() throws Exception;
protected abstract void onError(String message);
}

Best,
Marvin


-Original Message-
From: Sebastien [mailto:seb...@gmail.com] 
Sent: Wednesday, January 22, 2014 2:43 PM
To: users@wicket.apache.org
Subject: Re: Handling exceptions thrown by a model

Hi Olivier,

I simple way to achieve this is to have a (abstract) #onError method:

public abstract class MyModel extends
LoadableDetachableModel>
{
private static final long serialVersionUID = 1L;
private static final Logger LOG =
LoggerFactory.getLogger(DashboardModel.class);

public MyModel()
{
}

@Override
protected List load()
{
List list = new ArrayList();

try
{
//TODO fill list;
}
catch (TheException e)
{
this.error(e.getMessage(), e);
}

return list;
}

private void error(String message, Exception e)
{
LOG.error(message, e);
this.onError(message);
}

protected abstract void onError(String message); }

In MyPage

private MyModel newMyModel()
{
return new MyModel() {

private static final long serialVersionUID = 1L;

@Override
protected void onError(String message)
{
MyPage.this.error(message);
}
};
}


Hope this helps,
Sebastien.


On Wed, Jan 22, 2014 at 2:07 PM, Oliver B. Fischer wrote:

> I have implementation of LoadableDetachableModel which might throw an 
> exception in load(). Unfortunately this exception might be thrown 
> while rendering the page.
>
> Currently I handle the exception with an AbstractRequestCycleListener 
> added to the application itself.
>
> But don't like it because I don't want to add an 
> AbstractRequestCycleListener for each possible exception.
>
> It is possible to handle specific exceptions page local? I tried to 
> add a custom Behaviour implementation to my page but the onException() 
> method was never called.
>
> Any idea how to handle such exceptions locally?
>
> Oliver
>
> -
> 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