Re: Web Sockets proxying

2014-01-27 Thread Paul Bors
I don't think segmentation faults fall (no pun intended) under Wicket :)

You might want to look for help under the Unbuntu's user mailing lists
and/or search on Google.
Here's a starting point for you:
http://www.amoss.me.uk/2013/06/apache-2-2-websocket-proxying-ubuntu-mod_proxy_wstunnel/


On Mon, Jan 27, 2014 at 12:42 PM, Maxim Solodovnik wrote:

> Hello All,
> Is there any way to perform proxying of web sockets?
>
> I have tried mod_proxy_wstunnel but with no luck due to
> 1) I might compile something to very stable (Segmentation fault under
> Ubuntu 13.10 HTTP 2.4.6)
> 2) both main app and ws URL are looks the same:
> http://localhost/openmeetings and ws://localhost/openmeetings.
>
> Should I create additional page/mapping for performing ws tunneling?
> Maybe anyone can share example config/how to?
>
> Thanks in advance :)
>
> --
> WBR
> Maxim aka solomax
>


Re: XSS in wicket. Wicket fault or my fault?

2014-01-29 Thread Paul Bors
No need, Wicket escapes your model objects, see
Component#setEscapeModelStrings(true) for when HTML should be escaped and
thus the browser won't execute it as HTML or JS.
http://ci.apache.org/projects/wicket/apidocs/6.x/org/apache/wicket/Component.html#setEscapeModelStrings(boolean)

That is on by default, so you should switch to using a wicket model for
your label.

See the bottom section 11.1 "What is a model?" of the wicket free guide at:
http://wicket.apache.org/guide/guide/modelsforms.html#modelsforms_1

Also, older Wicket in Action:
http://www.javaranch.com/journal/2008/10/using-wicket-labels-and-links.html


On Wed, Jan 29, 2014 at 12:26 PM, Gonzalo Aguilar Delgado <
gagui...@aguilardelgado.com> wrote:

> Hi there,
>
> I'm building an application for a client and my security advisor told me
> about a XSS attack that can be performed on the site.
>
> When user logs-in I welcome they by Saying "Hello user".
>
> 
> 
> Hello ${realName}.
> Welcome to the Synapse web.
> 
> 
>
>
> As you can see I use I18N so this is not the real text that will show up,
> but's similar.
>
> I used to think that wicket validated output before building web but the
> white hat hacked it by just putting a fake name into the database. Too easy
> for me...
>
> The content of realName is:
>
> '';!--"alert('XSS')=&{()}
>
>
> So I ended with:
>
> Hello'';!--"alert('XSS')=&{()}
>
> In the web page. And the script executed on login.
>
> I was thinking about baking a method into my DAO classes to validate
> everything that goes to the database. But it should be a better solution.
>
> Can you point me to right one?
>
>
>
> Best regards,
>
>
>


Re: Which is recomended way to implemen an editable repeating view

2014-01-29 Thread Paul Bors
Take your pick at one of the Repeaters from:
http://www.wicket-library.com/wicket-examples/index.html

More on them in Ch 13 "Displaying multiple items with repeaters" of the
Wicket free guide at:
http://wicket.apache.org/guide/guide/repeaters.html

Or pruchase a book on Wicket such as Wicket in Action:
http://wicket.apache.org/learn/books/


On Wed, Jan 29, 2014 at 5:23 AM, cosmindumy  wrote:

> Hello,
> I want to know which is the best way to implement a repeating view,
> preferable data view which contains an input field in each row.
> On submit, I need to get an iterator to get reference both to row model
> (example a Person object) and to editable component (ex an input text for
> age). The input must be processed and model updated.
> Thanks in advance.
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Which-is-recomended-way-to-implemen-an-editable-repeating-view-tp4664028.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
>
>


Singleton for empty models

2014-01-30 Thread Paul Bors
While I have re-usable panels, I don't want them to look up the component
tree hirarchy for a compound property model.



So I end up creating a lot of empty models such as:

super(id, new Model());



How do you guys manage your empty models?

Won't it make sense to have a Model.EMPTY_INSTANCE or similar?



Of course I can have Spring or some other DI handle that empty instance as
a singleton, but I am curious as to how other users solve this problem?


Re: Singleton for empty models

2014-01-30 Thread Paul Bors
Btw, in my use-case I extends FormComponentPanel since if I were to
set its panel to null or a compund property one, I would have to change my
model object to include the wicket id for the FormComponentPanel itself and
then go to the fields I need.

Inside my panel I warpped what I needed in PropertyModels.


On Thu, Jan 30, 2014 at 2:34 PM, Paul Bors  wrote:

> While I have re-usable panels, I don't want them to look up the component
> tree hirarchy for a compound property model.
>
>
>
> So I end up creating a lot of empty models such as:
>
> super(id, new Model());
>
>
>
> How do you guys manage your empty models?
>
> Won't it make sense to have a Model.EMPTY_INSTANCE or similar?
>
>
>
> Of course I can have Spring or some other DI handle that empty instance as
> a singleton, but I am curious as to how other users solve this problem?
>


Re: Singleton for empty models

2014-01-30 Thread Paul Bors
n/m as I wrote this e-mail I realized that I don't need a
FormComponentPanel and going with a simple Panel is all have to do.

Sorry for the noise...


On Thu, Jan 30, 2014 at 2:41 PM, Paul Bors  wrote:

> Btw, in my use-case I extends FormComponentPanel since if I were to
> set its panel to null or a compund property one, I would have to change my
> model object to include the wicket id for the FormComponentPanel itself and
> then go to the fields I need.
>
> Inside my panel I warpped what I needed in PropertyModels.
>
>
> On Thu, Jan 30, 2014 at 2:34 PM, Paul Bors  wrote:
>
>> While I have re-usable panels, I don't want them to look up the component
>> tree hirarchy for a compound property model.
>>
>>
>>
>> So I end up creating a lot of empty models such as:
>>
>> super(id, new Model());
>>
>>
>>
>> How do you guys manage your empty models?
>>
>> Won't it make sense to have a Model.EMPTY_INSTANCE or similar?
>>
>>
>>
>> Of course I can have Spring or some other DI handle that empty instance
>> as a singleton, but I am curious as to how other users solve this problem?
>>
>
>


Re: onchange event always being fired before onclick event

2014-01-30 Thread Paul Bors
What makes you think that the only way to focus on something is by clicking
on it?

I would aproach your problem from a different angle. I would ask the
browser to give me whatever has the focus via document.activeElement:
https://developer.mozilla.org/en-US/docs/Web/API/document.activeElement
http://msdn.microsoft.com/en-us/library/ie/ms533065(v=vs.85).aspx

Or simply use the focus selector in jQuery:
http://api.jquery.com/focus-selector/


On Thu, Jan 30, 2014 at 2:15 PM, Rafael Barrera Oro wrote:

> Hello everyone!
>
> I'm trying to to mantain the focus of the last component that was clicked
> regardless of the refresh of part of the page when certain text field
> changes. The problem i have is that the onchange event is always fired
> before the onclick method, and this causes that the latter is either fired
> over the wrong component or not fired at all, is there a way to delay the
> onchange event until after the onclick event takes place?
>
> My goal is to use the onclick event to save the id of the clicked
> component, then let the onchange event do its thing (refresh a part of the
> page which maybe includes the clicked component).
>
> Has anyone achieved something similiar and/or has any ideas?
>
> Thanks in advance!
> Rafael
>


Re: onchange event always being fired before onclick event

2014-01-30 Thread Paul Bors
Btw, your use-case sounds strange.

Why would you refresh what's in focus via some other's tag onChange?
Why not just simply refresh whatever component lost focus whenever its
onChagne is fired?

On Thu, Jan 30, 2014 at 3:37 PM, Paul Bors  wrote:

> What makes you think that the only way to focus on something is by
> clicking on it?
>
> I would aproach your problem from a different angle. I would ask the
> browser to give me whatever has the focus via document.activeElement:
> https://developer.mozilla.org/en-US/docs/Web/API/document.activeElement
> http://msdn.microsoft.com/en-us/library/ie/ms533065(v=vs.85).aspx
>
> Or simply use the focus selector in jQuery:
> http://api.jquery.com/focus-selector/
>
>
> On Thu, Jan 30, 2014 at 2:15 PM, Rafael Barrera Oro wrote:
>
>> Hello everyone!
>>
>> I'm trying to to mantain the focus of the last component that was clicked
>> regardless of the refresh of part of the page when certain text field
>> changes. The problem i have is that the onchange event is always fired
>> before the onclick method, and this causes that the latter is either fired
>> over the wrong component or not fired at all, is there a way to delay the
>> onchange event until after the onclick event takes place?
>>
>> My goal is to use the onclick event to save the id of the clicked
>> component, then let the onchange event do its thing (refresh a part of the
>> page which maybe includes the clicked component).
>>
>> Has anyone achieved something similiar and/or has any ideas?
>>
>> Thanks in advance!
>> Rafael
>>
>
>


Re: replaceWith method in Panel not working with AjaxLazyLoadPanel

2014-02-08 Thread Paul Bors
Replace it it on the parent, then add the parent to the ajax target to be 
refreshed on the screen.

~ Thank you,
   Paul Bors

On Feb 6, 2014, at 5:25 AM, Vishal Popat  wrote:

> Hi,
> 
> I have the following panel layout:
> 
> SomeOtherPanel
> AjaxLazyLoadPanel
>   Panel loading with AjaxLazyLoadPanel
>   PanelToReplace
> 
> I am trying to replace PanelToReplace using replaceWith within 
> IndicatingAjaxFallbackLink onClick method but I get the message:
> Component '[EmptyPanel [Component id = additionalInfo]]' with markupid: 
> 'additionalInfo3e' not rendered because it was already removed from page.
> 
> Using the same approach, I have replaced SomeOtherPanel which is not inside 
> AjaxLazyLoadPanel and it works fine.
> 
> So it seems I cannot use replaceWith when the Panel is within 
> AjaxLazyLoadPanel.
> Is there an alternative way to do this?
> 
> Regards
> Vishal
> -
> 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 Wizzard Question / Custom Overview Bars

2014-02-08 Thread 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";>
 
 
  
  
  
  
  
  
 


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]]




[[Header]]


[[View]]


[[Feeback]]


[[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.complete",
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 as kind of menu?!
>
> kind regards
> Patrick


Re: I have not found file where per session data get store under work Folder in wicket application

2014-02-08 Thread Paul Bors
Are you after the user session or the cashed page store, page map?
https://cwiki.apache.org/confluence/display/WICKET/Page+maps

Drop the wicket debug artifact in your wicket webapp then load this URL to see 
the Wicket Debug Bar and you can get to see the Wicket Sessions Inspector.
Set this to true in your application when running in debug 
getDebugSettings().setDevelopmentUtilitiesEnabled(true);

Have fun!


On Feb 8, 2014, at 4:02 AM, Sharad Raut  wrote:

> 
> 
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/I-have-not-found-file-where-per-session-data-get-store-under-work-Folder-in-wicket-application-tp4664316.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: Modular Wicket Application

2014-02-08 Thread Paul Bors
I’m no expert, but it looks like your filter is not started right. That should 
be configured via the web.xml file.

Perhaps you could create a quick-start and package your project for us to see 
it as a whole?
Only the minimal code that produces the error should be packaged.

On Feb 8, 2014, at 4:12 AM, IowA  wrote:

> Hello all, I am new to Wicket. When I use Guice in Wicket's quickstart
> everything works like a charm and it is possible to deploy it on Tomcat. But
> when i use same code + write my module deploying to Tomcat ends with errors.
> Catalina - http://pastebin.com/CaFGzDta
> Tomcat - http://pastebin.com/prEU4RX5
> 
> wicket module pom.xml - http://pastebin.com/zF0z2MiN
> domain module pom.xml - http://pastebin.com/bLkbwhsN
> parent pom.xml - http://pastebin.com/hC9sLpuJ
> 
> Any ideas what I am doing wrong?
> 
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/Modular-Wicket-Application-tp4664317.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: Visual HTML diff in Wicket?

2014-02-08 Thread Paul Bors
I would say to find out what Jira is using to diff the CSV commits and use that 
:)

On Feb 6, 2014, at 4:06 PM, Stephan Schrader  wrote:

> You could try https://github.com/alkacon/alkacon-diff
> 
> Stephan
> 
> 
>> Am 06.02.2014 um 10:53 schrieb Martin Dietze :
>> 
>> In my system there is an editorial submodule for creating HTML
>> contents. As I am about to add a versioning history to it, I'd
>> like to add some kind of visualisation of what changed from edit
>> to edit. 
>> 
>> Does anyone here know of something like a library for this that
>> can be used conveniently in a Wicket-based application? Free
>> would be nice, but commercial (depending on the price, of
>> course) would be an option, too.
>> 
>> Cheers,
>> 
>> M'bert
>> 
>> -- 
>> --- / http://herbert.the-little-red-haired-girl.org / -
>> =+= 
>> Albert Camus wrote that the only serious question is whether to kill yourself
>> or not.  Tom Robbins wrote that the only serious question is whether time has
>> a beginning and an end.  Camus clearly got up on the wrong side of bed, and
>> Robbins must have forgotten to set the alarm.  -- Tom Robbins
>> 
>> -
>> 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: Apache wicket project as osgi compoments

2014-02-08 Thread Paul Bors
We solved this by using customized security permissions.
If a user wasn’t given the permission for module A, so be it :)

On Feb 4, 2014, at 7:49 PM, Shengche Hsiao  wrote:

> Hello
> 
> Thanks for reply, indeed I plan to implement my wicket project in osgi way!
> But I don't know how to start it, thanks for hyper links, I'll check it out.
> 
> 
> On Wed, Feb 5, 2014 at 3:42 AM, Francois Meillet > wrote:
> 
>> You should have a look at
>> 
>> http://code.google.com/p/osgi-enterprise/wiki/WicketAndOsgi
>> https://github.com/wicketstuff/core/wiki/Osgi
>> http://hwellmann.blogspot.fr/2011/06/wicket-and-osgi.html
>> 
>> http://www.volkomenjuist.nl/blog/2012/07/25/wicket-mounting-in-an-osgi-environment/
>> https://ops4j1.jira.com/wiki/display/paxwicket/Install+Pax+Wicket
>> 
>> http://karaf.922171.n3.nabble.com/pax-wicket-example-running-on-karaf-td4027622.html
>> 
>> François Meillet
>> Formation Wicket - Développement Wicket
>> 
>> 
>> 
>> 
>> 
>> Le 4 févr. 2014 à 17:01, tho...@jarnot.de a écrit :
>> 
>>> Although we don't know anything about your application structure, I tend
>> to
>>> answer YES.
>>> 
>>> Assuming from the subject, that we are talking about OSGi modules (or
>> rather
>>> bundles), making the application capable of that dynamism is surely
>>> possible. It simply depends on your decision of utilizing the OSGi
>>> programming model and execution environment. Do you have your application
>>> modules OSGi ready?
>>> 
>>> Having a look a the wicket-distribution it seems to be OSGi-ready. You
>> also
>>> may have a look at the "Pax Wicket" extension.
>>> 
>>> So you're probably good to go.
>>> 
>>> 
>>> --
>>> View this message in context:
>> http://apache-wicket.1842946.n4.nabble.com/Apache-wicket-project-as-osgi-compoments-tp4664159p4664164.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
>>> 
>> 
>> 
> 
> 
> -- 
> 
> --->
> We do this not because it is easy. We do this because it is hard.
> --->
> ShengChe Hsiao
> --->
> front...@gmail.com
> front...@tc.edu.tw
> --->
> VoIP : 070-910-2450
> --->


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



Re: Hybrid palette with DropDownChoice and ListView

2014-02-13 Thread Paul Bors
I don't think you need to go nuts and worry much about a ListView. Use a
Select2 instead of the drop-down and have a custom panel instead of the
plain old option. You can place an Add button or something or better yet,
check boxes and then you won't need the second list.

Suppose you do stick to old HTML components like a DropDown and a ListView.
First off, get off the list view and use a multiple Select.
Take a look at how the wicket pallet is done at:
http://www.wicket-library.com/wicket-examples/compref/wicket/bookmarkable/org.apache.wicket.examples.compref.PalettePage

All you would have to do is change the left available multi select with
your drop down.


Now, I would recommend using jQuery UI's widgets since they are easier to
use and more fun to work with (both for the developer and the application
user):
http://jqueryui.com/demos/

Have fun!

On Thu, Feb 13, 2014 at 11:05 AM, ChambreNoire  wrote:

> Hello,
>
> I'd like to create a hybrid 'palette'. First there's a DropDownChoice with
> an 'Add' link and next to this a vertical list of selected items, each with
> a 'remove' link. Of course, adding an item removes it from the
> DropDownChoice and adds it to the list and vice-versa for item 'removal'.
>
> I have already started but I fear that this is probably going to be fairly
> complicated as it involves using ListViews in a form and DropDownChoice
> customisation so any pointers to get me going would be most appreciated.
> I'll post some code once I have something vaguely functional!
>
> Thanks,
>
> Chambre
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Hybrid-palette-with-DropDownChoice-and-ListView-tp4664445.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: Hybrid palette with DropDownChoice and ListView

2014-02-13 Thread Paul Bors
Btw, Select2 demos are at:
http://ivaynberg.github.io/select2/

Its Wicket integration at:
https://github.com/ivaynberg/select2

That's Igor's baby (you might have seen Igor's name in Wicket's API
JavaDocs :)


On Thu, Feb 13, 2014 at 11:34 AM, Paul Bors  wrote:

> I don't think you need to go nuts and worry much about a ListView. Use a
> Select2 instead of the drop-down and have a custom panel instead of the
> plain old option. You can place an Add button or something or better yet,
> check boxes and then you won't need the second list.
>
> Suppose you do stick to old HTML components like a DropDown and a
> ListView. First off, get off the list view and use a multiple Select.
> Take a look at how the wicket pallet is done at:
>
> http://www.wicket-library.com/wicket-examples/compref/wicket/bookmarkable/org.apache.wicket.examples.compref.PalettePage
>
> All you would have to do is change the left available multi select with
> your drop down.
>
>
> Now, I would recommend using jQuery UI's widgets since they are easier to
> use and more fun to work with (both for the developer and the application
> user):
> http://jqueryui.com/demos/
>
> Have fun!
>
> On Thu, Feb 13, 2014 at 11:05 AM, ChambreNoire  wrote:
>
>> Hello,
>>
>> I'd like to create a hybrid 'palette'. First there's a DropDownChoice with
>> an 'Add' link and next to this a vertical list of selected items, each
>> with
>> a 'remove' link. Of course, adding an item removes it from the
>> DropDownChoice and adds it to the list and vice-versa for item 'removal'.
>>
>> I have already started but I fear that this is probably going to be fairly
>> complicated as it involves using ListViews in a form and DropDownChoice
>> customisation so any pointers to get me going would be most appreciated.
>> I'll post some code once I have something vaguely functional!
>>
>> Thanks,
>>
>> Chambre
>>
>> --
>> View this message in context:
>> http://apache-wicket.1842946.n4.nabble.com/Hybrid-palette-with-DropDownChoice-and-ListView-tp4664445.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: understanding looking for wicket:id

2014-02-15 Thread Paul Bors
Also take a look over the user guide's section on inheritance:
http://wicket.apache.org/guide/guide/layout.html#layout_2

~ Thank you,
   Paul Bors


On Fri, Feb 14, 2014 at 3:42 PM, Richter, Marvin <
marvin.rich...@jestadigital.com> wrote:

