Show feedback message from modal window in parent page

2011-09-30 Thread heapifyman
Hello,

I have a page that contains a list of entries and a modal window opened from
that page. The modal window contains a form to add new entries to the list
on the parent page.
Submitting the form in the modal window adds the new entry, closes the modal
window and updates the list of entries in the parent page.
This works fine.
However, I would like to show a "success" message on the parent page after I
submit the form in the modal window and close it.
This does not seem to work because I have another FeedbackPanel in the modal
window for showing error messages when required fields are not filled.
This FeedbackPanel in the modal window seems to receive the success message
instead of the FeedbackPanel on the parent page.

I tried google and I also tried using an IFeedbackMessageFilter on the modal
window's FeedbackPanel, but to no avail.
Any hints would be appreciated. Thanks


Re: Show feedback message from modal window in parent page

2011-10-03 Thread heapifyman
In the ModalWindow I have an AjaxButton in whose onSubmit method I
call ModalWindow.closeCurrent(target);

Is that not the right way to go?


2011/9/30 Dan Retzlaff 

> Each FeedbackPanel rendered in a response includes all messages generated
> during that request. The messages are then cleared from the session and
> won't be included in subsequent responses. Are you closing the modal in a
> way that immediately generates a second request?
>
> Dan
>
> On Fri, Sep 30, 2011 at 9:02 AM, heapifyman  wrote:
>
> > Hello,
> >
> > I have a page that contains a list of entries and a modal window opened
> > from
> > that page. The modal window contains a form to add new entries to the
> list
> > on the parent page.
> > Submitting the form in the modal window adds the new entry, closes the
> > modal
> > window and updates the list of entries in the parent page.
> > This works fine.
> > However, I would like to show a "success" message on the parent page
> after
> > I
> > submit the form in the modal window and close it.
> > This does not seem to work because I have another FeedbackPanel in the
> > modal
> > window for showing error messages when required fields are not filled.
> > This FeedbackPanel in the modal window seems to receive the success
> message
> > instead of the FeedbackPanel on the parent page.
> >
> > I tried google and I also tried using an IFeedbackMessageFilter on the
> > modal
> > window's FeedbackPanel, but to no avail.
> > Any hints would be appreciated. Thanks
> >
>


Re: Show feedback message from modal window in parent page

2011-10-03 Thread heapifyman


Ok, that I understand. Do you have an idea how to circumvent this and  
get the feedback message into the parent page?



Am 03.10.2011 um 17:51 schrieb Dan Retzlaff:

We use our own modal window class so I'm not sure what the best way  
to go

is. But I can probably explain what's happening. The onSubmit request
renders the feedback into the modal, then clears the messages from the
session. Then in a separate close button callback request you're
re-rendering the page-level FeedbackPanel but at that point the  
feedback

messages are gone.

On Mon, Oct 3, 2011 at 8:44 AM, heapifyman   
wrote:



In the ModalWindow I have an AjaxButton in whose onSubmit method I
call ModalWindow.closeCurrent(target);

Is that not the right way to go?


2011/9/30 Dan Retzlaff 

Each FeedbackPanel rendered in a response includes all messages  
generated
during that request. The messages are then cleared from the  
session and
won't be included in subsequent responses. Are you closing the  
modal in a

way that immediately generates a second request?

Dan

On Fri, Sep 30, 2011 at 9:02 AM, heapifyman 

wrote:



Hello,

I have a page that contains a list of entries and a modal window  
opened

from
that page. The modal window contains a form to add new entries to  
the

list

on the parent page.
Submitting the form in the modal window adds the new entry,  
closes the

modal
window and updates the list of entries in the parent page.
This works fine.
However, I would like to show a "success" message on the parent  
page

after

I
submit the form in the modal window and close it.
This does not seem to work because I have another FeedbackPanel  
in the

modal
window for showing error messages when required fields are not  
filled.

This FeedbackPanel in the modal window seems to receive the success

message

instead of the FeedbackPanel on the parent page.

I tried google and I also tried using an IFeedbackMessageFilter  
on the

modal
window's FeedbackPanel, but to no avail.
Any hints would be appreciated. Thanks









PGP.sig
Description: Signierter Teil der Nachricht


Re: Show feedback message from modal window in parent page

2011-10-04 Thread heapifyman
Hi,

I am using wicket 1.5 and I had already tried adding the page-level
FeedbackPanel in the onSubmit() response - to no avail.
But Session#info() seens to be doing the trick.

Thanks for the help!

Philip


2011/10/3 Dan Retzlaff 

