I do not want to have a separate MyPalette.html, because many times I
use the palette its layout must be different.
Instead, I want the MyPage.html to contain the panel markup: In a
similar manner to how the feedbackpanel markup is given in that
example in the book "created the component component structure inside
the page".
However, if I try to include the palette markup into the page markup,
I get that exception.
Judging from the feedbackpanel example, it should be possible,
however. Anyone know if there is something special to consider?
**
Martin
2008/5/11 Maurice Marrink <[EMAIL PROTECTED]>:
> Correct me if i am wrong but is this not the
> com.apress.wicketbook.validation.UserProfilePage from the book?
> Note that i do not have the book nor have i read it, i just have the
> example sourcecode, but judging from the code they are not replacing
> FeedBackPanel markup but are actually creating a component structure
> (inside the page, not as standalone) to do the same. That is why they
> can place the markup inside the page markup.
>
> It is possible however to replace the markup for prefab components you
> just can not do it inline (inside the page) and you have to use all
> the wicket id's from the original markup.
> So i think what you are looking for is this:
>
> public class MyPalette extends Palette
> {
> public MyPalette(String id, IModel choicesModel, IChoiceRenderer
> choiceRenderer, int rows,
> boolean allowOrder)
> {
> super(id, choicesModel, choiceRenderer, rows, allowOrder);
> }
> //same for other constructor
> }
> MyPalette.html:
> <wicket:panel>
>
> <input type="hidden" wicket:id="recorder"/>
> <h3 wicket:id="selectedHeader">[selected header]</h3>
> <select wicket:id="selection" size="10"
> class="choicesSelect"><option>Selected</option></select>
> <h3 wicket:id="availableHeader">[available header]</h3>
> <select wicket:id="choices" size="5"
> class="choicesSelect"><option>Select</option></select>
> <input type="button" wicket:id="addButton" class="paletteButton"/><br/>
> <input type="button" wicket:id="removeButton" class="paletteButton"/><br/>
> <input type="button" wicket:id="moveUpButton" class="button up"/><br/>
> <input type="button" wicket:id="moveDownButton" class="button down"/><br/>
> </wicket:panel>
>
> And in your page markup put a <span wicket:id="myPalette"></span>
> Note that i did not check the markup i just copy pasted yours.
>
> Maurice
>
>
>
> On Sat, May 10, 2008 at 8:39 PM, Martin Makundi
> <[EMAIL PROTECTED]> wrote:
> > Hi!
> >
> > I understand that it is possible to override Panel markup in your
> > within your main page. The Pro Wicket gives a simple example with the
> > FeedbackPanel:
> >
> > <html>
> > <head>
> > <title>User Profile</title>
> > </head>
> > <body>
> > <table border="1">
> > <tr wicket:id="feedback">
> > <td><span wicket:id="message">Message goes here</span></td>
> > <td><span wicket:id="level">Message log level</span></td>
> > </tr>
> > </table>
> > <!-- everything beyond this remains unchanged -->
> > <form wicket:id="userProfile">
> >
> > However, when I try to override the Palette component layout in a
> > similar manner:
> >
> > <span wicket:id="myPalette">
> > <input type="hidden" wicket:id="recorder"/>
> > <h3 wicket:id="selectedHeader">[selected header]</h3>
> > <select wicket:id="selection" size="10"
> > class="choicesSelect"><option>Selected</option></select>
> > <h3 wicket:id="availableHeader">[available header]</h3>
> > <select wicket:id="choices" size="5"
> > class="choicesSelect"><option>Select</option></select>
> > <input type="button" wicket:id="addButton" class="paletteButton"/><br/>
> > <input type="button" wicket:id="removeButton"
> class="paletteButton"/><br/>
> > <input type="button" wicket:id="moveUpButton" class="button up"/><br/>
> > <input type="button" wicket:id="moveDownButton" class="button
> down"/><br/>
> > </span>
> >
> > This fails with WicketMessage: close tag not found for tag: <span
> > wicket:id="myPalette">
> >
> > Why does the Palette-panel behave differently from the FeedbackPanel?
> >
> > **
> > Martin
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]