> 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
> 
> 
> 
> 
> 
> 
>
> This way every page which extends MyBasePage.java inherits the panel and
> the components you add in the subclasses will be placed in the place where
> you defined 
>
> Best,
> Marvin
>
> Am 14.02.2014 um 20:04 schrieb Farrukh SATTOROV :
>
> > my code work, if by definition each WebPage and Panel must have own
> markup
> > ?
> >
> > MyBasePage.java:
> > public class MyBasePage extends WebPage {
> >
> > public MyBasePage() {
> > add(new MyPanel("panel"));
> > }
> > }
> >
> > 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: Leaving page after closing modal results in browser pop up

2014-02-15 Thread Paul Bors
Have you tried setting this on your page?


Wicket.Window.unloadConfirmation = false;


It should work, and if you want to apply it to all of the modal pop-ups in
your app, consider using a header contribution that you would add to your
parent page.

~ Thank you,
   Pau Bors


On Sat, Feb 15, 2014 at 9:02 AM, PDiefent  wrote:

> Hi Ernesto, I didn't try because with former versions of Wicket the
> confirmation doesn't rise.
> The problem seams to exist since Wicket 6.13.
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Leaving-page-after-closing-modal-results-in-browser-pop-up-tp4664471p4664475.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: How to start Wizard with an active step? / Best practise?

2014-02-17 Thread Paul Bors
We need to build the WizardModel in a dynamic way. Although I think there
is a better more dynamic step too that can be used here.

So one cheap solution is to keep an enum or some sort of a definition of
your wizard steps:
public static enum WizStep {
/** Step 1 of N */ STEP_ONE(1),
/** Step N of N */ STEP_N;
...

private int stepNum;

WizStep(int stepNum) {
this.stepNum = stepNum;
}

public int getNum() {
return this.stepNum;
}
}

Then extend the wizard and build the model starting at the given step like
so:
private class MyWizard extends Wizard {
private static final long serialVersionUID = 1L;

public MyWizard(String id, WizStep startStep) {
super(id);
setDefaultModel(ediPojoModel);

WizardModel model = new WizardModel();
if(WizStep.STEP_ONE.getNum() >= startStep.getNum()) {
model.add(new FirstWiwardStep()});
}
// Keep adding the rest of the steps
...
if(WizStep.STEP_N.getNum() >= startStep.getNum()) {
model.add(new NthStep());
}

init(model);
}
}

Maybe a better approach is to create your own parent intelligent wizard
step that will skip itself in the init() or onInit() method till it get to
the Active step then you could build your model as normal.

Have fun.




On Mon, Feb 17, 2014 at 12:21 PM, Patrick Davids <
patrick.dav...@nubologic.com> wrote:

> Hi all,
> what is the best way to start a Wizard in a particular step?
>
> I tried:
> - to override onInit of WizardStep and setting this to activeStep, when
> the state is the right one, but init() of WizardModel always determines
> the next step after me (the current active), so this seems not to be a
> good way. I could set the prevoius, but this is quite faked.
>
> - to implement a condition; state is determined correct, but than all
> buttons are deactive, hmm...
>
> - manually setting setActiveStep() after init of WizardModel, but this
> needs to unpack model object to construction time to evaluate my state
> on my own (but it worked as expected).
>
> Did I miss something? Or is the third implementation the best trade-off?
>
> kind regards
> Patrick
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Does wicket:link tag work inside pages in different packages?

2014-03-02 Thread Paul Bors
Instead of using in-line  why not use a  
and then add(new Link(“homePage”, HomePage.class)); to your parent class? That 
will resolve no matter where its used from.

After all  is just a Link class at the end of the day.
Also see the examples page:
http://www.wicket-library.com/wicket-examples/linkomatic/home


On Feb 27, 2014, at 11:03 AM, Alberto Brosich  wrote:

> 
> Yes, I read it.
> Does it mean that have to do a different header panel for every
> suppages level (using "../(../)HomePage.html" link)? 
> 
> Alberto
> 
> 
> On Thu, 2014-02-27 at 16:30 +0100, Sven Meier wrote:
>> Have you read http://wicket.apache.org/guide/guide/urls.html#urls_3
>> ?
>> 
>> Sven
>> 
>> On 02/27/2014 03:44 PM, Alberto Brosich wrote:
>>> Hi,
>>> 
>>> I have an header panel with a link to the homepage of the site.
>>> This panel is included in every page of the site.
>>> If I use the  tag for that link it works fine (for example,
>>> it is disabled in the homepage) for the pages in the same package of the
>>> Homepage class.
>>> If I am on a page inside another package (subpackage in my case) the
>>> link became the name of that package plus the href specified in the html
>>> panel. For example:
>>> 
>>> ...
>>> 
>>> In a page inside package "subpackage" the link is:
>>> "subpackage/HomePage.html" and not "../".
>>> 
>>> What I'm doing wrong?
>>> 
>>> Regards
>>> 
>>> Alberto
>>> 
>>> 
>>> -
>>> 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
> 


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



Re: Wicket in Action outage: back online, better than ever!

2014-04-02 Thread Paul Bors
Hey Martijn,

Is there going to be an updated release of Wicket in Action based on Wicket 6?
Or has that effort been replaced by the Wicket Guide?

~ Thank you,
   Paul Bors

On Mar 30, 2014, at 5:45 PM, Martijn Dashorst  
wrote:

> I just wanted to let everybody know that the Wicket in Action blog is
> online again, and should now perform better than ever.
> 
> Thank you all for your patience if you wanted to get content from the
> website but found it unavailable.
> 
> Here's the rundown of what happened and how I spent my weekend:
> 
> http://wicketinaction.com/2014/03/wicket-in-action-makeover/
> 
> Martijn
> 
> PS. if you want to look at the source:
> https://github.com/dashorst/wicketinaction.com
> 
> -- 
> Become a Wicket expert, learn from the best: http://wicketinaction.com


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



Re: DataTable's FilterToolbar generics broken

2014-04-28 Thread Paul Bors
I think you're confused.

If you want to filter a collection based on type T, then your filter your
extend T.
The idea here is that your model object type for the filter is the same as
that retrieved by the data provider.
As such you can have a POJO of the same type T on which you apply the
filtering.

Otherwise what would you filter the collection based on?
There will be no standard, will there?

~ Thank you,
   Paul Bors


On Sat, Apr 26, 2014 at 9:39 AM, Leszek Gawron  wrote:

> I started migrating my code from wicket 1.4.19 to 6. Finally ! :)
>
> I found a FilterToolbar bug:
>
> Once you were able to create DataTable wrapped inside of
> FilterForm
>
> currently FilterToolbar requires you for those two types to be identical:
>
> public  FilterToolbar(final DataTable table, final
> FilterForm form,
> final IFilterStateLocator stateLocator)
>
> It looks like commit 9b3f9ca1df064fe9c6fde64ccc37fecc504b09a6
> introduced a bug long time ago and it carried on:
>
> -   public  FilterToolbar(final DataTable table, final
> FilterForm form,
> +   public  FilterToolbar(final DataTable table, final
> FilterForm form,
>
>
> FilterToolbar constructor should state:
>
> public  FilterToolbar(final DataTable table, final
> FilterForm form,
> final IFilterStateLocator stateLocator)
>
>
> cheers.
>
> --
> Leszek Gawron
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Question / Best Practise / (List)Model vs. (List)DataProvider

2014-05-16 Thread Paul Bors
Models:
http://wicket.apache.org/guide/guide/modelsforms.html

Data Providers (ie: Repeaters):
http://wicket.apache.org/guide/guide/repeaters.html

Long story short, a repeater's DataProvider gives you a single items model.
A model who wraps a collection, gives you a collection of items for a
single component.

On Thursday, May 8, 2014, Patrick Davids 
wrote:

> Hi all,
>
> what I often think about, and I cannot really say is; when to use Model
> or DataProvider as data providing object for components they repeat some
> thing?
>
> Javadoc says, DataProvider are (good) for DataViews.
> Hmm... ok, and they allow easer iterating (first index, count).
>
> I also can achieve this by using a LoadableDetachableModel>
> combined with a ModelIteratorAdapater.
>
> Both have detaching logic... both featuring extension, both have a sort
> of "load"-method (getObject() vs. getData()).
>
> Sometimes I think, they are so similar to each other... where is the key
> difference?
>
> Would be cool if some of yours just reply his "two cents" of daily
> programming experience... so I can get some new point of views.
>
> When do you use DataProvider or Model>?
> Did you experienced the same, not to exactly know which one you will use
> for your new page/panel/component?
> And often think about pro and cons using it with RepeatingViews? And
> later on, you see... "I could have used both... hmm..."
>
> thanx a lot for feedback and kind regards
> Patrick
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org 
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: DiskDataStore errors in production

2014-05-16 Thread Paul Bors
Or simply know that Wicket has a page data store which can't update on your
disk due to your file system permissions hence:
java.io.FileNotFoundException:
/opt/ssa/tomcat/apache-tomcat-7.0.29/work/Catalina/localhost/SSA/wicket.ssa-webapp-filestore/3943/9005/A851AC58C741B566C0E40BE1791649E1/data
(Permission denied)

Also see:
http://wicket.apache.org/guide/guide/versioningCaching.html

On Wednesday, May 14, 2014, eaglei22  wrote:

> Hi, my application in production often gets this error:
> May 14 09:12:27 ERROR
>
> DiskDataStore-/opt/ssa/tomcat/apache-tomcat-7.0.29/work/Catalina/localhost/SSA/wicket.ssa-webapp-filestore/4729/2939/909EAC3343856968BA7B1864B71CEA85/data
> (Too many open files)
> java.io.FileNotFoundException:
>
> /opt/ssa/tomcat/apache-tomcat-7.0.29/work/Catalina/localhost/SSA/wicket.ssa-webapp-filestore/4729/2939/909EAC3343856968BA7B1864B71CEA85/data
> (Too many open files)
> at java.io.RandomAccessFile.open(Native Method)
> at java.io.RandomAccessFile.(RandomAccessFile.java:233)
> at
>
> org.apache.wicket.pageStore.DiskDataStore$SessionEntry.getFileChannel(DiskDataStore.java:425)
> at
>
> org.apache.wicket.pageStore.DiskDataStore$SessionEntry.savePage(DiskDataStore.java:343)
> at
> org.apache.wicket.pageStore.DiskDataStore.storeData(DiskDataStore.java:181)
> at
>
> org.apache.wicket.pageStore.AsynchronousDataStore.storeData(AsynchronousDataStore.java:228)
> at
>
> org.apache.wicket.pageStore.DefaultPageStore.storePageData(DefaultPageStore.java:120)
> at
>
> org.apache.wicket.pageStore.DefaultPageStore.storePage(DefaultPageStore.java:154)
> at
>
> org.apache.wicket.page.PageStoreManager$PersistentRequestAdapter.storeTouchedPages(PageStoreManager.java:412)
> at
>
> org.apache.wicket.page.RequestAdapter.commitRequest(RequestAdapter.java:181)
>
>
>
>
> and now I am getting this error for every page opened making the log file
> extremely large:
>
> May 14 11:36:31 WARN  DiskDataStore-Cannot save page with id '866' because
> the data file cannot be opened.
> May 14 11:36:31 ERROR
>
> DiskDataStore-/opt/ssa/tomcat/apache-tomcat-7.0.29/work/Catalina/localhost/SSA/wicket.ssa-webapp-filestore/3943/9005/A851AC58C741B566C0E40BE1791649E1/data
> (Permission denied)
> java.io.FileNotFoundException:
>
> /opt/ssa/tomcat/apache-tomcat-7.0.29/work/Catalina/localhost/SSA/wicket.ssa-webapp-filestore/3943/9005/A851AC58C741B566C0E40BE1791649E1/data
> (Permission denied)
> at java.io.RandomAccessFile.open(Native Method)
> at java.io.RandomAccessFile.(RandomAccessFile.java:233)
> at
>
> org.apache.wicket.pageStore.DiskDataStore$SessionEntry.getFileChannel(DiskDataStore.java:425)
> at
>
> org.apache.wicket.pageStore.DiskDataStore$SessionEntry.savePage(DiskDataStore.java:343)
> at
> org.apache.wicket.pageStore.DiskDataStore.storeData(DiskDataStore.java:181)
> at
>
> org.apache.wicket.pageStore.AsynchronousDataStore$PageSavingRunnable.run(AsynchronousDataStore.java:355)
> at java.lang.Thread.run(Thread.java:722)
> May 14 11:36:31 WARN  DiskDataStore-Cannot save page with id '0' because
> the
> data file cannot be opened.
> May 14 11:36:32 ERROR
>
> DiskDataStore-/opt/ssa/tomcat/apache-tomcat-7.0.29/work/Catalina/localhost/SSA/wicket.ssa-webapp-filestore/3943/9005/A851AC58C741B566C0E40BE1791649E1/data
> (Permission denied)
> java.io.FileNotFoundException:
>
> /opt/ssa/tomcat/apache-tomcat-7.0.29/work/Catalina/localhost/SSA/wicket.ssa-webapp-filestore/3943/9005/A851AC58C741B566C0E40BE1791649E1/data
> (Permission denied)
> at java.io.RandomAccessFile.open(Native Method)
> at java.io.RandomAccessFile.(RandomAccessFile.java:233)
> at
>
> org.apache.wicket.pageStore.DiskDataStore$SessionEntry.getFileChannel(DiskDataStore.java:425)
> at
>
> org.apache.wicket.pageStore.DiskDataStore$SessionEntry.savePage(DiskDataStore.java:343)
> at
> org.apache.wicket.pageStore.DiskDataStore.storeData(DiskDataStore.java:181)
> at
>
> org.apache.wicket.pageStore.AsynchronousDataStore$PageSavingRunnable.run(AsynchronousDataStore.java:355)
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/DiskDataStore-errors-in-production-tp4665839.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: AjaxTabbedPanel and validation for all tabs

2014-05-16 Thread Paul Bors
My recommendation would be to use bean validation and Ajax to update the UI.

On Tuesday, May 6, 2014, mscoon  wrote:

> Hi all,
>
> I have a complex form for editing existing objects. I am planning to use
> AjaxTabbedPanel with adapted ajax links for the tabs to submit the current
> tab when the user switches tabs.
>
> There will be a "save" button under the tabbed panel that will save the
> entire object.
>
> For new objects, I could force the user to visit all tabs before allowing
> them to save, to guarantee that the validators have ran for all form
> components and all tabs.
>
> The twist here is that the object, when loaded, may be invalid. But I don't
> want to force the user to visit all tabs when editing an existing object
> because it will very unfriendly (imagine the user wanting to update just
> one field in the first tab and being forced to visit all five tabs before
> saving).
>
> So I am looking for a way to make sure that all validators run when the
> user clicks "save". As far as I understand there is no way to force all
> wicket validators to execute because the request will only contain post
> data for the active tab.
>
> Is there a way to solve this? Client side tabs are a solution I guess but
> one I'd like to avoid if possible.
>
> I did consider moving my validation logic to a server side validation
> method. The problem here is that you cannot leverage wicket's existing
> validators and error messages and also it becomes considerably harder to
> provide visual feedback for errors (e.g. highlight the components with
> errors). On the plus side, you do have a validation method that can be
> reused if you have alternate methods for updating the same data (e.g. via a
> REST service).
>
> Are there any pointers on using server side validation with wicket forms?
>
> Thanks in advance,
> Marios
>


Re: Include Files form Filesystem

2014-05-16 Thread Paul Bors
Wicket is just Java, so you can also have your Base class be the page
template and have other pages extend it ;)

On Sunday, May 11, 2014, Martin Grigorov  wrote:

> Hi,
>
> See http://wicketinaction.com/2011/07/wicket-1-5-mounting-resources/
> Create a custom ResourceReference and mount it. Then use
> RequestCycle#urlFor() to get the relative url to it and pass it to Include
>
> Martin Grigorov
> Wicket Training and Consulting
>
>
> On Fri, May 9, 2014 at 5:12 PM, Mikulicic, Vladimir <
> vladimir.mikuli...@br.de > wrote:
>
> > Hello,
> >
> > im using Wicket 6.15
> >
> > Does someone know how to  include a static HTML file from the filesystem
> > in my Wicket-App.
> >
> > I have a folder on my machine like /local/wtr/   with two files
> >  header.html   and footer.html in it.
> > The files are not in the docroot of my server, but somewhere in the
> > filesystem.
> >
> > I would like to include these Files with:
> >
> > new Include("include", "header.html");
> >
> > My approach is:
> >
> > getSharedResources().add("extern", new FolderContentResource(new
> > File("/local/wtr")));
> > mountResource("/resource/", new SharedResourceReference("extern"));
> >
> > But I don’t know how to use it  with  new Include()?
> > How to get the correct path to the header.html?
> >
> > Any help would be fine. Thanks a lot!
> >
> > Vladi
> >
> >
> >
> >
> >
> --
> > Bayerischer Rundfunk; Rundfunkplatz 1; 80335 München
> > Telefon: +49 89 590001; E-Mail: i...@br.de; Website: http://www.BR.de
> >
>


Re: Error page stack trace

2014-06-04 Thread Paul Bors
Why? You don't have access to your own log file?


On Wed, Jun 4, 2014 at 10:43 AM, Entropy  wrote:

> We set our error page via setInternalErrorPage on IApplicationSettings in
> 1.6.  I'd like to bury the stack trace in a comment in the rendered page in
> our staging and dev environments to save time.  But I have no idea how to
> get the originating trace in the error page.
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Error-page-stack-trace-tp4666119.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: Error page stack trace

2014-06-04 Thread Paul Bors
Btw, this is what you want:

http://ci.apache.org/projects/wicket/apidocs/6.0.x/org/apache/wicket/request/cycle/AbstractRequestCycleListener.html#onException%28org.apache.wicket.request.cycle.RequestCycle,%20java.lang.Exception%29

Add your own IRequestCycleListener (AbstractRequestCycleListener) with
org.apache.wicket.Application.getRequestCycleListeners().add() and
implement its #onException(RequestCycle, Exception) then drop that in your
HTML comment.


On Wed, Jun 4, 2014 at 11:31 AM, Paul Bors  wrote:

> Why? You don't have access to your own log file?
>
>
> On Wed, Jun 4, 2014 at 10:43 AM, Entropy  wrote:
>
>> We set our error page via setInternalErrorPage on IApplicationSettings in
>> 1.6.  I'd like to bury the stack trace in a comment in the rendered page
>> in
>> our staging and dev environments to save time.  But I have no idea how to
>> get the originating trace in the error page.
>>
>> --
>> View this message in context:
>> http://apache-wicket.1842946.n4.nabble.com/Error-page-stack-trace-tp4666119.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: Dataview help

2014-06-09 Thread Paul Bors
Have you tried one of the Repeaters from:
http://www.wicket-library.com/wicket-examples/index.html

Direct link:
http://www.wicket-library.com/wicket-examples/repeater/

They are also explained in the Wicket Free Guide at:
http://wicket.apache.org/guide/guide/single.html#repeaters

Let us know if you have a more specific question.


On Fri, Jun 6, 2014 at 9:29 AM, kumar ramanathan 
wrote:

> Hi Friends,
> I am new beginner of wicket and trying to implement the table as below
> using
> data view.
>
> name id
> sam  21(link)
> ram   16(link)
>
> once i click the id it show the sam/ram details in next page. I have tried
> many ways to implement it using  simple data view , but not able to do.
> Hoping you for help on this.
> I have tried cwiki examples, wicket library examples but those are very
> long
> to understand.Can you please share a simple project similar to my
> requirement above. Please help me, am struggling for nearly three months on
> this.
>
> Thanks,
> Kumar
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Dataview-help-tp4666151.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: Newbie question : How do I display a tabbed list vertically rather than horizontally?

2014-06-10 Thread Paul Bors
Extend the Wicket class you want like the AjaxTabbedPanel in Java (Model and 
Controller) and change the HTML (viewer) as you please.

You would need access to Wicket’s source code thus if you use Maven see the 
sources classifier at:
 http://maven.apache.org/pom.html

Perhaps your IDE (Eclipse, Netbeans, IntelliJ IDEA, etc) is already configured 
to view the sources of your project’s dependencies.
If not download the sources manually from maven central or view the source code 
in the right branch online at GitHub:
https://github.com/apache/wicket/tree/master/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/tabs

Note the TabbedPanel.html contents:
http://wicket.apache.org";>


[[tab title]]





So create your own VerticalTabbedPanel.html and change the HTML mark-up to say 
a table but preserve the wicket:id hierarchy:
http://wicket.apache.org";>







[[tab title]]




 

[panel]






Then you need to extend the AjaxTabbedPanel java class to your own 
VerticalTabbedPanel.java say:
public class VerticalTabbedPanel extends TabbedPanel {
// In your own VerticalTabbedPanel constructors call super.*
}

From then on, feel free to use your new VerticalTabbedPanel.

Alternately you can use CSS to style the original markup of the 
TabbedPanel.html to be vertical which might be an easier solution as earlier 
suggested.
I only provided this answer to you so you can learn how easy it is to override 
Wicket’s code and its markup if so desired.

On Jun 9, 2014, at 10:34 AM, Tim Collins  wrote:

> I am rather new to wicket and am trying to do something that ought to be 
> rather easy... I want to make the tabs I display show up vertically rather 
> than horizontally.
> 
> I am currently building a arraylist of tabs and then passing them to 
> AjaxTabbedPanel, but as far as I can see there is no way to make the 
> resulting tabs on a page show up down the left side of a page rather than 
> across the top... Is there an easy way to do that?
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 



Re: OnChangeAjaxBehavior.onUpdate() not called

2014-06-10 Thread Paul Bors
Well, by hidden do you mean an input type of hidden or not present on the DOM?

On Jun 10, 2014, at 7:03 PM, Lucio Crusca  wrote:

>> everything looks OK to me
>> check whether there are any JS errors in the browser's Dev Tools console.
> 
> No errors. Can the fact that the input fields are inside a div that is
> initially hidden and then slid down via jQuery make a difference?
> 
> 
> -
> 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: Link in repeaters

2014-06-10 Thread Paul Bors
You need to wrap a the Anchor around a Label and you can do so either in a 
fragment or your own LablledLinkPanel…

On Jun 10, 2014, at 2:01 PM, Sven Meier  wrote:

> Hi,
> 
> a link does not output a label. Read here for two possible solutions:
> 
> https://www.mail-archive.com/wicket-user@lists.sourceforge.net/msg28621.html
> 
> Regards
> Sven
> 
> On 06/10/2014 06:02 PM, kumar ramanathan wrote:
>> Hi Friends ,
>> I have successfully generated the view using repeaters using the following
>> code.
>> 
>> HTML:
>> 
>> 
>> Name Id
>> 
>>  
>> 
>> 
>> 
>> HelloWorld.java
>> public HelloWorld(){
>>  List list = new  ArrayList();
>>  list.add(new Persons("sam","one"));
>>  list.add(new Persons("ram","two"));
>>  ListDataProvider listDataProvider = new
>> ListDataProvider(list);
>> DataView dataView = new DataView("rows",
>> listDataProvider) {
>> @Override protected void populateItem(Item item)
>>  {
>>   Persons person = item.getModelObject();
>>RepeatingView repeatingView = new RepeatingView("dataRow");
>>   repeatingView.add(new Label(repeatingView.newChildId(),
>> person.getName()));
>>   repeatingView.add(new Label(
>> repeatingView.newChildId(),person.getId()));
>>   item.add(repeatingView);
>>  }
>>  };
>>  add(dataView);
>>  }
>> Ouput I got :
>> 
>> Name Id
>> sam one(not link)
>> ram  two(not link)
>> 
>> Now I have tried to display the above ouput as below with link
>> 
>> Name Id
>> sam one(link)
>> ram  two(link)
>> 
>> 
>> For this ouput i have altered the code in helloword.java as below
>> 
>> 
>> DataView dataView = new DataView("rows",
>> listDataProvider){
>>  protected void populateItem(Item item){
>>   Persons person = item.getModelObject();
>>   RepeatingView repeatingView = new RepeatingView("dataRow");
>>   repeatingView.add(new Label(repeatingView.newChildId(),
>> person.getName()));
>>   repeatingView.add(new Link(person.getId()){
>>  public void onClick(){
>>  setResponsePage(Output.class);
>>  }
>>   });
>>   item.add(repeatingView);
>>   }
>> }; add(dataView);}}
>>  Output I got for the above code change is
>> 
>> Name Id
>> sam
>> ram
>> 
>> No Id value is displayed.
>> 
>> I need your help on making code changes to display the id as link. Kindly
>> help me what are the things i need to update.
>> Thanks,
>> Kumar
>> 
>> 
>> --
>> View this message in context: 
>> http://apache-wicket.1842946.n4.nabble.com/Link-in-repeaters-tp4666176.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
> 


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