> I'm looking at 1.4's WebSession#cleanupFeedbackMessages(), and it looks
> like
> only feedback messages associated with a component are always cleared. So
> if
> you associate the message with the Session itself (Session#info(...)), and
> make sure no FeedbackPanels are rendered in the onSubmit() response, they
> should still be available for your close button callback response.
>
> A hacky solution might be including the page-level FeedbackPanel in the
> onSubmit() response, and *not* in the close button callback response.
>
> Let us know if you come up with a better solution.
>
> On Mon, Oct 3, 2011 at 8:57 AM, heapifyman  wrote:
>
> >
> > Ok, that I understand. Do you have an idea how to circumvent this and get
> > the feedback message into the parent page?
> >
> >
> > Am 03.10.2011 um 17:51 schrieb Dan Retzlaff:
> >
> >
> >  We use our own modal window class so I'm not sure what the best way to
> go
> >> is. But I can probably explain what's happening. The onSubmit request
> >> renders the feedback into the modal, then clears the messages from the
> >> session. Then in a separate close button callback request you're
> >> re-rendering the page-level FeedbackPanel but at that point the feedback
> >> messages are gone.
> >>
> >> On Mon, Oct 3, 2011 at 8:44 AM, heapifyman 
> wrote:
> >>
> >>  In the ModalWindow I have an AjaxButton in whose onSubmit method I
> >>> call ModalWindow.closeCurrent(**target);
> >>>
> >>> Is that not the right way to go?
> >>>
> >>>
> >>> 2011/9/30 Dan Retzlaff 
> >>>
> >>>  Each FeedbackPanel rendered in a response includes all messages
> >>>> generated
> >>>> during that request. The messages are then cleared from the session
> and
> >>>> won't be included in subsequent responses. Are you closing the modal
> in
> >>>> a
> >>>> way that immediately generates a second request?
> >>>>
> >>>> Dan
> >>>>
> >>>> On Fri, Sep 30, 2011 at 9:02 AM, heapifyman 
> >>>>
> >>> wrote:
> >>>
> >>>>
> >>>>  Hello,
> >>>>>
> >>>>> I have a page that contains a list of entries and a modal window
> opened
> >>>>> from
> >>>>> that page. The modal window contains a form to add new entries to the
> >>>>>
> >>>> list
> >>>>
> >>>>> on the parent page.
> >>>>> Submitting the form in the modal window adds the new entry, closes
> the
> >>>>> modal
> >>>>> window and updates the list of entries in the parent page.
> >>>>> This works fine.
> >>>>> However, I would like to show a "success" message on the parent page
> >>>>>
> >>>> after
> >>>>
> >>>>> I
> >>>>> submit the form in the modal window and close it.
> >>>>> This does not seem to work because I have another FeedbackPanel in
> the
> >>>>> modal
> >>>>> window for showing error messages when required fields are not
> filled.
> >>>>> This FeedbackPanel in the modal window seems to receive the success
> >>>>>
> >>>> message
> >>>>
> >>>>> instead of the FeedbackPanel on the parent page.
> >>>>>
> >>>>> I tried google and I also tried using an IFeedbackMessageFilter on
> the
> >>>>> modal
> >>>>> window's FeedbackPanel, but to no avail.
> >>>>> Any hints would be appreciated. Thanks
> >>>>>
> >>>>>
> >>>>
> >>>
> >
>


Jump to specific page of AjaxFallbackDefaultDataTable

2011-10-06 Thread heapifyman
Hello all,

I would like to ask, if there is a built-in functionality to display a
particular page of an AjaxFallbackDefaultDataTable when displaying the
table, i.e. instead of page 1 of 5 I would like to have it display page 3 of
5 initially because an entry of interest is on that page?

Thanks in advance,
Philip


Re: Jump to specific page of AjaxFallbackDefaultDataTable

2011-10-06 Thread heapifyman


Am 06.10.2011 um 16:08 schrieb Hans Lesmeister 2:


DataTable.setCurrentPage(int)


Thanks. When would be the best moment to call that method if I wanted  
to accomplish the following:
I add a new entry to the table and afterwards want to display the page  
where the new entry appears in the table taking into account the sort  
state of the table.


Someone got an example for that by chance?

Thanks in advance.




-
--
Regards,
Hans

http://cantaa.de

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Jump-to-specific-page-of-AjaxFallbackDefaultDataTable-tp3878357p3878396.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





PGP.sig
Description: Signierter Teil der Nachricht


AutoCompleteTextField problems

2011-10-09 Thread heapifyman

Hello everyone,

I'm having problems with my AutoCompleteTextField. I would like to  
have one of my domain objects bound to the AutoCompleteTextField's  
model but in the autocomplete dropdown list I would like to see only  
the name property of that domain object, not the whole toString()  
result.


I managed to get this working by using my own  
AbstractAutoCompleteRenderer but when I submit the form and make a

DomainObject do = autoCompleteTextField.getModelObject();
I get a ClassCastException: String cannot be cast to DomainObject.

Is there any example of how to get this working, please?
Thanks in advance.


PGP.sig
Description: Signierter Teil der Nachricht


AjaxTabbedPanel - intercept switching tabs

2011-10-20 Thread heapifyman
Hello,

is there a default way to determine when a user switches between tabs in an
AjaxTabbedPanel?
I see onAjaxUpdate(final AjaxRequestTarget target) but that is called after
the new tab has been set.
I would like to add a confirmation dialog before the new tab is set in case
the user had changed data in the current tab.

Or should I maybe override the protected WebMarkupContainer newLink(final
String linkId, final int index) method?

Is that possible? If so any hints would be appreciated. Thanks


Help with AjaxLazyLoadPanel

2011-11-16 Thread heapifyman
Hello everyone,

I'm using an AjaxLazyLoadPanel in one of my pages to lazily load a
datatable where the data is read in from some files, which might take a
while. This is working fine so far.
However, I also need to provide functionality to clear the whole table and
read in the data from the files again. I would like to do that without
reloading the whole page, so I'm using an IndicatingAjaxButton for that.
Now when reloading the data for the table again, I get the nice spinning
Indicator next to the button but the table is still visible. I would like
to have the same visual effect as when the page is loaded and
the AjaxLazyLoadPanel shows the Indicator instead of the table and then
replaces it with the actual table once it's loaded.

How would I do that? Any hints would be appreciated.

Thanks.


Re: AjaxLazyLoadPanel question

2011-11-17 Thread heapifyman
Hello,

I'm facing the same "problem" as the Matt above but honestly I must admit
that I do not really understand Pedro's advice.
Did you manage to implement his advice, Matt? Could I get a little more
information about how this IAjaxCallDecorator might actually look like?
That would be a great help.

Thanks in advance,
Philip



2011/2/4 Pedro Santos 

> I Matt, try to decorate the AJAX javascript to show/hide the indicator
> using
> an IAjaxCallDecorator
>
> On Thu, Feb 3, 2011 at 5:40 PM, Matt Schmidt  wrote:
>
> > I currently have a DataGridView loaded inside of an AjaxLazyLoadPanel,
> > including the service call to get the data.
> >
> > myLazyLoadPanel = new AjaxLazyLoadPanel("id", new
> CollectionModel())
> > {
> >public Component getLazyLoadComponent(String markupId) {
> >if(getDefaultModelObject() == null) {
> >setDefaultModelObject(myPojoService.readAll());
> >}
> >return new MyDataGridView(markupId, getDefaultModel()); //ignoring
> > casting for simplicity
> >}
> > }
> >
> > That works great for loading the page before the service call is
> complete.
> >
> > But now I need to add a DropDownChoice to change the collection in the
> data
> > grid via Ajax after the page is loaded. Is there anyway to get the
> > DataGridView to be replaced with an Ajax indicator (like on page load)
> > during an Ajax "onchange" event for the DropDownChoice? I've added an
> Ajax
> > indicator to the DropDownChoice, but I would like the same behavior I get
> > on
> > page load for the AjaxLazyLoadPanel.
> >
> > This is what I have for the drop down for starters:
> >
> > myDropDownChoice.add(new AjaxFormComponentUpdateBehavior("onchange") {
> >protected void onUpdate(AjaxRequestTarget target) {
> >if(myDropDownChoice.getModelObject().equals(foo)) {
> >
>  myLazyLoadPanel.setDefaultModelObject(myPojoService.readFoo());
> >}
> >//check other selections
> >   target.addComponent(myLazyLoadPanel);
> >}
> > }
> >
> > I may be looking at this entirely wrong... Any suggestions?
> >
>
>
>
> --
> Pedro Henrique Oliveira dos Santos
>


Re: AjaxLazyLoadPanel question

2011-11-18 Thread heapifyman
Great, it's working.
Thanks for the quick response,

Philip



2011/11/17 Igor Vaynberg 

> you can replace the lazy load panel instance:
>
> //check other selections
> myLazyLoadPanel=myLazyLoadPanel.replaceWith(new
> MyLazyLoadPanel(myLazyLoadPanel.getId(), ..)
> target.addComponent(myLazyLoadPanel);
>
> this will reset the state of lazyloadpanel to the "not-yet-loaded"
>
> -igor
>
> On Thu, Feb 3, 2011 at 11:40 AM, Matt Schmidt 
> wrote:
> > I currently have a DataGridView loaded inside of an AjaxLazyLoadPanel,
> > including the service call to get the data.
> >
> > myLazyLoadPanel = new AjaxLazyLoadPanel("id", new
> CollectionModel()) {
> >public Component getLazyLoadComponent(String markupId) {
> >if(getDefaultModelObject() == null) {
> >setDefaultModelObject(myPojoService.readAll());
> >}
> >return new MyDataGridView(markupId, getDefaultModel()); //ignoring
> > casting for simplicity
> >}
> > }
> >
> > That works great for loading the page before the service call is
> complete.
> >
> > But now I need to add a DropDownChoice to change the collection in the
> data
> > grid via Ajax after the page is loaded. Is there anyway to get the
> > DataGridView to be replaced with an Ajax indicator (like on page load)
> > during an Ajax "onchange" event for the DropDownChoice? I've added an
> Ajax
> > indicator to the DropDownChoice, but I would like the same behavior I
> get on
> > page load for the AjaxLazyLoadPanel.
> >
> > This is what I have for the drop down for starters:
> >
> > myDropDownChoice.add(new AjaxFormComponentUpdateBehavior("onchange") {
> >protected void onUpdate(AjaxRequestTarget target) {
> >if(myDropDownChoice.getModelObject().equals(foo)) {
> >
>  myLazyLoadPanel.setDefaultModelObject(myPojoService.readFoo());
> >}
> >//check other selections
> >   target.addComponent(myLazyLoadPanel);
> >}
> > }
> >
> > I may be looking at this entirely wrong... Any suggestions?
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: AjaxLazyLoadPanel question

2011-11-18 Thread heapifyman
Hello again,

I have a follow-up question. Can I somehow update other components once the
AjaxLazyLoadPanel's getLazyLoadComponent() method has completed?

I thought I could use the new wicket 1.5 event mechanism for that but if I
understood correctly I would have to send the AjaxRequestTarget in the
payload to add my changed components to it, right?
And I don't really know how to get the AjaxRequestTarget in
the getLazyLoadComponent() method.

Thanks in advance for any hints,
Philip


2011/11/18 heapifyman 

> Great, it's working.
> Thanks for the quick response,
>
> Philip
>
>
>
> 2011/11/17 Igor Vaynberg 
>
>> you can replace the lazy load panel instance:
>>
>> //check other selections
>> myLazyLoadPanel=myLazyLoadPanel.replaceWith(new
>> MyLazyLoadPanel(myLazyLoadPanel.getId(), ..)
>> target.addComponent(myLazyLoadPanel);
>>
>> this will reset the state of lazyloadpanel to the "not-yet-loaded"
>>
>> -igor
>>
>> On Thu, Feb 3, 2011 at 11:40 AM, Matt Schmidt 
>> wrote:
>> > I currently have a DataGridView loaded inside of an AjaxLazyLoadPanel,
>> > including the service call to get the data.
>> >
>> > myLazyLoadPanel = new AjaxLazyLoadPanel("id", new
>> CollectionModel()) {
>> >public Component getLazyLoadComponent(String markupId) {
>> >if(getDefaultModelObject() == null) {
>> >setDefaultModelObject(myPojoService.readAll());
>> >}
>> >return new MyDataGridView(markupId, getDefaultModel());
>> //ignoring
>> > casting for simplicity
>> >}
>> > }
>> >
>> > That works great for loading the page before the service call is
>> complete.
>> >
>> > But now I need to add a DropDownChoice to change the collection in the
>> data
>> > grid via Ajax after the page is loaded. Is there anyway to get the
>> > DataGridView to be replaced with an Ajax indicator (like on page load)
>> > during an Ajax "onchange" event for the DropDownChoice? I've added an
>> Ajax
>> > indicator to the DropDownChoice, but I would like the same behavior I
>> get on
>> > page load for the AjaxLazyLoadPanel.
>> >
>> > This is what I have for the drop down for starters:
>> >
>> > myDropDownChoice.add(new AjaxFormComponentUpdateBehavior("onchange") {
>> >protected void onUpdate(AjaxRequestTarget target) {
>> >if(myDropDownChoice.getModelObject().equals(foo)) {
>> >
>>  myLazyLoadPanel.setDefaultModelObject(myPojoService.readFoo());
>> >}
>> >//check other selections
>> >   target.addComponent(myLazyLoadPanel);
>> >}
>> > }
>> >
>> > I may be looking at this entirely wrong... Any suggestions?
>> >
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>


Re: AjaxLazyLoadPanel question

2011-11-18 Thread heapifyman
Hm, looks like AjaxRequestTarget.get() is what I was looking for?



2011/11/18 heapifyman 

> Hello again,
>
> I have a follow-up question. Can I somehow update other components once
> the AjaxLazyLoadPanel's getLazyLoadComponent() method has completed?
>
> I thought I could use the new wicket 1.5 event mechanism for that but if I
> understood correctly I would have to send the AjaxRequestTarget in the
> payload to add my changed components to it, right?
> And I don't really know how to get the AjaxRequestTarget in
> the getLazyLoadComponent() method.
>
> Thanks in advance for any hints,
> Philip
>
>
> 2011/11/18 heapifyman 
>
>> Great, it's working.
>> Thanks for the quick response,
>>
>> Philip
>>
>>
>>
>> 2011/11/17 Igor Vaynberg 
>>
>>> you can replace the lazy load panel instance:
>>>
>>> //check other selections
>>> myLazyLoadPanel=myLazyLoadPanel.replaceWith(new
>>> MyLazyLoadPanel(myLazyLoadPanel.getId(), ..)
>>> target.addComponent(myLazyLoadPanel);
>>>
>>> this will reset the state of lazyloadpanel to the "not-yet-loaded"
>>>
>>> -igor
>>>
>>> On Thu, Feb 3, 2011 at 11:40 AM, Matt Schmidt 
>>> wrote:
>>> > I currently have a DataGridView loaded inside of an AjaxLazyLoadPanel,
>>> > including the service call to get the data.
>>> >
>>> > myLazyLoadPanel = new AjaxLazyLoadPanel("id", new
>>> CollectionModel()) {
>>> >public Component getLazyLoadComponent(String markupId) {
>>> >if(getDefaultModelObject() == null) {
>>> >setDefaultModelObject(myPojoService.readAll());
>>> >}
>>> >return new MyDataGridView(markupId, getDefaultModel());
>>> //ignoring
>>> > casting for simplicity
>>> >}
>>> > }
>>> >
>>> > That works great for loading the page before the service call is
>>> complete.
>>> >
>>> > But now I need to add a DropDownChoice to change the collection in the
>>> data
>>> > grid via Ajax after the page is loaded. Is there anyway to get the
>>> > DataGridView to be replaced with an Ajax indicator (like on page load)
>>> > during an Ajax "onchange" event for the DropDownChoice? I've added an
>>> Ajax
>>> > indicator to the DropDownChoice, but I would like the same behavior I
>>> get on
>>> > page load for the AjaxLazyLoadPanel.
>>> >
>>> > This is what I have for the drop down for starters:
>>> >
>>> > myDropDownChoice.add(new AjaxFormComponentUpdateBehavior("onchange") {
>>> >protected void onUpdate(AjaxRequestTarget target) {
>>> >if(myDropDownChoice.getModelObject().equals(foo)) {
>>> >
>>>  myLazyLoadPanel.setDefaultModelObject(myPojoService.readFoo());
>>> >}
>>> >//check other selections
>>> >   target.addComponent(myLazyLoadPanel);
>>> >}
>>> > }
>>> >
>>> > I may be looking at this entirely wrong... Any suggestions?
>>> >
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>>
>>
>


Re: how to implement a Form with Ajax Paginated List of Checkboxes?

2011-12-06 Thread heapifyman
Hi,

I have the same problem and I would appreciate if you could post a code
example of how you solved your problem? Specifically what you put into
the AjaxCheckBox' onUpdate() method?

Thanks


2011/8/11 bad boy 

> AjaxFormChoiceComponentUpdatingBehavior did not work. For some reason ir
> would only ccept the first checkbox.  when I checked  say 5 checkboxe, it
> would only remember the first fone
>
>
> But changing Check to AjaxCheckBox worked perfectly.
>
>
> Thanks
>
>
>
>
>
> - Original Message -
> From: Martin Grigorov 
> To: users@wicket.apache.org; bad boy 
> Cc:
> Sent: Wednesday, August 10, 2011 7:35 AM
> Subject: Re: how to implement a Form with Ajax Paginated List of
> Checkboxes?
>
> Add AjaxFormChoiceComponentUpdatingBehavior to the CheckGroup
>
> On Wed, Aug 10, 2011 at 4:38 AM, bad boy  wrote:
> > On my Wicket page, I have a form with a couple of TextFields and a
> paginated List of Checkboxes implemented with Dataview and and a sortable
> data provider.  The ajax pagination of the dataview works fine.
> >
> > The problem is that when I select a few items on Page 1 and then go to
> Page 2 and then return to Page 1 using the AjaxPagingNavigator, the
> selection is lost : the items that were checked on Page 1 initially do no
> have the "check mark" anymore.
> >
> > What should I do so that the items that were selected on a page of
> Dataview do not get lost when the AjaxPagnigaion is used to traverse the
> pages of the Dataview ?
> >
> >
> >
> > public final class AjaxFormWithPaginatedCheckBoxPage extends BasePage {
> >
> > static Logger logger =
> Logger.getLogger(AjaxFormWithPaginatedCheckBoxPage.class);
> > private Person person = new Person();
> > int counter = 0;
> >
> > WebMarkupContainer webMC;
> > static List pList=Person.getPersons(100);
> > int maxListCount=5;
> > DataView dv;
> > CheckGroup group;
> > public AjaxFormWithPaginatedCheckBoxPage() {
> > super();
> > final Form form = new Form("form", new
> CompoundPropertyModel(person)) {
> >
> > protected void onSubmit() {
> > logger.info("form recived");
> > logger.info(" person name " + person.getName());
> >
> > setResponsePage(new AjaxTogglePanelTestPage());
> > }
> > };
> > final TextField name = new TextField("name");
> > final TextField age = new TextField("age");
> > form.add(name);
> > form.add(age);
> >
> >
> > group=new CheckGroup("group", new ArrayList());
> > form.add(group);
> >
> > webMC= new WebMarkupContainer("webMC");
> > webMC.setOutputMarkupId(true);
> >
> >
> > SortablePersonDataProvider personDataProvider=new
> SortablePersonDataProvider(pList);
> > dv = new DataView("persons", personDataProvider) {
> >
> > @Override
> > protected void populateItem(Item item) {
> > item.add(new Check("check", item.getModel()));
> >
> > item.add(new Label("id", new PropertyModel(item.getModel(),
> "id")));
> > item.add(new Label("name", new
> PropertyModel(item.getModel(), "name")));
> > item.add(new Label("age", new PropertyModel(item.getModel(),
> "age")));
> > }
> >
> >
> > };
> > dv.setItemsPerPage(maxListCount);
> >
> >
> > webMC.add(new AjaxFallbackOrderByBorder("orderByID", "id",
> personDataProvider)
> > {
> > @Override
> > protected void onSortChanged()
> > {
> > dv.setCurrentPage(0);
> > }
> >
> > @Override
> > protected void onAjaxClick(AjaxRequestTarget target) {
> > target.addComponent(webMC);
> > }
> > });
> >
> > webMC.add(new AjaxFallbackOrderByBorder("orderByName", "name",
> personDataProvider)
> > {
> > @Override
> > protected void onSortChanged()
> > {
> > dv.setCurrentPage(0);
> > }
> >
> > @Override
> > protected void onAjaxClick(AjaxRequestTarget target) {
> > target.addComponent(webMC);
> > }
> > });
> > webMC.add(new AjaxFallbackOrderByBorder("orderByAge", "age",
> personDataProvider)
> > {
> > @Override
> > protected void onSortChanged()
> > {
> > dv.setCurrentPage(0);
> > }
> >
> > @Override
> > protected void onAjaxClick(AjaxRequestTarget target) {
> > target.addComponent(webMC);
> > }
> > });
> >
> >
> > webMC.add(dv);
> > webMC.add(new AjaxPagingNavigator("navigator",dv));
> > group.add(webMC);
> >
> > AjaxButton ab = new AjaxButton("ajax-button", new
> PropertyModel(this,
> > "counter"), form) {
> >
> > @Override
> > protected void onSubmit(AjaxRequestTarget target, Form form) {
> > counter++;
> > logger.info("ajx form recived");
> > logger.info("ajx person name " + person.getName());
> >
> > target.addComponent(this);
> >
> > }
> > };
> >

Download file from ModalWindow problem

2011-12-07 Thread heapifyman
Hello all,

I have a problem with a file download from a ModalWindow.
The ModalWindow contains a form in which the user can specify some
parameters. When clicking submit I generate a PDF based on the chosen
parameters and offer it for download. The ModalWindow is closed then.
I followed the approach described here
https://cwiki.apache.org/WICKET/ajax-update-and-file-download-in-one-blow.html
and
it actually works quite nice.

My problem is that after the file is downloaded and the ModalWindow is
closed all my Ajax stuff on the page from which the ModalWindow was opened
are not working anymore. Only when I reload the page, the Ajax stuff is
working again.

I would appreciate any hints as to what I might be doing wrong. Or maybe
someone has another code example of how to download a file from a
ModalWindow?

Thanks in advance.


Re: Download file from ModalWindow problem

2011-12-08 Thread heapifyman
Hello again.

Here's some more information about my problem: in the ModalWindow's
SubmitButton's onSubmit() I call at the end:

ModalWindow.closeCurrent(target);
download.initiate(target);

The AJAXDownload behaviour is added to the SubmitButton in the ModalWindow.
Or do I have to add it to the button on my page that opens the ModalWindow?

Thanks in advance.



2011/12/7 heapifyman 

> Hello all,
>
> I have a problem with a file download from a ModalWindow.
> The ModalWindow contains a form in which the user can specify some
> parameters. When clicking submit I generate a PDF based on the chosen
> parameters and offer it for download. The ModalWindow is closed then.
> I followed the approach described here
> https://cwiki.apache.org/WICKET/ajax-update-and-file-download-in-one-blow.html
>  and
> it actually works quite nice.
>
> My problem is that after the file is downloaded and the ModalWindow is
> closed all my Ajax stuff on the page from which the ModalWindow was opened
> are not working anymore. Only when I reload the page, the Ajax stuff is
> working again.
>
> I would appreciate any hints as to what I might be doing wrong. Or maybe
> someone has another code example of how to download a file from a
> ModalWindow?
>
> Thanks in advance.
>
>
>


Re: Download file from ModalWindow problem

2011-12-08 Thread heapifyman
I believe it already is. My markup looks like this:




... more buttons here ...




where dataPanel is:








2011/12/8 Daniel Weidele 

> Have you tried to put modal itself inside of another form, too?
>
>
> Am 08.12.2011 um 13:29 schrieb heapifyman :
>
> > Hello again.
> >
> > Here's some more information about my problem: in the ModalWindow's
> > SubmitButton's onSubmit() I call at the end:
> >
> > ModalWindow.closeCurrent(target);
> > download.initiate(target);
> >
> > The AJAXDownload behaviour is added to the SubmitButton in the
> ModalWindow.
> > Or do I have to add it to the button on my page that opens the
> ModalWindow?
> >
> > Thanks in advance.
> >
> >
> >
> > 2011/12/7 heapifyman 
> >
> >> Hello all,
> >>
> >> I have a problem with a file download from a ModalWindow.
> >> The ModalWindow contains a form in which the user can specify some
> >> parameters. When clicking submit I generate a PDF based on the chosen
> >> parameters and offer it for download. The ModalWindow is closed then.
> >> I followed the approach described here
> >>
> https://cwiki.apache.org/WICKET/ajax-update-and-file-download-in-one-blow.htmland
> >> it actually works quite nice.
> >>
> >> My problem is that after the file is downloaded and the ModalWindow is
> >> closed all my Ajax stuff on the page from which the ModalWindow was
> opened
> >> are not working anymore. Only when I reload the page, the Ajax stuff is
> >> working again.
> >>
> >> I would appreciate any hints as to what I might be doing wrong. Or maybe
> >> someone has another code example of how to download a file from a
> >> ModalWindow?
> >>
> >> Thanks in advance.
> >>
> >>
> >>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Download file from ModalWindow problem

2011-12-08 Thread heapifyman
You mean putting an additional form around the modal window like below?




... more buttons here ...




where dataPanel is:






 





2011/12/8 Daniel Weidele 

> No, it's doesn't look nested, yet. You may nest forms in Wicket, where the
> modal windows markup is in between.
>
> This worked for me when I experienced a similar problem.
>
> Von meinem iPad gesendet
>
> Am 08.12.2011 um 14:12 schrieb heapifyman :
>
> > I believe it already is. My markup looks like this:
> >
> > 
> > 
> >  > wicket:id="downloadButtonLabel">
> >... more buttons here ...
> >
> >
> > 
> >
> > where dataPanel is:
> > 
> > 
> > 
> > 
> >
> > 
> >
> >
> > 2011/12/8 Daniel Weidele 
> >
> >> Have you tried to put modal itself inside of another form, too?
> >>
> >>
> >> Am 08.12.2011 um 13:29 schrieb heapifyman :
> >>
> >>> Hello again.
> >>>
> >>> Here's some more information about my problem: in the ModalWindow's
> >>> SubmitButton's onSubmit() I call at the end:
> >>>
> >>> ModalWindow.closeCurrent(target);
> >>> download.initiate(target);
> >>>
> >>> The AJAXDownload behaviour is added to the SubmitButton in the
> >> ModalWindow.
> >>> Or do I have to add it to the button on my page that opens the
> >> ModalWindow?
> >>>
> >>> Thanks in advance.
> >>>
> >>>
> >>>
> >>> 2011/12/7 heapifyman 
> >>>
> >>>> Hello all,
> >>>>
> >>>> I have a problem with a file download from a ModalWindow.
> >>>> The ModalWindow contains a form in which the user can specify some
> >>>> parameters. When clicking submit I generate a PDF based on the chosen
> >>>> parameters and offer it for download. The ModalWindow is closed then.
> >>>> I followed the approach described here
> >>>>
> >>
> https://cwiki.apache.org/WICKET/ajax-update-and-file-download-in-one-blow.htmland
> >>>> it actually works quite nice.
> >>>>
> >>>> My problem is that after the file is downloaded and the ModalWindow is
> >>>> closed all my Ajax stuff on the page from which the ModalWindow was
> >> opened
> >>>> are not working anymore. Only when I reload the page, the Ajax stuff
> is
> >>>> working again.
> >>>>
> >>>> I would appreciate any hints as to what I might be doing wrong. Or
> maybe
> >>>> someone has another code example of how to download a file from a
> >>>> ModalWindow?
> >>>>
> >>>> Thanks in advance.
> >>>>
> >>>>
> >>>>
> >>
> >> -
> >> 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: Updating model object on AjaxFallbackDefaultDataTable page change

2011-12-08 Thread heapifyman
Hello Mark,

did you manage to solve this? I'm facing the same problem and tried to
implement my own navigation links (as AjaxSubmitLink) as Igor suggested.
But still my checkgroup state is not preserved when changing the table
pages.

If you had some code example that would be a huge help.
Thanks,
Philip




2010/11/10 Matt Schmidt 

> Are you suggesting to override
> AjaxPagingNavigator.newPagingNavigationIncrementLink() and
> AjaxPagingNavigator.newPagingNavigationLink() and implement our own
> navigation links similar to AjaxPagingNavigationIncrementLink and
> AjaxPagingNavigationLink that do the same thing except extends
> SubmitLink rather than Link?
>
> Am I making that harder than it needs to be? It may help a lot if you
> have a code sample for something like this.
>
> On Tue, Nov 9, 2010 at 4:04 PM, Igor Vaynberg 
> wrote:
> >
> > see my last suggestion and replace navigator's links with submitlinks
> >
> > -igor
> >
> > On Tue, Nov 9, 2010 at 1:02 PM, Matt Schmidt 
> wrote:
> > > Yes that works for the first page - only on that page are the
> javascript
> > > behaviors rendered.
> > >
> > > Basically, we are looking for a way to NOT do an ajax request every
> time we
> > > check a box - The model object of the check group should be updated
> when we
> > >
> > > a) click the submit button or
> > > b) change the page of the datatable.
> > >
> > > What are we missing here?
> > >
> > > On Tue, Nov 9, 2010 at 3:32 PM, Igor Vaynberg  >wrote:
> > >
> > >> use AjaxFormChoiceComponentUpdatingBehavior, that one works with
> Check.
> > >>
> > >> also you can use CheckBox with the ajax behavior instead of
> > >> CheckGroup/Check
> > >>
> > >> or replace links used by navigator with submit links, there are
> > >> factory methods on the navigator.
> > >>
> > >> -igor
> > >>
> > >> On Tue, Nov 9, 2010 at 8:41 AM, Matt Schmidt 
> wrote:
> > >> > I have a CheckGroup that contains an AjaxFallbackDefaultDataTable
> that
> > >> has a
> > >> > column containing a Check. As long as I click my submit button
> while on
> > >> the
> > >> > first page of the DataTable, the model object of the CheckGroup is
> > >> updated
> > >> > as expected with the items I had checked. However, if I check some
> > >> > checkboxes and then go to page 2 of the DataTable, the CheckGroup's
> model
> > >> > object is not updated and I lose everything I checked on page 1.
> > >> >
> > >> > The DataTable class has an "onPageChanged()" event, but it appears
> that
> > >> it
> > >> > is called after the page is actually changed.
> > >> >
> > >> > My other thought was to add an AjaxFormComponentUpdatingBehavior to
> the
> > >> > Check, but Check is not a FormComponent.
> > >> >
> > >> > Any thoughts?
> > >> >
> > >> > 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
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Download file from ModalWindow problem

2011-12-08 Thread heapifyman
I did and I still don't seem to get it. I think I followed all the  
recommendations in javadoc:


- put  in html file before the  
ajax button that opens the window

- added another form around the 
- changed sequence in ModalWindow's form's submit to
download.initiate(target);
ModalWindow.closeCurrent(target);

Still, after the window is closed and the download finished I cannot  
use any of the ajax links on my page until I reloaded the whole page.


I don't understand what I might be doing wrong here.


Am 08.12.2011 um 21:34 schrieb Martin Grigorov:


See ModalWindow's javadoc. It explains about the need of a form

On Thu, Dec 8, 2011 at 8:24 PM, heapifyman   
wrote:
You mean putting an additional form around the modal window like  
below?





   ... more buttons here ...
   
   


where dataPanel is:





   

   




2011/12/8 Daniel Weidele 

No, it's doesn't look nested, yet. You may nest forms in Wicket,  
where the

modal windows markup is in between.

This worked for me when I experienced a similar problem.

Von meinem iPad gesendet

Am 08.12.2011 um 14:12 schrieb heapifyman :


I believe it already is. My markup looks like this:




   ... more buttons here ...
   
   


where dataPanel is:




   



2011/12/8 Daniel Weidele 


Have you tried to put modal itself inside of another form, too?


Am 08.12.2011 um 13:29 schrieb heapifyman :


Hello again.

Here's some more information about my problem: in the  
ModalWindow's

SubmitButton's onSubmit() I call at the end:

ModalWindow.closeCurrent(target);
download.initiate(target);

The AJAXDownload behaviour is added to the SubmitButton in the

ModalWindow.

Or do I have to add it to the button on my page that opens the

ModalWindow?


Thanks in advance.



2011/12/7 heapifyman 


Hello all,

I have a problem with a file download from a ModalWindow.
The ModalWindow contains a form in which the user can specify  
some
parameters. When clicking submit I generate a PDF based on the  
chosen
parameters and offer it for download. The ModalWindow is  
closed then.

I followed the approach described here




https://cwiki.apache.org/WICKET/ajax-update-and-file-download-in-one-blow.htmland

it actually works quite nice.

My problem is that after the file is downloaded and the  
ModalWindow is
closed all my Ajax stuff on the page from which the  
ModalWindow was

opened
are not working anymore. Only when I reload the page, the Ajax  
stuff

is

working again.

I would appreciate any hints as to what I might be doing  
wrong. Or

maybe
someone has another code example of how to download a file  
from a

ModalWindow?

Thanks in advance.





-
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





PGP.sig
Description: Signierter Teil der Nachricht


Re: Download file from ModalWindow problem

2011-12-09 Thread heapifyman
I have narrowed down the problem to Google Chrome (both 15.x and 17.x-dev
version) now. In both Firefox and IE 9 the download is working and the ajax
links keep working after the download finished.

I have created a quickstart application that demonstrates the thing. Are
you still interested in that to see if it's a Chrome or a Wicket issue? If
so, where should I put it?

Thanks


2011/12/9 Ernesto Reinaldo Barreiro 

> Can you please create a quick-start application that we can test?
>
> Ernesto
>
> On Fri, Dec 9, 2011 at 1:38 AM, heapifyman  wrote:
>
> > I did and I still don't seem to get it. I think I followed all the
> > recommendations in javadoc:
> >
> > - put  in html file before the
> > ajax button that opens the window
> > - added another form around the 
> > - changed sequence in ModalWindow's form's submit to
> >download.initiate(target);
> >ModalWindow.closeCurrent(**target);
> >
> > Still, after the window is closed and the download finished I cannot use
> > any of the ajax links on my page until I reloaded the whole page.
> >
> > I don't understand what I might be doing wrong here.
> >
> >
> > Am 08.12.2011 um 21:34 schrieb Martin Grigorov:
> >
> >
> >  See ModalWindow's javadoc. It explains about the need of a form
> >>
> >> On Thu, Dec 8, 2011 at 8:24 PM, heapifyman 
> wrote:
> >>
> >>> You mean putting an additional form around the modal window like below?
> >>>
> >>> 
> >>> 
> >>> <**span
> >>> wicket:id="**downloadButtonLabel">
> >>>   ... more buttons here ...
> >>>   
> >>>   
> >>> 
> >>>
> >>> where dataPanel is:
> >>> 
> >>> 
> >>> 
> >>> 
> >>>
> >>>   
> >>>
> >>>   
> >>>
> >>> 
> >>>
> >>>
> >>> 2011/12/8 Daniel Weidele  daniel.weid...@uni-konstanz.de>
> >>> >
> >>>
> >>>  No, it's doesn't look nested, yet. You may nest forms in Wicket, where
> >>>> the
> >>>> modal windows markup is in between.
> >>>>
> >>>> This worked for me when I experienced a similar problem.
> >>>>
> >>>> Von meinem iPad gesendet
> >>>>
> >>>> Am 08.12.2011 um 14:12 schrieb heapifyman :
> >>>>
> >>>>  I believe it already is. My markup looks like this:
> >>>>>
> >>>>> 
> >>>>> 
> >>>>> <**span
> >>>>> wicket:id="**downloadButtonLabel">
> >>>>>   ... more buttons here ...
> >>>>>   
> >>>>>   
> >>>>> 
> >>>>>
> >>>>> where dataPanel is:
> >>>>> 
> >>>>> 
> >>>>> 
> >>>>> 
> >>>>>   
> >>>>> 
> >>>>>
> >>>>>
> >>>>> 2011/12/8 Daniel Weidele  daniel.weid...@uni-konstanz.de>
> >>>>> >
> >>>>>
> >>>>>  Have you tried to put modal itself inside of another form, too?
> >>>>>>
> >>>>>>
> >>>>>> Am 08.12.2011 um 13:29 schrieb heapifyman :
> >>>>>>
> >>>>>>  Hello again.
> >>>>>>>
> >>>>>>> Here's some more information about my problem: in the ModalWindow's
> >>>>>>> SubmitButton's onSubmit() I call at the end:
> >>>>>>>
> >>>>>>> ModalWindow.closeCurrent(**target);
> >>>>>>> download.initiate(target);
> >>>>>>>
> >>>>>>> The AJAXDownload behaviour is added to the SubmitButton in the
> >>>>>>>
> >>>>>> ModalWindow.
> >>>>>>
> >>>>>>> Or do I have to add it to the button on my page that opens the
> >>>>>>>
> >>>>>> ModalWindow?
> >>>>>>
> >>>>>>>
> >>>>>>> Thanks in advance.
> >>>

Re: Download file from ModalWindow problem

2011-12-20 Thread heapifyman
I have narrowed down the problem to Google Chrome (both 15.x and 17.x- 
dev version) now. In both Firefox and IE 9 the download is working and  
the ajax links keep working after the download finished.


I have created a quickstart application that demonstrates the thing.  
Are you still interested in that to see if it's a Chrome or a Wicket  
issue? If so, where should I put it?


Thanks


2011/12/9 Ernesto Reinaldo Barreiro 
Can you please create a quick-start application that we can test?

Ernesto

On Fri, Dec 9, 2011 at 1:38 AM, heapifyman  wrote:

> I did and I still don't seem to get it. I think I followed all the
> recommendations in javadoc:
>
> - put  in html file before  
the

> ajax button that opens the window
> - added another form around the **div>

> - changed sequence in ModalWindow's form's submit to
>download.initiate(target);
>ModalWindow.closeCurrent(**target);
>
> Still, after the window is closed and the download finished I  
cannot use

> any of the ajax links on my page until I reloaded the whole page.
>
> I don't understand what I might be doing wrong here.
>
>
> Am 08.12.2011 um 21:34 schrieb Martin Grigorov:
>
>
>  See ModalWindow's javadoc. It explains about the need of a form
>>
>> On Thu, Dec 8, 2011 at 8:24 PM, heapifyman   
wrote:

>>
>>> You mean putting an additional form around the modal window like  
below?

>>>
>>> 
>>> 
>>> <**span
>>> wicket:id="**downloadButtonLabel">
>>>   ... more buttons here ...
>>>   
>>>   
>>> 
>>>
>>> where dataPanel is:
>>> 
>>> 
>>> 
>>> 
>>>
>>>   
>>>
>>>   
>>>
>>> 
>>>
>>>
>>> 2011/12/8 Daniel Weidele >

>>> >
>>>
>>>  No, it's doesn't look nested, yet. You may nest forms in Wicket,  
where

>>>> the
>>>> modal windows markup is in between.
>>>>
>>>> This worked for me when I experienced a similar problem.
>>>>
>>>> Von meinem iPad gesendet
>>>>
>>>> Am 08.12.2011 um 14:12 schrieb heapifyman :
>>>>
>>>>  I believe it already is. My markup looks like this:
>>>>>
>>>>> 
>>>>> 
>>>>> <**span
>>>>> wicket:id="**downloadButtonLabel">
>>>>>   ... more buttons here ...
>>>>>   
>>>>>   
>>>>> 
>>>>>
>>>>> where dataPanel is:
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>>   
>>>>> 
>>>>>
>>>>>
>>>>> 2011/12/8 Daniel Weidele >

>>>>> >
>>>>>
>>>>>  Have you tried to put modal itself inside of another form, too?
>>>>>>
>>>>>>
>>>>>> Am 08.12.2011 um 13:29 schrieb heapifyman  
:

>>>>>>
>>>>>>  Hello again.
>>>>>>>
>>>>>>> Here's some more information about my problem: in the  
ModalWindow's

>>>>>>> SubmitButton's onSubmit() I call at the end:
>>>>>>>
>>>>>>> ModalWindow.closeCurrent(**target);
>>>>>>> download.initiate(target);
>>>>>>>
>>>>>>> The AJAXDownload behaviour is added to the SubmitButton in the
>>>>>>>
>>>>>> ModalWindow.
>>>>>>
>>>>>>> Or do I have to add it to the button on my page that opens the
>>>>>>>
>>>>>> ModalWindow?
>>>>>>
>>>>>>>
>>>>>>> Thanks in advance.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> 2011/12/7 heapifyman 
>>>>>>>
>>>>>>>  Hello all,
>>>>>>>>
>>>>>>>> I have a problem with a file download from a ModalWindow.
>>>>>>>> The ModalWindow contains a form in which the user can  
specify some

>>>>>>>> parameters. When clicking submit I generate a PDF based on the
>>>>>>>> chosen
>>>>>>>> parameters and offer it for download. The ModalWindow is  
closed

>>>>>>>&g

Cancelling form submit in ModalWindow causes validation errors in Form of underlying base page?

2012-01-12 Thread heapifyman
Hello everyone,

first, sorry for the bad subject. I didn't know how to describe this
problem in a short line.
I have a page with a form with two AjaxButtons (Add and Delete) and an
AjaxFallbackDefaultDataTable. The first button opens a ModalWindow with
another form to add new entries to the table. The ModalWindow also has a
Cancel button (with setDefaultFormProcessing(false);). which closes the
ModalWindow.
The page's second button (Delete) should delete entries from the table that
have been selected using Check components that are added to each row of the
table.

If I open the ModalWindow and then click the "Cancel" button in the
ModalWindow I cannot use the Delete button afterwards. I always get to the
Delete buttons onError method and in my log I see the following: WARN
org.apache.wicket.protocol.http.WebSession.cleanupFeedbackMessages(WebSession.java:135)
- Component-targetted feedback message was left unrendered. This could be
because you are missing a FeedbackPanel on the page.  Message:
[FeedbackMessage message = "_errormessage_", reporter = orderNumber, level
= ERROR]

But the FeedbackMessage is from the ModalWindow.

How could I solve this so that I can cancel the ModalWindow and still use
the Delete button?

Thanks in advance,
Philip


Markup Inheritance example with Ajax?

2010-06-25 Thread heapifyman

Hello all,

I would like to extend the Markup Inheritance example
(http://wicket.apache.org/examplemarkupinheritance.html) by replacing
the content part of the page (i.e. the wicket:child) using Ajax.

I tried to replace the BookmarkablePageLink on the BasePage with an
AjaxLink but this does not seem to work because one cannot add a WebPage
(e.g. Page1 in the example) to the target in the onClick() method.

Is there a way in Wicket to have a BasePage with header, content and
footer and replace the content by using Ajax?

I'd appreciate if anyone could point me to some example or documentation.

Best regards,
philip



signature.asc
Description: OpenPGP digital signature


Re: Markup Inheritance example with Ajax?

2010-07-02 Thread heapifyman
Am 25.06.2010 20:09, schrieb Jeremy Thomerson:
> If you want to do this, you are basically using the single-page paradigm
> where your content is always a panel.  Basically you just create a single
> page, and then all of your content goes into panels instead of pages with
> markup inheritance.  Then swap the panel in your link and add it to the ajax
> response.  You can make these bookmarkable through PageParameters.

Thank you both. Panels are what I've been looking for.

> 
> Jeremy Thomerson
> 
> On Fri, Jun 25, 2010 at 12:29 PM, heapifyman  wrote:
> 
>>
>> Hello all,
>>
>> I would like to extend the Markup Inheritance example
>> (http://wicket.apache.org/examplemarkupinheritance.html) by replacing
>> the content part of the page (i.e. the wicket:child) using Ajax.
>>
>> I tried to replace the BookmarkablePageLink on the BasePage with an
>> AjaxLink but this does not seem to work because one cannot add a WebPage
>> (e.g. Page1 in the example) to the target in the onClick() method.
>>
>> Is there a way in Wicket to have a BasePage with header, content and
>> footer and replace the content by using Ajax?
>>
>> I'd appreciate if anyone could point me to some example or documentation.
>>
>> Best regards,
>> philip
>>
>>
> 
> 




signature.asc
Description: OpenPGP digital signature


Using absolute URLs in Ajax-Forms, -buttons and -links

2010-07-08 Thread heapifyman

Hello all,

I'm trying to kind of embed a wicket app into another web page, meaning
that the wicket pages are included as part of the other web page. All
submits, links, buttons in the wicket pages are realised using wicket's
ajax features.

Unfortunately, the wicketSubmitFormById call in an Ajax form submit is
using a relative URL, like in the following example:



This call fails of course if the wicket page is "embedded" into the
other web page. So, my question would be: is there a way to tell wicket
to use an absolute URL in this call to wicketSubmitFormById?

Thanks in advance,
Philip



signature.asc
Description: OpenPGP digital signature


Customizing URLs in Ajax-Forms, -buttons and -links

2010-07-19 Thread heapifyman

Hello all,

I'm trying to kind of embed a wicket app into another web page, meaning
that the wicket pages are loaded into a modal jQuery panel. All
submits, links, buttons in the wicket pages are thus realised using
wicket's ajax features.

Unfortunately, the wicketSubmitFormById call in an Ajax form submit is
using a relative URL, resulting code looks like this:



This call fails of course if the wicket page is "embedded" into the
other web page because the webapp context is different. So, my question
would be: is there a way to customize the URL parameter in this call to
wicketSubmitFormById?

Thanks in advance,
Philip





signature.asc
Description: OpenPGP digital signature


Re: Loadable-detachable model for ListView

2012-05-10 Thread heapifyman
The examples page does not seem to be working:
HTTP Status 500 -
--

*type* Exception report

*message***

*description* *The server encountered an internal error () that prevented
it from fulfilling this request.*

*exception*

javax.servlet.ServletException: Filter execution threw an exception

*root cause*

java.lang.OutOfMemoryError: PermGen space

*note* *The full stack trace of the root cause is available in the Apache
Tomcat/6.0.29 logs.*




2012/5/10 Igor Vaynberg 

> use PagingNavigator. there are examples here:
>
> http://www.wicket-library.com/wicket-examples/repeater/
>
> -igor
>
> On Wed, May 9, 2012 at 4:11 PM, sudeivas 
> wrote:
> > Thanks Igor for the response.
> >
> > If I use dataview.setItemsPerPage(50), then my Data View loads only the
> > first 50 entries. But how can I trigger or ask the data view to load the
> > next 50 entries when we scroll down the list or when we reach the end of
> the
> > list?
> >
> > -Suresh
> >
> > --
> > View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Loadable-detachable-model-for-ListView-tp4621232p4622091.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: Loadable-detachable model for ListView

2012-05-10 Thread heapifyman
by examples page I meant:
http://www.wicket-library.com/wicket-examples/repeater/


2012/5/10 heapifyman 

> The examples page does not seem to be working:
> HTTP Status 500 -
> --
>
> *type* Exception report
>
> *message***
>
> *description* *The server encountered an internal error () that prevented
> it from fulfilling this request.*
>
> *exception*
>
> javax.servlet.ServletException: Filter execution threw an exception
>
> *root cause*
>
> java.lang.OutOfMemoryError: PermGen space
>
> *note* *The full stack trace of the root cause is available in the Apache
> Tomcat/6.0.29 logs.*
>
>
>
>
> 2012/5/10 Igor Vaynberg 
>
>> use PagingNavigator. there are examples here:
>>
>> http://www.wicket-library.com/wicket-examples/repeater/
>>
>> -igor
>>
>> On Wed, May 9, 2012 at 4:11 PM, sudeivas 
>> wrote:
>> > Thanks Igor for the response.
>> >
>> > If I use dataview.setItemsPerPage(50), then my Data View loads only the
>> > first 50 entries. But how can I trigger or ask the data view to load the
>> > next 50 entries when we scroll down the list or when we reach the end
>> of the
>> > list?
>> >
>> > -Suresh
>> >
>> > --
>> > View this message in context:
>> http://apache-wicket.1842946.n4.nabble.com/Loadable-detachable-model-for-ListView-tp4621232p4622091.html
>> > Sent from the Users forum mailing list archive at Nabble.com.
>> >
>> > -
>> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> > For additional commands, e-mail: users-h...@wicket.apache.org
>> >
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>


Re: wicket & ajax push

2012-05-31 Thread heapifyman
If you are looking for examples, wicketstuff has a push module (
https://github.com/wicketstuff/core/tree/master/jdk-1.6-parent/push-parent),
atmosphere examples also contain a wicket example (
https://github.com/Atmosphere/atmosphere/tree/master/samples) and the just
released wicket 6 beta2 comes with a wicket-atmosphere module (
http://wicket.apache.org/2012/05/29/wicket-6.0.0-beta2-released.html)


2012/5/30 Douglas Ferguson 

> Anybody doing any ajax push stuff using wicket?
>
> Douglas
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: wicket-atmosphere NullPointerException at initialization

2012-06-13 Thread heapifyman
I think I had the same problem and was able to overcome it by adding
atmosphere.xml file in src/main/webapp/META-INF and changing the web.xml.
Both I took from the wicket examples.

atmosphere.xml looks like this:






web.xml defines atmosphere servlet instead of default wicket filter:

AtmosphereApplication
org.atmosphere.cpr.AtmosphereServlet

applicationClassName
org.heapifyman.wicketatmospheretest.AtmosphereApplication


org.atmosphere.useWebSocket
true


org.atmosphere.useNative
true


org.atmosphere.cpr.CometSupport.maxInactiveActivity
3


filterMappingUrlPattern
/atmo/*


org.atmosphere.websocket.WebSocketProtocol
org.atmosphere.websocket.protocol.EchoProtocol

1



AtmosphereApplication
/atmo/*



2012/6/13 Martin Grigorov 

> Hi,
>
> Check what is different between your web.xml and atmosphere.xml and
> the ones in wicket-examples.war.
>
> The NPE is caused by not set org.atmosphere.cpr.BroadcasterFactory but
> I'm not sure what exactly setups it.
>
> On Wed, Jun 13, 2012 at 11:29 AM, theAnthony 
> wrote:
> > Hi,
> >
> > I wanted to play around with wicket 6.0.0-beta2 and wicket-atmosphere, I
> > created a quickstart created a simple page which would display a number
> and
> > that number would come from a simple bean with a method scheduled to be
> > executed every X seconds which would push the new value to the EventBus.
> But
> > at initialization of the application, I get a NullPointerException in the
> > EventBus.
> >
> > So I went back to the quickstart and made it as simple as possible. Just
> > initializing the EventBus:
> >
> > mvn archetype:generate -DarchetypeGroupId=org.apache.wicket
> > -DarchetypeArtifactId=wicket-archetype-quickstart
> > -DarchetypeVersion=6.0.0-beta2 -DgroupId=com.company.ecom
> > -DartifactId=emm-client-push2
> > -DarchetypeRepository=https://repository.apache.org/-DinteractiveMode=false
> >
> > Once created, I added the dependency in the pom file:
> >
> > 
> >org.apache.wicket
> >wicket-atmosphere
> >0.1
> > 
> >
> > And finally modified init method of the WicketApplication class:
> >
> >public void init()
> >{
> >super.init();
> >
> >// add your configuration here
> >new EventBus(this);
> >}
> >
> > And when I launch the Start.java, here is the exception
> > WARN  - AbstractLifeCycle  - FAILED wicket.emm-client-push2:
> > java.lang.NullPointerException
> > java.lang.NullPointerException
> >at org.apache.wicket.atmosphere.EventBus.(EventBus.java:85)
> >at com.bnpp.ecom.WicketApplication.init(WicketApplication.java:31)
> >at
> org.apache.wicket.Application.initApplication(Application.java:814)
> >at
> org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:379)
> >at
> org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:314)
> >at
> org.eclipse.jetty.servlet.FilterHolder.doStart(FilterHolder.java:102)
> >at
> >
> org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
> >at
> >
> org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:748)
> >at
> >
> org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:249)
> >at
> >
> org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1222)
> >at
> >
> org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:676)
> >at
> org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:455)
> >at
> >
> org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
> >at
> >
> org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:90)
> >at org.eclipse.jetty.server.Server.doStart(Server.java:260)
> >at
> >
> org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
> >at com.company.ecom.Start.main(Start.java:66)
> >
> > I think I followed the instructions from the release note so I don't
> > understand what I'm missing. Any clue ?
> >
> > Cheers
> >
> > --
> > View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/wicket-atmosphere-NullPointerException-at-initialization-tp4649917.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
>
>


[1.5] AjaxFormComponentUpdatingBehavior and Cancel AjaxButton to reset form

2012-08-06 Thread heapifyman
Hello,

I've been struggling for a while now with a problem that a Cancel
AjaxButton (with setDefaultFormProcessing(false)) calling form.clearInput()
would not reset my form to original values.
The problem seems to be that I have AjaxFormComponentUpdatingBehavior
(onchange event) for validation added to a few Textfields of the form.
Am I right, that the behaviour updates the model and thus the Cancel button
cannot restore the original value?

And if that really is the problem, is there a best practice how to combine
the two functionalities?

Thanks in advance.


Re: [1.5] AjaxFormComponentUpdatingBehavior and Cancel AjaxButton to reset form

2012-08-07 Thread heapifyman
If I use an AjaxLink instead of an AjaxButton I still get the same
behaviour. The values in the form are not reset when clicking the Cancel
link/button.

My form has a CompoundPropertyModel and just three TextFields.
Each TextField has an AjaxFormComponentUpdatingBehavior for validation on
event "onchange". The Cancel AjaxLink should reset (and disable) the form
but stay on the same page.

Now what I get is this: if the user changes a value and it is valid, the
underlying model get's updated. Clicking Cancel afterwards does not reset
the changed value back to the original value.

If I remove the AjaxFormComponentUpdatingBehavior Cancel AjaxLink works as
expected.

I am looking for a way to have the Cancel link and still keep
the AjaxFormComponentUpdatingBehavior.



2012/8/6 Bertrand Guay-Paquet 

> Hi,
>
> form.clearInput() only clears the raw input (what is received in the
> current request) of the form components. That is, it doesn't modify the
> underlying models. With setDefaultFormProcessing(**false), this means
> that your FormComponent models are not updated at all.
>
> The AjaxFormComponentUpdatingBehav**ior should only be triggered when
> input changes on the text fields. It plays no part otherwise when clicking
> a button.
>
> As a sidenote, why do you use a Button? This component causes the form to
> be submitted but apparently you don't need the values for this action. A
> link would save a bit of processing and transfer.
>
> Bertrand
>
>
> On 06/08/2012 12:33 PM, heapifyman wrote:
>
>> Hello,
>>
>> I've been struggling for a while now with a problem that a Cancel
>> AjaxButton (with setDefaultFormProcessing(**false)) calling
>> form.clearInput()
>> would not reset my form to original values.
>> The problem seems to be that I have AjaxFormComponentUpdatingBehav**ior
>> (onchange event) for validation added to a few Textfields of the form.
>> Am I right, that the behaviour updates the model and thus the Cancel
>> button
>> cannot restore the original value?
>>
>> And if that really is the problem, is there a best practice how to combine
>> the two functionalities?
>>
>> Thanks in advance.
>>
>>
>
> --**--**-
> To unsubscribe, e-mail: 
> users-unsubscribe@wicket.**apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: [1.5] AjaxFormComponentUpdatingBehavior and Cancel AjaxButton to reset form

2012-08-07 Thread heapifyman
2012/8/7 Martin Grigorov 

> On Tue, Aug 7, 2012 at 1:25 PM, Phillips, David 
> wrote:
> > The primary nature of the AjaxFormComponentUpdatingBehavior is to
> validate the input and update the model. If you are looking to do the
> validation piece without updating the model, you probably want to use an
> AjaxEventBehavior instead. In onEvent you can then call inputChanged and
> validate directly on the component without calling updateModel.
>
> This wont work because AjaxEventBehavior doesn't send the data, unless
> you do this manually.
>

How would I do that?


>
>
> The cancel link should just set an empty model object to the form.
>

What if I'm editing an existing entity that's coming from a database (not
creating a new one) and I want to display the original values after
clicking Cancel? I assume I have to reload the entity and set it as the
model object again?


>
> >
> > Thanks,
> > -David Phillips
> >
> > -Original Message-
> > From: heapifyman [mailto:heapify...@gmail.com]
> > Sent: Tuesday, August 07, 2012 5:07 AM
> > To: users@wicket.apache.org
> > Subject: Re: [1.5] AjaxFormComponentUpdatingBehavior and Cancel
> AjaxButton to reset form
> >
> > If I use an AjaxLink instead of an AjaxButton I still get the same
> behaviour. The values in the form are not reset when clicking the Cancel
> link/button.
> >
> > My form has a CompoundPropertyModel and just three TextFields.
> > Each TextField has an AjaxFormComponentUpdatingBehavior for validation
> on event "onchange". The Cancel AjaxLink should reset (and disable) the
> form but stay on the same page.
> >
> > Now what I get is this: if the user changes a value and it is valid, the
> underlying model get's updated. Clicking Cancel afterwards does not reset
> the changed value back to the original value.
> >
> > If I remove the AjaxFormComponentUpdatingBehavior Cancel AjaxLink works
> as expected.
> >
> > I am looking for a way to have the Cancel link and still keep the
> AjaxFormComponentUpdatingBehavior.
> >
> >
> >
> > 2012/8/6 Bertrand Guay-Paquet 
> >
> >> Hi,
> >>
> >> form.clearInput() only clears the raw input (what is received in the
> >> current request) of the form components. That is, it doesn't modify
> >> the underlying models. With setDefaultFormProcessing(**false), this
> >> means that your FormComponent models are not updated at all.
> >>
> >> The AjaxFormComponentUpdatingBehav**ior should only be triggered when
> >> input changes on the text fields. It plays no part otherwise when
> >> clicking a button.
> >>
> >> As a sidenote, why do you use a Button? This component causes the form
> >> to be submitted but apparently you don't need the values for this
> >> action. A link would save a bit of processing and transfer.
> >>
> >> Bertrand
> >>
> >>
> >> On 06/08/2012 12:33 PM, heapifyman wrote:
> >>
> >>> Hello,
> >>>
> >>> I've been struggling for a while now with a problem that a Cancel
> >>> AjaxButton (with setDefaultFormProcessing(**false)) calling
> >>> form.clearInput()
> >>> would not reset my form to original values.
> >>> The problem seems to be that I have
> >>> AjaxFormComponentUpdatingBehav**ior
> >>> (onchange event) for validation added to a few Textfields of the form.
> >>> Am I right, that the behaviour updates the model and thus the Cancel
> >>> button cannot restore the original value?
> >>>
> >>> And if that really is the problem, is there a best practice how to
> >>> combine the two functionalities?
> >>>
> >>> Thanks in advance.
> >>>
> >>>
> >>
> >> --**--**--
> >> --- To unsubscribe, e-mail:
> >> users-unsubscribe@wicket.**apache.org >> 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
>
>


Re: Apache wicket cookbook ch5 - Filtering form example

2012-09-07 Thread heapifyman
Turn the submit button into an AjaxButton:



form.add(new AjaxButton("submit", form) {...}

and in the button's onSubmit method add the table to the AjaxRequestTarget.
I believe that should do it.



2012/9/7 lucast 

> Dear Forum,
> For those of you familiar with the content of Apache wicket cookbook. There
> is a wonderful example for filtering data tables on chapter 5 (recipe0502),
> When I click search, the entire page is refreshed. The main question I have
> about this is:
>
> Is there a way to implement this using ajax so that only the result table
> is
> refreshed/repainted?
>
> Thanks in advance,
> Lucas
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Apache-wicket-cookbook-ch5-Filtering-form-example-tp4651836.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Wicket 6 and CDI

2012-09-07 Thread heapifyman
Now that wicket 6 final is out, will there be a wicket 6 compatible
"release" of wicket-cdi? Or is it already available on one of the maven
repos? Or should I get the source from github and build it myself if I want
to use wicket-cdi with wicket 6?


2012/7/16 Igor Vaynberg 

> just pushed the wicket-6 branch
>
> -igor
>
> On Mon, Jul 16, 2012 at 1:04 AM, Jochen Mader 
> wrote:
> > Hehehehe, that was easy :)
> > It's just a couple of package-renames and fixing the
> > ConversationExpiryChecker to use the new way of getting the
> > AjaxRequestTarget:
> > AjaxRequestTarget target =
> RequestCycle.get().find(AjaxRequestTarget.class);
> > if (component instanceof Page ||target != null)
> > Took me like 3 minutes.
> > I just did a quick smoke test in Glassfish and so far things are looking
> good.
> > Will hopefully get some more time tomorrow evening to test a little more.
> > If I find any problems I will let you know.
> >
> > CU,
> >
> > Jochen
> >
> >
> > On Sun, Jul 15, 2012 at 11:45 PM, Jochen Mader
> >  wrote:
> >> Tried it out a few minutes ago.
> >> Looks a few things got moved into the core package (e.g.
> IPageRequestHandler).
> >> I had a quick look and so far I didn't find anything beyond renamed
> >> packages (but that's just a few minutes of looking).
> >> I might just give it a shot and try to get it running.
> >>
> >> CU
> >> Jochen
> >>
> >> On Sun, Jul 15, 2012 at 11:15 PM, Igor Vaynberg <
> igor.vaynb...@gmail.com> wrote:
> >>> havent had time to try it out on wicket 6 yet, is anything actually
> broken?
> >>>
> >>> -igor
> >>>
> >>> On Sun, Jul 15, 2012 at 11:40 PM, Jochen Mader
> >>>  wrote:
>  To get that out of the way: I know that Wicket 6 won't be shipped with
>  CDI directly :)
>  I still would like to use Wicket 6 in Glassfish.
>  Are there plans to port wicket-cdi to Wicket 6? I couldn't find
>  anything on the 42lines git-repo on that issue.
>  Help required?
> 
>  Thanks,
> 
>  Jochen
> 
>  -
>  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 6 and CDI

2012-09-07 Thread heapifyman
looks like org.jboss.weld.weld-core and
org.jboss.weld.servlet.weld-servlet-core
are there. though not in version 1.1.2.Final.
wicket-cdi might have upgrade to at least 1.1.4.Final


2012/9/7 Martijn Dashorst 

> On Fri, Sep 7, 2012 at 4:00 PM, Martin Grigorov 
> wrote:
> >>> There is a security hole:
> http://search.maven.org/#search%7Cga%7C1%7Cwicket-cdi
> >>
> >> Apparently seam-conversation-spi *is* in the maven central repository.
> >
> > I see Wicket 6.1.0 coming :-)
>
> Before we start cheering, for wicket-cdi examples to work, the weld-*
> things also need to be in Central. And wicket-cdi-examples is still at
> 1.0 in Central. Now I just saw some releases of weld-* in central,
> perhaps the right libraries are available now.
>
> Martijn
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Adding the same panel with different parameters...

2012-09-13 Thread heapifyman
Make CPanel extend GenericPanel.
Then use cPanel.setModelObject() and pass it newObject or editObject
depending on which button has been clicked.



2012/9/13 theivorykitty 

> Hey guys! First time post -
>
> So, I have a page that has two buttons (among other things) - one is to
> create a new object, and one is to edit an already existing object.
>
> I have a customization panel that allows the user to change the object's
> name, and other data.
>
> When the user enters the page, I'd like the customization page to be
> non-visible. When the user selects the link to create a new object, I want
> to bring up the panel, passing in the parameter of a new object. If the
> user
> selects the link to edit an existing object, however, I want to bring up
> the
> same panel, but pass in the parameter of the existing object.
>
> The problem is, with Wicket I have to give it SOMETHING when the page first
> comes up, so I do the following:
>
> cPanel = new CPanel("cPanel", newObject);
> add(cPanel);
> cPanel.setOutputMarkupPlaceholderTag(true);
> cPanel.setVisible(false);
>
> And when they select the "Create New Object" button, its easy to just do
> the
> following in the link:
>
> cPanel.setVisible(true);
> target.add(cPanel, cPanel.getMarkupId());
>
> However, what the heck am I supposed to do when they click the button to
> edit an existing object? The panel has already been created, and when I do
> a
> replaceWith(), it doesn't like it (I think because the customization panel
> isn't visible yet when the user clicks the edit button)...
>
> Oh, and I should mention that I don't know which object they're going to
> edit until they click the edit button, so I don't have the object on page
> generation to just make an entirely different panel with that parameter,
> add
> both, set them both to invisible, and then change visibility as the need
> arises. I've pulled that one before!
>
> So basically, how do I switch an invisible panel with a different one (of
> the same type with a different parameter) before I bring up visibility?
>
> Sorry if this is a silly question! Any help would be great!
>
> Thanks!
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Adding-the-same-panel-with-different-parameters-tp4651967.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Wicket 6 + EJB

2012-09-24 Thread heapifyman
https://github.com/wicketstuff/core/wiki/Java-EE-Inject
allows injecting EJBs, etc. in wicket-6 applications.




2012/9/24 Michael Zhavzharov 

> Hello Everyone.
>
> I have a question about how to include EJB into my wicket web application.
> When I was looking for solution for this problem in google, I have found
> two
> ways to solve it:
> 1) Extend my Application class from org.jboss.weld.wicket.WeldApplication
> and then simply add @Inject annotation to my bean.
>
> or
>
> 2) Use
> getComponentInstantiationListeners().add((IComponentInstantiationListener)
> new JavaEEComponentInjector(this)); in init method in my Application class
> and then add @EJB annotation to my bean
>
> But libraries that I need to do this became depracated in this version of
> Wicket (v.6) and don't work at all.
>
> Can somebody give me an advice how to solve my problem?
>
> Thank's.
>
> Michael.
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Wicket-6-EJB-tp4652286.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Wicket with JPA and container managed transactions

2012-10-08 Thread heapifyman
As far as I understood you have two possibilities:
1. Inject your EJB into a CDI component and inject that component into your
wicket pages using @Inject annotation. That should solve the serialization
problem but you will have an additional "layer".
2. Use javaee-inject from wicketstuff [1] to inject your EJBs with @EJB
annotation into your wicket pages.

I've tried the second approach (though in JBoss, not glassfish) and so
far have had no problems with using both wicket-cdi and javaee-inject in
the same project. Maybe it's not so nice because you have to include two
dependencies and use two different kinds of annotations in your wicket
pages.

[1] https://github.com/wicketstuff/core/wiki/Java-EE-Inject


2012/10/8 Dieter Tremel 

> Moving from JSF to Wicket 6.1.0 I am used to having all JPA operations
> in a EJB facade to use the container's (Glassfish 3.2.1) transaction
> management. I use and know wicket-cdi for injection, which works fine.
>
> Unfortunately, if I inject an EJB in a wicket page, the serialization
> checks of wicket complain that it is not serializable. This is true for
> EJB, I suppose since they are proxied by
> EJBLocalObjectInvocationHandlerDelegate. Frustrated I have read the
> thread around http://markmail.org/message/4esc7m5subft5ngu
>
> My thinking is blocked at this point. If I can't use jpa with container
> managed transactions wicket how is the simpliest way do achieve it? All
> examples I googled and also these in the book "Wicket in Action" are
> only reading data or using Spring, what I do not want to do.
>
> Thank you for any hint
> Dieter Tremel
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Wicket and file upload with blueimp jquery file upload

2012-10-16 Thread heapifyman
Not sure if I understand.
As far as I got it, the upload plugin requires some "web service" that
accepts POST and DELETE requests to add/remove uploaded files.
Doing that is no problem, I guess.
But how to I link this with the current user's wicket session so that I
know which files the users uploaded when finally the form is submitted?
I'm not sure if I'm using the right wording here. Hope you get the idea...


2012/10/16 Martin Grigorov 

> Hi,
>
> Is it an option to upload to a IResource and store the uploaded data
> the same way as if you'd do in the page ?
>
> On Tue, Oct 16, 2012 at 12:49 PM, heapifyman  wrote:
> > Hello,
> >
> > has anyone tried yet to integrate blueimp's jQuery File Upload
> > http://blueimp.github.com/jQuery-File-Upload/ with Wicket FileUpload?
> > Especially in combination with additional input fields 
> > I'm kind of stuck because I'm not really sure where to point the jquery
> > file upload's url param to and how to store the uploaded files in the
> > wicket page for saving them when the complete form is submitted.
> >
> > Any help would be appreciated.
> > Thanks
>
>
>
> --
> 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
>
>


Re: Wicket and file upload with blueimp jquery file upload

2012-10-16 Thread heapifyman
Thanks.
Would you mind sharing the mounted resource's code? I'm not completely sure
how to implement that.


2012/10/16 Bas Gooren 

> Hi!
>
> We use a different uploader (uploadify), but the basics are the same.
>
> What we've built for this is a behavior which renders the UI for the
> uploader, and handles ajax callbacks.
>
> The uploader uploads to a mounted resource (e.g. at /uploadify), which has
> an internal cache (UUID => FileInfo).
> After a successful upload, the upload resource returns the UUID;
> The javascript onComplete handler then calls the ajax behavior with the
> UUID parameter, which allows other components in the page to respond to the
> upload.
>
> To prevent overflow in the uploader cache we use a map with a maximum size
> which evicts old entries on overflow.
>
> Met vriendelijke groet,
> Kind regards,
>
> Bas Gooren
>
> Op 16-10-2012 12:59, schreef heapifyman:
>
>  Not sure if I understand.
>> As far as I got it, the upload plugin requires some "web service" that
>> accepts POST and DELETE requests to add/remove uploaded files.
>> Doing that is no problem, I guess.
>> But how to I link this with the current user's wicket session so that I
>> know which files the users uploaded when finally the form is submitted?
>> I'm not sure if I'm using the right wording here. Hope you get the idea...
>>
>>
>> 2012/10/16 Martin Grigorov 
>>
>>  Hi,
>>>
>>> Is it an option to upload to a IResource and store the uploaded data
>>> the same way as if you'd do in the page ?
>>>
>>> On Tue, Oct 16, 2012 at 12:49 PM, heapifyman 
>>> wrote:
>>>
>>>> Hello,
>>>>
>>>> has anyone tried yet to integrate blueimp's jQuery File Upload
>>>> http://blueimp.github.com/**jQuery-File-Upload/<http://blueimp.github.com/jQuery-File-Upload/>with
>>>>  Wicket FileUpload?
>>>> Especially in combination with additional input fields >>> type=text">
>>>> I'm kind of stuck because I'm not really sure where to point the jquery
>>>> file upload's url param to and how to store the uploaded files in the
>>>> wicket page for saving them when the complete form is submitted.
>>>>
>>>> Any help would be appreciated.
>>>> Thanks
>>>>
>>>
>>>
>>> --
>>> Martin Grigorov
>>> jWeekend
>>> Training, Consulting, Development
>>> http://jWeekend.com
>>>
>>> --**--**
>>> -
>>> To unsubscribe, e-mail: 
>>> users-unsubscribe@wicket.**apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>>
>>>
>


Re: Wicket and file upload with blueimp jquery file upload

2012-10-24 Thread heapifyman
Thanks. That helped a lot.


2012/10/16 Bas Gooren 

> Behavior (wicket 1.5): http://pastebin.com/WUHsiRL2
> instance.js (to initialize uploadify): http://pastebin.com/jGSwzHMN
>
> Mount it in Application.init() with:
>
> // Allow uploads through uploadify
> mount( new UploadifyBehavior.Uploader( "/uploadify" ) );
>
> Use it like this:
>
> component.add( new UploadifyBehavior()
> {
>
> @Override
> protected void onUpload( UploadInfo info,
> AjaxRequestTarget target )
> {
> // Handle upload any way you like, and replace stuff
> in this ajax request
> }
>
> } );
>
>
> Met vriendelijke groet,
> Kind regards,
>
> Bas Gooren
>
> Op 16-10-2012 19:09, schreef heapifyman:
>
>> Thanks.
>> Would you mind sharing the mounted resource's code? I'm not completely
>> sure
>> how to implement that.
>>
>>
>> 2012/10/16 Bas Gooren 
>>
>>  Hi!
>>>
>>> We use a different uploader (uploadify), but the basics are the same.
>>>
>>> What we've built for this is a behavior which renders the UI for the
>>> uploader, and handles ajax callbacks.
>>>
>>> The uploader uploads to a mounted resource (e.g. at /uploadify), which
>>> has
>>> an internal cache (UUID => FileInfo).
>>> After a successful upload, the upload resource returns the UUID;
>>> The javascript onComplete handler then calls the ajax behavior with the
>>> UUID parameter, which allows other components in the page to respond to
>>> the
>>> upload.
>>>
>>> To prevent overflow in the uploader cache we use a map with a maximum
>>> size
>>> which evicts old entries on overflow.
>>>
>>> Met vriendelijke groet,
>>> Kind regards,
>>>
>>> Bas Gooren
>>>
>>> Op 16-10-2012 12:59, schreef heapifyman:
>>>
>>>   Not sure if I understand.
>>>
>>>> As far as I got it, the upload plugin requires some "web service" that
>>>> accepts POST and DELETE requests to add/remove uploaded files.
>>>> Doing that is no problem, I guess.
>>>> But how to I link this with the current user's wicket session so that I
>>>> know which files the users uploaded when finally the form is submitted?
>>>> I'm not sure if I'm using the right wording here. Hope you get the
>>>> idea...
>>>>
>>>>
>>>> 2012/10/16 Martin Grigorov 
>>>>
>>>>   Hi,
>>>>
>>>>> Is it an option to upload to a IResource and store the uploaded data
>>>>> the same way as if you'd do in the page ?
>>>>>
>>>>> On Tue, Oct 16, 2012 at 12:49 PM, heapifyman 
>>>>> wrote:
>>>>>
>>>>>  Hello,
>>>>>>
>>>>>> has anyone tried yet to integrate blueimp's jQuery File Upload
>>>>>> http://blueimp.github.com/jQuery-File-Upload/<http://blueimp.github.com/**jQuery-File-Upload/>
>>>>>> <http://**blueimp.github.com/jQuery-**File-Upload/<http://blueimp.github.com/jQuery-File-Upload/>>with
>>>>>> Wicket FileUpload?
>>>>>>
>>>>>> Especially in combination with additional input fields >>>>> type=text">
>>>>>> I'm kind of stuck because I'm not really sure where to point the
>>>>>> jquery
>>>>>> file upload's url param to and how to store the uploaded files in the
>>>>>> wicket page for saving them when the complete form is submitted.
>>>>>>
>>>>>> Any help would be appreciated.
>>>>>> Thanks
>>>>>>
>>>>>>
>>>>> --
>>>>> Martin Grigorov
>>>>> jWeekend
>>>>> Training, Consulting, Development
>>>>> http://jWeekend.com
>>>>>
>>>>> --**--**
>>>>> -
>>>>> To unsubscribe, e-mail: 
>>>>> users-unsubscribe@wicket.**apa**che.org<http://apache.org>
>>>>> 
>>>>> >
>>>>>
>>>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>>>
>>>>>
>>>>>
>>>>>
>


Wicket 6.2.0 and MultipartServletWebRequestImpl

2012-10-31 Thread heapifyman
Hello,

Just updated from 6.1.1 to 6.2.0 and now I'm having a problem with file
uploads.
I have a
  public class FileUploadRequestHandler implements IRequestHandler
that handles jquery fileupload requests.

In its respond() method I call
  Request request = requestCycle.getRequest();
which in wicket 6.1.1 would give me a MultipartServletWebRequestImpl with
parameters and postparameters filled and, of course, the files to upload.

In 6.2.0 I only get a ServletWebRequest and the postparameters are empty.

I guess this is due to WICKET-4752 but I am at a complete loss how to get
back the old behavior.

Any hints would be appreciated.
Thanks


Re: Wicket 6.2.0 and MultipartServletWebRequestImpl

2012-10-31 Thread heapifyman
Sorry, could you elaborate a bit on that? I don't see the connection... :(


2012/10/31 Martin Grigorov 

>
> https://git-wip-us.apache.org/repos/asf/wicket/repo?p=wicket.git;a=commitdiff;h=3355b5af68a238855a602f5161980d65024a1e92
>
> On Wed, Oct 31, 2012 at 12:49 PM, heapifyman  wrote:
> > Hello,
> >
> > Just updated from 6.1.1 to 6.2.0 and now I'm having a problem with file
> > uploads.
> > I have a
> >   public class FileUploadRequestHandler implements IRequestHandler
> > that handles jquery fileupload requests.
> >
> > In its respond() method I call
> >   Request request = requestCycle.getRequest();
> > which in wicket 6.1.1 would give me a MultipartServletWebRequestImpl with
> > parameters and postparameters filled and, of course, the files to upload.
> >
> > In 6.2.0 I only get a ServletWebRequest and the postparameters are empty.
> >
> > I guess this is due to WICKET-4752 but I am at a complete loss how to get
> > back the old behavior.
> >
> > Any hints would be appreciated.
> > Thanks
>
>
>
> --
> 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
>
>


Re: Wicket 6.2.0 and MultipartServletWebRequestImpl

2012-10-31 Thread heapifyman
Hello,
after a second closer look I figured I should override newWebRequest in
my WicketApplication extends WebApplication, right?
So now I have:
@Override
public WebRequest newWebRequest(HttpServletRequest servletRequest,
String filterPath) {
WebRequest webRequest = super.newWebRequest(servletRequest, filterPath);

String contentType = servletRequest.getContentType();
String method = servletRequest.getMethod();
if (webRequest instanceof ServletWebRequest
&& Form.METHOD_POST.equalsIgnoreCase(method)
&& Strings.isEmpty(contentType) == false
&& contentType.toLowerCase().startsWith(
Form.ENCTYPE_MULTIPART_FORM_DATA)) {
try {
return ((ServletWebRequest) webRequest).newMultipartWebRequest(
getApplicationSettings().getDefaultMaximumUploadSize(),
"externalForm");
} catch (FileUploadException e) {
throw new RuntimeException(e);

}
}

return webRequest;
}

That seems to work. Am I still missing something?
Thanks


2012/10/31 Andrea Del Bene 

> Hi,
>
> the change introduced by WICKET-4752 caused some other problems so it was
> reverted in 6.2.0. If you want to obtain the old behavior you should use in
> our application class  the code that has been removed from WebApplication
> class (see the diff indicated by Martin)
>
>  Sorry, could you elaborate a bit on that? I don't see the connection... :(
>>
>>
>> 2012/10/31 Martin Grigorov 
>>
>>  https://git-wip-us.apache.org/**repos/asf/wicket/repo?p=**
>>> wicket.git;a=commitdiff;h=**3355b5af68a238855a602f5161980d**65024a1e92<https://git-wip-us.apache.org/repos/asf/wicket/repo?p=wicket.git;a=commitdiff;h=3355b5af68a238855a602f5161980d65024a1e92>
>>>
>>> On Wed, Oct 31, 2012 at 12:49 PM, heapifyman 
>>> wrote:
>>>
>>>> Hello,
>>>>
>>>> Just updated from 6.1.1 to 6.2.0 and now I'm having a problem with file
>>>> uploads.
>>>> I have a
>>>>public class FileUploadRequestHandler implements IRequestHandler
>>>> that handles jquery fileupload requests.
>>>>
>>>> In its respond() method I call
>>>>Request request = requestCycle.getRequest();
>>>> which in wicket 6.1.1 would give me a MultipartServletWebRequestImpl
>>>> with
>>>> parameters and postparameters filled and, of course, the files to
>>>> upload.
>>>>
>>>> In 6.2.0 I only get a ServletWebRequest and the postparameters are
>>>> empty.
>>>>
>>>> I guess this is due to WICKET-4752 but I am at a complete loss how to
>>>> get
>>>> back the old behavior.
>>>>
>>>> Any hints would be appreciated.
>>>> Thanks
>>>>
>>>
>>>
>>> --
>>> Martin Grigorov
>>> jWeekend
>>> Training, Consulting, Development
>>> http://jWeekend.com
>>>
>>> --**--**
>>> -
>>> To unsubscribe, e-mail: 
>>> users-unsubscribe@wicket.**apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>>
>>>
>
> --**--**-
> To unsubscribe, e-mail: 
> users-unsubscribe@wicket.**apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Wicket 6.2.0 and MultipartServletWebRequestImpl

2012-10-31 Thread heapifyman
Ok, now I am kind of lost again. Sorry for the stupid question:
Before I had
- in WicketApplication: mount(new FileUploader("/fileupload"));
- where FileUploader extends AbstractMapper and calls "return new
FileUploadRequestHandler();" in mapRequest(Request request)
- FileUploadRequestHandler implements IRequestHandler and handles both POST
and GET requests for file up- and download respectively

Where does the IResource impl. fit int there? Is there an example somewhere
or where would I find some documentation to read up on this topic?
Thanks again.


2012/10/31 Martin Grigorov 

> Hi,
>
> As Andrea explained (and the ticket you mentioned yourself) the change
> in MyApp#newWebRequest caused several problems, so better do not do it
> there.
> Move the code that creates the MultipartWebRequest in your own IResource
> impl.
>
> On Wed, Oct 31, 2012 at 1:55 PM, heapifyman  wrote:
> > Hello,
> > after a second closer look I figured I should override newWebRequest in
> > my WicketApplication extends WebApplication, right?
> > So now I have:
> > @Override
> > public WebRequest newWebRequest(HttpServletRequest servletRequest,
> > String filterPath) {
> > WebRequest webRequest = super.newWebRequest(servletRequest, filterPath);
> >
> > String contentType = servletRequest.getContentType();
> > String method = servletRequest.getMethod();
> > if (webRequest instanceof ServletWebRequest
> > && Form.METHOD_POST.equalsIgnoreCase(method)
> > && Strings.isEmpty(contentType) == false
> > && contentType.toLowerCase().startsWith(
> > Form.ENCTYPE_MULTIPART_FORM_DATA)) {
> > try {
> > return ((ServletWebRequest) webRequest).newMultipartWebRequest(
> > getApplicationSettings().getDefaultMaximumUploadSize(),
> > "externalForm");
> > } catch (FileUploadException e) {
> > throw new RuntimeException(e);
> >
> > }
> > }
> >
> > return webRequest;
> > }
> >
> > That seems to work. Am I still missing something?
> > Thanks
> >
> >
> > 2012/10/31 Andrea Del Bene 
> >
> >> Hi,
> >>
> >> the change introduced by WICKET-4752 caused some other problems so it
> was
> >> reverted in 6.2.0. If you want to obtain the old behavior you should
> use in
> >> our application class  the code that has been removed from
> WebApplication
> >> class (see the diff indicated by Martin)
> >>
> >>  Sorry, could you elaborate a bit on that? I don't see the
> connection... :(
> >>>
> >>>
> >>> 2012/10/31 Martin Grigorov 
> >>>
> >>>  https://git-wip-us.apache.org/**repos/asf/wicket/repo?p=**
> >>>>
> wicket.git;a=commitdiff;h=**3355b5af68a238855a602f5161980d**65024a1e92<
> https://git-wip-us.apache.org/repos/asf/wicket/repo?p=wicket.git;a=commitdiff;h=3355b5af68a238855a602f5161980d65024a1e92
> >
> >>>>
> >>>> On Wed, Oct 31, 2012 at 12:49 PM, heapifyman 
> >>>> wrote:
> >>>>
> >>>>> Hello,
> >>>>>
> >>>>> Just updated from 6.1.1 to 6.2.0 and now I'm having a problem with
> file
> >>>>> uploads.
> >>>>> I have a
> >>>>>public class FileUploadRequestHandler implements IRequestHandler
> >>>>> that handles jquery fileupload requests.
> >>>>>
> >>>>> In its respond() method I call
> >>>>>Request request = requestCycle.getRequest();
> >>>>> which in wicket 6.1.1 would give me a MultipartServletWebRequestImpl
> >>>>> with
> >>>>> parameters and postparameters filled and, of course, the files to
> >>>>> upload.
> >>>>>
> >>>>> In 6.2.0 I only get a ServletWebRequest and the postparameters are
> >>>>> empty.
> >>>>>
> >>>>> I guess this is due to WICKET-4752 but I am at a complete loss how to
> >>>>> get
> >>>>> back the old behavior.
> >>>>>
> >>>>> Any hints would be appreciated.
> >>>>> Thanks
> >>>>>
> >>>>
> >>>>
> >>>> --
> >>>> Martin Grigorov
> >>>> jWeekend
> >>>> Training, Consulting, Development
> >>>> http://jWeekend.com
> >>>>
> >>>> --**--**
> >>>> -
> >>>> To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.org<
> users-unsubscr...@wicket.apache.org>
> >>>> For additional commands, e-mail: users-h...@wicket.apache.org
> >>>>
> >>>>
> >>>>
> >>
> >>
> --**--**-
> >> To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.org<
> 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
>
>


Re: Wicket 6.2.0 and MultipartServletWebRequestImpl

2012-11-01 Thread heapifyman
Ok, got it. Thanks a lot.


2012/11/1 Martin Grigorov 

> Hi,
>
> The idea is to create MultipartWebRequest before trying to read
> multi-part data from the servlet input stream.
> So in your case you have to do this in your own FileUploadRequestHandler.
>
> On Wed, Oct 31, 2012 at 6:14 PM, heapifyman  wrote:
> > Ok, now I am kind of lost again. Sorry for the stupid question:
> > Before I had
> > - in WicketApplication: mount(new FileUploader("/fileupload"));
> > - where FileUploader extends AbstractMapper and calls "return new
> > FileUploadRequestHandler();" in mapRequest(Request request)
> > - FileUploadRequestHandler implements IRequestHandler and handles both
> POST
> > and GET requests for file up- and download respective
> >
> > Where does the IResource impl. fit int there? Is there an example
> somewhere
> > or where would I find some documentation to read up on this topic?
> > Thanks again.
> >
> >
> > 2012/10/31 Martin Grigorov 
> >
> >> Hi,
> >>
> >> As Andrea explained (and the ticket you mentioned yourself) the change
> >> in MyApp#newWebRequest caused several problems, so better do not do it
> >> there.
> >> Move the code that creates the MultipartWebRequest in your own IResource
> >> impl.
> >>
> >> On Wed, Oct 31, 2012 at 1:55 PM, heapifyman 
> wrote:
> >> > Hello,
> >> > after a second closer look I figured I should override newWebRequest
> in
> >> > my WicketApplication extends WebApplication, right?
> >> > So now I have:
> >> > @Override
> >> > public WebRequest newWebRequest(HttpServletRequest servletRequest,
> >> > String filterPath) {
> >> > WebRequest webRequest = super.newWebRequest(servletRequest,
> filterPath);
> >> >
> >> > String contentType = servletRequest.getContentType();
> >> > String method = servletRequest.getMethod();
> >> > if (webRequest instanceof ServletWebRequest
> >> > && Form.METHOD_POST.equalsIgnoreCase(method)
> >> > && Strings.isEmpty(contentType) == false
> >> > && contentType.toLowerCase().startsWith(
> >> > Form.ENCTYPE_MULTIPART_FORM_DATA)) {
> >> > try {
> >> > return ((ServletWebRequest) webRequest).newMultipartWebRequest(
> >> > getApplicationSettings().getDefaultMaximumUploadSize(),
> >> > "externalForm");
> >> > } catch (FileUploadException e) {
> >> > throw new RuntimeException(e);
> >> >
> >> > }
> >> > }
> >> >
> >> > return webRequest;
> >> > }
> >> >
> >> > That seems to work. Am I still missing something?
> >> > Thanks
> >> >
> >> >
> >> > 2012/10/31 Andrea Del Bene 
> >> >
> >> >> Hi,
> >> >>
> >> >> the change introduced by WICKET-4752 caused some other problems so it
> >> was
> >> >> reverted in 6.2.0. If you want to obtain the old behavior you should
> >> use in
> >> >> our application class  the code that has been removed from
> >> WebApplication
> >> >> class (see the diff indicated by Martin)
> >> >>
> >> >>  Sorry, could you elaborate a bit on that? I don't see the
> >> connection... :(
> >> >>>
> >> >>>
> >> >>> 2012/10/31 Martin Grigorov 
> >> >>>
> >> >>>  https://git-wip-us.apache.org/**repos/asf/wicket/repo?p=**
> >> >>>>
> >> wicket.git;a=commitdiff;h=**3355b5af68a238855a602f5161980d**65024a1e92<
> >>
> https://git-wip-us.apache.org/repos/asf/wicket/repo?p=wicket.git;a=commitdiff;h=3355b5af68a238855a602f5161980d65024a1e92
> >> >
> >> >>>>
> >> >>>> On Wed, Oct 31, 2012 at 12:49 PM, heapifyman  >
> >> >>>> wrote:
> >> >>>>
> >> >>>>> Hello,
> >> >>>>>
> >> >>>>> Just updated from 6.1.1 to 6.2.0 and now I'm having a problem with
> >> file
> >> >>>>> uploads.
> >> >>>>> I have a
> >> >>>>>public class FileUploadRequestHandler implements
> IRequestHandler
> >> >>>>> that handles jquery fileupload requests.
> >> >>>>>
> >> >>>>> In its respond

Re: wicket-bootstrap navbar - SEARCH button

2012-11-15 Thread heapifyman
As far as I know, wicket-bootstrap's Navbar currently does not support
adding a search form out of the box because you can only add buttons/links
to the Navbar.
I have been advised to override Navbar and adapt the html markup according
to my needs, which was pretty easy to do and works just fine.



2012/11/15 

> Hi
>
> I was as mentioned looking at demo, which includes a search.
> If wicket-bootstrap support such? I could not find?
>
> Regards
> Ronny
>
> -Original Message-
> From: Michael Haitz [mailto:michael.ha...@1und1.de]
> Sent: 14 November 2012 21:08
> To: users@wicket.apache.org
> Subject: Re: wicket-bootstrap navbar - SEARCH button
>
> hi,
>
> do you want to use wicket-bootstrap or do you want to implement it by
> yourself?
>
> best,
> Michael
>
> Am 23.10.2012 um 13:45 schrieb ronny.v...@consult.nordea.com:
>
> > Hi There
> >
> > Any with a quick answer on how to implement a search like in:
> > http://wb.agilecoders.de/demo/components?1#navbar
> >
> > Ending up in some markup like: mailto:ronny.v...@consult.nordea.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 handle failing calls to external systems within a Component without resorting to an error page?

2012-12-13 Thread heapifyman
Maybe an AjaxLazyLoadPanel could help?
I think you could catch service exceptions in getLazyLoadComponent() and
return an error panel instead of the real one.


2012/12/13 Stefan Renz 

> Hi,
>
> my searches didn't turn up anything, so I figured I ask on the mailing
> list:
>
> Consider the following scenario: a Page contains a number of Panels, one
> of which displays data retrieved by a web service, typically by means of
> LoadableDetachableModel or IDataProvider.
>
> In my case, the WebService used is a Hessian-Endpoint, which is
> conveniently available to the caller as a Proxy of an Interface. Such an
> interface doesn't expose any transport layer exceptions; rather, the
> Proxy takes care of converting any underlying IOException, such as
> ConnectException, into a RuntimeException.
>
> I would like to exchange the Panel with an error message panel saying
> that the service is not available rather than showing an entire error
> page (which is something we do for other kind of exceptions, thanks to
> the fabulous Wicket framework).
>
> How could I achieve something like that? Something like this can happen
> during rendering time, not necessarily in onInitialize(), where I could
> do an alive check and exchange the panel.
>
> Where should I look? What would be your suggestions? Should I come up
> with a Quickstart as an executable example (without the service -- just
> any Exception from within a LoadableDetachableModel#load() will do nicely)?
>
> Thanks in advance,
> bye
> Stefan
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: [ANNOUNCE] Apache Wicket 6.4.0 released

2013-01-03 Thread heapifyman
Hello,

I've been using net.ftlines.wicket-bean-validation for a while now and I
suppose that the new experimantal org.apache.wicket.wicket-bean-validation
is based on the ftlines version and will eventually replace it (at least
for wicket 6 and above)?
Can I just replace the ftlines version with the new one or are there any
incompatibilities (except from the obvious difference in package names)?

Thanks in advance



2012/12/18 Martijn Dashorst 

> The Apache Wicket PMC is proud to announce Apache Wicket 6.4.0!
>
> This release marks the fourth minor release of Wicket 6. Starting
> with Wicket 6 we use semantic versioning for the future development of
> Wicket, and as such no API breaks are present in this release compared
> to 6.0.0.
>
> New and noteworthy
> ===
>
> JQuery was upgraded to 1.8.3, bootstrap to 2.2.2.
>
> JSR 303 BeanValidation support
> --
>
> Native support for BeanValidation (JSR 303) was added as an
> experimental module and released as version 0.5. You can grab it
> by using these maven coordinates:
>
> org.apache.wicket:wicket-bean-validation:0.5:jar
>
> or by pasting in the pom snippet below:
>
> 
> org.apache.wicket
> wicket-bean-validation
> 0.5
> 
>
> Note that this is an experimental module and that it is not released
> under the semantic versioning rules. Use at your own risk.
>
> Hierarchical feedback panel
> ---
>
> A new kind of feedback panel was introduced: a hierarchical feedback
> panel. A specialized feedback panel that only displays messages from
> inside a fence defined by a container component. Instances will not
> show messages coming from inside a nested fence, allowing the nesting
> of these panels to work correctly without displaying the same
> feedback message twice. A constructor that does not takes a fencing
> component creates a catch-all panel that shows messages that do not
> come from inside any fence or from the Session.
>
> For more information see:
>
> http://s.apache.org/wicket-FencedFeedbackPanel
>
> For the full changelog see the release notes attached to the end of
> this announcement.
>
> Using this release
> =
>
> With Apache Maven update your dependency to (and don't forget to
> update any other dependencies on Wicket projects to the same version):
>
> 
> org.apache.wicket
> wicket-core
> 6.4.0
> 
>
> Or download and build the distribution yourself, or use our
> convenience binary package
>
>  * Source: http://www.apache.org/dyn/closer.cgi/wicket/6.4.0
>  * Binary: http://www.apache.org/dyn/closer.cgi/wicket/6.4.0/binaries
>
> Upgrading from earlier versions
> ===
>
> If you upgrade from 6.0.0, 6.1.0, 6.2.0 or 6.3.0 this release is a drop in
> replacement. If you come from a version prior to 6.0.0, please
> read our Wicket 6 migration guide found at
>
> http://s.apache.org/wicket-6.0-migration
>
> Have fun!
>
> — The Wicket team
>
> ==
>
> Release Notes - Wicket - Version 6.4.0
>
> ** Sub-task
> * [WICKET-4880] - Make it possible to override the Ajax behavior
> of AjaxSubmitLink and AjaxButton
>
> ** Bug
> * [WICKET-4869] - Wicket-Atmosphere track message length
> * [WICKET-4872] - IllegalArgumentException on
> ReloadingWicketFilter and inheritance markup
> * [WICKET-4877] - encodeUrl fails parsing jsessionid when using root
> context
> * [WICKET-4878] - Rendering of feedback messages fails with DebugBar
> in page
> * [WICKET-4881] - IE 8 : error when handling Wicket Ajax Response
> * [WICKET-4884] - ValidationError messages for NumberTextFields
> with minimum/maximum are always English
> * [WICKET-4886] - Do not register Ajax timer if the component is
> removed
> * [WICKET-4890] - Bad validation messages after WICKET-2128
> * [WICKET-4891] - UrlRenderer.renderRelativeUrl misbehavior if the
> filterPath is composed.
> * [WICKET-4894] - Internet Explorer fails fails to properly
> include conditional stylesheet links added via AjaxRequestTarget
> * [WICKET-4895] - WicketRuntimeException: addOrReplace for
> feedback panel does not clear Component.FEEDBACK_LIST - feedback from
> replaced component causes error.
> * [WICKET-4899] - autocomplete shows strings with quotes strings
> as string2 with "quote"
> * [WICKET-4900] - Setting a status code on an AbstractResource
> results in no HTTP body
> * [WICKET-4908] - Wrong charset or screwed up characters in
> Norwegian properties-file
> * [WICKET-4911] - Palette Ajax update does not work
> * [WICKET-4913] - HtmlDocumentParser does not support tags
> containing number (e.g. h1-h6)
> * [WICKET-4915] - org.apache.wicket.util.resource.Patht#find fails
> on Windows
> * [WICKET-4916] - AbstractTree$TreeItem renderHead does not call
> renderHead for child TreeItems.
> * [WICKET-4917] - Websockets are not working if URL has a hash in it
> 

Re: [ANNOUNCE] Apache Wicket 6.4.0 released

2013-01-03 Thread heapifyman
Thanks for clarifying.
I tested a bit with the new bean-validation module and so far everything
seems to be working.


2013/1/3 Igor Vaynberg 

> there are some incompatibilities. ive optimized some code to make it
> faster and remove some other code that i do not thing belongs.
>
> so, no, it is not a drop in replacement
> and, yes, this code deprecates the net.ftlines code for wicket 6+
>
> -igor
>
> On Thu, Jan 3, 2013 at 3:44 AM, heapifyman  wrote:
> > Hello,
> >
> > I've been using net.ftlines.wicket-bean-validation for a while now and I
> > suppose that the new experimantal
> org.apache.wicket.wicket-bean-validation
> > is based on the ftlines version and will eventually replace it (at least
> > for wicket 6 and above)?
> > Can I just replace the ftlines version with the new one or are there any
> > incompatibilities (except from the obvious difference in package names)?
> >
> > Thanks in advance
> >
> >
> >
> > 2012/12/18 Martijn Dashorst 
> >
> >> The Apache Wicket PMC is proud to announce Apache Wicket 6.4.0!
> >>
> >> This release marks the fourth minor release of Wicket 6. Starting
> >> with Wicket 6 we use semantic versioning for the future development of
> >> Wicket, and as such no API breaks are present in this release compared
> >> to 6.0.0.
> >>
> >> New and noteworthy
> >> ===
> >>
> >> JQuery was upgraded to 1.8.3, bootstrap to 2.2.2.
> >>
> >> JSR 303 BeanValidation support
> >> --
> >>
> >> Native support for BeanValidation (JSR 303) was added as an
> >> experimental module and released as version 0.5. You can grab it
> >> by using these maven coordinates:
> >>
> >> org.apache.wicket:wicket-bean-validation:0.5:jar
> >>
> >> or by pasting in the pom snippet below:
> >>
> >> 
> >> org.apache.wicket
> >> wicket-bean-validation
> >> 0.5
> >> 
> >>
> >> Note that this is an experimental module and that it is not released
> >> under the semantic versioning rules. Use at your own risk.
> >>
> >> Hierarchical feedback panel
> >> ---
> >>
> >> A new kind of feedback panel was introduced: a hierarchical feedback
> >> panel. A specialized feedback panel that only displays messages from
> >> inside a fence defined by a container component. Instances will not
> >> show messages coming from inside a nested fence, allowing the nesting
> >> of these panels to work correctly without displaying the same
> >> feedback message twice. A constructor that does not takes a fencing
> >> component creates a catch-all panel that shows messages that do not
> >> come from inside any fence or from the Session.
> >>
> >> For more information see:
> >>
> >> http://s.apache.org/wicket-FencedFeedbackPanel
> >>
> >> For the full changelog see the release notes attached to the end of
> >> this announcement.
> >>
> >> Using this release
> >> =
> >>
> >> With Apache Maven update your dependency to (and don't forget to
> >> update any other dependencies on Wicket projects to the same version):
> >>
> >> 
> >> org.apache.wicket
> >> wicket-core
> >> 6.4.0
> >> 
> >>
> >> Or download and build the distribution yourself, or use our
> >> convenience binary package
> >>
> >>  * Source: http://www.apache.org/dyn/closer.cgi/wicket/6.4.0
> >>  * Binary: http://www.apache.org/dyn/closer.cgi/wicket/6.4.0/binaries
> >>
> >> Upgrading from earlier versions
> >> ===
> >>
> >> If you upgrade from 6.0.0, 6.1.0, 6.2.0 or 6.3.0 this release is a drop
> in
> >> replacement. If you come from a version prior to 6.0.0, please
> >> read our Wicket 6 migration guide found at
> >>
> >> http://s.apache.org/wicket-6.0-migration
> >>
> >> Have fun!
> >>
> >> — The Wicket team
> >>
> >> ==
> >>
> >> Release Notes - Wicket - Version 6.4.0
> >>
> >> ** Sub-task
> >> * [WICKET-4880] - Make it possible to override the Ajax behavior
> >> of AjaxSubmitLink and AjaxButton
> >>
> >> ** Bug
> >>

BeanValidation - IllegalStateException: Could not resolve Property from component

2013-01-04 Thread heapifyman
Hello,

I switched from using net.ftlines.wicket-bean-validation to
org.apache.wicket.wicket-bean-validation and now I get the exception
mentioned in the subject when using a Form with CompoundPropertyModel.(see
stack trace at the end of the message).

My code looks like this:
Form form = new Form("form", new
CompoundPropertyModel(newUser))
TextField emailTextField = new TextField("email");
form.add(new BeanValidationBorder("emailValidationBorder",
emailTextField));

If I pass a PropertyModel to the emailTextField constructor it will work
(as explained in the doc).
However, I thought, the CompoundPropertyModel's idea was to avoid this
extra code?

Does bean-validation not work with CompoundPropertyModel or is there
anything I have to explicitly configure/implement?

Thanks in advance.


Re: BeanValidation - IllegalStateException: Could not resolve Property from component

2013-01-07 Thread heapifyman
The PropertyValidator is added in the BeanValidationBorder. Unfortunately,
I don't know what property the FormComponent is for, when
BeanValidationBorder is created.
So I guess, I have to get rid of CompoundPropertyModel and pass PropertyModels
to my FormComponents' constructors.

Interestingly, the CompoundPropertyModel way was working in the net.ftlines
version of wicket-bean-validation.



2013/1/6 martin.dilger 

> Your Code does not show where the PropertyValidator is added.
> If you work with CompoundPropertyModels, you need to explicitely configure
> the Property, since no Model is available to retrieve the Information.
>
> Wicket expects a Model of Type IPropertyReflectionAwareModel to work.
>
> Just do the following (Dummy Code)
>
> ...add(new PropertyValidator(new
> Property(.class,"";
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/BeanValidation-IllegalStateException-Could-not-resolve-Property-from-component-tp4655159p4655170.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: wicket via websocket

2010-11-22 Thread heapifyman
wicket plus atmosphere framework might also be a possibility. one tutorial here:
http://jfarcand.wordpress.com/2010/10/07/writing-websocket-application-using-apache-wicket/


On Sun, Nov 21, 2010 at 5:05 PM, kamiseq  wrote:
> ok, thanks, I will try that
>
> pozdrawiam
> Paweł Kamiński
>
> kami...@gmail.com
> pkaminski@gmail.com
> __
>

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



CheckGroupSelector - set checked if all Checkboxes are already selected

2011-05-12 Thread heapifyman

Hello,

I have a CheckGroup and the CheckGroupSelector. Everythings working fine
so far except for one thing. If I check all checkboxes in the group
(manually or through checking the CheckGroupSelector), save this to a
database and reload the page, the individual checkboxes are correctly
displayed as checked but the CheckGroupSelector is not, i.e.I have to
click the CheckGroupSelector twice to uncheck all the individual checkboxes.
So how do I let the CheckGroupSelector reflect the current state of the
individual checkboxes when the page is loaded?

Thanks for any hints



signature.asc
Description: OpenPGP digital signature


Re: CheckGroupSelector - set checked if all Checkboxes are already selected

2011-05-12 Thread heapifyman
Am 12.05.2011 15:17, schrieb Martin Grigorov:
> It looks like CheckGroupSelector doesn't support that right now.
> Please file a ticket.
> Attaching a quickstart will make it easier for us and it will be improved
> sooner.

in the meantime I found a "solution":

if (selected.size() == all.size()) {
checkGroupSelector.add(new SimpleAttributeModifier("checked",
"checked"));
}

where "selected" is the collection passed to the CheckGroup and "all" is
the collection passed to the ListView populating the individual checkboxes.

Do you guys still think there's need for a ticket? Maybe this should at
least be added to the documentation for the CheckGroup?

> On Thu, May 12, 2011 at 1:44 PM, heapifyman  wrote:
>
>> Hello,
>>
>> I have a CheckGroup and the CheckGroupSelector. Everythings working fine
>> so far except for one thing. If I check all checkboxes in the group
>> (manually or through checking the CheckGroupSelector), save this to a
>> database and reload the page, the individual checkboxes are correctly
>> displayed as checked but the CheckGroupSelector is not, i.e.I have to
>> click the CheckGroupSelector twice to uncheck all the individual
>> checkboxes.
>> So how do I let the CheckGroupSelector reflect the current state of the
>> individual checkboxes when the page is loaded?
>>
>> Thanks for any hints
>>
>>
>




signature.asc
Description: OpenPGP digital signature


Re: CheckGroupSelector - set checked if all Checkboxes are already selected

2011-05-13 Thread heapifyman
Am 12.05.2011 15:41, schrieb Martin Grigorov:
> I am not sure whether you solution actually works.
> I think they will be always the same.

it is working fine for me here.

> On Thu, May 12, 2011 at 3:35 PM, heapifyman  wrote:
>
>> Am 12.05.2011 15:17, schrieb Martin Grigorov:
>>> It looks like CheckGroupSelector doesn't support that right now.
>>> Please file a ticket.
>>> Attaching a quickstart will make it easier for us and it will be improved
>>> sooner.
>> in the meantime I found a "solution":
>>
>> if (selected.size() == all.size()) {
>>checkGroupSelector.add(new SimpleAttributeModifier("checked",
>> "checked"));
>> }
>>
>> where "selected" is the collection passed to the CheckGroup and "all" is
>> the collection passed to the ListView populating the individual checkboxes.
>>
>> Do you guys still think there's need for a ticket? Maybe this should at
>> least be added to the documentation for the CheckGroup?
>>
>>> On Thu, May 12, 2011 at 1:44 PM, heapifyman 
>> wrote:
>>>> Hello,
>>>>
>>>> I have a CheckGroup and the CheckGroupSelector. Everythings working fine
>>>> so far except for one thing. If I check all checkboxes in the group
>>>> (manually or through checking the CheckGroupSelector), save this to a
>>>> database and reload the page, the individual checkboxes are correctly
>>>> displayed as checked but the CheckGroupSelector is not, i.e.I have to
>>>> click the CheckGroupSelector twice to uncheck all the individual
>>>> checkboxes.
>>>> So how do I let the CheckGroupSelector reflect the current state of the
>>>> individual checkboxes when the page is loaded?
>>>>
>>>> Thanks for any hints
>>>>
>>>>
>>
>>
>




signature.asc
Description: OpenPGP digital signature


Re: get rid of LazyLoadException

2013-02-24 Thread heapifyman

I found this blog post (and the rest of the series) very helpful:
https://www.42lines.net/2011/11/21/adding-jpahibernate-into-the-cdi-and-wicket-mix/

Or maybe try to use an EXTENDED EntityManager in your project to keep entities 
managed and get rid of LazyLoadException.


Am 23.02.2013 um 19:22 schrieb Cedric Gatay :

> I think you need to carefully understand how the Hibernate Session works.
> This exception usually occurs when you try to access an object that has not
> been loaded from your database in your components but the session is
> already closed.
> 
> Regards,
> 
> __
> Cedric Gatay
> http://www.bloggure.info | http://cedric.gatay.fr |
> @Cedric_Gatay
> 
> 
> On Sat, Feb 23, 2013 at 5:48 PM, Evgheni Emelianov wrote:
> 
>> Hi there, i am looking for a got way to get rid of my LazyLoadException in
>> my Project, I'm using javaee 6 with hibernate 4.1.1 and
>> wicketstuff-javaee-inject and don't know which is the best way to solve it?
>> some good links or examples would help.
>> 
>> 
>> Evgheni
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>> 
>> 



Re: How to add Java Script Confirmation dialog to dropdown choice

2013-02-25 Thread heapifyman
mydropdownComponent.add(new AjaxFormComponentUpdatingBehavior("change") {
  @Override
  protected void onUpdate(AjaxRequestTarget target) {
target.appendJavaScript("your javascript...");
  }
});


2013/2/25 Ernesto Reinaldo Barreiro 

> Can you just register your "behavior" to on change? Something like:
>
> MyPanel extends Panel {
>
>
> public void renderHead(IHeaderResponse reponse) {
>
>
>
> reponse.render(OnDomReadyHeaderItem.forScript("jQuery('#mydropdown').on('change',
> function(){//what ever you want to do});"));
>
> }
>
> }
>
> On Mon, Feb 25, 2013 at 11:44 AM, venkat  wrote:
>
> > Hi ,
> >
> > I have a requirement, where when user selects a particular option from
> > dropdown, I need to show Java Script Confirmation dialog.  Is there any
> way
> > in Wicket to add javaScript behaviour to dropdown choice.
> >
> > Have used JavaScriptConfirmation to submit buttons in other areas and is
> > working fine,however am not sure how to add this behavior to
> dropdownchoice
> > events?
> >
> > I would appreciate quick response.
> >
> > Thanks
> > Venkat
> >
> >
> >
> > --
> > View this message in context:
> >
> http://apache-wicket.1842946.n4.nabble.com/How-to-add-Java-Script-Confirmation-dialog-to-dropdown-choice-tp4656755.html
> > Sent from the Users forum mailing list archive at Nabble.com.
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
>
>
> --
> Regards - Ernesto Reinaldo Barreiro
> Antilia Soft
> http://antiliasoft.com/ 
>


Re: How to add Java Script Confirmation dialog to dropdown choice

2013-02-25 Thread heapifyman
Care to share this precondition handling?


2013/2/25 Martin Grigorov 

> Hi,
>
>
> On Mon, Feb 25, 2013 at 1:35 PM, heapifyman  wrote:
>
> > mydropdownComponent.add(new AjaxFormComponentUpdatingBehavior("change") {
> >   @Override
> >   protected void onUpdate(AjaxRequestTarget target) {
> > target.appendJavaScript("your javascript...");
> >   }
> > });
> >
> >
> In our project we have a ClientSideEventBehavior. It is a AjaxEventBehavior
> with a precondition that always stops the Ajax call.
>
>
> >
> > 2013/2/25 Ernesto Reinaldo Barreiro 
> >
> > > Can you just register your "behavior" to on change? Something like:
> > >
> > > MyPanel extends Panel {
> > >
> > >
> > > public void renderHead(IHeaderResponse reponse) {
> > >
> > >
> > >
> > >
> >
> reponse.render(OnDomReadyHeaderItem.forScript("jQuery('#mydropdown').on('change',
> > > function(){//what ever you want to do});"));
> > >
> > > }
> > >
> > > }
> > >
> > > On Mon, Feb 25, 2013 at 11:44 AM, venkat 
> > wrote:
> > >
> > > > Hi ,
> > > >
> > > > I have a requirement, where when user selects a particular option
> from
> > > > dropdown, I need to show Java Script Confirmation dialog.  Is there
> any
> > > way
> > > > in Wicket to add javaScript behaviour to dropdown choice.
> > > >
> > > > Have used JavaScriptConfirmation to submit buttons in other areas and
> > is
> > > > working fine,however am not sure how to add this behavior to
> > > dropdownchoice
> > > > events?
> > > >
> > > > I would appreciate quick response.
> > > >
> > > > Thanks
> > > > Venkat
> > > >
> > > >
> > > >
> > > > --
> > > > View this message in context:
> > > >
> > >
> >
> http://apache-wicket.1842946.n4.nabble.com/How-to-add-Java-Script-Confirmation-dialog-to-dropdown-choice-tp4656755.html
> > > > Sent from the Users forum mailing list archive at Nabble.com.
> > > >
> > > > -
> > > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > > > For additional commands, e-mail: users-h...@wicket.apache.org
> > > >
> > > >
> > >
> > >
> > > --
> > > Regards - Ernesto Reinaldo Barreiro
> > > Antilia Soft
> > > http://antiliasoft.com/ <http://antiliasoft.com/antilia>
> > >
> >
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com <http://jweekend.com/>
>


Re: How to add Java Script Confirmation dialog to dropdown choice

2013-02-25 Thread heapifyman
Am I right in assuming that this behavior will run the javascript that is
returned by "getBeforeHandler()" and then it will stop and won't do
anything else (which is achieved by "onPrecondition("return false")")?


2013/2/25 Martin Grigorov 

> abstract public class ClientSideEventBehavior extends AjaxEventBehavior {
>   public ClientSideEventBehavior(String eventName) { super(eventName); }
>
>   @Override protected final void updateAjaxAttributes(AjaxRequestAttributes
> attributes) {
>  super.updateAjaxAttributes(attributes);
>
>  attributes.setAllowDefault(isDefaultAllowed());
>
>  String beforeHandler = getBeforeHandler();
>  AjaxCallListener listener = new AjaxCallListener();
>  listener.onBefore(beforeHandler);
>  listener.onPrecondition("return false;");
>  attributes.getAjaxCallListeners().add(listener);
>   }
>
>   @Override public final void onEvent(AjaxRequestTarget) {
>  // never called
>   }
>
>   protected boolean isDefaultAllowed() {return false;}
>
>   abstract protected String getBeforeHandler();
> }
>
> The user of this class can only use before handlers.
>
> On Mon, Feb 25, 2013 at 5:10 PM, heapifyman  wrote:
>
> > Care to share this precondition handling?
> >
> >
> > 2013/2/25 Martin Grigorov 
> >
> > > Hi,
> > >
> > >
> > > On Mon, Feb 25, 2013 at 1:35 PM, heapifyman 
> > wrote:
> > >
> > > > mydropdownComponent.add(new
> > AjaxFormComponentUpdatingBehavior("change") {
> > > >   @Override
> > > >   protected void onUpdate(AjaxRequestTarget target) {
> > > > target.appendJavaScript("your javascript...");
> > > >   }
> > > > });
> > > >
> > > >
> > > In our project we have a ClientSideEventBehavior. It is a
> > AjaxEventBehavior
> > > with a precondition that always stops the Ajax call.
> > >
> > >
> > > >
> > > > 2013/2/25 Ernesto Reinaldo Barreiro 
> > > >
> > > > > Can you just register your "behavior" to on change? Something like:
> > > > >
> > > > > MyPanel extends Panel {
> > > > >
> > > > >
> > > > > public void renderHead(IHeaderResponse reponse) {
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > >
> >
> reponse.render(OnDomReadyHeaderItem.forScript("jQuery('#mydropdown').on('change',
> > > > > function(){//what ever you want to do});"));
> > > > >
> > > > > }
> > > > >
> > > > > }
> > > > >
> > > > > On Mon, Feb 25, 2013 at 11:44 AM, venkat  >
> > > > wrote:
> > > > >
> > > > > > Hi ,
> > > > > >
> > > > > > I have a requirement, where when user selects a particular option
> > > from
> > > > > > dropdown, I need to show Java Script Confirmation dialog.  Is
> there
> > > any
> > > > > way
> > > > > > in Wicket to add javaScript behaviour to dropdown choice.
> > > > > >
> > > > > > Have used JavaScriptConfirmation to submit buttons in other areas
> > and
> > > > is
> > > > > > working fine,however am not sure how to add this behavior to
> > > > > dropdownchoice
> > > > > > events?
> > > > > >
> > > > > > I would appreciate quick response.
> > > > > >
> > > > > > Thanks
> > > > > > Venkat
> > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > View this message in context:
> > > > > >
> > > > >
> > > >
> > >
> >
> http://apache-wicket.1842946.n4.nabble.com/How-to-add-Java-Script-Confirmation-dialog-to-dropdown-choice-tp4656755.html
> > > > > > Sent from the Users forum mailing list archive at Nabble.com.
> > > > > >
> > > > > >
> > -
> > > > > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > > > > > For additional commands, e-mail: users-h...@wicket.apache.org
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Regards - Ernesto Reinaldo Barreiro
> > > > > Antilia Soft
> > > > > http://antiliasoft.com/ <http://antiliasoft.com/antilia>
> > > > >
> > > >
> > >
> > >
> > >
> > > --
> > > Martin Grigorov
> > > jWeekend
> > > Training, Consulting, Development
> > > http://jWeekend.com <http://jweekend.com/>
> > >
> >
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com <http://jweekend.com/>
>


Re: Infinite Scrolling in Wicket 6

2013-02-28 Thread heapifyman
Is there some documentation or example available for wicket-bootstrap's
InifiniteScrollingBehavior?


2013/2/27 Nick Pratt 

> Ive used Datatables (www.datatables.net) for similar features and it works
> pretty well.
>
> N
>
> On Wed, Feb 27, 2013 at 4:58 AM, Martin Dietze  wrote:
>
> > I will soon have to implement infinite scrolling in my project
> > and would thus like to know if there are already libraries or
> > code snippets for this based on Wicket 6?
> >
> > What I found after a quick search was oegyscroll [1], but this
> > seems to be based on Wicket 1.4.x.
> >
> > But as this feature is becoming increasingly popular, I'm sure
> > that others have already implemented this kind of thing and can
> > give me a recommendation?
> >
> > Cheers,
> >
> > M'bert
> >
> > [1] https://github.com/reaktor/oegyscroll
> >
> > --
> > --- / http://herbert.the-little-red-haired-girl.org /
> > -
> > =+=
> > Ruft man einen Hund, dann kommt er. Ruft man eine Katze, dann nimmt
> > sie das zur Kenntnis, und kommt gelegentlich darauf zurueck.
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
>


Re: wicket and JPA

2013-06-14 Thread heapifyman
Correct me if I'm wrong but I think as long as dbObject is still "managed"
code like the following should persist the changes to dbObject, i.e.
changes to dbObject will be saved once the transaction commits.
beginTX()
dbObject.setXXX();
dbObject.setYYY();
commitTX()

If dbObject is "detached" you will have to call
entityManager.merge(dbObject) before committing the transaction.



2013/6/14 Evgheni Emelianov 

> Try first to refresh your entity with entitymanagerObject.refresh(), and
> use the return object for an update and then merge()
>
> Am 14.06.2013 um 10:14 schrieb Sven Meier :
>
> > It depends whether your working with detached or manages entities. Are
> you using OSIV?
> >
> > Sven
> >
> > On 06/14/2013 12:22 AM, Boris Brinza wrote:
> >> Hello,
> >> ok, i understand what my problem was,
> >> I've update my code to use detachable model, quite easy refactorting.
> >>
> >> But it only postponed my problem to model onDetach, if i understand it
> right.
> >> In pdf, "If we don't want to loose these changes we must explicitly
> persist the entity before the detaching phase occurs."
> >> So same problem with update of JPA enbtity. Insert is ok, just call
> persist(), but update?
> >>
> >>
> >>
> >> On 06/13/2013 02:52 PM, Sven Meier wrote:
> >>> Please read "9.6 Detachable models" of the Wicket Free Guide and come
> back with your questions.
> >>>
> >>> Sven
> >>>
> >>> On 06/13/2013 01:20 PM, Boris Brinza wrote:
>  Hello to all,
>  I have some fundamental issues with integration of jpa into wicket.
>  I develop web application using wicket 6 and JPA (eclipselink). Maybe
> next question is more JPA oriented, but nevertheless:
> 
>  Lets say i have
>  class BaseDetailPage extends WebPage {
> protected  dbEntity;
> 
>  }
> 
>  where dbEntity is instance of jpa persisted object.
>  BaseDetail page contains form for editing db entity using
> CompoundPropertyModel.
> 
>  After i open detail page, entity is read from DB and page is
> displayed (if edit button is pressed) or i create new instance of object
> (if add button is pressed).
> 
>  After submit, if i want to add new record, everything is clear, i
> call beginTX(), entityManager.persist(dbEntity), commitTX().
> 
>  But what about updating existing record?
> 
>  Every example for JPA shows some basic code like this:
>  beginTX()
>  dbObject.setXXX();
>  dbObject.setYYY();
>  commitTX()
> 
> 
>  But how to integrate this into wicket form using compound property
> model?
>  There is no such code for setting properties of db object, and jpa
> does not have anything like entityManager.update().
> 
>  Now i use hack (by my opinion it';s a hack)
> 
>  beginTX()
>  entityManaget.detach(dbObject);
>  entityManager.merge(dbObject)
>  commitTX()
> 
>  but i am not sure, if it's right solution (or i'm almost sure it's
> not right attitude)
> 
>  Is there any tutorial how to integrate these frameworks, or some
> simple opensource project to check how it's solved?
> 
>  Thanks for any advice,
>  Boris
> 
> 
> 
> 
>  -
>  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
>
>


Wicket 6 Portlet in JBoss GateIn

2013-07-12 Thread heapifyman
Hello,

I'm trying to get a Wicket 6 app running as a Portlet in JBoss GateIn 3.6
using the wicketstuff-portlet lib (
https://github.com/wicketstuff/core/tree/master/jdk-1.6-parent/portlet-parent
).

So far I have managed to get the Wicket quickstart app running, i.e. I can
display simple things like a "Label" in the Wicket portlet.
However, as soon as I add a "Form" to my page I get an Exception (see
below).

Has anyone maybe a running example or can point me to some documentation?
Things I found on the web seem to be mostly for Wicket <1.5 or specific to
Liferay.

Thanks in advance.

Caused by: java.lang.IllegalArgumentException: Argument '_url' may not be
null.
at org.apache.wicket.util.lang.Args.notNull(Args.java:41)
at org.apache.wicket.request.Url.parse(Url.java:205)
at org.apache.wicket.request.Url.parse(Url.java:192)
at
org.apache.wicket.protocol.http.servlet.ServletWebResponse.encodeRedirectURL(ServletWebResponse.java:224)
at
org.apache.wicket.protocol.http.servlet.ServletWebResponse.sendRedirect(ServletWebResponse.java:236)
at
org.apache.wicket.protocol.http.BufferedWebResponse$SendRedirectAction.invoke(BufferedWebResponse.java:400)
at
org.apache.wicket.protocol.http.BufferedWebResponse.writeTo(BufferedWebResponse.java:588)
at
org.apache.wicket.protocol.http.HeaderBufferingWebResponse.stopBuffering(HeaderBufferingWebResponse.java:60)
at
org.apache.wicket.protocol.http.HeaderBufferingWebResponse.flush(HeaderBufferingWebResponse.java:97)
at
org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:269)
at
org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:201)
at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:282)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
[jbossweb-7.0.13.Final.jar:]
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
[jbossweb-7.0.13.Final.jar:]
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:840)
[jbossweb-7.0.13.Final.jar:]
at
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:720)
[jbossweb-7.0.13.Final.jar:]
at
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:657)
[jbossweb-7.0.13.Final.jar:]
at
org.gatein.pc.portlet.impl.jsr168.api.PortletRequestDispatcherImpl.dispatch(PortletRequestDispatcherImpl.java:142)
[pc-portlet-2.4.1.Final.jar:2.4.1.Final]
at
org.gatein.pc.portlet.impl.jsr168.api.PortletRequestDispatcherImpl.include(PortletRequestDispatcherImpl.java:84)
[pc-portlet-2.4.1.Final.jar:2.4.1.Final]
at
org.apache.wicket.portlet.WicketPortlet.processMimeResponseRequest(WicketPortlet.java:407)
at
org.apache.wicket.portlet.WicketPortlet.processRequest(WicketPortlet.java:579)
at org.apache.wicket.portlet.WicketPortlet.doView(WicketPortlet.java:221)
at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:354)
at javax.portlet.GenericPortlet.render(GenericPortlet.java:259)
...


Re: wicket conversation scope - weld integration

2013-10-29 Thread heapifyman
seam-wicket is outdated and has been replaced by wicket-cdi if I’m not mistaken.
Also, this series of blog post probably contains all you need for setting up 
CDI in Wicket. It helped me:
https://www.42lines.net/category/blog/software-engineering/full-stack-implementation/
 


Am 29.10.2013 um 16:53 schrieb brazz :

> Hi,
> 
> after fighting for several days with integrating cdi with wicket (i am
> interseted in this conversation scope thing). I ended up with the following
> stack trace:
> 
> java.lang.IllegalStateException: Context is already active
>   at
> org.jboss.weld.context.AbstractConversationContext.activate(AbstractConversationContext.java:245)
> 
> This is the configuration: 
> tomcat apache-tomcat-7.0.6 or apache-tomcat-7.0.47
> 
> seam-conversation-spi-3.0.0.Final.jar
> seam-wicket.jar
> weld-servlet.jar
> cdi-api.jar
> seam-conversation-weld-3.0.0.Final.jar
> wicket-cdi-6.11.0.jar
> 
> wicket version is wicket-6.11.0
> cdi version is weld-2.1.0
> 
> i think i tried every possible configuration and proposed solution on the
> internet. 
> Of course i read every article about wicket- cdi, conversation scope,
> ftlines 
> 
> As it has to run although on WAS7, i'm not very optimistic. Has anyone tried
> that?
> 
> Thanks for any suggestions.
> 
> 
> 
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/wicket-conversation-scope-weld-integration-tp4662028.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
> 



signature.asc
Description: Message signed with OpenPGP using GPGMail