Re: Remove ListView item in ModalWindow

2010-10-19 Thread armandoxxx

Well that did it .. 

I made a separate page and added that page into a ModalWindow. 
I also removed item from a list not from ListView Component .. and now it's
working properly ! 

Regards

Armando
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Remove-ListView-item-in-ModalWindow-tp3000348p3001743.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: Remove ListView item in ModalWindow

2010-10-18 Thread armandoxxx

Hey mate .. 

sorry for late reply ... 

I decided to make a ModalWindow and use a page instead of a setContent() ... 
I think that might help .. 
I read on some forum that setContent() on modal window caused people some
problems and they advised to use page instead .. so, i'll just create a page
and put that into a modal window and tell you how it goes ... ;) 

regards

Armando
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Remove-ListView-item-in-ModalWindow-tp3000348p3001530.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: Remove ListView item in ModalWindow

2010-10-18 Thread Pedro Santos
Are you using an static model at the list view? See if your objects on it
correctly implement the hash and equals method...
I can't wonder why at the response your browser is trying to leave the page
:S

On Mon, Oct 18, 2010 at 1:07 PM, armandoxxx wrote:

>
> Hey ...
>
> 10x for your fast reply ...
>
> 1. onSubmit method is empty
> 2. I tried to do remove on my list but it allways returns false ... with no
> error .. and I cant figure it out why ...
>
> Regards
>
> Armando
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Remove-ListView-item-in-ModalWindow-tp3000348p3000420.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
>
>


-- 
Pedro Henrique Oliveira dos Santos


Re: Remove ListView item in ModalWindow

2010-10-18 Thread armandoxxx

Hey ... 

10x for your fast reply ... 

1. onSubmit method is empty 
2. I tried to do remove on my list but it allways returns false ... with no
error .. and I cant figure it out why ... 

Regards

Armando



-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Remove-ListView-item-in-ModalWindow-tp3000348p3000420.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: Remove ListView item in ModalWindow

2010-10-18 Thread Pedro Santos
Remove the element at the list view model list rather then at the list view
components list. About the 'leave page' message, see if at your form
onsubmit method there is some redirect rule implemented.

On Mon, Oct 18, 2010 at 12:23 PM, armandoxxx wrote:

>
> Hey ppl
>
> Need a little help with my problem.
>
> I have a list view in a form in a modal window.
> (MODAL WINDOW > FORM > LIST VIEW (with some components representing fields)
> Each field in list view has a AjaxButton beside and this button removes the
> whole component (list item) from the list.
>
> Code that removes a a component from the list
>
>
>private void removeValue(final Integer theIndex) {
>myListView.remove(listOfComponents.get(theIndex));
>}
>
>
> /**
> my button code
> **/
>private final AjaxButton removeValueLink= new
> AjaxButton("remove-value") {
>
>@Override
>protected void onSubmit(final AjaxRequestTarget theTarget,
> Form form) {
>
>  referenceToComponentWithMyList.removeValue(ValuePanel.this.index);
> //removes my component from the list .. calls upper function
>
>  theTarget.addComponent(referenceToComponentWithMyList.getListWrapper());
> //reference to webmarkup container in which list is in ...because you cant
> refresh list without it.. (read in wiki)
>}
>
>};
>
>
>
> So now to the problem ...
> whenever I press a button to remove a component (item) I get a prompt "If I
> really want to leave the page" !?!?!?
> and After I press the button LEAVE the page ... I get
>
> Caused by: java.lang.IllegalStateException: No Page found for component
> [MarkupContainer [Component id = remove-value]]
>
> NOTE: When initing ModalWindow my Form is added with setContent() method !
>
> Any help would be appreciated !
>
> Regards
>
> Armando
>
>
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Remove-ListView-item-in-ModalWindow-tp3000348p3000348.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
>
>


-- 
Pedro Henrique Oliveira dos Santos


Remove ListView item in ModalWindow

2010-10-18 Thread armandoxxx

Hey ppl

Need a little help with my problem. 

I have a list view in a form in a modal window. 
(MODAL WINDOW > FORM > LIST VIEW (with some components representing fields)
Each field in list view has a AjaxButton beside and this button removes the
whole component (list item) from the list. 

Code that removes a a component from the list 


private void removeValue(final Integer theIndex) {
myListView.remove(listOfComponents.get(theIndex));
}


/**
my button code
**/
private final AjaxButton removeValueLink= new 
AjaxButton("remove-value") {

@Override
protected void onSubmit(final AjaxRequestTarget theTarget, 
Form form) {

referenceToComponentWithMyList.removeValue(ValuePanel.this.index);
//removes my component from the list .. calls upper function 

theTarget.addComponent(referenceToComponentWithMyList.getListWrapper());
//reference to webmarkup container in which list is in ...because you cant
refresh list without it.. (read in wiki)
}

};



So now to the problem ... 
whenever I press a button to remove a component (item) I get a prompt "If I
really want to leave the page" !?!?!?
and After I press the button LEAVE the page ... I get

Caused by: java.lang.IllegalStateException: No Page found for component
[MarkupContainer [Component id = remove-value]]

NOTE: When initing ModalWindow my Form is added with setContent() method !

Any help would be appreciated !

Regards

Armando





-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Remove-ListView-item-in-ModalWindow-tp3000348p3000348.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