Re: Ajax Form Submit via jquery plugin / javascript

2014-06-10 Thread Paul Bors
http://ci.apache.org/projects/wicket/apidocs/6.0.x/org/apache/wicket/ajax/form/AjaxFormSubmitBehavior.html

"Ajax event behavior that submits a form via ajax when the event it is attached 
to, is invoked.”

You’re attaching the submit event so who fires that?

On Jun 10, 2014, at 5:28 AM, Vishal Popat  wrote:

> Hi,
> 
> I am using a jquery steps plugin which has the ability to change options.
> One of the options I have is:
>   onFinished: function (event, currentIndex) {
>var form = document.forms["selectionForm"];
>form.submit();
>},
> 
> The javascript above submits the associated form. However I would like to 
> submit the form via ajax. Normally I would use an AjaxButton for ajax 
> processing but in this case I need something else. I have tried
> 
> selectionForm.add(new AjaxFormSubmitBehavior(selectionForm, "onsubmit") {
>   @Override
>   protected void onSubmit(AjaxRequestTarget target) {
>   log.debug("*** ajax form submit");
>   }
> }
> 
> but this does not seem to work as the debug does not get outputted.
> Additionally, the onSubmit Form version is called. Is there a way to stop 
> this?
> 
> Let me know if should be using something else instead.
> 
> Regards
> Vishal
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 



Re: OnChangeAjaxBehavior.onUpdate() not called [PARTIALLY SOLVED]

2014-06-11 Thread Paul Bors
How about an AjaxBehavior with the onChange event?

On Jun 11, 2014, at 9:10 AM, Lucio Crusca  wrote:

>> Martin was right, there were Javascript errors, but for some reason the
>> webconsole didn't display them the first time I looked at it.
>> 
> 
> However the problem is only partially solved. onUpdate() now gets called,
> but only when the TextField looses focus. I need it to be called on every
> single keypress... is there anything I should do for that?
> 
> 
> -
> 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: Ajax Form Submit via jquery plugin / javascript

2014-06-17 Thread Paul Bors
Instead of calling form.submit() from your jQuery, call 
${‘#someButtonID’}.click() or whatever, then register your event under the 
button’s onClick in Wicket.
You can have that button shared, or you can write your own Behavior to submit 
the form via a hidden button (i.e.: X and Y coordinates set to negative so it’s 
way off the page as well as its display property set to hidden).

Those are just couple of ideas.

On Jun 13, 2014, at 11:45 AM, vp143  wrote:

> Paul Bors wrote
>> http://ci.apache.org/projects/wicket/apidocs/6.0.x/org/apache/wicket/ajax/form/AjaxFormSubmitBehavior.html
>> 
>> "Ajax event behavior that submits a form via ajax when the event it is
>> attached to, is invoked.”
>> 
>> You’re attaching the submit event so who fires that?
> 
> You are right, I missed that but I am still a little stumped on what to do.
> 
> I am assuming the form gets submitted when calling 
> jQuery("#selectionForm").submit()
> 
> I was assuming this part
> add(new AjaxFormSubmitBehavior(this, "onsubmit") { 
> would be waiting for the submit of the form and then get executed.
> 
> Have I understood correctly?
> What am I missing?
> 
> Regards
> Vishal
> 
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/Ajax-Form-Submit-via-jquery-plugin-javascript-tp4666170p4666257.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: Feedback/Error message.

2014-07-07 Thread Paul Bors
Have a look at the Sortable DataTable:
https://cwiki.apache.org/confluence/display/WICKET/Simple+Sortable+DataTable+Example

It has a build in message for when there are no results matching your
filter or the model is empty.
You can override it to display your own custom message as well.


On Sat, Jun 21, 2014 at 9:11 AM, K  wrote:

> Hi
>
> I am trying to build a web application in which i have to display list of
> items on search...
>
> this part has been done but i have to add a errror message in the same page
> if the search result comes out null...
>
> I am using DataView for displaying the results. using condition in java is
> simple but for the unreachable id that i mention in condition the mark up
> is
> not being rendered if the condition is true.
>
> any help is well appriciated...
>
> Thanks
>
>
> -
>
> K
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Feedback-Error-message-tp1874404p4666330.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: Custom Pagination

2014-07-14 Thread Paul Bors
You're half way home.

You extended PagingNavigator but forgot to read its code.
See line 150 of PagingNavigator or better said the newNavigation() method:

/**
 * Create a new PagingNavigation. May be subclassed to make us of
specialized PagingNavigation.
 *
 * @param id
 *The id of the navigation component
 * @param pageable
 *the pageable component
 * @param labelProvider
 *The label provider for the link text.
 * @return the navigation object
 */
protected PagingNavigation newNavigation(final String id, final
IPageable pageable,
final IPagingLabelProvider labelProvider)
{
return new PagingNavigation(id, pageable, labelProvider);
}

In your class, override that factory method to return the type of
PagingNavigation you want.


Also, get more familiar with that component's code. Read and understand how
those classes are related to each other:
https://github.com/apache/wicket/tree/442932d4e4c5cc27940bc2ef956cb24c1ba54df0/wicket-core/src/main/java/org/apache/wicket/markup/html/navigation/paging



On Fri, Jun 27, 2014 at 6:44 AM, K  wrote:

> Hey sven
>
> thanks for the reply i have resolve the issue
>
> now i have been trying to trying to implement something like
>
> << <  (textbox)  of (totalnumberofpages) > >>
>
> any suggestions on this
>
>
> -
>
> K
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Custom-Pagination-tp4666387p4666397.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: Mailbox component

2014-07-29 Thread Paul Bors
This is Wicket not GMail :)

Perhaps you could write your own?

Integrate something like this in your own page/panel (or ask Google for a
better one):
http://w3lessons.info/2013/05/13/gmail-style-message-inbox-design-with-jquery-css/

Then you can use templates to send those e-mails:
http://www.wicket-library.com/wicket-examples/mailtemplate/

I haven't tried any of this so you're on your own.

Please refrain from asking such general question in this mailing list.
If you have a specific Wicket question, then by all means start a new
topic/thread/post.


On Tue, Jul 29, 2014 at 9:43 PM, Pierre Goupil 
wrote:

> Good evening,
>
> Does anyone know about a mailbox component, please?
>
> I'm looking for something to allow my users send and browse private
> messages through my webapp. And I'd be surprised that there is no good
> open-source components to do that out there.
>
> Any suggestion?
>
> Thanks in advance,
>
> Pierre
>


Foundation integrated in wicket

2014-07-29 Thread Paul Bors
Has anyone integrated Foundation from http://foundation.zurb.com/ in Wicket?

Each time I search for it the search engine comes back to Apache's Wicket
Foundation :)


Re: Can I process a POST with simple non-Json parameters using wicket-restannotations

2014-08-05 Thread Paul Bors
I think you might be looking for the query parameters of the 
http://ci.apache.org/projects/wicket/apidocs/6.0.x/org/apache/wicket/request/Request.html
 class.

See Chapter 9 of the Wicket Guide:
http://wicket.apache.org/guide/guide/single.html#requestProcessing

You can get to the Request from any of the Components on your page. Thus you 
can have a bookmarkable URL and in the constructor of that page you can grab 
the request and extract the parameters from it.

Do you care if the request is POST or GET?
Wicket abstracts that out for you via the query parameters.

~ Thank you,
   Paul Bors

On Aug 5, 2014, at 5:07 PM, Bruce Lombardi  wrote:

> Hi,
> 
> 
> 
> I have successfully setup a restful service using Wicketstuff
> wicket-restannotation that accepts Json parameters. But I need to write
> something in Wicket that will accepts a post of an order confirmation from
> another source that does not use Json. Is there a simple way of doing that
> with wicket-restannotations? I only see how to process Json. I know that
> Json standard for a restful service, so I may have to do something else,
> like using @MountPath and pulling the parameters out of the request.
> 
> 
> 
> Bruce
> 



Re: Mailbox component

2014-08-07 Thread Paul Bors
Suppose you take the jQuery Table and style it something like this (in a
responsive web 'theamable' manner):
http://w3lessons.info/2013/05/13/gmail-style-message-inbox-design-with-jquery-css/

Suppose you integrate it in Wicket and have it functional and suppose you
want the following basic features implemented:
* SMTP/POP and IMAP support
  * Properties or settings screen to configure the basics
* Add Star / Unstar Messages
* Delete Single Message
* Delete Multiple Messages
* Mark as Read
* Mark as Unread

One would have to handle a pretty good abstraction of the actual
interaction with the mail server which might or might not support all those
features. And if a feature is not supported it should be disabled.

I think this is at least a week's effort.


On Wed, Jul 30, 2014 at 1:35 AM, Ernesto Reinaldo Barreiro <
reier...@gmail.com> wrote:

> Pierre,
>
> Hi,
>
> I have rolled out something like that for a private application. I'm not
> sure how configurable/complete it is at the moment. I would not be against
> open sourcing it.
>
>
> On Wed, Jul 30, 2014 at 3:43 AM, Pierre Goupil 
> wrote:
>
> > Good evening,
> >
> > Does anyone know about a mailbox component, please?
> >
> > I'm looking for something to allow my users send and browse private
> > messages through my webapp. And I'd be surprised that there is no good
> > open-source components to do that out there.
> >
> > Any suggestion?
> >
> > Thanks in advance,
> >
> > Pierre
> >
>
>
>
> --
> Regards - Ernesto Reinaldo Barreiro
>


Re: wicket-select2 - adding sub categories seen in select2

2014-08-07 Thread Paul Bors
Your question is better asked on that project’s mailing list at:
https://groups.google.com/forum/#!forum/select2

Or if you prefer on the wicket-select2 project mailing list at:
https://github.com/ivaynberg/wicket-select2/issues (this is actually the bug 
tracker)

~ Thank you,
   Paul Bors

On Jul 7, 2014, at 6:43 AM, Vishal Popat  wrote:

> Hi,
> 
> Is it possible to add categories to the lists in wicket-select2 like seen in 
> http://ivaynberg.github.io/select2/#basics (The Time Zone labels)?
> Also is it possible to add functionality like the flag images as well?
> 
> Regards
> Vishal



Re: HTML headings

2014-08-07 Thread Paul Bors
I can’t view your HTML in my email client, but here’s a quick example of what I 
think you’re asking for:

HTML:
http://wicket.apache.org";>

[[label]]



Java:
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.form.OnChangeAjaxBehavior;
import 
org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteSettings;
import 
org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteTextField;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.form.TextField;
import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.model.IModel;

public class LabeledEditTextField extends Panel {
private boolean editable;
private Label label;
private TextField textField;

public LabelEditTextField(String id, IModel labelModel, IModel 
textFieldModel) {
this(id, labelModel, textFieldModel, false);
}

/**
 * Create a {@link Label} that can turn into an {@link 
AutoCompleteTextField}
 * if the autoCompleteChoices is not null.
 * 
 * @param id{@link Component} id
 * @param labelModel{@link IModel} to use for the {@link Label}
 * @param textFieldModel{@link IModel} to use for the {@link 
AjaxTextField} or the {@link AutoCompleteTextField}
 * @param autoCompleteTextField true if an {@link 
AutoCompleteTextField} is to be used in which case you
 *  must override {@link 
#getAutoCompleteChoices(String)}. false is a simple
 *  {@link AjaxTextField} is to be used.
 */
public LabelEditTextField(String id, IModel labelModel, IModel 
textFieldModel, boolean autoCompleteTextField) {
super(id);
label = new Label("label", labelModel);
textField = (autoCompleteTextField) ?
new AutoCompleteTextField("textField", textFieldModel, new 
AutoCompleteSettings().setPreselect(false)) {
@Override
protected Iterator getChoices(String input) {
return getAutoCompleteChoices(input);
}
} : 
new AjaxTextField("textField", textFieldModel) {
@Override
public void doAjaxUpdates(AjaxRequestTarget target) {
LabelEditTextField.this.ajaxCallback(target);
}
@Override
public void doAjaxUpdatesOnError(AjaxRequestTarget target) {
LabelEditTextField.this.ajaxCallbackOnError(target);
}
};
if(autoCompleteTextField) {
textField.add(new OnChangeAjaxBehavior() {
@Override
public void onUpdate(AjaxRequestTarget target) {
LabelEditTextField.this.ajaxCallback(target);
}
@Override
public void onError(AjaxRequestTarget target, RuntimeException 
re) {
LabelEditTextField.this.ajaxCallbackOnError(target);
}
});
}
adjustVisibility();
add(label);
add(textField);
}

/**
 * Provides list of auto-complete choices for the AutoCompleteTextField.
 * 
 * @param   input User input
 * @return  Iterator to the list of auto-complete choices based on the user 
input.
 */
protected Iterator getAutoCompleteChoices(String userInput) {
List emptyList = Collections.emptyList();
return emptyList.iterator();
}

private void adjustVisibility() {
if(isEditable()) {
label.setVisible(false);
textField.setVisible(true);
} else {
label.setVisible(true);
textField.setVisible(false);
}
}

/**
 * Toggle between the view mode and the edit mode.
 * 
 * @param editable  false by default if the Label 
is to be displayed,
 *  true if the Text Field is to 
be displayed.
 */
public void setEditable(boolean editable) {
this.editable = editable;
adjustVisibility();
}

public TextField getEditComponent() {
return this.textField;
}

public boolean isEditable() {
return this.editable;
}

public void ajaxCallback(AjaxRequestTarget target) {
// Optionally overridden by subclasses
}

public void ajaxCallbackOnError(AjaxRequestTarget target) {
// Optionally overridden by subclasses
}
}

I advise you take the common functionality like the setEditable(), isEditable() 
and getEditComponent() place them into an interface that returns only 
FormComponents so that you can have other types of LabelledEdit***Component but 
the

Re: Foundation integrated in wicket

2014-08-09 Thread Paul Bors
Right, that’s all custom to your web app.

Suppose I want to take your SASS and apply it to my form field, more precisely 
a Wicket class.
Suppose I want to be able to “theme” the entire look-n-feel of the web app and 
only have to customize the theme and not the entire product.

That’s what I mean.

On Aug 7, 2014, at 10:15 AM, vp143  wrote:

> I am not sure I understand what you are after... I do not have anything on
> GitHub.
> 
> I used SASS to install and compile my sass files and put my js files in my
> webapp directory.
> 
> Let me know if you have any specific questions.
> 
> Regards
> Vishal
> 
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/Foundation-integrated-in-wicket-tp4666792p4666936.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: Foundation integrated in wicket

2014-08-09 Thread Paul Bors
I guess this doesn’t matter as long as one uses a theme outside of wicket.

n/m

On Aug 9, 2014, at 2:13 PM, Paul Bors  wrote:

> Right, that’s all custom to your web app.
> 
> Suppose I want to take your SASS and apply it to my form field, more 
> precisely a Wicket class.
> Suppose I want to be able to “theme” the entire look-n-feel of the web app 
> and only have to customize the theme and not the entire product.
> 
> That’s what I mean.
> 
> On Aug 7, 2014, at 10:15 AM, vp143  wrote:
> 
>> I am not sure I understand what you are after... I do not have anything on
>> GitHub.
>> 
>> I used SASS to install and compile my sass files and put my js files in my
>> webapp directory.
>> 
>> Let me know if you have any specific questions.
>> 
>> Regards
>> Vishal
>> 
>> --
>> View this message in context: 
>> http://apache-wicket.1842946.n4.nabble.com/Foundation-integrated-in-wicket-tp4666792p4666936.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: Referencing DataTable rows within the table column header

2014-09-09 Thread Paul Bors
Hey Ephraim,

At Knoa for the console code I created an API around those components.
You don't have to re-invent the wheel, all you have to do is get familiar
with the console commons and which DropDown component to use.

Remember wicket is a component driven framework similar to Swing.

I would recommend using one of the Ajax enabled drop downs and override the
method to refresh the data table rows of interest. There are plenty of
examples in the console's code base... look at how other table such as the
ones for the End User attributes are refreshed or how the edit button in a
table cell will turn the table row into form components. Use the same
principle.

Also, if this is just a filter toolbar, then look at how other Ajax filter
toolbars work and you won't loos focus of the drop down since it's Ajax
that does the refresh.

If you are to re-implement this from scratch and re-invent the wheel you
can also but I won't recommend it.
Just look over the current available components in your commons API and use
the appropriate one, or extend it and make it do what you need.

Martin was referring to the event mechanism build in Wicket documented in
the Wicket Guide at:
http://wicket.apache.org/guide/guide/single.html#advanced_1

But for a simple filter toolbar you don't need to get that complicated.

~ Have fun,
   Paul Bors

On Tue, Sep 9, 2014 at 12:29 PM, Ephraim Rosenfeld 
wrote:

> Hi Martin:
>
>
>
> Thank you for your quick response.
>
>
>
> I was initially updating the entire table, but that was causing me to lose
> focus from the drop-down menu in which I made the selection. Also, my hope
> was that I could update as few row items/components as possible, thereby
> expediting the table-refresh process.
>
>
>
> When you mention 'Wicket's Event System', are you referring to
> inter-component events, like the example portrayed here:
> http://savicprvoslav.blogspot.com/2012/06/wicket-15-inter-component-events.html
>
>
>
> Regards,
>
>
>
> - Ephraim
>
>
>
> -Original Message-
> From: Martin Grigorov [mailto:mgrigo...@apache.org]
> Sent: Tuesday, September 09, 2014 12:10 PM
> To: users@wicket.apache.org
> Subject: Re: Referencing DataTable rows within the table column header
>
>
>
> Hi,
>
>
>
> Why don't you update the table itself ? This will update all its children
> components too.
>
>
>
> Otherwise I'd use Wicket's Event system to send a notification to all
> interested parties.
>
>
>
> Martin Grigorov
>
> Wicket Training and Consulting
>
> https://twitter.com/mtgrigorov
>
>
>
>
>
> On Tue, Sep 9, 2014 at 7:01 PM, Ephraim Rosenfeld  <mailto:erosenf...@knoa.com>>
>
> wrote:
>
>
>
> > Hello All,
>
> >
>
> > I am creating a table with a DropDownChoice component in the header of
>
> > one of the columns. When a selection is made in the drop down in the
>
> > column header, I want to update all of the rows in the table.
>
> >
>
> > Would the following snippet be the best approach to reference each row
>
> > Item component from the column header, or is there an alternative to
>
> > using the get() method?
>
> >
>
> > Thank you in advance,
>
> >
>
> > - Ephraim
>
> >
>
> > WebMarkupContainer container =
>
> > ((WebMarkupContainer)dropDownChoice.findParent(DataTable.class).get(1));
>
> >DataGridView gridView  =
>
> > (DataGridView)container.get(0);
>
> >for(int i = 0; i < NUM_OF_ROWS; i++) {
>
> >Item item = (Item)gridView.get(i);
>
> > // do row updates
>
> > }
>
> >
>


Re: Referencing DataTable rows within the table column header

2014-09-09 Thread Paul Bors
Another piece of advice,

Avoid unnecessary casts (Wicket 6 supports generics) and try not to use
code to navigate the wicket component tree unnecessary like this line of
code:

WebMarkupContainer container = ((WebMarkupContainer)
dropDownChoice.findParent(DataTable.class).get(1));

Get familiar with the best practices documented at:
http://wicket.apache.org/guide/guide/single.html#bestpractices

You should give the free guide a read back to back and treat it as your
bible until you get a bit more intimate with Wicket :)

