Re: not addding componet in case of error
It looks like you still have to add all the componet in my case reportresultpanel and others to tableAddChart . In my case if error condition and i'm just adding tableAndChartContainer. If complains about reportresultpanel being in the markup not being added. Unable to find component with id 'reportresultpanel' here is the part where i'm handling if (originalRowSet.size() 1){ //just insert empty lable to the container error(No data returned for this report. ); WebMarkupContainer tableAndChartContainer = new WebMarkupContainer(tableAndCharts); add(tableAndChartContainer); } else { here is the html markup wicket:extend h1Report Results for /h1 h3 div wicket:id=reportResultTitle/div /h3 div wicket:id=feedback[[ feedback ]]/div div wicket:id=tableAndCharts table tr td form wicket:id=form1 table tr td /td /tr tr tdselect wicket:id=chart1Select //td /tr /table /form /td td form wicket:id=form2 table tr td /td /tr tr tdselect wicket:id=chart2Select //td /tr /table /form /td /tr /table /div h3/h3 /wicket:extend vineet semwal wrote: toggling visibility will always do, my idea was creating the actual component only if data is available . On Mon, Dec 14, 2009 at 2:05 AM, Martijn Dashorst martijn.dasho...@gmail.com wrote: Or just set visibility based on error On Saturday, December 12, 2009, vineet semwal vineetsemwal1...@gmail.com wrote: add empty webmarkupcontainers as your components,if no error,replace the containers with your components else you don't need to replace. On Sat, Dec 12, 2009 at 8:02 AM, Swarnim Ranjitkar swarn...@hotmail.com wrote: I have a case where I check some error condition at the beginning of the code. If there is error I just want to display error message so basically it is if (error == true){ display message } else { //render regular page add(component1) add(compnent2) } if there is error I don't have any data to generate my component. Is there a clean way to do this. I'm getting Unable to find component with id 'chart1image' exception. Appreciate your feedback thank you -- regards, Vineet Semwal -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.4 increases type safety for web applications Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.0 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- regards, Vineet Semwal -- View this message in context: http://old.nabble.com/not-addding-componet-in-case-of-error-tp26754430p26779962.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: not addding componet in case of error
never mind please. it did work. I just forgot to set the visibility to false for he container wicketnewuser wrote: It looks like you still have to add all the componet in my case reportresultpanel and others to tableAddChart . In my case if error condition and i'm just adding tableAndChartContainer. If complains about reportresultpanel being in the markup not being added. Unable to find component with id 'reportresultpanel' here is the part where i'm handling if (originalRowSet.size() 1){ //just insert empty lable to the container error(No data returned for this report. ); WebMarkupContainer tableAndChartContainer = new WebMarkupContainer(tableAndCharts); add(tableAndChartContainer); } else { here is the html markup wicket:extend h1Report Results for /h1 h3 div wicket:id=reportResultTitle/div /h3 div wicket:id=feedback[[ feedback ]]/div div wicket:id=tableAndCharts table tr td form wicket:id=form1 table tr td /td /tr tr tdselect wicket:id=chart1Select //td /tr /table /form /td td form wicket:id=form2 table tr td /td /tr tr tdselect wicket:id=chart2Select //td /tr /table /form /td /tr /table /div h3/h3 /wicket:extend vineet semwal wrote: toggling visibility will always do, my idea was creating the actual component only if data is available . On Mon, Dec 14, 2009 at 2:05 AM, Martijn Dashorst martijn.dasho...@gmail.com wrote: Or just set visibility based on error On Saturday, December 12, 2009, vineet semwal vineetsemwal1...@gmail.com wrote: add empty webmarkupcontainers as your components,if no error,replace the containers with your components else you don't need to replace. On Sat, Dec 12, 2009 at 8:02 AM, Swarnim Ranjitkar swarn...@hotmail.com wrote: I have a case where I check some error condition at the beginning of the code. If there is error I just want to display error message so basically it is if (error == true){ display message } else { //render regular page add(component1) add(compnent2) } if there is error I don't have any data to generate my component. Is there a clean way to do this. I'm getting Unable to find component with id 'chart1image' exception. Appreciate your feedback thank you -- regards, Vineet Semwal -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.4 increases type safety for web applications Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.0 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- regards, Vineet Semwal -- View this message in context: http://old.nabble.com/not-addding-componet-in-case-of-error-tp26754430p26779967.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: not addding componet in case of error
Or just set visibility based on error On Saturday, December 12, 2009, vineet semwal vineetsemwal1...@gmail.com wrote: add empty webmarkupcontainers as your components,if no error,replace the containers with your components else you don't need to replace. On Sat, Dec 12, 2009 at 8:02 AM, Swarnim Ranjitkar swarn...@hotmail.comwrote: I have a case where I check some error condition at the beginning of the code. If there is error I just want to display error message so basically it is if (error == true){ display message } else { //render regular page add(component1) add(compnent2) } if there is error I don't have any data to generate my component. Is there a clean way to do this. I'm getting Unable to find component with id 'chart1image' exception. Appreciate your feedback thank you -- regards, Vineet Semwal -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.4 increases type safety for web applications Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.0 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: not addding componet in case of error
toggling visibility will always do, my idea was creating the actual component only if data is available . On Mon, Dec 14, 2009 at 2:05 AM, Martijn Dashorst martijn.dasho...@gmail.com wrote: Or just set visibility based on error On Saturday, December 12, 2009, vineet semwal vineetsemwal1...@gmail.com wrote: add empty webmarkupcontainers as your components,if no error,replace the containers with your components else you don't need to replace. On Sat, Dec 12, 2009 at 8:02 AM, Swarnim Ranjitkar swarn...@hotmail.com wrote: I have a case where I check some error condition at the beginning of the code. If there is error I just want to display error message so basically it is if (error == true){ display message } else { //render regular page add(component1) add(compnent2) } if there is error I don't have any data to generate my component. Is there a clean way to do this. I'm getting Unable to find component with id 'chart1image' exception. Appreciate your feedback thank you -- regards, Vineet Semwal -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.4 increases type safety for web applications Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.0 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- regards, Vineet Semwal
not addding componet in case of error
I have a case where I check some error condition at the beginning of the code. If there is error I just want to display error message so basically it is if (error == true){ display message } else { //render regular page add(component1) add(compnent2) } if there is error I don't have any data to generate my component. Is there a clean way to do this. I'm getting Unable to find component with id 'chart1image' exception. Appreciate your feedback thank you
Re: not addding componet in case of error
add empty webmarkupcontainers as your components,if no error,replace the containers with your components else you don't need to replace. On Sat, Dec 12, 2009 at 8:02 AM, Swarnim Ranjitkar swarn...@hotmail.comwrote: I have a case where I check some error condition at the beginning of the code. If there is error I just want to display error message so basically it is if (error == true){ display message } else { //render regular page add(component1) add(compnent2) } if there is error I don't have any data to generate my component. Is there a clean way to do this. I'm getting Unable to find component with id 'chart1image' exception. Appreciate your feedback thank you -- regards, Vineet Semwal