How to Update contents of a child component?

2010-07-30 Thread Niv

Hi All

I would like to know an elegant solution to deal with the following issue.

For CRUD operations this is the approach I have taken.

List of Components
1.ContainerPanel 
2.SearchPanel
3.SearchResultsPanel
4.DetailsPanel and this contains a child component that has a
MultiSelectControl

The ContainerPanel adds the SearchPanel. The SearchPanel, adds
SearchResultsPanel and DetailsPanel.

So when I first load/render the ContainerPanel, I hide the
SearchResultsPanel and DetailsPanel.
When some search is done then I make the SearchResultsPanel visible.

OnClick event of an item of the SearchResultsPanel , I unhide and update the
Model of the Details panel. Now,for some reason it does not seem to refresh
the child component in DetailsPanel(.ie. MultiSelectControl)

So on every OnClick, I want the Details panel to refresh the content of the
nested component in Details Panel. At the moment, I can't see a way to do
this, other than removing the nested component and re-creating it.  I am
sure its not the right way to do it.

Has anyone had a similar scenario before? I would like to use a cleaner way
to approach this.

Also is this approach for CRUD acceptable as in using the container
approach?
Thanks again,



-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-Update-contents-of-a-child-component-tp2307756p2307756.html
Sent from the Wicket - User 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: Model Is Not being Refreshed

2010-08-03 Thread Niv

Just wanted to add that this issue is not exactly the same as i posted
earlier but related in a way. But it is a separate issue. - I am making sure
it is not  re-post. Thank you

http://apache-wicket.1842946.n4.nabble.com/How-to-Update-contents-of-a-child-component-td2307756.html#a2307756

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Model-Is-Not-being-Refreshed-tp2311457p2311460.html
Sent from the Wicket - User 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



Ajax-Panel Toggling Visibility

2010-08-06 Thread Niv

Hi 

I got an issue with making a panel visible via Ajax. I had a look at the
following link to refer and I seemed to have done all that was mentioned out
there.

http://apache-wicket.1842946.n4.nabble.com/Panel-setVisible-in-Ajax-call-td1861998.html#a1861998



When i first create the panel, I set it like this

searchResults.setOutputMarkupPlaceholderTag(true);
searchResults.setVisible(false);

Then when user clicked the Ajax button/link

I compute the resultList that must be updated on the searchResults and then
do the following:

onSearch(AjaxRequestTarget target){
  searchResults = new SearchResults(id,list); //- Not sure if this is the
correct way to refresh a ListView...
  searchResults.setOutputMarkupPlaceholderTag(true);
  searchResults.setVisible(true); // - Setting it to true
  target.addComponent(searchResults);
}

There is no exception being thrown. On the Ajax debug window I get the
following.I don't see the markup being refreshed.

INFO: focus removed from 
INFO: focus set on test11
INFO:
INFO: Initiating Ajax GET request on
?wicket:interface=:4:searchPanel:searchForm:test::IBehaviorListener:0:random=0.6959895812032867
INFO: Invoking pre-call handler(s)...
INFO: focus removed from test11
INFO: Received ajax response (69 characters)
INFO:
?xml version=1.0 encoding=UTF-8?ajax-response/ajax-response
INFO: Response parsed. Now invoking steps...
INFO: Response processed successfully.
INFO: Invoking post-call handler(s)...
INFO: refocus last focused component not needed/allowed
INFO: focus set on test11
INFO: focus removed from test11


Any thoughts?

Thank
Niv

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Ajax-Panel-Toggling-Visibility-tp2316018p2316018.html
Sent from the Wicket - User 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: Ajax-Panel Toggling Visibility

2010-08-06 Thread Niv

Hi

 I think I failed to explicitly mention that the panel is not being made
visible even though the code to setVisible is executed.

Thanks
niv
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Ajax-Panel-Toggling-Visibility-tp2316018p2316020.html
Sent from the Wicket - User 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



DropDownChoice-Choose One Selected Item

2011-02-09 Thread Niv

Hi
Is there a way I can have the selected option on a DropDownChoice to be set
with  one of the items in the Model instead of ' Choose One'  as the
selected item by default? I know this has been asked around in a different
sense but I could not find a closer match to this. 
Code Snippet

ListCountry countryList =service.getCountries();
ChoiceRendererCountry defaultChoiceRenderer = new
ChoiceRendererCountry(Constants.NAME, Constants.ID);
countryChoice = new DropDownChoiceCountry(Constants.ADDRESS_COUNTRY,
countryList, defaultChoiceRenderer);

//Would like the countryChoice to be able to have the First Contry in the
countrList to be the one rendered instead of 'Choose One'.

Thanks and if it seems redundant do pardon me
Cheers



-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/DropDownChoice-Choose-One-Selected-Item-tp3298535p3298535.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