Other resources available for you to learn and master Wicket are the Wicket
Stuff (http://wicketstuff.org/) and the examples at:
http://www.wicket-library.com/wicket-examples-6.0.x/index.html

Get familiar to those as well.

For a filter toolbar see:
http://www.wicket-library.com/wicket-examples-6.0.x/repeater/wicket/bookmarkable/org.apache.wicket.examples.repeater.DataTableFilterToolbarPage;jsessionid=03E1374082C8198F0F052CED6E54F7A1?0

Although is not using a drop-down but you'll get the idea :)

~ Thank you,
   Paul Bors


On Tue, Sep 9, 2014 at 2:57 PM, Paul Bors  wrote:

> Hey Ephraim,
>
> At Knoa for the console code I created an API around those components.
> You don't have to re-invent the wheel, all you have to do is get familiar
> with the console commons and which DropDown component to use.
>
> Remember wicket is a component driven framework similar to Swing.
>
> I would recommend using one of the Ajax enabled drop downs and override
> the method to refresh the data table rows of interest. There are plenty of
> examples in the console's code base... look at how other table such as the
> ones for the End User attributes are refreshed or how the edit button in a
> table cell will turn the table row into form components. Use the same
> principle.
>
> Also, if this is just a filter toolbar, then look at how other Ajax filter
> toolbars work and you won't loos focus of the drop down since it's Ajax
> that does the refresh.
>
> If you are to re-implement this from scratch and re-invent the wheel you
> can also but I won't recommend it.
> Just look over the current available components in your commons API and
> use the appropriate one, or extend it and make it do what you need.
>
> Martin was referring to the event mechanism build in Wicket documented in
> the Wicket Guide at:
> http://wicket.apache.org/guide/guide/single.html#advanced_1
>
> But for a simple filter toolbar you don't need to get that complicated.
>
> ~ Have fun,
>Paul Bors
>
> On Tue, Sep 9, 2014 at 12:29 PM, Ephraim Rosenfeld 
> wrote:
>
>> Hi Martin:
>>
>>
>>
>> Thank you for your quick response.
>>
>>
>>
>> I was initially updating the entire table, but that was causing me to
>> lose focus from the drop-down menu in which I made the selection. Also, my
>> hope was that I could update as few row items/components as possible,
>> thereby expediting the table-refresh process.
>>
>>
>>
>> When you mention 'Wicket's Event System', are you referring to
>> inter-component events, like the example portrayed here:
>> http://savicprvoslav.blogspot.com/2012/06/wicket-15-inter-component-events.html
>>
>>
>>
>> Regards,
>>
>>
>>
>> - Ephraim
>>
>>
>>
>> -Original Message-
>> From: Martin Grigorov [mailto:mgrigo...@apache.org]
>> Sent: Tuesday, September 09, 2014 12:10 PM
>> To: users@wicket.apache.org
>> Subject: Re: Referencing DataTable rows within the table column header
>>
>>
>>
>> Hi,
>>
>>
>>
>> Why don't you update the table itself ? This will update all its children
>> components too.
>>
>>
>>
>> Otherwise I'd use Wicket's Event system to send a notification to all
>> interested parties.
>>
>>
>>
>> Martin Grigorov
>>
>> Wicket Training and Consulting
>>
>> https://twitter.com/mtgrigorov
>>
>>
>>
>>
>>
>> On Tue, Sep 9, 2014 at 7:01 PM, Ephraim Rosenfeld > <mailto:erosenf...@knoa.com>>
>>
>> wrote:
>>
>>
>>
>> > Hello All,
>>
>> >
>>
>> > I am creating a table with a DropDownChoice component in the header of
>>
>> > one of the columns. When a selection is made in the drop down in the
>>
>> > column header, I want to update all of the rows in the table.
>>
>> >
>>
>> > Would the following snippet be the best approach to reference each row
>>
>> > Item component from the column header, or is there an alternative to
>>
>> > using the get() method?
>>
>> >
>>
>> > Thank you in advance,
>>
>> >
>>
>> > - Ephraim
>>
>> >
>>
>> > WebMarkupContainer container =
>>
>> > ((WebMarkupContainer)dropDownChoice.findParent(DataTable.class).get(1));
>>
>> >DataGridView gridView  =
>>
>> > (DataGridView)container.get(0);
>>
>> >for(int i = 0; i < NUM_OF_ROWS; i++) {
>>
>> >Item item = (Item)gridView.get(i);
>>
>> > // do row updates
>>
>> > }
>>
>> >
>>
>
>


Re: ComponentNotFoundException when googlebot scrapes wicket page

2014-09-16 Thread Paul Bors
Well, you have the wicket component tree path to what's not found:
titleBar:menu:2:link

The 3rd (index 2) menu link was missing at the point your page was rendered.
Start thinking about how your 'menu' component could miss that from the
mode.

Or perhaps someone used the back-page button and your page was not in the
page store?

On Tue, Sep 16, 2014 at 3:42 AM, Robert Gründler  wrote:

> Hi,
>
> we’ve a very odd problem and are somewhat stuck, maybe someone here on the
> list has seen this sort of behaviour before.
>
> We’ve deployed a small wicket app (4 pages) to a tomcat7 server and all 4
> pages work just fine on the live system.
>
> However, when googlebot scrapes the pages, we see ComponentNotFound
> exceptions:
>
> ComponentNotFoundException: Could not find component
> 'titleBar:menu:2:link' on page XYZ
>
> We’ve tried to fetch the page as google bot from the webmaster tools, but
> the exception is not being triggered either.
>
> No matter how we request the page, we cannot reproduce this exception.
> Only 2 or 3 times a day when the bot
> indexes us, we see this in the logs.
>
> We’ve also made sure the pages are stateless using the @StalessComponent
> annotation in combination with the StatelessChecker listener.
>
> Has anyone an idea what could cause this?
>
> thanks!
>
>
> -robert
>
>
>
>


Re: ComponentNotFoundException when googlebot scrapes wicket page

2014-09-16 Thread Paul Bors
ie: How do you create the menu links?
Where does the model come from and are those links dynamic?

On Tue, Sep 16, 2014 at 11:15 AM, Paul Bors  wrote:

> Well, you have the wicket component tree path to what's not found:
> titleBar:menu:2:link
>
> The 3rd (index 2) menu link was missing at the point your page was
> rendered.
> Start thinking about how your 'menu' component could miss that from the
> mode.
>
> Or perhaps someone used the back-page button and your page was not in the
> page store?
>
> On Tue, Sep 16, 2014 at 3:42 AM, Robert Gründler 
> wrote:
>
>> Hi,
>>
>> we’ve a very odd problem and are somewhat stuck, maybe someone here on
>> the list has seen this sort of behaviour before.
>>
>> We’ve deployed a small wicket app (4 pages) to a tomcat7 server and all 4
>> pages work just fine on the live system.
>>
>> However, when googlebot scrapes the pages, we see ComponentNotFound
>> exceptions:
>>
>> ComponentNotFoundException: Could not find component
>> 'titleBar:menu:2:link' on page XYZ
>>
>> We’ve tried to fetch the page as google bot from the webmaster tools, but
>> the exception is not being triggered either.
>>
>> No matter how we request the page, we cannot reproduce this exception.
>> Only 2 or 3 times a day when the bot
>> indexes us, we see this in the logs.
>>
>> We’ve also made sure the pages are stateless using the @StalessComponent
>> annotation in combination with the StatelessChecker listener.
>>
>> Has anyone an idea what could cause this?
>>
>> thanks!
>>
>>
>> -robert
>>
>>
>>
>>
>


Re: AuthenticatedWebSession.authenticate() not being called

2014-09-17 Thread Paul Bors
Irrespective of the UI, have your read through
http://wicket.apache.org/learn/projects/authroles.html ?

Most likely the wicket-auth-roles login page is using one of the documented
annotations that makes all the difference for you. Try to place that
annotation on your page (I haven't read your code...)

On Wed, Sep 17, 2014 at 5:20 AM, Lucio Crusca  wrote:

> I've moved one step forward: the authenticate() method now gets called if
> I use the SignInPage class included in wicket-auth-roles instead of my own
> SignInPage.
>
> However, as you can see in the code I posted yesterday, my SignInPage is
> very simple and, compared to the one bundled with wicket, it only has a
> additional Label and some minor html differences.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Transpose html table

2014-10-03 Thread Paul Bors
If you want to "transpose" your table (ie: change the rows and columns)
then it turn this implies that you want to change the structure of the
table both the format and the model.
ie: You need to provide new columns and new data model.

You would do so in 2 steps:
1) Create the new table with the new columns
2) Provide it the new data model

Then use the addOrReplace("tableId", transposedTableRef) and you're done.

Otherwise... look at transposing your table in jQuery alone on the client
side and not on the server side.

On Fri, Oct 3, 2014 at 11:53 AM, Martin Makundi <
martin.maku...@koodaripalvelut.com> wrote:

> Hi!
>
> We have a html table in wicket implemented as:
>
> foreach :: listview of table rows {
>   ..
>   foreach :: list view of table cells {
>  ..
>   }
> }
>
> (note: that was pseudocode)
>
>
> What we would like to do, is offer users possibility to transpose the
> table, however, with minimum changes to the code.
>
> Anybody done this? Any insights?
>
> We acknowledge that there are some inherent differences in the transposed
> versions of a html table. For example table rows can be ajax updated but
> table columns cannot. This might suggest that a div suitable layout should
> be used? Or should we simply
> ajaxRequestTarget.addComponent(xx::foreach::firstChildOfRow)  visit each
> first child of '*row*' when transposed?
>
> Maybe the transpose could be done using a simple onrender string replace
> operation (think along the lines of a "*complex regexp operation*").
>
> Any ideas, comments?
>
> Would be nice to accomplish this with a neat trick... NOT looking for a js
> gimmick because that will be slow with our heavy duty tables.
>
> Some references:
>
>-
>
> http://assaneonline.blogspot.fi/2011/02/looking-for-simpler-way-to-transpose.html
>-
>
> http://adomas.eu/transposing-html-table-even-with-colspan-and-rowspan-used-with-jquery-javascript-code/
>
>
> **
> Martin
>


Re: Mapping two UI componets to Single Model

2014-10-06 Thread Paul Bors
Please reffer to the free user guide, section 12.9 Creating complex form
components with FormComponentPanel at:
http://wicket.apache.org/guide/guide/single.html#forms2_9

In short you need to create your own compound FormComponentPanel that
encapsulates both from components and accepts a single model. Then you
would take that model and pass each individual part of it to the
corresponding form component you want.


On Mon, Oct 6, 2014 at 3:50 AM, manoj kumar 
wrote:

> Yes Sebastien it is related to my previous post.
>
> Actually we are using this for adding filters for a Report, where each
> filter is a Row consisting of:
>
> for ex: a Report might be on the Employee Table. where user could add a
> filter as:
>
> Attribute   OperatorValue Editor
> Department  IN  In this case it is
> Multi Select
> DOB EQ
>   DateTimeField
> EmpName LIKEtextField
> joining dateBetween  &
> .
>
> There are Two Drop downs one for a attribute of a report and a value
> Editor:
>
> Based on The Attribute selected:
> 1. The Value Editor is changed to either text Field, Date or multi select &
> also
> 2. The List of the Operators allowed for that attribute is shown.
> 3. Now We have added the Between Operator for the Date attributes.
>
> For Date we are using
> org.apache.wicket.extensions.yui.calendar.DateTimeField. which only accepts
> the Single date model object.
>
> so my Question is when between is checked i will show two DateTimeFields,
> and these two should map to a Single Model object, is this possible?
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Mapping-two-UI-componets-to-Single-Model-tp4667796p4667829.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: How to get this URL pattern working in newer versions of Wicket?

2014-10-06 Thread Paul Bors
Hey Steve,

You should not mount it yourself given the long session ID of
'a79c7348-6c8b-
4912-8cc7-3b4419344f7f' since that will change anyhow.

To understand how Wicket handles the URL mapping see the user guide's
Chapter 10 "Wicket Links and URL generation" at:
http://wicket.apache.org/guide/guide/single.html#urls

I guess you want to provide your own IMapperContext?


On Mon, Oct 6, 2014 at 12:31 AM, Steve Swinsburg 
wrote:

> Hi all,
>
> I've been working on Wicket 1.4 for a while and in upgrading to Wicket 6
> I've found an inconsistency in the way URLs are handled, specifically in
> the inmethod data grid but also the editable data grid.
>
> I have a particular context path that I need to maintain as the webapp
> rendering is inside a portal type framework.
>
> I have taken the example webapps from both 1.4 and 6 and customised them so
> they run in the framework.
>
> In Wicket 1.4, the page is mounted like:
>
> mount(new HybridUrlCodingStrategy("/data-grid/editable",
> EditableDataGridPage.class));
>
> and works fine. The URL is:
>
> http://localhost:8080/portal/tool/a79c7348-6c8b-4912-8cc7-3b4419344f7f/data-grid/editable.3
>
> In Wicket 6, the page is mounted as:
>
> mount("/data-grid/editable", EditableDataGridPage.class);
> ...
> getRootRequestMapperAsCompound().add(new MountedMapper(mountPath,
> pageClass));
>
> and it does not work. It strips my leading context bits
> (/portal/tool/UUID).
>
> I tried to mount it myself:
> mountPage("/a79c7348-6c8b-4912-8cc7-3b4419344f7f",
> EditableDataGridPage.class);
>
> But that goes into an infinite redirect loop if I mount it to the webapp I
> want. If I mount it to a non wicket webapp, then that mount works fine.
>
> I am not sure how to restore the old URL mapping strategy.
>
> Can anyone help?
>
> thanks,
> Steve
>


Re: how to handle null pointer exception while submit button

2014-10-06 Thread Paul Bors
Must be the wrong mailing list, ignore :)

On Sun, Oct 5, 2014 at 11:15 PM, Warren Bell 
wrote:

