You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Martin Makundi <ma...@koodaripalvelut.com> on 2008/05/10 20:39:58 UTC

Overriding panel markup: close tag not found for tag

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: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Overriding panel markup: close tag not found for tag

Posted by Maurice Marrink <ma...@gmail.com>.
So in your page you are doing exactly the same as Palette, i.e. you
are adding all the components, headers, etc ?
Just because you want to have different markup. Then why don't you
create your own Palette and use fragments to change the markup, that
certainly is a lot code friendlier then repeating yourself every time.

However it is odd the close tag can not be found.

Maurice

On Mon, May 12, 2008 at 9:13 AM, Martin Makundi
<ma...@koodaripalvelut.com> wrote:
> But why does it seem to work with FeedbackPanel? I want just that. A
>  fragment I understand just means providing optional markups. That is
>  not exactly what I want because every realization is different.
>
>  **
>  Martin
>
>  2008/5/12 Eelco Hillenius <ee...@gmail.com>:
>
>
> > > 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".
>  >
>  >  You should use a Fragment instead of a Panel in that case.
>  >
>  >  Eelco
>  >
>  >
>  >
>  >  ---------------------------------------------------------------------
>  >  To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>  >  For additional commands, e-mail: users-help@wicket.apache.org
>  >
>  >
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>  For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Overriding panel markup: close tag not found for tag

Posted by Martin Makundi <ma...@koodaripalvelut.com>.
But why does it seem to work with FeedbackPanel? I want just that. A
fragment I understand just means providing optional markups. That is
not exactly what I want because every realization is different.

**
Martin

2008/5/12 Eelco Hillenius <ee...@gmail.com>:
> > 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".
>
>  You should use a Fragment instead of a Panel in that case.
>
>  Eelco
>
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>  For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Overriding panel markup: close tag not found for tag

Posted by Eelco Hillenius <ee...@gmail.com>.
> 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".

You should use a Fragment instead of a Panel in that case.

Eelco

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Overriding panel markup: close tag not found for tag

Posted by Martin Makundi <ma...@koodaripalvelut.com>.
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 <ma...@gmail.com>:
> 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
>  <ma...@koodaripalvelut.com> 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: users-unsubscribe@wicket.apache.org
>  > For additional commands, e-mail: users-help@wicket.apache.org
>  >
>  >
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>  For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Overriding panel markup: close tag not found for tag

Posted by Maurice Marrink <ma...@gmail.com>.
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
<ma...@koodaripalvelut.com> 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: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org