Re: Hide feedback when there are no messages
Hi, How does your markup looks like? Peter 2009-11-28 20:26 keltezéssel, Николай Кучумов írta: Hello. I'm currently developing a sign up form using Wicket. I've stylized the error feedback panel to make it look red, and now i see this red panel even when there are no messages at all. Can you advice me something to make the feedback panel div invisible when there are no messages? *You can get the idea by going to http://vostrets.ru/register/ - the error panel is empty but is still visible... - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Hide feedback when there are no messages
Hello, Major. It looks like this: body wicket:extend div wicket:id=feedback class=error /div br/br/br/ form wicket:id=form /form /wicket:extend /body and the CSS is: .error { width: auto; margin-left: 25%; margin-right: 25%; border: 1px solid #fc908c; background-image: url('../pictures/icons/error_64x64.png'); background-color: #ffeceb; } You can view the bookmark on the link provided above (vostrets.ru/register/) - just open the page in Firefox, right click and View page source.
Re: Hide feedback when there are no messages
well, if you put in the class=error by deafult, of course it will show the div. ;) Delete from your markup the class=error, then see when your validation fails, what css class will be generated via wicket, and override that from your css file. Peter 2009-11-28 20:46 keltezéssel, Николай Кучумов írta: Hello, Major. It looks like this: body wicket:extend div wicket:id=feedback class=error /div br/br/br/ form wicket:id=form /form /wicket:extend /body and the CSS is: .error { width: auto; margin-left: 25%; margin-right: 25%; border: 1px solid #fc908c; background-image: url('../pictures/icons/error_64x64.png'); background-color: #ffeceb; } You can view the bookmark on the link provided above (vostrets.ru/register/) - just open the page in Firefox, right click and View page source. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Hide feedback when there are no messages
Oh, really. Thank you, Major Obvious : ) The class is feedbackPanel: ul wicket:id=feedbackul class=feedbackPanel I think i'll try to somehow subclass it tomorrow to get it output something like errorFeedbackPanel. 2009/11/28 Major Péter majorpe...@sch.bme.hu well, if you put in the class=error by deafult, of course it will show the div. ;) Delete from your markup the class=error, then see when your validation fails, what css class will be generated via wicket, and override that from your css file. Peter 2009-11-28 20:46 keltezéssel, Николай Кучумов írta: Hello, Major. It looks like this: body wicket:extend div wicket:id=feedback class=error /div br/br/br/ form wicket:id=form /form /wicket:extend /body and the CSS is: .error { width: auto; margin-left: 25%; margin-right: 25%; border: 1px solid #fc908c; background-image: url('../pictures/icons/error_64x64.png'); background-color: #ffeceb; } You can view the bookmark on the link provided above ( vostrets.ru/register/) - just open the page in Firefox, right click and View page source. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Hide feedback when there are no messages
You're welcome. :) Why do you want to subclass it? Check out our solution: In your page add: add(new FeedbackPanel(pagemessages)); in html: span wicket:id=pagemessages id=pagemessages/span in css: #pagemessages ul li { list-style: none; background: #D9EBF9 url('../images/bckgNotice.gif') top left repeat-x; } #pagemessages ul li .feedbackPanelERROR, #pagemessages ul li .feedbackPanelINFO { display: block; padding: 6px 0 6px 36px; } #pagemessages ul li .feedbackPanelERROR { background: url('../images/iconError.gif') top left no-repeat; } #pagemessages ul li .feedbackPanelINFO { background: url('../images/iconInfo.gif') top left no-repeat; } #pagemessages ul { border: 1px solid #CBE5F7; width: 480px; margin-top: 15px; position: relative; right: -200px; } for example. Like this you can use FBP both for validations and simple messaging with user (via info(), error() and warning() functions of page). Peter 2009-11-28 21:33 keltezéssel, Николай Кучумов írta: Oh, really. Thank you, Major Obvious : ) The class is feedbackPanel: ul wicket:id=feedbackul class=feedbackPanel I think i'll try to somehow subclass it tomorrow to get it output something like errorFeedbackPanel. 2009/11/28 Major Péter majorpe...@sch.bme.hu well, if you put in the class=error by deafult, of course it will show the div. ;) Delete from your markup the class=error, then see when your validation fails, what css class will be generated via wicket, and override that from your css file. Peter 2009-11-28 20:46 keltezéssel, Николай Кучумов írta: Hello, Major. It looks like this: body wicket:extend div wicket:id=feedback class=error /div br/br/br/ form wicket:id=form /form /wicket:extend /body and the CSS is: .error { width: auto; margin-left: 25%; margin-right: 25%; border: 1px solid #fc908c; background-image: url('../pictures/icons/error_64x64.png'); background-color: #ffeceb; } You can view the bookmark on the link provided above ( vostrets.ru/register/) - just open the page in Firefox, right click and View page source. - 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: Hide feedback when there are no messages
Thanks Peter, it works. 2009/11/28 Major Péter majorpe...@sch.bme.hu You're welcome. :) Why do you want to subclass it? Check out our solution: In your page add: add(new FeedbackPanel(pagemessages)); in html: span wicket:id=pagemessages id=pagemessages/span in css: #pagemessages ul li { list-style: none; background: #D9EBF9 url('../images/bckgNotice.gif') top left repeat-x; } #pagemessages ul li .feedbackPanelERROR, #pagemessages ul li .feedbackPanelINFO { display: block; padding: 6px 0 6px 36px; } #pagemessages ul li .feedbackPanelERROR { background: url('../images/iconError.gif') top left no-repeat; } #pagemessages ul li .feedbackPanelINFO { background: url('../images/iconInfo.gif') top left no-repeat; } #pagemessages ul { border: 1px solid #CBE5F7; width: 480px; margin-top: 15px; position: relative; right: -200px; } for example. Like this you can use FBP both for validations and simple messaging with user (via info(), error() and warning() functions of page). Peter 2009-11-28 21:33 keltezéssel, Николай Кучумов írta: Oh, really. Thank you, Major Obvious : ) The class is feedbackPanel: ul wicket:id=feedbackul class=feedbackPanel I think i'll try to somehow subclass it tomorrow to get it output something like errorFeedbackPanel. 2009/11/28 Major Péter majorpe...@sch.bme.hu well, if you put in the class=error by deafult, of course it will show the div. ;) Delete from your markup the class=error, then see when your validation fails, what css class will be generated via wicket, and override that from your css file. Peter 2009-11-28 20:46 keltezéssel, Николай Кучумов írta: Hello, Major. It looks like this: body wicket:extend div wicket:id=feedback class=error /div br/br/br/ form wicket:id=form /form /wicket:extend /body and the CSS is: .error { width: auto; margin-left: 25%; margin-right: 25%; border: 1px solid #fc908c; background-image: url('../pictures/icons/error_64x64.png'); background-color: #ffeceb; } You can view the bookmark on the link provided above ( vostrets.ru/register/) - just open the page in Firefox, right click and View page source. - 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