> OK, a little confused, AWT, Applet ? Is Wicket up to something I haven’t
> heard about ?
>
> Warren
>
> On Oct 5, 2014, at 7:57 PM, Taught by S&M 
> wrote:
>
> > This code will help to handle exceptions when there is a single
> TextField:
> >
> > import java.awt.*;
> > import java.awt.event.*;
> > import java.applet.*;
> >
> > /*
> > 
> > 
> > */
> >
> > class FieldZeroException extends Exception
> > {
> >   FieldZeroException()
> >   {
> >   }
> >
> >   public String toString()
> >   {
> >   return "Text field is empty.";
> >   }
> > }
> >
> > public class throwsDemo extends Applet implements ActionListener
> > {
> > Button b1;
> > TextField tf1,tf2;
> > Label l1,l2;
> >
> >   public void init()
> >   {
> >   setLayout(new FlowLayout(FlowLayout.LEFT));
> >   l1=new Label("NULL");
> >   l1.setForeground(Color.RED);
> >   l2=new Label();
> >   l2.setForeground(Color.GREEN);
> >   tf1=new TextField(10);
> >   b1=new Button("Check");
> >   add(tf1);
> >   add(b1);
> >   add(l1);
> >   add(l2);
> >   b1.addActionListener(this);
> >   }
> >
> >   public void actionPerformed(ActionEvent ae)
> >   {
> >   if(ae.getSource()==b1)
> >   {
> >   String str1=tf1.getText();
> >   int i=str1.length();
> >   try
> >   {
> >   if(i==0)
> >   {
> >   throw new FieldZeroException();
> >   }
> >   else
> >   {
> >   l1.setText("Success");
> >   }
> >   }
> >   catch(FieldZeroException fze)
> >   {
> >   l1.setText(fze.toString());
> >   }
> >   }
> >   }
> > }
> >
> > --
> > View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/how-to-handle-null-pointer-exception-while-submit-button-tp4666392p4667826.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
> >
> >
> > --
> > This email was Virus checked by Clark's Nutrition's Astaro Security
> Gateway.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: How to get this URL pattern working in newer versions of Wicket?

2014-10-07 Thread Paul Bors
Check out Wicket's source code and put a break point then follow through :)

On Tue, Oct 7, 2014 at 2:09 AM, Steve Swinsburg 
wrote:

> Hi Paul,
>
> Yeah the UUID will change in different placements of the app, I was just
> trying to get this particular instance working :)
> Just wondering why it didn't work, given that UUID? The UUID is correct for
> this placement and the URL it generated was correct though it kept
> redirecting until the browser stopped it.
>
> cheers,
> Steve
>
> On Tue, Oct 7, 2014 at 3:49 AM, Paul Bors  wrote:
>
> > Hey Steve,
> >
> > You should not mount it yourself given the long session ID of
> > 'a79c7348-6c8b-
> > 4912-8cc7-3b4419344f7f' since that will change anyhow.
> >
> > To understand how Wicket handles the URL mapping see the user guide's
> > Chapter 10 "Wicket Links and URL generation" at:
> > http://wicket.apache.org/guide/guide/single.html#urls
> >
> > I guess you want to provide your own IMapperContext?
> >
> >
> > On Mon, Oct 6, 2014 at 12:31 AM, Steve Swinsburg <
> > steve.swinsb...@gmail.com>
> > wrote:
> >
> > > Hi all,
> > >
> > > I've been working on Wicket 1.4 for a while and in upgrading to Wicket
> 6
> > > I've found an inconsistency in the way URLs are handled, specifically
> in
> > > the inmethod data grid but also the editable data grid.
> > >
> > > I have a particular context path that I need to maintain as the webapp
> > > rendering is inside a portal type framework.
> > >
> > > I have taken the example webapps from both 1.4 and 6 and customised
> them
> > so
> > > they run in the framework.
> > >
> > > In Wicket 1.4, the page is mounted like:
> > >
> > > mount(new HybridUrlCodingStrategy("/data-grid/editable",
> > > EditableDataGridPage.class));
> > >
> > > and works fine. The URL is:
> > >
> > >
> >
> http://localhost:8080/portal/tool/a79c7348-6c8b-4912-8cc7-3b4419344f7f/data-grid/editable.3
> > >
> > > In Wicket 6, the page is mounted as:
> > >
> > > mount("/data-grid/editable", EditableDataGridPage.class);
> > > ...
> > > getRootRequestMapperAsCompound().add(new MountedMapper(mountPath,
> > > pageClass));
> > >
> > > and it does not work. It strips my leading context bits
> > > (/portal/tool/UUID).
> > >
> > > I tried to mount it myself:
> > > mountPage("/a79c7348-6c8b-4912-8cc7-3b4419344f7f",
> > > EditableDataGridPage.class);
> > >
> > > But that goes into an infinite redirect loop if I mount it to the
> webapp
> > I
> > > want. If I mount it to a non wicket webapp, then that mount works fine.
> > >
> > > I am not sure how to restore the old URL mapping strategy.
> > >
> > > Can anyone help?
> > >
> > > thanks,
> > > Steve
> > >
> >
>


Re: alternative solution for addOrReplace()?

2014-10-07 Thread Paul Bors
Why not use Ajax?

addOrReplace() is really for when you need the full request cycle and have
the page rendered on the server side. With Ajax you get your target for
which you can add all the components you want to refresh on the page.

Given the day and age we live in, I don't think there is a need to even
worry about browsers that do not support Ajax. Than again, that depends on
your product's requirements.

Otherwise, you can keep on using addOrReplace() but stop using instaceof
and start using Generics.
If you need an example code-snippet of that let me know and I'll dig some
out for you.

On Tue, Oct 7, 2014 at 9:51 AM, Patrick Davids  wrote:

> Hi all,
> I have a panel, which renders a inner markupcontainer (different panels
> for different ways of displaying my model object) depending on its model
> objects type.
>
> I do this by addOrReplace() the inner panel in an onConfigure() having
> an "if instanceof"; and it also iterates over a list...
>
> I'm not sure, if it is a good solution (I dont like the instanceof
> approach), but the panel works quite good for ajax rendering and
> refreshing use-cases.
>
> But, the addOrReplace() has one big disadvantage.
> It forces to detach the model on each iteration, so on each iteration I
> get a database access to retrieve it again.
>
> Is there anyway to keep the model attached until the entire request
> cycle is finished?
>
>
> Or should I try to find complete other solution for this kind of "high
> dynamic iterating panel"?
> Is it better to use e.g. Fragments to display a model object in
> different ways depending on its state?
>
> Please give some inspirations... I ran out of ideas. Help!
>
> kind regards :-)
> Patrick
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Could not clear select2Choice component model value.

2014-10-07 Thread Paul Bors
You can also ask the developer via:
https://github.com/ivaynberg/wicket-select2/issues

You should probably take a look over the open issues so that you are
familiar with that other developers faced. Maybe one of those issues might
be a road block for you?

Although you will get a faster reply from Igor or another Wicket developer
via this list :)

On Tue, Oct 7, 2014 at 4:23 AM, Martin Grigorov 
wrote:

> Hi,
>
> You should call formComponent.clearInput() too.
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Tue, Oct 7, 2014 at 9:13 AM, MadasamySankarapandian <
> madas...@mcruncher.com> wrote:
>
> >
> > This is regarding wicket-select2 project. I could not find any mailing
> > list for this project. That is why sending here. Please some one help me.
> >
> > I have created clear link to clear the form input values. After click the
> > clear link,  all components values are cleared except Select2Choice
> > component.
> >
> > Here with attached quickstart to recreate this problem.
> >
> > Follow below steps to recreate this problem
> >
> > * Download attachment and extract it.
> > * cd select2-quickstart.
> > * Then execute mvn clean package jetty:run
> > * Type localhost:8080 in browser
> > * Give the input to name and country field.
> > * Click clear link
> >
> > Now name(*TextField*) field value is cleared and country(*Select2Choice*)
> > field value is not cleared.
> >
> >
> >
> > --
> > Thanks and regards
> >  Madasamy
> >
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
>


Re: Could not clear select2Choice component model value.

2014-10-07 Thread Paul Bors
Can you update this issue then?

https://github.com/ivaynberg/wicket-select2/issues/93

On Tue, Oct 7, 2014 at 12:00 PM, Maxim Solodovnik 
wrote:

> we recently moved this component to wicketstuff:
>
> https://github.com/wicketstuff/core/tree/master/jdk-1.7-parent/select2-parent
>
> to get Wicket7 compatible version
>
>
> On 7 October 2014 22:56, Paul Bors  wrote:
>
> > You can also ask the developer via:
> > https://github.com/ivaynberg/wicket-select2/issues
> >
> > You should probably take a look over the open issues so that you are
> > familiar with that other developers faced. Maybe one of those issues
> might
> > be a road block for you?
> >
> > Although you will get a faster reply from Igor or another Wicket
> developer
> > via this list :)
> >
> > On Tue, Oct 7, 2014 at 4:23 AM, Martin Grigorov 
> > wrote:
> >
> > > Hi,
> > >
> > > You should call formComponent.clearInput() too.
> > >
> > > Martin Grigorov
> > > Wicket Training and Consulting
> > > https://twitter.com/mtgrigorov
> > >
> > > On Tue, Oct 7, 2014 at 9:13 AM, MadasamySankarapandian <
> > > madas...@mcruncher.com> wrote:
> > >
> > > >
> > > > This is regarding wicket-select2 project. I could not find any
> mailing
> > > > list for this project. That is why sending here. Please some one help
> > me.
> > > >
> > > > I have created clear link to clear the form input values. After click
> > the
> > > > clear link,  all components values are cleared except Select2Choice
> > > > component.
> > > >
> > > > Here with attached quickstart to recreate this problem.
> > > >
> > > > Follow below steps to recreate this problem
> > > >
> > > > * Download attachment and extract it.
> > > > * cd select2-quickstart.
> > > > * Then execute mvn clean package jetty:run
> > > > * Type localhost:8080 in browser
> > > > * Give the input to name and country field.
> > > > * Click clear link
> > > >
> > > > Now name(*TextField*) field value is cleared and
> > country(*Select2Choice*)
> > > > field value is not cleared.
> > > >
> > > >
> > > >
> > > > --
> > > > Thanks and regards
> > > >  Madasamy
> > > >
> > > >
> > > > -
> > > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > > > For additional commands, e-mail: users-h...@wicket.apache.org
> > > >
> > >
> >
>
>
>
> --
> WBR
> Maxim aka solomax
>


Re: alternative solution for addOrReplace()?

2014-10-07 Thread Paul Bors
I think you might have over-complicated your design.
Your use-case is quite simple, you have user input that filters the
display. It might be that there are a lot of panels to be updated but then
again it should be simple to update the parent which in turn delegates that
responsibility to the children.

Take a quick look over how Decebal implemented his Wicket-Dashboards as in
his project the entire dashboard is refreshed when adding a new panel which
in turn can be quite complicated.

His code and examples are at:
https://github.com/decebals/wicket-dashboard

Study his design and see how much of that you can apply to your page.

Otherwise I suggest you get rid of the addOrReplace() and move that logic
into your onBeforeRender() methods for those panels to update themself.

On Tue, Oct 7, 2014 at 12:43 PM, Patrick Davids <
patrick.dav...@nubologic.com> wrote:

> Hi Paul,
> thanx for replying.
>
> Oh, I use Ajax very heavily in this case. Thats why I said: "the panel
> works quite good for ajax rendering and refreshing use-cases"
>
> Hmm... ok... I think I missed some details. I try to explain.
>
> My page contains two sections seperated from each other.
> A kind of data-entry and a kind of displaying the results.
>
> The section which displays the results is a quite complicated panel,
> having an RefreshingView for about 30 (I will name them) sub-panels.
>
> These sub-panels addOrReplace() an inner container while rendering itself.
> And the replacement depends on my model object type.
>
> So, my sub-panel class has a hugh knowledge about how to render the
> results.
>
> On entering some data on the data-entry section I refresh the whole
> panel in the display section with all its sub-panels using Ajax. And
> this works great.
> Some of the sub-panels also rerender/refresh own there own, by listening
> to events etc pepe. All this behaviours are working very well.
>
> The only disadvantage is, using addOrReplace(), I have a heavy
> detaching/attaching situation and a performance problem.
>
> So, the best solution for now would be, keeping my panel implementation
> as it is, but just having my models detached only once, not for iteration.
>
> And here I dont have any idea how to solve that... :-/
>
> thanx and kind regards
> Patrick
>
> Am 07.10.2014 17:52, schrieb Paul Bors:
> > Why not use Ajax?
> >
> > addOrReplace() is really for when you need the full request cycle and
> have
> > the page rendered on the server side. With Ajax you get your target for
> > which you can add all the components you want to refresh on the page.
> >
> > Given the day and age we live in, I don't think there is a need to even
> > worry about browsers that do not support Ajax. Than again, that depends
> on
> > your product's requirements.
> >
> > Otherwise, you can keep on using addOrReplace() but stop using instaceof
> > and start using Generics.
> > If you need an example code-snippet of that let me know and I'll dig some
> > out for you.
> >
> > On Tue, Oct 7, 2014 at 9:51 AM, Patrick Davids <
> patrick.dav...@nubologic.com
> >> wrote:
> >
> >> Hi all,
> >> I have a panel, which renders a inner markupcontainer (different panels
> >> for different ways of displaying my model object) depending on its model
> >> objects type.
> >>
> >> I do this by addOrReplace() the inner panel in an onConfigure() having
> >> an "if instanceof"; and it also iterates over a list...
> >>
> >> I'm not sure, if it is a good solution (I dont like the instanceof
> >> approach), but the panel works quite good for ajax rendering and
> >> refreshing use-cases.
> >>
> >> But, the addOrReplace() has one big disadvantage.
> >> It forces to detach the model on each iteration, so on each iteration I
> >> get a database access to retrieve it again.
> >>
> >> Is there anyway to keep the model attached until the entire request
> >> cycle is finished?
> >>
> >>
> >> Or should I try to find complete other solution for this kind of "high
> >> dynamic iterating panel"?
> >> Is it better to use e.g. Fragments to display a model object in
> >> different ways depending on its state?
> >>
> >> Please give some inspirations... I ran out of ideas. Help!
> >>
> >> kind regards :-)
> >> Patrick
> >> -
> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >> For additional commands, e-mail: users-h...@wicket.apache.org
> >>
> >>
> >
>


Re: Modify items in quickview?

2014-10-30 Thread Paul Bors
Are you talking about this QuickView?
https://github.com/vineetsemwal/quickview



On Thu, Oct 30, 2014 at 1:16 PM, Boris Goldowsky 
wrote:

> How would you set things up to have the best of both worlds with a
> QuickView?   I need to have
> (a) a button like an AjaxItemsNavigator that adds additional elements to
> the QuickView without repainting the entire view, AND
> (b) some AJAX operations that change the entire content of the QuickView –
> for example, they can change the data provider.
>
> If I use the ReuseAllStrategy I can’t determine how to accomplish (b).
> Other item reuse strategies don’t seem to allow (a).  Does a custom item
> reuse strategy with a “reset” method make sense or is there a better way?
>
> Boris
>
>


Re: Unit testing RadioChoice with AjaxFormComponentUpdatingBehavior

2014-10-30 Thread Paul Bors
Since you want to test a AjaxFormComponentUpdatingBehav
ior and not a standard form component (non-ajax) you don't use
formTester.selectRadioChoice( "propertyType", 2 ) you have to create the
AjaxTarget and etc.

See "Testing AJAX behaviors" section at:
http://wicket.apache.org/guide/guide/testing.html

On Thu, Oct 30, 2014 at 4:27 PM, Andrea Del Bene 
wrote:

> On 30/10/14 21:08, Nick Pratt wrote:
>
>> Wicket 6.17.0
>>
>> I have a RadioChoice (in a Form) that has an attached
>> AjaxFormComponentUpdatingBehavior.
>>
>> The onUpdate() method of the Behavior fires an event for other components
>> on the page to update (change visibility depending on user selection in
>> radio choice).
>>
>> Im trying to unit test it using:
>>
>> formTester.selectRadioChoice( "propertyType", 2 );
>>
> I guess that's a typo :) or are you using a custom formTester?
>
>>
>> and then I'm trying to trigger the behavior to fire so that I can
>> check that the various components are visible/invisible:
>>
>> Component component = baseTester.getComponentFromLastRenderedPage(
>> "form:propertyType" );
>> for ( Behavior b : component.getBehaviors() )
>> {
>> if ( b instanceof AjaxFormComponentUpdatingBehavior )
>> {
>>baseTester.executeBehavior( (AbstractAjaxBehavior) b );
>> }
>> }
>>
>> However, I'm running in to this when the behavior is executed:
>>
>> org.apache.wicket.core.request.handler.ListenerInvocationNotAllowedEx
>> ception:
>> Behavior rejected interface invocation.
>>
>> Is it possible to unit test this specific behavior, and am I going
>> about this the right way?
>>
>> I've verified that the application works as expected in a browser.
>>
> BTW, multiple-choice component should use 
> AjaxFormChoiceComponentUpdatingBehavior
> instead of AjaxFormComponentUpdatingBehavior.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: PropertyModel / PropertyResolver / Map or List access

2014-11-06 Thread Paul Bors
I think that should have worked as per:
http://wicket.apache.org/guide/guide/modelsforms.html#modelsforms_2

Label label = new Label("firstChildName", new PropertyModel(person,
"children.0.name"));

What version of Wicket are you using?



On Thu, Nov 6, 2014 at 11:03 AM, Patrick Davids <
patrick.dav...@nubologic.com> wrote:

> Hi all,
>
> the javadoc of PropertyResolver says, map or list access is possible via
> keys or index.
> Accessing an map via key is no problem, but I dont get it working for
> lists and index.
>
> for instance:
>
> MyPage extends Page{
>
>private IModel> list;
>
>public MyPage(IModel> list){
>  super();
>  this.list = list;
>
> add(new Label("mylabel", new PropertyModel(MyPage.this,
> "list[1].anyProperty")));
>
>}
>
> }
>
> ends up in a Exception like this:
> Last cause: No get method defined for class: class MyPage$1 expression: 1
>
> I also made a try with "list.1.anyProperty".
> Not working...
>
> Any ideas?
>
> best regards
> Patrick


Re: PropertyModel / PropertyResolver / Map or List access

2014-11-06 Thread Paul Bors
Create a quick-start, open a Jira ticket and provide a push request fixing
it :)

On Thu, Nov 6, 2014 at 11:38 AM, Patrick Davids <
patrick.dav...@nubologic.com> wrote:

> Hi Paul,
> v6.17.0.
>
> Maybe, I made a too reduced example.
> My property navigates further... its more like this:
> "list[1].anyProperty[key]"
>
> Is such a combination allowed?
>
> Patrick
>
> Am 06.11.2014 17:24, schrieb Paul Bors:
> > I think that should have worked as per:
> > http://wicket.apache.org/guide/guide/modelsforms.html#modelsforms_2
> >
> > Label label = new Label("firstChildName", new PropertyModel(person,
> > "children.0.name"));
> >
> > What version of Wicket are you using?
> >
> >
> >
> > On Thu, Nov 6, 2014 at 11:03 AM, Patrick Davids <
> > patrick.dav...@nubologic.com> wrote:
> >
> >> Hi all,
> >>
> >> the javadoc of PropertyResolver says, map or list access is possible via
> >> keys or index.
> >> Accessing an map via key is no problem, but I dont get it working for
> >> lists and index.
> >>
> >> for instance:
> >>
> >> MyPage extends Page{
> >>
> >> private IModel> list;
> >>
> >> public MyPage(IModel> list){
> >>   super();
> >>   this.list = list;
> >>
> >>  add(new Label("mylabel", new PropertyModel(MyPage.this,
> >> "list[1].anyProperty")));
> >>
> >> }
> >>
> >> }
> >>
> >> ends up in a Exception like this:
> >> Last cause: No get method defined for class: class MyPage$1 expression:
> 1
> >>
> >> I also made a try with "list.1.anyProperty".
> >> Not working...
> >>
> >> Any ideas?
> >>
> >> best regards
> >> Patrick
> >
>


Re: GitHub

2014-11-13 Thread Paul Bors
That's a GitHub question and not a Wicket one. Wrong mailing list.

But here:
https://help.github.com/articles/fork-a-repo/

2014-11-13 20:58 GMT-05:00 Zala Pierre GOUPIL :

> Hi all,
>
> When I try and fork Wicket github repo, I don't get all the branches and
> tags. Does anyone has a clue regarding that?
>
> Cheers,
>
> Pierre
>
> --
> Si le sang ne coule pas assez chaud dans tes veines, je le répandrai sur le
> sable pour qu'il bouille au soleil.
>


Re: Wicket6 setResponsePage() stackoverflow error.

2014-11-24 Thread Paul Bors
I'm no expert but it looks as if your filter from Liferay is looping calls
into Wicket's filter and vice-versa.

What's your web.xml config?

On Tue, Nov 25, 2014 at 12:22 AM, Milind  wrote:

> Hello,
>
> I am using Liferay "liferay-portal-6.2-ce-ga2" with Wicket6 and when
> setResponsePage(MyClass.class, params); is called it gives stackoverflow
> error. Does anyone came across similar error?
>
> http://www.liferay.com/community/forums/-/message_boards/message/45604006
>  >
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Wicket6-setResponsePage-stackoverflow-error-tp4668538.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: TabbedPanel

2014-12-01 Thread Paul Bors
At a first glimpse it looks okay. Not sure what you mean by your
application terminating... but here's a working example for you to correct
you page:
http://www.wicket-library.com/wicket-examples/compref/wicket/bookmarkable/org.apache.wicket.examples.compref.TabbedPanelPage;jsessionid=76A4F74BA9600E5D001006980818BB0A?0

On Sat, Nov 29, 2014 at 6:11 AM, K  wrote:

> Hi
> I am trying to implement an example for tabbed panel page in wicket but it
> does not work. I have stripped off few methods that i thought were not
> necessary for my current scenario. I am not sure if i missed something.
> Please suggest.
>
> Mark-up: Tabbed Panel Page
> tabbedpanelpage.txt
> <
> http://apache-wicket.1842946.n4.nabble.com/file/n4668589/tabbedpanelpage.txt
> >
>
> Java Code: Tabbed Panel Page
> tabbedpanelpage(1).txt
> <
> http://apache-wicket.1842946.n4.nabble.com/file/n4668589/tabbedpanelpage%281%29.txt
> >
>
> Mark-up: TabPanel1 (TabPanel2 & TabPanel3 are same )
> tabpanel1.txt
> <http://apache-wicket.1842946.n4.nabble.com/file/n4668589/tabpanel1.txt>
>
> My Log:
> Constructor:
> AbstractTab : 1
> AbstractTab : 2
> AbstractTab : 3
> getPanel: 1
> TabPanel1
>
> my application terminates at this point. Thanks in advance.
>
> -
> K
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/TabbedPanel-tp4668589.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
>
>


-- 
~ Thank you,
   Paul Bors


Have a Heineken on me Wicket team!

2015-09-22 Thread Paul Bors
Soon we will lunch a small little site for the new James Bond 007 movie and
as some of you might now, he started drinking Heineken now-a-day :)

http://hknbond-us.heineken.com/

Just wanted to thank the Wicket team for making such simple projects even
easier !!!

-
~ Thank you,
p...@bors.ws
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Have-a-Heineken-on-me-Wicket-team-tp4672013.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



US: Wicket Dev hourly consulting fee

2018-11-07 Thread Paul Bors
Hey Wicketers,

For those of you located in US, what's the fair market hourly consulting
fee you charge in 2018 / 2019?


RE: Validating form components in a refreshing view

2012-07-17 Thread Paul Bors
For example of how you could validate a form given multiple form fields take a 
look at how EqualInputValidator is implemented.

You would have to keep references to the form fields that are related and 
return them as an array via IFormValidator. getDependentFormComponents() of 
your own IFormValidator implementation. Then you can add as many of those you 
want to your form.

Wicket form processing:

 ---  --  -  --    
 
| Start | -> | required | -> | convert | -> | validate | -> |  push  | -> | 
onSubmit() |
|   ||  checks  ||  input  ||  input   ||  input || 
   |
 ---  --  -  --    
 
  |  ||  |  

 fail   fail fail   fail   
--- 
  |  ||  || 
onError() |
   - - - - - - - - - - - - - - - - - - - - - - - - - - -> | 
  |
   
---

I recommend reading "Wicket in Action" (http://manning.com/dashorst/) or any 
other books listed on Wicket's website (http://wicket.apache.org/learn/books/).

~ Thank you,
Paul Bors | Software Engineer | Knoa Software | 5 Union Square West, New York , 
NY 10003 | O: 212-807-9608 | www.knoa.com


-Original Message-
From: Tobias Knierim [mailto:tobias.knie...@googlemail.com] 
Sent: Tuesday, July 17, 2012 6:04 AM
To: users@wicket.apache.org
Subject: Re: Validating form components in a refreshing view

Hi Josh,

you're right,
I haven't put any in this example because I am really not sure how I should 
accomplish this.
If I choose a FormValidator with the FormComponents textOne and textTwo, I can 
just compare the values of one row.

I will extend my example later.

Tobi


2012/7/17 Josh Kamau :
> Hi Tobi ;
>
> I cant see any Validation code..
>
> Josh.
>
> On Tue, Jul 17, 2012 at 12:01 PM, Tobias Knierim < 
> tobias.knie...@googlemail.com> wrote:
>
>> Hi Josh,
>>
>> I just created a little example of how my application is working:
>> I want to compare value2 from Entry1 with value1 from Entry2 and so on.
>>
>> Any ideas?
>>
>>
>> Form form = new Form("form");
>> add(form);
>>
>> RefreshingView refreshingView = new 
>> RefreshingView("list", values) {
>>
>> @Override
>> protected Iterator> getItemModels() {
>> List entryList = 
>> values.getObject().getEntryList();
>>
>> ModelIteratorAdapter mia = new
>> ModelIteratorAdapter(entryList.iterator()) {
>>
>> @Override
>> protected IModel 
>> model(Entry object) {
>> return new 
>> CompoundPropertyModel(object);
>> }
>> };
>> return mia;
>> }
>>
>> @Override
>> protected void populateItem(Item item) {
>> IModel model = 
>> item.getModel();
>>
>> item.add(new 
>> TextField("textOne", new PropertyModel(model, 
>> "value1")));
>> item.add(new 
>> TextField("textTwo", new PropertyModel(model, 
>> "value2")));
>> }
>>
>> };
>>
>> form.add(refreshingView);
>>
>> Tobi
>>
>>
>> 2012/7/17 Josh Kamau :
>> > Tobi ;
>> >
>> > May be you can paste some code to show how you are constructing the 
>> > forms...
>> >
>> > I believe if you just add the validators to the components and then
>> submit
>> > the forms, it just works..
>> >
>> > Josh.
>> >
>> > On Tue, Jul 17, 2012 at 10:22 AM, Tobias Knierim < 
>> > tobias.knie...@googlemail.com> wrote:
>> >
>> >> Hi Josh,
>> >>
>> >> The whole view is wrapped in one form.
>> >>
>> >> Greetings
>> >> Tobi
>> >>
>> >> Am 17.07.2012 um 09:04 schrieb Josh Kamau :
>> >>
>

Update JavaDoc for AbstractChoice#setType(java.lang.Class)

2012-07-17 Thread Paul Bors
How should we as Wicket users request updates to JavaDocs as we come across 
them?

AbstractChoice.setType throws an UnsupportedOperationException but that's not 
reflected in its JavaDoc at:
http://ci.apache.org/projects/wicket/apidocs/1.5.x/org/apache/wicket/markup/html/form/AbstractChoice.html#setType(java.lang.Class)

This is not mentioned in the migration guide. Perhaps a note should be added 
next to the one about AbstractSingleSelectChoice:
https://cwiki.apache.org/WICKET/migration-to-wicket-15.html#MigrationtoWicket1.5-%2528RC6%2529AbstractSingleSelectChoiceusesemptyStringasvaluefordefaultchoice

~ Thank you,
Paul Bors

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



RE: How to Logout

2012-07-18 Thread Paul Bors
There is no need to throw a RestartResponseAtInterceptPageException.
Simply redirect the user to the log-in page:

// Logout
Link logout = new Link("logout") {
@Override
public void onClick() {
Session.session().invalidateNow();
setResponsePage(LoginPage.class);
}
};

~ Thank you,
Paul Bors

-Original Message-
From: Sébastien Gautrin [mailto:sgaut...@telemetris.com] 
Sent: Wednesday, July 18, 2012 12:43 PM
To: users@wicket.apache.org
Subject: Re: How to Logout

Hi,

The LogoutPage in the application I work on is quite simple:
- first we invalidate the session with session.invalidateNow() like you do
- second we throw a RestartResponseAtInterceptPageException with the Page we 
want the user to go to after the logout process (actually we use it with the 
class of the Page we want, but you can pass it an instance of a Page).

Hope this will help.


 Original Message 
Subject: How to Logout
From: Matthias Keller 
To: users@wicket.apache.org
Date: 2012-07-18

> Hi
>
> I'm trying to implement a simple logout mechanism with the need of 
> complete session termination.
>
> For this I created a LogoutPage and mounted it using 
> mountPage("/logout", LogoutPage.class);
>
> Now this page contains multiple components and a link to change 
> langugage etc, therefore it is stateful.
> But when I perform a session.invalidate(Now)() in the page's 
> constructor, the user gets redirected to /logout?0 with a new session 
> ID. Probably though the page was stored in the previous session so it 
> doesn't exist with the new one, then he gets redirected back to 
> /logout, back to /logout?0 and so on.
>
> What do I have to do to implement this simple logout page?
>
> Thanks
>
> Matt
>

-
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: [1.5] [6.0] dynamically named CSS, JS & images resources

2012-07-19 Thread Paul Bors
Have you tried turning the  tag into a dynamic WebMarkupContainer and 
then switching its href attribute's value via an AttributeModifier?

HTML:



 rel="stylesheet" type="text/css" 
href="css/default-styles.css">






Java:

public BasePage() {
htmlTag = new TransparentWebMarkupContainer("htmlTag");
htmlTag.add( new AttributeModifier("lang", new 
Model(getUserLocale().getLanguage())) );
add(htmlTag);

cssHeadLink = new WebMarkupContainer("cssHeadLink");
cssHeadLink.add( new AttributeModifier("href", new 
Model(getSkinStyleSheet())) );
htmlTag.add(cssHeadLink);
}

Then have getSkinStyleSheet() return the name of the CSS file or use any other 
kind of IModel.

Notice the above example also shows the use of the 
TransparentWebMarkupContainer used to change the HTML document's language in a 
similar manner only it will not be part of the component path for pages that 
extend BasePage. Here, getUserLocale() returns the Locale of the logged-in user 
whose ID is stored the Session.

~ Thank you,
Paul Bors | Software Engineer | Knoa Software | 5 Union Square West, New York , 
NY 10003 | O: 212-807-9608 | www.knoa.com


-Original Message-
From: Pierre Goupil [mailto:goupilpie...@gmail.com] 
Sent: Thursday, July 19, 2012 2:57 PM
To: users@wicket.apache.org
Subject: [1.5] [6.0] dynamically named CSS, JS & images resources

Good evening,

I'd like to contribute CSSs & JSs to my  for which names I don't know. 
More precisely, I'd like to be able to download a .zip, unzip it and contribute 
its CSS & JS content to the , plus being able to display the images of 
the zip thanks to the links in the CSS.

Regarding the downloading and unzipping steps, it's easy. But for the header 
contributions, I can't figure out how to do that since :

1) I don't know the names of the CSS & JS files before download

2) the CSS files link to the images using their regular names, but Wicket 
appends characters of its own to their names.

What I'm trying to achieve is to be able to switch (at run-time) my app's theme 
by downloading a new one on a themes website, like 
http://www.freecsstemplates.org/

I use Wicket 1.5.7 but a solution for Wicket 6.0 is OK as well.

Any help will be much appreciated.

Regards,

Pierre Goupil


--
Le bonheur n'est pas une destination, mais une façon de voyager.

Papa d'une petite Lou-Ann depuis le 30 juin.


RE: I think it's time for a new book.... Igor and Co ?

2012-07-22 Thread Paul Bors
I second improving the current code documentation as I recently migrated a
mid-size project to Wicket 1.5.7 from 1.3.7 and I've notice myself having to
dig into the framework implementation more often than normal because of the
weak or at times wrong JavaDocs.

I won't mind submitting small patches if someone would point the way. Last I
asked I was told to submit a push via git hub. Is there a wiki page on how
to submit such code changes patches to a wicket branch?

At the same time I do feel that a book explaining the inner works of Wicket
will also benefit everyone to better understand the framework faster and be
able to contribute as needed. I remember couple of years ago when I first
started working with Wicket and how lost I was until after I read two books
on the subject just to learn how to use it.

That's my 2 cents :)

~ Thank you,
  p...@bors.ws

-Original Message-
From: snekse [mailto:sne...@gmail.com] 
Sent: Sunday, July 22, 2012 2:23 PM
To: users@wicket.apache.org
Subject: Re: I think it's time for a new book Igor and Co ?

Putting in my 2 cents.

I'd rather see more people put in time and effort to submit patches for
documentation that would reduce the need to dig into the guts of Wicket.

Now that I'm more familiar with Wicket, I'll try to start doing this.  I
hope others will too.
On Jul 22, 2012 10:55 AM, "Michael Mosmann"  wrote:

> I would put the bell on the cat .. but maybe someone would join..
>
> Mm:)
> --
> Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail 
> gesendet.
>
>
>
> Igor Vaynberg  schrieb:
>
> lol. my thoughts exactly :)
>
> -igor
>
> On Sun, Jul 22, 2012 at 12:53 PM, Josh Kamau 
> wrote:
> > Who will bell ; the cat ?
> >
> > On Sun, Jul 22, 2012 at 12:51 PM, Michael Mosmann 
> > >wrote:
> >
> >> Had the same idea...
> >> --
> >> Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail 
> >> gesendet.
> >>
> >>
> >>
> >> mlabs  schrieb:
> >>
> >> The title would be ... 'Wicket Internals' ...
> >> Dive DEEPER into the parts other programmers never reach
> >> The inner workings of response cycles... what really happens ...
> >> Oh and esp the Ajax stuff... jQuery integration ... etc...
> >>
> >> TIA
> >>
> >>
> >>
> >> --
> >> View this message in context:
> >>
> http://apache-wicket.1842946.n4.nabble.com/I-think-it-s-time-for-a-new
> -book-Igor-and-Co-tp4650687.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
>
>


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



RE: Wicket Layout Design

2012-07-23 Thread Paul Bors
You can try using a TransparentWebMarkupContainer so that you won't always
have to add them to the page hierarchy and only override your factory
methods when you need to.

For a code-snippet example see this thread:
http://apache-wicket.1842946.n4.nabble.com/1-5-6-0-dynamically-named-CSS-JS-
amp-images-resources-tc4650635.html#a4650638

~ Thank you,
  Paul Bors

-Original Message-
From: divad91 [mailto:diva...@hotmail.com] 
Sent: Monday, July 23, 2012 12:40 PM
To: users@wicket.apache.org
Subject: Re: Wicket Layout Design

Thanks Jesse for your reply.

The only drawback of this method is that I will need to override theses 3
methods (createNewHeader, createNewFooter...) in all pages that extends
"BasePage.java".Ideally I would like to avoid copying code but I think it's
the cleaner way to override layout components.

Thanks again !
David



--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/Wicket-Layout-Design-tp4650630p46
50734.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: I think it's time for a new book.... Igor and Co ?

2012-07-23 Thread Paul Bors
Thanks Martin,

That's quite helpful, I'll sign up today :)

~ Thank you,
  Paul Bors

-Original Message-
From: Martin Grigorov [mailto:mgrigo...@apache.org] 
Sent: Monday, July 23, 2012 3:15 AM
To: users@wicket.apache.org
Subject: Re: I think it's time for a new book Igor and Co ?

Hi,

You can create tickets in our Jira with attached patches if you don't know how 
to use GitHub or you don't want to use it.

If you want to try GitHub:
1) create an account at GitHub (https://github.com/)
2) go to https://github.com/apache/wicket and click the "Fork" button
3) clone the fork locally: git clone
https://github.com/MY_ACCOUNT/wicket.git (replace MY_ACCIUNT with your real 
username.)
4) make your improvements in the code
5) git commit
6) git push
7) go to https://github.com/MY_ACCOUNT/wicket and press the "Pull Request" 
button

That's it.

On Mon, Jul 23, 2012 at 12:27 AM, Paul Bors  wrote:
> I second improving the current code documentation as I recently 
> migrated a mid-size project to Wicket 1.5.7 from 1.3.7 and I've notice 
> myself having to dig into the framework implementation more often than 
> normal because of the weak or at times wrong JavaDocs.
>
> I won't mind submitting small patches if someone would point the way. 
> Last I asked I was told to submit a push via git hub. Is there a wiki 
> page on how to submit such code changes patches to a wicket branch?
>
> At the same time I do feel that a book explaining the inner works of 
> Wicket will also benefit everyone to better understand the framework 
> faster and be able to contribute as needed. I remember couple of years 
> ago when I first started working with Wicket and how lost I was until 
> after I read two books on the subject just to learn how to use it.
>
> That's my 2 cents :)
>
> ~ Thank you,
>   p...@bors.ws
>
> -Original Message-
> From: snekse [mailto:sne...@gmail.com]
> Sent: Sunday, July 22, 2012 2:23 PM
> To: users@wicket.apache.org
> Subject: Re: I think it's time for a new book Igor and Co ?
>
> Putting in my 2 cents.
>
> I'd rather see more people put in time and effort to submit patches 
> for documentation that would reduce the need to dig into the guts of Wicket.
>
> Now that I'm more familiar with Wicket, I'll try to start doing this.  
> I hope others will too.
> On Jul 22, 2012 10:55 AM, "Michael Mosmann"  wrote:
>
>> I would put the bell on the cat .. but maybe someone would join..
>>
>> Mm:)
>> --
>> Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail 
>> gesendet.
>>
>>
>>
>> Igor Vaynberg  schrieb:
>>
>> lol. my thoughts exactly :)
>>
>> -igor
>>
>> On Sun, Jul 22, 2012 at 12:53 PM, Josh Kamau 
>> wrote:
>> > Who will bell <http://en.wikipedia.org/wiki/Belling_the_cat>; the cat ?
>> >
>> > On Sun, Jul 22, 2012 at 12:51 PM, Michael Mosmann 
>> >> >wrote:
>> >
>> >> Had the same idea...
>> >> --
>> >> Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail 
>> >> gesendet.
>> >>
>> >>
>> >>
>> >> mlabs  schrieb:
>> >>
>> >> The title would be ... 'Wicket Internals' ...
>> >> Dive DEEPER into the parts other programmers never reach
>> >> The inner workings of response cycles... what really happens ...
>> >> Oh and esp the Ajax stuff... jQuery integration ... etc...
>> >>
>> >> TIA
>> >>
>> >>
>> >>
>> >> --
>> >> View this message in context:
>> >>
>> http://apache-wicket.1842946.n4.nabble.com/I-think-it-s-time-for-a-ne
>> w
>> -book-Igor-and-Co-tp4650687.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
>>
>>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>



--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.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: Where to add javascript in html pages which follow inheritance relationship.

2012-07-31 Thread Paul Bors
>From what I remember  is the way to go!
https://cwiki.apache.org/WICKET/wickets-xhtml-tags.html#Wicket%2527sXHTMLtag
s-Elementwicket%253Ahead

I believe this tag will appends what its surrounding to the bottom of
already existing head tag contents on the page.

For your child page you should not define another  html tag inside
. View your page source and start troubleshooting from there.

And if you didn't define another  html tag, then post your code so we
can better help you better :)

-Original Message-
From: kshitiz [mailto:k.agarw...@gmail.com] 
Sent: Tuesday, July 31, 2012 12:38 PM
To: users@wicket.apache.org
Subject: Re: Where to add javascript in html pages which follow inheritance
relationship.

Please help me out here...for a child page..how would I add javascript in
its head. I have tried out wicket:head with head tag in base page but it is
not working out...



--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/Where-to-add-javascript-in-html-p
ages-which-follow-inheritance-relationship-tp4650855p4650903.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: Where to add javascript in html pages which follow inheritance relationship.

2012-08-01 Thread Paul Bors
Well, it appears that your Page2.html and Page3.html are base pages (root
classes to extend from) since you used  (something will
extend from those pages). Thus your hierarchy tree would look like:

Page2.html (root)
  Page1.html (child: if you extend Page2)
Page3.html (root)
  Page1.html (child: if you extend Page3)

Also, you should add a  to the HTML file(s) that are your base
classes (the ones you declared  in).

See this example on Creating layouts using markup inheritance from Wicket's
website:
http://wicket.apache.org/learn/examples/markupinheritance.html

Hope that helps!

-Original Message-
From: kshitiz [mailto:k.agarw...@gmail.com] 
Sent: Wednesday, August 01, 2012 2:42 AM
To: users@wicket.apache.org
Subject: Re: Where to add javascript in html pages which follow inheritance
relationship.

Nothing happened..:(...here is the code:

*Page1.html*

http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
;>
http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en"

xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd";
>











*Page2.html*

http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
;>
http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en"
   
xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd";
>







*Page3.html*

http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
;>
http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en"
   
xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd";
>








/Please note that page1 extends from page2 and page2 extends from page3.
Also, I am not using any renderHead related code in java classes. I want to
deal with JS and CSS at html level only/

If I put the following section in page2.html and then run page1, alert
appears...




 




--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/Where-to-add-javascript-in-html-p
ages-which-follow-inheritance-relationship-tp4650855p4650908.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: Boolean DropDownChoice

2012-08-01 Thread Paul Bors
Instead of going to the extent of overriding a class because your model
value is not updated, why not fix the problem?

Take a look at the component reference wicket-example project:
http://www.wicket-library.com/wicket-examples/compref/

More precisely at the DropDownChoice:
http://www.wicket-library.com/wicket-examples/compref/wicket/bookmarkable/or
g.apache.wicket.examples.compref.DropDownChoicePage?0

-Original Message-
From: Lawrence, Sean [mailto:sean.lawre...@mantech.com] 
Sent: Wednesday, August 01, 2012 7:19 PM
To: users@wicket.apache.org
Subject: Boolean DropDownChoice

Hi,

I'm trying to create a custom form component that extends a
DropDownChoice. The reason I'm doing this is because I need a form
component that forces a user to select a choice. However, I'm unable to get
the model to update. What am I not overriding properly? I'm all ears for
suggestions if there is a better way to do this as well.

/**
* A Boolean form component that uses a drop down choice so that
* a user is forced to choose between "Yes" or "No".
*
*/
public class YesNoDropDownChoice extends DropDownChoice {

  private static final long serialVersionUID = 1L;

  public YesNoDropDownChoice(String id, IModel model) {
super(id, model, Arrays.asList(
Choice.YES.getBoolean(),
Choice.NO.getBoolean()));
onModelChanged();
  }

  @Override
  protected void onModelChanged() {
super.onModelChanged();
setModelObject(getModelObject());
  }

  /**
  * {@inheritDoc}
  */
  @Override
  protected void convertInput() {
Boolean b = getModelObject();
setConvertedInput(b);
  }
}

Thanks in advance,

Sean Lawrence



This e-mail and any attachments are intended only for the use of the
addressee(s) named herein and may contain proprietary information. If you
are not the intended recipient of this e-mail or believe that you received
this email in error, please take immediate action to notify the sender of
the apparent error by reply e-mail; permanently delete the e-mail and any
attachments from your computer; and do not disseminate, distribute, use, or
copy this message and any attachments.


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



RE: Repeating TextFields

2012-08-01 Thread Paul Bors
I use DataTable and add a new object to its model.
Another thing I do is to allow for an edit button that would turn the entire
row of a DataTable into the appropriate form fields.

For a visual see the Editable tree table from wicket's examples at:
http://www.wicket-library.com/wicket
-examples/nested/wicket/bookmarkable/org.apache.wicket.examples.ajax.builtin
.tree.EditableTreeTablePage?2

-Original Message-
From: Benjamin Heiskell [mailto:ben.heisk...@gmail.com] 
Sent: Wednesday, August 01, 2012 8:26 PM
To: users@wicket.apache.org
Subject: Repeating TextFields

Hi,

I have a List that I want to represent with TextFields. I need to be
able to dynamically add and remove them via AJAX.

>From what I've read online (and experienced firsthand) ListViews do not seem
to be designed for this.

What is the best way to approach this problem?

Thanks!
Ben

-
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: Redirecting from Ajax onSubmit

2012-08-02 Thread Paul Bors
Can't you simply get away with calling setResponsePage()?

~ Thank you,
   Paul C Bors

On Aug 1, 2012, at 20:17, vinitty  wrote:

> I am trying to do the redirection from AjaxSubmitLink onSubmit method 
> using this 
> RequestCycle.get().scheduleRequestHandlerAfterCurrent(reqTarget);
> 
> But i am not seeing redirection on browser
> 
> I am using wicket 1.5.7
> 
> Please help me 
> 
> 
> 
> 
> 
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/Redirecting-from-Ajax-onSubmit-tp4650938.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: urgent-help.. how to click a specific tree node at the default

2012-08-05 Thread Paul Bors
See the Wicket Ajax examples section on Tree and Table:

http://www.wicket-library.com/wicket-examples/ajax/

Tree and TreeTable: shows ajax tree and ajax tree table. 

~ Thank you,
   Paul C Bors

On Aug 4, 2012, at 23:52, swwa...@tsmc.com wrote:

> 
> Hello:
>I am new to wicket..please help to give suggestion to this
> requirment.
> I will expand the tree at the default. But I need to start(click) the first
> node at the default.
> 
> Do anyone could help me how to implement this??
> I have use selectNode to select the first node but it can not start to
> trigger the onclick event..
> 
> 
> Joan
> --- 
> TSMC PROPERTY   
> This email communication (and any attachments) is proprietary information   
> for the sole use of its 
> intended recipient. Any unauthorized review, use or distribution by anyone  
> other than the intended 
> recipient is strictly prohibited.  If you are not the intended recipient,   
> please notify the sender by 
> replying to this email, and then delete this email and any copies of it 
> immediately. Thank you. 
> --- 
> 
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 


RE: dynamic control of location of panels on page

2012-08-07 Thread Paul Bors
Well, if you use a repeater it will go through its model in the order you
added the items to it.
If you want to control where on the page they go, then you would need some
kind of dynamic template or overlay.

For that I used HTML tables with North, South, Center, East, West table
cells and I add the container to all 5 cells but hide the ones that I don't
want to see.
It's a bit extensive as the page map grows, but it works and it should be
okay to get you started on a better solution :)

For some other dynamic components I used Velocity as their template:
http://en.wikipedia.org/wiki/Apache_Velocity

This is the Wicket project on it:
http://wicket.apache.org/learn/projects/velocity.html

~ Thank you,
  Paul Bors

-Original Message-
From: oggie [mailto:gog...@gmail.com] 
Sent: Tuesday, August 07, 2012 4:01 PM
To: users@wicket.apache.org
Subject: dynamic control of location of panels on page

Let's say we want to have a number of widgets on the page. But we want to be
able to dynamically define what widgets are shown, and in what order they
appear on the page.

So I can create a bunch of panels, each with their own html, and add those
panels to a container to display on the screen. But how do I  control the
order of them? If I put them in a list, will they be drawn in the order they
were added to the list?

I'm following this example:
https://cwiki.apache.org/WICKET/page-with-dynamic-components.html wicket
dynamic content 

Will this type of solution work even if the widgets are of different widths?
Can we still control the layout in the html if we never know what widgets
are shown?

I hope I explained it properly.



--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/dynamic-control-of-location-of-pa
nels-on-page-tp4651043.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: How to display a grid with empty cells

2012-08-09 Thread Paul Bors
Make use of the EmptyPanel class for the null or empty models. You could
also simply call setVisible(false) on your component if you can hide it all
together.

http://wicket.apache.org/apidocs/1.4/org/apache/wicket/markup/html/panel/Emp
tyPanel.html

~ Thank you,
  Paul Bors

-Original Message-
From: Bertrand Guay-Paquet [mailto:ber...@step.polymtl.ca] 
Sent: Wednesday, August 08, 2012 11:37 PM
To: users@wicket.apache.org
Subject: Re: How to display a grid with empty cells

Hi,

I haven't used the GridView directly so I can't help you with it
specifically. However, have you considered modifying your provider to always
return 9 records with some having an empty placeholder? It's definitely a
"hack", but it may be worth a try.

Bertrand

On 08/08/2012 10:56 PM, Alec Swan wrote:
> Hello,
>
> I am using Wicket 1.4.17 and need to display a 3x3 table with all of 
> its cells, some of which may not have a model and hence blank. So, if 
> my DataProvider returns 0 elements than I want all 9 cells to be shown 
> as blank.
>
> I started using GridView and overrode its populateEmptyItem() method 
> to display empty cells. However, contrary to its JavaDoc "Add 
> component to an Item for which there is no model anymore and is shown 
> in a cell" this method is not being called unless a row has at least 
> one item (see GrdiView#addItems()).
>
> What would the easiest way to accomplish what I need without copying 
> the entire code from GridView class? Any other component that can do 
> that?
>
> Thanks,
>
> Alec
>
> -
> 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: How to update the treetable

2012-08-10 Thread Paul Bors
Since Wicket's TreeTable uses Java's javax.swing.tree.TreeModel, I would
check out Oracle's tutorial on How To Use Trees (JTree).

More precisely the Dynamically Changing a Tree section:
http://docs.oracle.com/javase/tutorial/uiswing/components/tree.html#dynamic

See if that helps you.

~ Thank you,
  Paul Bors

-Original Message-
From: lxw_first [mailto:lxw_fi...@hotmail.com] 
Sent: Friday, August 10, 2012 3:38 AM
To: users@wicket.apache.org
Subject: How to update the treetable

I created a treetable with a treemodel based on database schema. I am trying
to refresh the treetable so that it will change it's data after some db
update.
I update viat the button event.the button event work but treetable doesn't
change.
To create treetable i have this on my page:

treeTable = new TreeTable("treeTable", createTreeModel(), columns);
treeTable.getTreeState().setAllowSelectMultiple(true);
treeTable.setRootLess(true);
treeTable.getTreeState().collapseAll();
creatForm.add(treeTable);

the createTreeModel code:
protected TreeModel createTreeModel() {
DefaultMutableTreeNode rootNode = new DefaultMutableTreeNode();
initTree(roleList, rootNode);
TreeModel treeModel = new DefaultTreeModel(rootNode);
return treeModel;
}

i add the button event like this:
protected void onSubmit(AjaxRequestTarget target, Form form) {
roleList.clear();
treeTable.updateTree(target);
target.add(getForm(),treeTable);
}

Any idea or reference to documentation that explain this?
thanks.



--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/How-to-update-the-treetable-tp465
1122.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: Multi row Tabs

2012-08-10 Thread Paul Bors
You can change the look-n-feel of any Wicket component by simply extending
the Wicket class, and either modify the HTML and/or the CSS.

If you modify the HTML make sure you preserve the wicket component tree
unchanged since the super class will break at runtime if you shift the HTML
code around and break the hierarchy of the wicket component tree.

I extended from AjaxTabbedPanel and have two panels that would either render
the tabs horizontal or vertical and when they reach the end of the page they
will wrap to the second row or column.

The look-n-feel as well as horizontal or vertical orientation is handled by
different CSS classes via the float attribute (and many others) inside my
package. For example:

Horizontal tabs from left to right use this CSS class:
div.horizontalTabpanel div.tab-row li.selected {
float: left;
...
}

Vertical tabs from top to bottom use this:
div.verticalTabpanel div.tab-row li.selected {
float: top;
...
}

One class sets the CSS of the main panel to either horizontalTabpanel or
verticalTabpanel.

~ Thank you,
  Paul Bors

-Original Message-
From: Valery Gorbunov [mailto:valery.gorbu...@hys-enterprise.com] 
Sent: Friday, August 10, 2012 10:34 AM
To: users@wicket.apache.org
Cc: Alex Khalevin
Subject: Multi row Tabs

Hi All,

I am new in Wicket. Is it possible to implement Tabs in multi row manner. I
see in examples or tutorial only singe row tabs.

If not. Which best way to implement it?

Thank you.

Valery Gorbunov


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



RE: RadioGroup

2012-08-11 Thread Paul Bors
Have you taken a look at the Wicket-Examples project's component references
as linked from Wicket's website under the Learn section on the left panel?
http://www.wicket-library.com/wicket-examples/compref/

More specifically the RadioGroup and Radio:
http://www.wicket-library.com/wicket-examples/compref/wicket/bookmarkable/or
g.apache.wicket.examples.compref.RadioGroupPage?2

You need your form, then add to it a RadioGroup whose model holds on to the
active Radio selection and then add all the Radio buttons to the RadioGroup.

The RadioGroup can be a  tag and if I am not wrong even a
 tag.

Same concept applies to the CheckGroup and Check, not to be confused with
CheckBox.

Hope that helps!

~ Thank you,
  Paul Bors

PS: Since Wicket is open source, you can download those projects including
wicket-examples and run them locally on your computer. See the "Provide a
path" link from under the Contribute section on the left panel of the home
page an then follow the "Check out the code" link.

-Original Message-
From: Andrea Del Bene [mailto:an.delb...@gmail.com] 
Sent: Saturday, August 11, 2012 3:48 PM
To: users@wicket.apache.org
Subject: Re: RadioGroup

Ok, but I still don't understand the relation between RadioGroup and the
Radio controls you create. I mean, I expect to find a section of the code
where you add Radio controls to RadioGroup (they "have to be in the
component hierarchy somewhere below the group component" as stated into
JavaDoc)
> Hi Andrea,
> ListView is only renderer for Radio elements,  in real life 
> selectOneRadioItems isn't empty array. Code little bit difficult to 
> understand. But problem it setting model value after form submission 
> RadioGroup instance didn't put value to model, but on rendering phase 
> it reading data from model.
> Wicket version 1.5.7.
> Valery Gorbunov
> On Sat, Aug 11, 2012 at 12:12 AM, Andrea Del Bene
wrote:
>


-
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: Searching for new experience with wicket

2012-08-13 Thread Paul Bors
Also read the articles on http://wicket.apache.org from under the Contribute 
left side section :)

~ Thank you,
  Paul Bors

-Original Message-
From: Martin Grigorov [mailto:mgrigo...@apache.org] 
Sent: Monday, August 13, 2012 11:52 AM
To: users@wicket.apache.org
Subject: Re: Searching for new experience with wicket

Hi,

Check my previous message for the details.
Checkout the new code, investigate it for a while, checkout the code for the 
old wicket-examples
(https://github.com/apache/wicket/tree/master/wicket-examples) and start 
migrating the old examples one by one to the new design.

When ready with migrating an example please make a Pull Request 
(https://help.github.com/categories/63/articles).

On Mon, Aug 13, 2012 at 11:11 AM, nunofaria11  wrote:
> Hello there,
>
> I would also be interested in contributing to Wicket. I've recently 
> started working (recent graduate) and I am now working with 
> technologies such as Java, Wicket, Hibernate, CSS (messing around with 
> Twitter Bootstrap) and a little bit of JavaScript and JQuery.
>
> Also I think it would br a great learning opportunity for me =) I can 
> initially offer 6 to 8h p. week.
>
> What would I need to do?
>
> Best regards.
>
>
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/Searching-for-new-experienc
> e-with-wicket-tp465p4651165.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
>



--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.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: Basic JUnit Test

2012-08-13 Thread Paul Bors
Also get familiar with the API for the WicketTester that extends 
BaseWicketTester.

There are quite a few useful methods that can aid you during unit testing such 
as BaseWicketTester#debugComponentTrees() which will output the wicket 
component tree.

In our unit tests we extended from WicketTester and added a dumpPage() method 
that would give you both the output of BaseWicketTester#debugComponentTrees() 
and that of BaseWicketTester#getLastResponseAsString() so a developer can see 
both the Wicket component tree and the HTML or whatever the last response was 
(Ajax, etc).

When I write unit tests I use those two methods extensively as I would need to 
know both the component path in the tree and the expected output or the last 
response.

There are plenty of other helper methods there as well.

~ Thank you,
  Paul Bors

-Original Message-
From: Martin Grigorov [mailto:mgrigo...@apache.org] 
Sent: Monday, August 13, 2012 11:53 AM
To: users@wicket.apache.org
Subject: Re: Basic JUnit Test

Hi,

Put a breakpoint in the button's onSubmit() method and see whether it is 
actually called.
It could be that you need to call formTester.submit("myForm:myButton");

On Mon, Aug 13, 2012 at 5:18 PM, JCoder  wrote:
> Hi all,
>
> Im working at a basic Unit Test that looks like this:
>
> 1. tester.assertRenderedPage(FirstPage.class);
> 2. FormTester formTester = tester.newFormTester("myForm"); 3. 
> formTester.submit("myButton"); 4. 
> tester.assertRenderedPage(SecondPage.class);
>
> All lines work as expected. Only line 4 fails. I just want to verify a click 
> on a button and after that a certain Page (SecondPage) should be rendered.
>
> The test fails with: "junit.framework.AssertionFailedError: 
> expected: but was:"
> What did I wrong?
>
> Cheers & Thanks in advance,
> Y
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>



--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.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: Generic search form/panel implementation

2012-08-13 Thread Paul Bors
We have some proprietary small projects in our product developed in Wicket
that matches your request.

I had to develop something similar for a form that draws itself on the
screen in a tab panel whose meta-data is in XML which in turn is uploaded to
the product as a plug-in at run-time. To get this up and running took a good
3-4 weeks of development time.

Thus what you're asking for is possible and you don't have to restrict your
meta-data to XML, feel free to use annotations if it's all done in Java
code. You should keep in mind that Wicket depends a lot on the MVC, your
only limitations are really the model object(s), the custom form validation
and submission actions (error reporting, localization etc).

The model I overcome by using generic objects for each form field in a tree
structure with IDs for each element and using this tree as the model of the
form which in turn is used by the form submission after validation succeeds
to grab the user input. The same tree carries the UI definitions and default
values as loaded from the XML file.

For the custom form validation, I allowed the developer of the XML file(s)
define a validator given the well known wicket classes and their API plus
the specific domain ones we have developed in-house and pass primitive
arguments to their constructors (ie: maximum character size for this text
field is x).

Since I'm using this on a single page, I didn't have to worry about the form
submission and error but I could have designed this as an interface and have
the client code implement it form different forms and pages, I think is
doable.

~ Thank you,
  Paul Bors

-Original Message-
From: nunofaria11 [mailto:nunofari...@gmail.com] 
Sent: Monday, August 13, 2012 4:05 AM
To: users@wicket.apache.org
Subject: Generic search form/panel implementation

Hi,

I am trying to implement a generic search form/panel in Wicket. The form
should allow searches in several fields in an Entity (using the DAO pattern)
in order to filter the output of a ListView or a DataView. What is the best
way to do this? I've thought of doing this using an extended DataProvider
but I haven't really seen any real example.

Did anyone implemented such a thing? Some pointers would be nice.

Regards
Nuno



--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/Generic-search-form-panel-impleme
ntation-tp4651164.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: how to get HttpServletRequest in My Application class

2012-08-13 Thread Paul Bors
For your reference also see:
https://cwiki.apache.org/WICKET/getting-a-url-for-display.html

~ Thank you,
  Paul Bors

-Original Message-
From: wicket user [mailto:samd...@live.com] 
Sent: Monday, August 13, 2012 1:07 PM
To: users@wicket.apache.org
Subject: Re: how to get HttpServletRequest in My Application class

I am getting java.lang.NullPointerException
((ServletWebRequest)RequestCycle.get().getRequest()).getContainerRequest() 
.  




--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/how-to-get-HttpServletRequest-in-
My-Application-class-tp4651189p4651196.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: how to get HttpServletRequest in My Application class

2012-08-13 Thread Paul Bors
BTW, if you get a NPE on RequestCycle.get() then you most likely place this
code outside a Wicket Component like a Page.

Try moving it to a page first and see if you grab a reference to the request
object. If you do, then pass it as a parameter to your other method/class.

For older version of Wicket < 1.5.x see:
https://cwiki.apache.org/WICKET/request-cycle-and-request-cycle-processor.ht
ml

For newer version see:
https://cwiki.apache.org/WICKET/requestcycle-in-wicket-15.html

~ Thank you,
  Paul Bors

-Original Message-
From: Paul Bors [mailto:p...@bors.ws] 
Sent: Monday, August 13, 2012 1:18 PM
To: users@wicket.apache.org
Subject: RE: how to get HttpServletRequest in My Application class

For your reference also see:
https://cwiki.apache.org/WICKET/getting-a-url-for-display.html

~ Thank you,
  Paul Bors

-Original Message-
From: wicket user [mailto:samd...@live.com] 
Sent: Monday, August 13, 2012 1:07 PM
To: users@wicket.apache.org
Subject: Re: how to get HttpServletRequest in My Application class

I am getting java.lang.NullPointerException
((ServletWebRequest)RequestCycle.get().getRequest()).getContainerRequest() 
.  




--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/how-to-get-HttpServletRequest-in-
My-Application-class-tp4651189p4651196.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: Is there a way to search component by its wicket ID ?

2012-08-13 Thread Paul Bors
In my unit test code I use:

  
com.googlecode.londonwicket
wicket-component-expressions
0.2.0
test

  
org.apache.wicket
wicket
  

  

Or see:
http://code.google.com/p/londonwicket/source/browse/repo/com/googlecode/lond
onwicket/wicket-component-expressions/?r=61#wicket-component-expressions%2F0
.2.0

They are a group of Wicket users from London and their two static method
tool allows you to use regexp in the component path as well as filtering by
a component type such as a TextBox and its model such as
Model("Hello World").

I don't think the new version of Wicket has this flexibility build in
WicketTester, but looking over the code of
BaseWicketTester#getComponentFromLastRenderedPage() and
BaseWicketTester#debugComponentTrees() you can implement your own method to
iterate through the component tree and return a reference to the component
you want.

~ Thank you,
  Paul Bors

-Original Message-
From: arkadyz111 [mailto:azelek...@gmail.com] 
Sent: Monday, August 13, 2012 9:41 AM
To: users@wicket.apache.org
Subject: Is there a way to search component by its wicket ID ?

Hello, team.

I am looking for a way to locate component by its wicket id in markup
container. But I see only option to search by "path" is supported.

Do I miss something ?

Thank you.



--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/Is-there-a-way-to-search-componen
t-by-its-wicket-ID-tp4651175.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: Is there a way to search component by its wicket ID ?

2012-08-14 Thread Paul Bors
If you use wicket-component-expressions from com.googlecode.londonwicket you
can get to the list of all the components on the page that have that
"username" id via a regexp of "**:username", but as James mentioned earlier,
the ID is not unique and your wicket component tree might have such multiple
nodes (hence why wicket-component-expressions gives you a list of them).

I normally know that my panel has only one such component by the ID since I
developed it, so if I attach it to my page inside a panel with an ID like
"myPanel" then I use "**:myPanel:**:username" and I also filter by the
component type such as TextField.class to narrow down the search.

That's not production code, is unit test and I'm assuming that's the context
of your question. By using such regexp, I found myself refactoring the unit
test code less when shuffling panels on a page.

~ Thank you,
  Paul Bors

-Original Message-
From: James Eliyezar [mailto:ja...@mcruncher.com] 
Sent: Tuesday, August 14, 2012 4:12 AM
To: users@wicket.apache.org
Subject: Re: Is there a way to search component by its wicket ID ?

Because the id is unique only within the markup container of a component.
It need not be unique in a page. This is by design.
For more details refer:
https://cwiki.apache.org/WICKET/component-hierarchy.html


On Tue, Aug 14, 2012 at 3:42 PM, arkadyz111  wrote:

> But why we have to write "userForm" ? What is an idea behind of this ?
>
> Why get("username") is not enough ?
>
>
>
> --
> View this message in context:
>
http://apache-wicket.1842946.n4.nabble.com/Is-there-a-way-to-search-componen
t-by-its-wicket-ID-tp4651175p4651217.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
>
>


-- 
Thanks & regards
James Selvakumar
mcruncher.com


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



RE: How to control IMG/CSS URL-Rewriting in mounted pages?

2012-08-14 Thread Paul Bors
Wicket rewrite the SRC attribute of the image as relative to your webapp 
context unless you declare that image as a wicket component, give it a 
wicket:id and then use a ContextImage.

Thus you would turn a  to a .

If you do so, then you can still preserve the "wrong" src relative path of 
"../images/image.jpg" so that your web developers can see the images while 
editing the static HTML resources and when you run the web-app Wicket will take 
care of fixing that URL for you no matter at what point you mount the page.

If you have too many such images and refactoring might take you too long, then 
consider write your own Custom Wicket Tag Resolver for an attribute of the img 
HTML tag and override what the framework does for you (do call super) by 
changing the src attribute in a similar way ContextImage would do it for you.

For example see this article:
http://sanityresort.blogspot.com/2011/08/creating-custom-wicket-tag-resolver.html

Or see how other such resolvers or AttributeModifer are used by Wicket itself, 
you can start with the AutoComponentResolver.

~ Good look to you!
  Paul Bors

-Original Message-
From: Joachim Schrod [mailto:jsch...@acm.org] 
Sent: Tuesday, August 14, 2012 2:53 AM
To: users@wicket.apache.org
Subject: Re: How to control IMG/CSS URL-Rewriting in mounted pages?

Yes, that's what I observed and described below. And that behavior is not 
appropriate for my use case.

So, how can I stop Wicket to "make the url relative to the web root no matter 
what mount path I use for the page"?

I want to *change* that: my designer delivers HTML where the images are *not* 
relative to the web root, but to one directory below. In our HTML files are 
URLs like "../images/image.img" and I don't want to change these URLs.

Alternatively, how can I tell Wicket that the web root has a different prefix 
just for rewriting these image URLs?

Thanks,
Joachim

Martin Grigorov wrote:
> Hi,
> 
> If your images/css are in the web root then use something like 
> "images/image.img" in your .html.
> Wicket will make the url relative to the web root no matter what mount 
> path you use for the page.
> 
> On Mon, Aug 13, 2012 at 5:41 PM, Joachim Schrod  wrote:
>> Hi,
>>
>> I'm new to Wicket and write my first application in it. I use "Wicket 
>> in Action" and online resources as documentation. (I stumbled already 
>> about the 1st few roadblocks owing to changes from Wicket 1.4 to 1.5. 
>> ;-)) So, if there's an easy pointer to answer my question, don't 
>> hesitate to just send it.
>>
>> My problem: I have a page that's mounted as URL "cat/entry". In the 
>> page's HTML there are links to images and CSS files that start with 
>> "..", e.g., "../images/bg_blabla.img". These are no Wicket 
>> components, just plain HTML.
>>
>> When Wicket renders the page, it rewrites the image URLs and prepends 
>> "../", e.g., the image URL now is output as 
>> "../../images/bg_blabla.img". I suppose it tries to adept to the 
>> extra path level that I introduced during mount and compensates for it.
>>
>> How can I stop Wicket from adding this "../" prefix? I searched via 
>> Google and read through Javadocs, but to no avail.
>>
>> For background: The URL in the HTML file is right... My HTML 
>> designers deliver their design files as "cat/entry.html", my mounts 
>> just follow their lead. I would like to change their files as little 
>> as possible, it makes files swapping back to/with them much easier.
>>
>> I hope somebody here may help me, thanks in advance.
>>
>> Joachim

--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Joachim Schrod, Roedermark, Germany
Email: jsch...@acm.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: WicketRuntimeException: "Submit Button ... is not enabled"

2012-08-14 Thread Paul Bors
As an idea, I tend to keep the panel edit/view state as a boolean and then
toggle the label on the button and control the behavior of the button press
via an if-else statement in the onSubmit() of the button.

This helps because I only have a single Edit/Save button and I toggle from
labels to form fields on the fly controlling those components via
AjaxFallback*** implemented in a single refrechPanel() method that calls
setVisable(editMode) for all the components that are to toggle or hide.

Also you can do this to the DataTable rows when necessary similar to how the
Editable tree table works:
http://www.wicket-library.com/wicket-examples/ajax/tree/table/editable?3

I get away with all this because I have my own generic labeled form
component that can toggle from a label to a form component and have a
 html tag as well as an Help icon and feedback panel associated with
it.

~ Thank you,
  Paul Bors

-Original Message-
From: eugenebalt [mailto:eugeneb...@yahoo.com] 
Sent: Tuesday, August 14, 2012 12:16 PM
To: users@wicket.apache.org
Subject: Re: WicketRuntimeException: "Submit Button ... is not enabled"

It is true that we have multiple buttons on our form that we are
disabling/hiding selectively.

Our scenario: a panel that contains the button "Edit", and then when it's
clicked, the panel opens and "Edit" is replaced by two other visible buttons
- "Submit" and "Cancel". "Edit" is gone. We need this dynamic behavior to
enable rich, "self-changing" forms.

Example:

add(new Button ("editButton"){
  @Override
 public boolean isVisible() {
 return showeditbutton;
}
@Override
public void onSubmit() { 
  showeditbutton = false;// hide this one
  showsavebutton = true;   // show the others
  showcancelbutton = true;
}
}

These are global variables/flags on the form. 

So given this "self-changing form" requirement, what's the fastest way to
get rid of this intermittent "Not Enabled / Visible" error? Is there a way
to turn off this validation in Wicket?



--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/WicketRuntimeException-Submit-But
ton-is-not-enabled-tp4651180p4651233.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: Ajaxtabbedpanel example not working on ie9

2012-08-14 Thread Paul Bors
If you're talking about:
http://www.wicket-library.com/wicket-examples/ajax/tabbed-panel?2

That works fine with IE: 9.0.8112.16421, perhaps you blocked JavaScript from
executing?

~ Thank you,
  Paul Bors

-Original Message-
From: Delange [mailto:delan...@telfort.nl] 
Sent: Tuesday, August 14, 2012 5:44 PM
To: users@wicket.apache.org
Subject: Ajaxtabbedpanel example not working on ie9

Running this example from the apache website it's working ok, But when i run
the sample example on my tomcat server and open it in an IE9
browser: i see no reaction if a choose another  tab

When I try this on Chrome or Safari it works fine.

How to resolve this with IE9?

Here a debug list: 
 1.5.5 Inspector Session: 894 bytes Page: 11,1K  builtinSource code [go
back]


first tab
 second tab
 third tab
 
This is tab-panel 1 

scroll lock | clear | close Wicket Ajax Debug Window (drag me here)
INFO: focus set on id3
INFO: 
INFO: Initiating Ajax GET request on
tabbed-panel;jsessionid=1o1o1xat4y10e17ppe024et92n?0-1.IBehaviorListener.0-t
abs-tabs~container-tabs-1-link&random=0.01693648764738187
INFO: Invoking pre-call handler(s)...
INFO: Received ajax response (2538 characters)
INFO: 

ERROR: Cannot create DOM document: [object Error]
ERROR: Wicket.Ajax.Call.failure: Error while parsing response: Kan de waarde
van de eigenschap documentElement niet ophalen: het object is null of niet
gedefinieerd
INFO: Invoking post-call handler(s)...
INFO: Invoking failure handler(s)...
INFO: focus removed from id3WICKET AJAX DEBUG



--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/Ajaxtabbedpanel-example-not-worki
ng-on-ie9-tp4651235.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: Static web page localization

2012-08-15 Thread Paul Bors
Another idiom is to attach a wicket:id to that HTML tag, and in your Java code 
use a WebMarkupContainer with an AttributeModifier to change whatever attribute 
you would like. Of course the IResource and children might be a better approach 
since it does the work for you :)

~ Thank you,
  Paul Bors

-Original Message-
From: Martin Grigorov [mailto:mgrigo...@apache.org] 
Sent: Wednesday, August 15, 2012 2:20 AM
To: users@wicket.apache.org
Subject: Re: Static web page localization

Hi,

You may use Wicket IResource that should serve the SWFs dynamically.
See http://wicketinaction.com/2011/07/wicket-1-5-mounting-resources/
for an inspiration.

On Wed, Aug 15, 2012 at 9:02 AM, Arni Kekoni  wrote:
> Hello
>
> I have a bunch of static web pages, with no wicket objects associated with 
> them.
> These pages have .swf files like so:
>
> 
>
> Is it possible to use wicket to localize those .swf files?  Serve 
> xyz_en.swf for english and so on?
> I know you could simply create a  page_en.html, page_nl.html and so 
> on, but I am looking for possible automation.
>
> Thanks
> Arni
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>



--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.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: Nested form submit problem

2012-08-28 Thread Paul Bors
Sounds complicated, why not just setVisible(false) when you want to "delete"
or hide one of those questions (aka form fields)?
Also, I don't think you need to use nested forms here, unless you wrap each
question in a panel and within in a form.

Refer to this wiki page for nested forms and their behavior:
https://cwiki.apache.org/WICKET/nested-forms.html

Is hard to follow the code example you gave but if I understand your
use-case right and if you want to add different questions within a form I
suggest you use a DataTable and a dynamic DataProvider that would be
populated with a list of Panels that hold on to each of the labels and form
fields with the questions you want to show (no need for an inner form unless
you want the question to be answered by itself). When you want to hide one
of them simply call setVisible(false) and use Ajax to refresh the DataTable.
If you want to change the questions, simply change the list of Panels and
make sure each form field has its own model (or use CompoundModel if you
want).

Hope that helps :)

~ Thank you,
  Paul Bors

-Original Message-
From: Sandor Feher [mailto:sfe...@bluesystem.hu] 
Sent: Tuesday, August 28, 2012 11:28 AM
To: users@wicket.apache.org
Subject: Nested form submit problem

Hi,

I have the following use case. I have some questionnaires and a couple of
questions belong to every questionnaire.
I created a nested form component contains two forms. First does nothing
just has some buttons (save,delete,cancel,reset) and contains as many child
forms as the number of questions.
So it's fine and almost everything work. My problem is when I want to delete
the items and click delete button then the inner form's onSubmit event also
fires although I set the delete.setDefaultFormProcessing(false) behaviour on
delete button. Same is with reset and cancel button. Both of them fires
inner form's onSubmit event.


http://pastebin.com/zErvmG5J

tia, Sandor



--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/Nested-form-submit-problem-tp4651
565.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: Nested form submit problem

2012-08-28 Thread Paul Bors
Why not use "onchange" and validate the field when the user changes the
input?

All you would have to do is add your validators as you would normally do,
then create Ajax*** form components and in their callback method for
onError(target) refresh your feedback panel.

A text field with this design applied to it will validate the user input for
each character typed, use a different JS event for other behavior.

For code examples see:
http://www.wicket-library.com/wicket-examples/ajax/form

~ Thank you,
  Paul Bors

-Original Message-
From: Sandor Feher [mailto:sfe...@bluesystem.hu] 
Sent: Tuesday, August 28, 2012 3:37 PM
To: users@wicket.apache.org
Subject: RE: Nested form submit problem

Hi Paul,

The problem related to AjaxFormSubmitBehavior  behaviour. This fires eform's
onSubmit event.
My original goal was to create field level validation with Ajax nothing
more.
The code above looks for a description belongs to the entered value and
displays it.
If the entered value validation failed then warns the user immediately. 
BTW if I turn of afvb setDefaultFormProcessing to false then the field level
validation does not work.


---
  AjaxFormSubmitBehavior afvb=
new AjaxFormSubmitBehavior(eform, "onchange") {
 
 
@Override
protected void onSubmit(AjaxRequestTarget art) {
HrpBbheertk ertk = (HrpBbheertk)
eform.getModelObject();
String k = ertek.getValue();
customBo.getDaoSession().beginTransaction();
HrpBbhepar5PK pk = new HrpBbhepar5PK();
pk.setCompany(ertk.getHrpBbheertkPK().getCompany());
   
pk.setAkodszam(ertk.getHrpBbheertkPK().getAlaptipus());
   
pk.setDkodszam(ertk.getHrpBbheertkPK().getDimenzio());
   
pk.setDekodszam(ertk.getHrpBbheertkPK().getDimenzioelem());
if (!k.isEmpty()) {
pk.setDertek(Short.valueOf(k));
HrpBbhepar5 hepar5 =
customBo.find(HrpBbhepar5.class, pk);
if (hepar5 != null) {
   
dimenev.setDefaultModelObject(hepar5.getDertekmegnev());
} else {
dimenev.setDefaultModelObject("");
}

}
if
(customBo.getDaoSession().getTransaction().isActive()) {
   
customBo.getDaoSession().getTransaction().commit();
}

art.add(dimenev);
art.add(fb);
}

@Override
protected void onError(AjaxRequestTarget art) { 
art.add(fb);
}

};



--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/Nested-form-submit-problem-tp4651
565p4651568.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: Pre-Select DropDownChoice Selection, but No Model yet

2012-08-28 Thread Paul Bors
Drop downs are some of the difficult ones to get at first, but once you
understand one of them you're good to go!

See:
http://wicket.apache.org/learn/examples/dropdownchoice.html (the "Selecting
a default choice")
https://cwiki.apache.org/WICKET/dropdownchoice-examples.html

Or see the FormInput live example:
http://www.wicket-library.com/wicket-examples/forminput

~ Thank you,
  Paul Bors

-Original Message-
From: eugenebalt [mailto:eugeneb...@yahoo.com] 
Sent: Tuesday, August 28, 2012 6:33 PM
To: users@wicket.apache.org
Subject: Re: Pre-Select DropDownChoice Selection, but No Model yet

(Note: In my form, I am using a CompoundPropertyModel. So my DropDownChoice
is automatically tied to the field in my bean.)



--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/Pre-Select-DropDownChoice-Selecti
on-but-No-Model-yet-tp4651578p4651579.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



  1   2   3   4   5   >