You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by miro <mi...@yahoo.com> on 2008/10/10 16:07:03 UTC

html along with the component

I have custom components 

	protected class CustomMenuComponent extends Panel {
		private String headerlabel;
		private RepeatingView   repeatingView = new RepeatingView("repater");
		
		public CustomMenuComponent() {
			super("custmenu");
			add(repeatingView);
		}

		protected void addCustomLink(CustomLinkComponenet  customLinkComponenet){
			repeatingView.add(customLinkComponenet);
		}
		
		protected Label getHeader(){
			return new Label("hl",headerlabel);
		}
	}	

	protected class CustomLinkComponenet extends  Panel  {
		String displayName;
		Class  clazz;
		public CustomLinkComponenet(String displayName, Class  clazz) {
			super("customlink");
			this.displayName=displayName;
			this.clazz=clazz;
			add(getBookmarkablePageLink());
			add(getDisplayNameLabel());
		}

		protected BookmarkablePageLink  getBookmarkablePageLink(){
			return new BookmarkablePageLink("link", clazz);
		}

		protected  Label  getDisplayNameLabel(){
			return new Label("lbl",displayName);
		}
	} 
html for  component  CustomMenuComponent   

		<span-TAG wicket:id="custmenu">
		   <ul-TAG>
		   		<li-TAG wicket:id="repater"></li-TAG>
		   </ul-TAG>
                </span-TAG>
html for component   CustomLinkComponenet

		   			<span-TAG wicket:id="customlink">
		   				<A-TAG  href="#" wicket:id="link">
                                                        <label-TAG
wicket:id="lbl"></label-TAG>
                                                </A-TAG>
		   			</span-TAG>	
please help me with the options of   specifying this html for the components
. I want to tie html along with the components in the java file itself  is
it possible ?
-- 
View this message in context: http://www.nabble.com/html-along-with-the-component-tp19918507p19918507.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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


Re: html along with the component

Posted by Igor Vaynberg <ig...@gmail.com>.
search this list for TextLink

-igor

On Fri, Oct 10, 2008 at 8:32 AM, James Carman
<ja...@carmanconsulting.com> wrote:
> One thing I suggest you get away from is hard-coding your component
> ids in your constructors.  I've looked at a lot of examples and most
> folks let the caller supply the ids.  I think that might also be
> what's confusing you here.  I don't know if it's bad to hard-code the
> fragment id in your fragment class' constructor, but I'd let the
> caller hand you the actual component id (that way it's reusable).  So,
> I'd change it like this:
>
> public CustomMenuComponent(String id) {
>  super(id,"frag1");
>  add(repeatingView);
> }
>
> I really think you're confusing yourself with all of this nesting,
> though.  It doesn't look like you need all of this craziness.  If you
> really don't like repeating the link-containing-a-label stuff, then
> feel free to use a Fragment, but I don't know that the custom menu
> stuff is needed.  Try this:
>
> protected class MenuLink extends Fragment
> {
>  public LinkWithLabel(String id, Class<? extends WebPage> targetPage,
> IModel<String> labelModel)
>  {
>    super(id, "linkWithLabel", MyPage.this);
>    BookmarkablePageLink link = new BookmarkablePageLink("link", targetPage);
>    link.add(new Label("label", labelModel));
>    add(link);
>  }
> }
>
> In your markup, you'll have:
>
> <wicket:fragment id="menuLink">
>  <a href="#" wicket:id="link"><label wicket:id="label"></a>
> </wicket:fragment>
>
> This code is off the top of my head, so there may be some compiler
> errors, but you get the idea.
>
> On Fri, Oct 10, 2008 at 11:17 AM, miro <mi...@yahoo.com> wrote:
>>
>> here is the link
>>
>> http://pastebin.com/m4c9ed66b
>>
>> jwcarman wrote:
>>>
>>> Ahhh, ok.  I don't know that I've ever had that issue before.  How
>>> about doing a pastebin (http://pastebin.com/).  Put your code in there
>>> and send us a link?
>>>
>>> On Fri, Oct 10, 2008 at 10:51 AM, miro <mi...@yahoo.com> wrote:
>>>>
>>>> -tag is just to   show html , if i donot put that browser would parse
>>>> that
>>>> html and we dont get to see actual html code .
>>>>
>>>> jwcarman wrote:
>>>>>
>>>>> What is <span-tag>?
>>>>>
>>>>> On Fri, Oct 10, 2008 at 10:42 AM, miro <mi...@yahoo.com> wrote:
>>>>>>
>>>>>> This   is what i did to use fragment
>>>>>>
>>>>>>
>>>>>>        protected class CustomMenuComponent extends Fragment {
>>>>>>                private String headerlabel;
>>>>>>                private RepeatingView   repeatingView = new
>>>>>> RepeatingView("repater");
>>>>>>
>>>>>>                public CustomMenuComponent() {
>>>>>>                        super("custmenu","frag1");
>>>>>>                        add(repeatingView);
>>>>>>                }
>>>>>>
>>>>>>                protected void addCustomLink(CustomLinkComponenet
>>>>>> customLinkComponenet){
>>>>>>
>>>>>>                        repeatingView.add(customLinkComponenet);
>>>>>>                }
>>>>>>
>>>>>>                protected Label getHeader(){
>>>>>>                        return new Label("hl",headerlabel);
>>>>>>                }
>>>>>>        }
>>>>>>
>>>>>>        protected class CustomLinkComponenet extends  Fragment  {
>>>>>>                String displayName;
>>>>>>                Class  clazz;
>>>>>>                public CustomLinkComponenet(String displayName, Class
>>>>>> clazz) {
>>>>>>                        super("customlink","frag2");
>>>>>>                        this.displayName=displayName;
>>>>>>                        this.clazz=clazz;
>>>>>>                        add(getBookmarkablePageLink());
>>>>>>                        add(getDisplayNameLabel());
>>>>>>                }
>>>>>>
>>>>>>                protected BookmarkablePageLink
>>>>>> getBookmarkablePageLink(){
>>>>>>                        return new BookmarkablePageLink("link", clazz);
>>>>>>                }
>>>>>>
>>>>>>                protected  Label  getDisplayNameLabel(){
>>>>>>                        return new Label("lbl",displayName);
>>>>>>                }
>>>>>>        }
>>>>>>  in my page constructor
>>>>>>
>>>>>>                RicolaGroupbox  ricolaGroupbox= new
>>>>>> RicolaGroupbox("csrHome","ESP");
>>>>>>
>>>>>>                CustomMenuComponent  customMenuComponent= new
>>>>>> CustomMenuComponent();
>>>>>>                customMenuComponent.addCustomLink(new
>>>>>> CustomLinkComponenet("Storage
>>>>>> Inbox",Index.class));
>>>>>>
>>>>>>
>>>>>>                ricolaGroupbox.add(customMenuComponent);
>>>>>>               add(ricolaGroupbox);
>>>>>>
>>>>>> and  changed html
>>>>>> to this
>>>>>>
>>>>>>        <table-tag class="ricAppIndex"><tr-tag><td-tag>
>>>>>>            <div-tag wicket:id="csrHome">
>>>>>>                    <table-tag>
>>>>>>                        <tr-tag>
>>>>>>                            <td-tag>
>>>>>>                                                <span-tag
>>>>>> wicket:id="custmenu">
>>>>>>                                                </span-tag>
>>>>>>                            </td-tag>
>>>>>>                        </tr-tag>
>>>>>>                    </table-tag>
>>>>>>            </div-tag>
>>>>>>        </td-tag></tr-tag></table-tag>
>>>>>>
>>>>>>
>>>>>>        <wicket:fragment wicket:id="frag1">
>>>>>>                <span-tag wicket:id="custmenu">
>>>>>>                   <ul-tag>
>>>>>>                                <li-tag wicket:id="repater">
>>>>>>                                </li-tag>
>>>>>>                   </ul-tag>
>>>>>>                </span-tag>
>>>>>>        </wicket:fragment>
>>>>>>
>>>>>>        <wicket:fragment wicket:id="frag2">
>>>>>>                        <span-tag wicket:id="customlink">
>>>>>>                                <A-tag href="#"
>>>>>> wicket:id="link"><label-tag
>>>>>> wicket:id="lbl"></label-tag></A-tag>
>>>>>>                        </span-tag>
>>>>>>        </wicket:fragment>
>>>>>>
>>>>>> am I doing right for using fragment ?  and
>>>>>> this is the exception iam getting
>>>>>> org.apache.wicket.markup.MarkupException: Unable to find component with
>>>>>> id
>>>>>> 'custmenu' in [MarkupContainer [Component id = custmenu, page =
>>>>>> com.uprr.app.csr.webapp.pages.Index, path =
>>>>>> 0:csrHome:custmenu.Index$CustomMenuComponent, isVisible = true,
>>>>>> isVersioned
>>>>>> = true]]. This means that you declared wicket:id=custmenu in your
>>>>>> markup,
>>>>>> but that you either did not add the component to your page at all, or
>>>>>> that
>>>>>> the hierarchy does not match.
>>>>>>
>>>>>>
>>>>>>
>>>>>> Nino.Martinez wrote:
>>>>>>>
>>>>>>> Hi
>>>>>>>
>>>>>>> like so:
>>>>>>>
>>>>>>> class$innerclass.html
>>>>>>>
>>>>>>> example
>>>>>>>
>>>>>>> MyPanel$MyInnerPanel.html
>>>>>>>
>>>>>>> Or just have the panels in their own classes...
>>>>>>>
>>>>>>> If you take a look at the wizard example(wicket library) theres an
>>>>>>> example there on a wizard with panels..
>>>>>>>
>>>>>>> miro wrote:
>>>>>>>> I have custom components
>>>>>>>>
>>>>>>>>      protected class CustomMenuComponent extends Panel {
>>>>>>>>              private String headerlabel;
>>>>>>>>              private RepeatingView   repeatingView = new
>>>>>>>> RepeatingView("repater");
>>>>>>>>
>>>>>>>>              public CustomMenuComponent() {
>>>>>>>>                      super("custmenu");
>>>>>>>>                      add(repeatingView);
>>>>>>>>              }
>>>>>>>>
>>>>>>>>              protected void addCustomLink(CustomLinkComponenet
>>>>>>>> customLinkComponenet){
>>>>>>>>                      repeatingView.add(customLinkComponenet);
>>>>>>>>              }
>>>>>>>>
>>>>>>>>              protected Label getHeader(){
>>>>>>>>                      return new Label("hl",headerlabel);
>>>>>>>>              }
>>>>>>>>      }
>>>>>>>>
>>>>>>>>      protected class CustomLinkComponenet extends  Panel  {
>>>>>>>>              String displayName;
>>>>>>>>              Class  clazz;
>>>>>>>>              public CustomLinkComponenet(String displayName, Class
>>>>>>>> clazz) {
>>>>>>>>                      super("customlink");
>>>>>>>>                      this.displayName=displayName;
>>>>>>>>                      this.clazz=clazz;
>>>>>>>>                      add(getBookmarkablePageLink());
>>>>>>>>                      add(getDisplayNameLabel());
>>>>>>>>              }
>>>>>>>>
>>>>>>>>              protected BookmarkablePageLink
>>>>>>>> getBookmarkablePageLink(){
>>>>>>>>                      return new BookmarkablePageLink("link", clazz);
>>>>>>>>              }
>>>>>>>>
>>>>>>>>              protected  Label  getDisplayNameLabel(){
>>>>>>>>                      return new Label("lbl",displayName);
>>>>>>>>              }
>>>>>>>>      }
>>>>>>>> html for  component  CustomMenuComponent
>>>>>>>>
>>>>>>>>              <span-TAG wicket:id="custmenu">
>>>>>>>>                 <ul-TAG>
>>>>>>>>                              <li-TAG wicket:id="repater"></li-TAG>
>>>>>>>>                 </ul-TAG>
>>>>>>>>                 </span-TAG>
>>>>>>>> html for component   CustomLinkComponenet
>>>>>>>>
>>>>>>>>                                      <span-TAG
>>>>>>>> wicket:id="customlink">
>>>>>>>>                                              <A-TAG  href="#"
>>>>>>>> wicket:id="link">
>>>>>>>>                                                         <label-TAG
>>>>>>>> wicket:id="lbl"></label-TAG>
>>>>>>>>                                                 </A-TAG>
>>>>>>>>                                      </span-TAG>
>>>>>>>> please help me with the options of   specifying this html for the
>>>>>>>> components
>>>>>>>> . I want to tie html along with the components in the java file
>>>>>>>> itself
>>>>>>>> is
>>>>>>>> it possible ?
>>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> -Wicket for love
>>>>>>>
>>>>>>> Nino Martinez Wael
>>>>>>> Java Specialist @ Jayway DK
>>>>>>> http://www.jayway.dk
>>>>>>> +45 2936 7684
>>>>>>>
>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> --
>>>>>> View this message in context:
>>>>>> http://www.nabble.com/html-along-with-the-component-tp19918507p19919684.html
>>>>>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>>>>>
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> 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
>>>>>
>>>>>
>>>>>
>>>>
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/html-along-with-the-component-tp19918507p19919849.html
>>>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> 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
>>>
>>>
>>>
>>
>> --
>> View this message in context: http://www.nabble.com/html-along-with-the-component-tp19918507p19920357.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> 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: html along with the component

Posted by James Carman <ja...@carmanconsulting.com>.
One thing I suggest you get away from is hard-coding your component
ids in your constructors.  I've looked at a lot of examples and most
folks let the caller supply the ids.  I think that might also be
what's confusing you here.  I don't know if it's bad to hard-code the
fragment id in your fragment class' constructor, but I'd let the
caller hand you the actual component id (that way it's reusable).  So,
I'd change it like this:

public CustomMenuComponent(String id) {
  super(id,"frag1");
  add(repeatingView);
}

I really think you're confusing yourself with all of this nesting,
though.  It doesn't look like you need all of this craziness.  If you
really don't like repeating the link-containing-a-label stuff, then
feel free to use a Fragment, but I don't know that the custom menu
stuff is needed.  Try this:

protected class MenuLink extends Fragment
{
  public LinkWithLabel(String id, Class<? extends WebPage> targetPage,
IModel<String> labelModel)
  {
    super(id, "linkWithLabel", MyPage.this);
    BookmarkablePageLink link = new BookmarkablePageLink("link", targetPage);
    link.add(new Label("label", labelModel));
    add(link);
  }
}

In your markup, you'll have:

<wicket:fragment id="menuLink">
  <a href="#" wicket:id="link"><label wicket:id="label"></a>
</wicket:fragment>

This code is off the top of my head, so there may be some compiler
errors, but you get the idea.

On Fri, Oct 10, 2008 at 11:17 AM, miro <mi...@yahoo.com> wrote:
>
> here is the link
>
> http://pastebin.com/m4c9ed66b
>
> jwcarman wrote:
>>
>> Ahhh, ok.  I don't know that I've ever had that issue before.  How
>> about doing a pastebin (http://pastebin.com/).  Put your code in there
>> and send us a link?
>>
>> On Fri, Oct 10, 2008 at 10:51 AM, miro <mi...@yahoo.com> wrote:
>>>
>>> -tag is just to   show html , if i donot put that browser would parse
>>> that
>>> html and we dont get to see actual html code .
>>>
>>> jwcarman wrote:
>>>>
>>>> What is <span-tag>?
>>>>
>>>> On Fri, Oct 10, 2008 at 10:42 AM, miro <mi...@yahoo.com> wrote:
>>>>>
>>>>> This   is what i did to use fragment
>>>>>
>>>>>
>>>>>        protected class CustomMenuComponent extends Fragment {
>>>>>                private String headerlabel;
>>>>>                private RepeatingView   repeatingView = new
>>>>> RepeatingView("repater");
>>>>>
>>>>>                public CustomMenuComponent() {
>>>>>                        super("custmenu","frag1");
>>>>>                        add(repeatingView);
>>>>>                }
>>>>>
>>>>>                protected void addCustomLink(CustomLinkComponenet
>>>>> customLinkComponenet){
>>>>>
>>>>>                        repeatingView.add(customLinkComponenet);
>>>>>                }
>>>>>
>>>>>                protected Label getHeader(){
>>>>>                        return new Label("hl",headerlabel);
>>>>>                }
>>>>>        }
>>>>>
>>>>>        protected class CustomLinkComponenet extends  Fragment  {
>>>>>                String displayName;
>>>>>                Class  clazz;
>>>>>                public CustomLinkComponenet(String displayName, Class
>>>>> clazz) {
>>>>>                        super("customlink","frag2");
>>>>>                        this.displayName=displayName;
>>>>>                        this.clazz=clazz;
>>>>>                        add(getBookmarkablePageLink());
>>>>>                        add(getDisplayNameLabel());
>>>>>                }
>>>>>
>>>>>                protected BookmarkablePageLink
>>>>> getBookmarkablePageLink(){
>>>>>                        return new BookmarkablePageLink("link", clazz);
>>>>>                }
>>>>>
>>>>>                protected  Label  getDisplayNameLabel(){
>>>>>                        return new Label("lbl",displayName);
>>>>>                }
>>>>>        }
>>>>>  in my page constructor
>>>>>
>>>>>                RicolaGroupbox  ricolaGroupbox= new
>>>>> RicolaGroupbox("csrHome","ESP");
>>>>>
>>>>>                CustomMenuComponent  customMenuComponent= new
>>>>> CustomMenuComponent();
>>>>>                customMenuComponent.addCustomLink(new
>>>>> CustomLinkComponenet("Storage
>>>>> Inbox",Index.class));
>>>>>
>>>>>
>>>>>                ricolaGroupbox.add(customMenuComponent);
>>>>>               add(ricolaGroupbox);
>>>>>
>>>>> and  changed html
>>>>> to this
>>>>>
>>>>>        <table-tag class="ricAppIndex"><tr-tag><td-tag>
>>>>>            <div-tag wicket:id="csrHome">
>>>>>                    <table-tag>
>>>>>                        <tr-tag>
>>>>>                            <td-tag>
>>>>>                                                <span-tag
>>>>> wicket:id="custmenu">
>>>>>                                                </span-tag>
>>>>>                            </td-tag>
>>>>>                        </tr-tag>
>>>>>                    </table-tag>
>>>>>            </div-tag>
>>>>>        </td-tag></tr-tag></table-tag>
>>>>>
>>>>>
>>>>>        <wicket:fragment wicket:id="frag1">
>>>>>                <span-tag wicket:id="custmenu">
>>>>>                   <ul-tag>
>>>>>                                <li-tag wicket:id="repater">
>>>>>                                </li-tag>
>>>>>                   </ul-tag>
>>>>>                </span-tag>
>>>>>        </wicket:fragment>
>>>>>
>>>>>        <wicket:fragment wicket:id="frag2">
>>>>>                        <span-tag wicket:id="customlink">
>>>>>                                <A-tag href="#"
>>>>> wicket:id="link"><label-tag
>>>>> wicket:id="lbl"></label-tag></A-tag>
>>>>>                        </span-tag>
>>>>>        </wicket:fragment>
>>>>>
>>>>> am I doing right for using fragment ?  and
>>>>> this is the exception iam getting
>>>>> org.apache.wicket.markup.MarkupException: Unable to find component with
>>>>> id
>>>>> 'custmenu' in [MarkupContainer [Component id = custmenu, page =
>>>>> com.uprr.app.csr.webapp.pages.Index, path =
>>>>> 0:csrHome:custmenu.Index$CustomMenuComponent, isVisible = true,
>>>>> isVersioned
>>>>> = true]]. This means that you declared wicket:id=custmenu in your
>>>>> markup,
>>>>> but that you either did not add the component to your page at all, or
>>>>> that
>>>>> the hierarchy does not match.
>>>>>
>>>>>
>>>>>
>>>>> Nino.Martinez wrote:
>>>>>>
>>>>>> Hi
>>>>>>
>>>>>> like so:
>>>>>>
>>>>>> class$innerclass.html
>>>>>>
>>>>>> example
>>>>>>
>>>>>> MyPanel$MyInnerPanel.html
>>>>>>
>>>>>> Or just have the panels in their own classes...
>>>>>>
>>>>>> If you take a look at the wizard example(wicket library) theres an
>>>>>> example there on a wizard with panels..
>>>>>>
>>>>>> miro wrote:
>>>>>>> I have custom components
>>>>>>>
>>>>>>>      protected class CustomMenuComponent extends Panel {
>>>>>>>              private String headerlabel;
>>>>>>>              private RepeatingView   repeatingView = new
>>>>>>> RepeatingView("repater");
>>>>>>>
>>>>>>>              public CustomMenuComponent() {
>>>>>>>                      super("custmenu");
>>>>>>>                      add(repeatingView);
>>>>>>>              }
>>>>>>>
>>>>>>>              protected void addCustomLink(CustomLinkComponenet
>>>>>>> customLinkComponenet){
>>>>>>>                      repeatingView.add(customLinkComponenet);
>>>>>>>              }
>>>>>>>
>>>>>>>              protected Label getHeader(){
>>>>>>>                      return new Label("hl",headerlabel);
>>>>>>>              }
>>>>>>>      }
>>>>>>>
>>>>>>>      protected class CustomLinkComponenet extends  Panel  {
>>>>>>>              String displayName;
>>>>>>>              Class  clazz;
>>>>>>>              public CustomLinkComponenet(String displayName, Class
>>>>>>> clazz) {
>>>>>>>                      super("customlink");
>>>>>>>                      this.displayName=displayName;
>>>>>>>                      this.clazz=clazz;
>>>>>>>                      add(getBookmarkablePageLink());
>>>>>>>                      add(getDisplayNameLabel());
>>>>>>>              }
>>>>>>>
>>>>>>>              protected BookmarkablePageLink
>>>>>>> getBookmarkablePageLink(){
>>>>>>>                      return new BookmarkablePageLink("link", clazz);
>>>>>>>              }
>>>>>>>
>>>>>>>              protected  Label  getDisplayNameLabel(){
>>>>>>>                      return new Label("lbl",displayName);
>>>>>>>              }
>>>>>>>      }
>>>>>>> html for  component  CustomMenuComponent
>>>>>>>
>>>>>>>              <span-TAG wicket:id="custmenu">
>>>>>>>                 <ul-TAG>
>>>>>>>                              <li-TAG wicket:id="repater"></li-TAG>
>>>>>>>                 </ul-TAG>
>>>>>>>                 </span-TAG>
>>>>>>> html for component   CustomLinkComponenet
>>>>>>>
>>>>>>>                                      <span-TAG
>>>>>>> wicket:id="customlink">
>>>>>>>                                              <A-TAG  href="#"
>>>>>>> wicket:id="link">
>>>>>>>                                                         <label-TAG
>>>>>>> wicket:id="lbl"></label-TAG>
>>>>>>>                                                 </A-TAG>
>>>>>>>                                      </span-TAG>
>>>>>>> please help me with the options of   specifying this html for the
>>>>>>> components
>>>>>>> . I want to tie html along with the components in the java file
>>>>>>> itself
>>>>>>> is
>>>>>>> it possible ?
>>>>>>>
>>>>>>
>>>>>> --
>>>>>> -Wicket for love
>>>>>>
>>>>>> Nino Martinez Wael
>>>>>> Java Specialist @ Jayway DK
>>>>>> http://www.jayway.dk
>>>>>> +45 2936 7684
>>>>>>
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> --
>>>>> View this message in context:
>>>>> http://www.nabble.com/html-along-with-the-component-tp19918507p19919684.html
>>>>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> 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
>>>>
>>>>
>>>>
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/html-along-with-the-component-tp19918507p19919849.html
>>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> 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
>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/html-along-with-the-component-tp19918507p19920357.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> 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: html along with the component

Posted by miro <mi...@yahoo.com>.
here is the link

http://pastebin.com/m4c9ed66b

jwcarman wrote:
> 
> Ahhh, ok.  I don't know that I've ever had that issue before.  How
> about doing a pastebin (http://pastebin.com/).  Put your code in there
> and send us a link?
> 
> On Fri, Oct 10, 2008 at 10:51 AM, miro <mi...@yahoo.com> wrote:
>>
>> -tag is just to   show html , if i donot put that browser would parse
>> that
>> html and we dont get to see actual html code .
>>
>> jwcarman wrote:
>>>
>>> What is <span-tag>?
>>>
>>> On Fri, Oct 10, 2008 at 10:42 AM, miro <mi...@yahoo.com> wrote:
>>>>
>>>> This   is what i did to use fragment
>>>>
>>>>
>>>>        protected class CustomMenuComponent extends Fragment {
>>>>                private String headerlabel;
>>>>                private RepeatingView   repeatingView = new
>>>> RepeatingView("repater");
>>>>
>>>>                public CustomMenuComponent() {
>>>>                        super("custmenu","frag1");
>>>>                        add(repeatingView);
>>>>                }
>>>>
>>>>                protected void addCustomLink(CustomLinkComponenet
>>>> customLinkComponenet){
>>>>
>>>>                        repeatingView.add(customLinkComponenet);
>>>>                }
>>>>
>>>>                protected Label getHeader(){
>>>>                        return new Label("hl",headerlabel);
>>>>                }
>>>>        }
>>>>
>>>>        protected class CustomLinkComponenet extends  Fragment  {
>>>>                String displayName;
>>>>                Class  clazz;
>>>>                public CustomLinkComponenet(String displayName, Class
>>>> clazz) {
>>>>                        super("customlink","frag2");
>>>>                        this.displayName=displayName;
>>>>                        this.clazz=clazz;
>>>>                        add(getBookmarkablePageLink());
>>>>                        add(getDisplayNameLabel());
>>>>                }
>>>>
>>>>                protected BookmarkablePageLink 
>>>> getBookmarkablePageLink(){
>>>>                        return new BookmarkablePageLink("link", clazz);
>>>>                }
>>>>
>>>>                protected  Label  getDisplayNameLabel(){
>>>>                        return new Label("lbl",displayName);
>>>>                }
>>>>        }
>>>>  in my page constructor
>>>>
>>>>                RicolaGroupbox  ricolaGroupbox= new
>>>> RicolaGroupbox("csrHome","ESP");
>>>>
>>>>                CustomMenuComponent  customMenuComponent= new
>>>> CustomMenuComponent();
>>>>                customMenuComponent.addCustomLink(new
>>>> CustomLinkComponenet("Storage
>>>> Inbox",Index.class));
>>>>
>>>>
>>>>                ricolaGroupbox.add(customMenuComponent);
>>>>               add(ricolaGroupbox);
>>>>
>>>> and  changed html
>>>> to this
>>>>
>>>>        <table-tag class="ricAppIndex"><tr-tag><td-tag>
>>>>            <div-tag wicket:id="csrHome">
>>>>                    <table-tag>
>>>>                        <tr-tag>
>>>>                            <td-tag>
>>>>                                                <span-tag
>>>> wicket:id="custmenu">
>>>>                                                </span-tag>
>>>>                            </td-tag>
>>>>                        </tr-tag>
>>>>                    </table-tag>
>>>>            </div-tag>
>>>>        </td-tag></tr-tag></table-tag>
>>>>
>>>>
>>>>        <wicket:fragment wicket:id="frag1">
>>>>                <span-tag wicket:id="custmenu">
>>>>                   <ul-tag>
>>>>                                <li-tag wicket:id="repater">
>>>>                                </li-tag>
>>>>                   </ul-tag>
>>>>                </span-tag>
>>>>        </wicket:fragment>
>>>>
>>>>        <wicket:fragment wicket:id="frag2">
>>>>                        <span-tag wicket:id="customlink">
>>>>                                <A-tag href="#"
>>>> wicket:id="link"><label-tag
>>>> wicket:id="lbl"></label-tag></A-tag>
>>>>                        </span-tag>
>>>>        </wicket:fragment>
>>>>
>>>> am I doing right for using fragment ?  and
>>>> this is the exception iam getting
>>>> org.apache.wicket.markup.MarkupException: Unable to find component with
>>>> id
>>>> 'custmenu' in [MarkupContainer [Component id = custmenu, page =
>>>> com.uprr.app.csr.webapp.pages.Index, path =
>>>> 0:csrHome:custmenu.Index$CustomMenuComponent, isVisible = true,
>>>> isVersioned
>>>> = true]]. This means that you declared wicket:id=custmenu in your
>>>> markup,
>>>> but that you either did not add the component to your page at all, or
>>>> that
>>>> the hierarchy does not match.
>>>>
>>>>
>>>>
>>>> Nino.Martinez wrote:
>>>>>
>>>>> Hi
>>>>>
>>>>> like so:
>>>>>
>>>>> class$innerclass.html
>>>>>
>>>>> example
>>>>>
>>>>> MyPanel$MyInnerPanel.html
>>>>>
>>>>> Or just have the panels in their own classes...
>>>>>
>>>>> If you take a look at the wizard example(wicket library) theres an
>>>>> example there on a wizard with panels..
>>>>>
>>>>> miro wrote:
>>>>>> I have custom components
>>>>>>
>>>>>>      protected class CustomMenuComponent extends Panel {
>>>>>>              private String headerlabel;
>>>>>>              private RepeatingView   repeatingView = new
>>>>>> RepeatingView("repater");
>>>>>>
>>>>>>              public CustomMenuComponent() {
>>>>>>                      super("custmenu");
>>>>>>                      add(repeatingView);
>>>>>>              }
>>>>>>
>>>>>>              protected void addCustomLink(CustomLinkComponenet
>>>>>> customLinkComponenet){
>>>>>>                      repeatingView.add(customLinkComponenet);
>>>>>>              }
>>>>>>
>>>>>>              protected Label getHeader(){
>>>>>>                      return new Label("hl",headerlabel);
>>>>>>              }
>>>>>>      }
>>>>>>
>>>>>>      protected class CustomLinkComponenet extends  Panel  {
>>>>>>              String displayName;
>>>>>>              Class  clazz;
>>>>>>              public CustomLinkComponenet(String displayName, Class
>>>>>> clazz) {
>>>>>>                      super("customlink");
>>>>>>                      this.displayName=displayName;
>>>>>>                      this.clazz=clazz;
>>>>>>                      add(getBookmarkablePageLink());
>>>>>>                      add(getDisplayNameLabel());
>>>>>>              }
>>>>>>
>>>>>>              protected BookmarkablePageLink 
>>>>>> getBookmarkablePageLink(){
>>>>>>                      return new BookmarkablePageLink("link", clazz);
>>>>>>              }
>>>>>>
>>>>>>              protected  Label  getDisplayNameLabel(){
>>>>>>                      return new Label("lbl",displayName);
>>>>>>              }
>>>>>>      }
>>>>>> html for  component  CustomMenuComponent
>>>>>>
>>>>>>              <span-TAG wicket:id="custmenu">
>>>>>>                 <ul-TAG>
>>>>>>                              <li-TAG wicket:id="repater"></li-TAG>
>>>>>>                 </ul-TAG>
>>>>>>                 </span-TAG>
>>>>>> html for component   CustomLinkComponenet
>>>>>>
>>>>>>                                      <span-TAG
>>>>>> wicket:id="customlink">
>>>>>>                                              <A-TAG  href="#"
>>>>>> wicket:id="link">
>>>>>>                                                         <label-TAG
>>>>>> wicket:id="lbl"></label-TAG>
>>>>>>                                                 </A-TAG>
>>>>>>                                      </span-TAG>
>>>>>> please help me with the options of   specifying this html for the
>>>>>> components
>>>>>> . I want to tie html along with the components in the java file
>>>>>> itself
>>>>>> is
>>>>>> it possible ?
>>>>>>
>>>>>
>>>>> --
>>>>> -Wicket for love
>>>>>
>>>>> Nino Martinez Wael
>>>>> Java Specialist @ Jayway DK
>>>>> http://www.jayway.dk
>>>>> +45 2936 7684
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>
>>>>>
>>>>>
>>>>
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/html-along-with-the-component-tp19918507p19919684.html
>>>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> 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
>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/html-along-with-the-component-tp19918507p19919849.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> 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
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/html-along-with-the-component-tp19918507p19920357.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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


Re: html along with the component

Posted by James Carman <ja...@carmanconsulting.com>.
Ahhh, ok.  I don't know that I've ever had that issue before.  How
about doing a pastebin (http://pastebin.com/).  Put your code in there
and send us a link?

On Fri, Oct 10, 2008 at 10:51 AM, miro <mi...@yahoo.com> wrote:
>
> -tag is just to   show html , if i donot put that browser would parse that
> html and we dont get to see actual html code .
>
> jwcarman wrote:
>>
>> What is <span-tag>?
>>
>> On Fri, Oct 10, 2008 at 10:42 AM, miro <mi...@yahoo.com> wrote:
>>>
>>> This   is what i did to use fragment
>>>
>>>
>>>        protected class CustomMenuComponent extends Fragment {
>>>                private String headerlabel;
>>>                private RepeatingView   repeatingView = new
>>> RepeatingView("repater");
>>>
>>>                public CustomMenuComponent() {
>>>                        super("custmenu","frag1");
>>>                        add(repeatingView);
>>>                }
>>>
>>>                protected void addCustomLink(CustomLinkComponenet
>>> customLinkComponenet){
>>>
>>>                        repeatingView.add(customLinkComponenet);
>>>                }
>>>
>>>                protected Label getHeader(){
>>>                        return new Label("hl",headerlabel);
>>>                }
>>>        }
>>>
>>>        protected class CustomLinkComponenet extends  Fragment  {
>>>                String displayName;
>>>                Class  clazz;
>>>                public CustomLinkComponenet(String displayName, Class
>>> clazz) {
>>>                        super("customlink","frag2");
>>>                        this.displayName=displayName;
>>>                        this.clazz=clazz;
>>>                        add(getBookmarkablePageLink());
>>>                        add(getDisplayNameLabel());
>>>                }
>>>
>>>                protected BookmarkablePageLink  getBookmarkablePageLink(){
>>>                        return new BookmarkablePageLink("link", clazz);
>>>                }
>>>
>>>                protected  Label  getDisplayNameLabel(){
>>>                        return new Label("lbl",displayName);
>>>                }
>>>        }
>>>  in my page constructor
>>>
>>>                RicolaGroupbox  ricolaGroupbox= new
>>> RicolaGroupbox("csrHome","ESP");
>>>
>>>                CustomMenuComponent  customMenuComponent= new
>>> CustomMenuComponent();
>>>                customMenuComponent.addCustomLink(new
>>> CustomLinkComponenet("Storage
>>> Inbox",Index.class));
>>>
>>>
>>>                ricolaGroupbox.add(customMenuComponent);
>>>               add(ricolaGroupbox);
>>>
>>> and  changed html
>>> to this
>>>
>>>        <table-tag class="ricAppIndex"><tr-tag><td-tag>
>>>            <div-tag wicket:id="csrHome">
>>>                    <table-tag>
>>>                        <tr-tag>
>>>                            <td-tag>
>>>                                                <span-tag
>>> wicket:id="custmenu">
>>>                                                </span-tag>
>>>                            </td-tag>
>>>                        </tr-tag>
>>>                    </table-tag>
>>>            </div-tag>
>>>        </td-tag></tr-tag></table-tag>
>>>
>>>
>>>        <wicket:fragment wicket:id="frag1">
>>>                <span-tag wicket:id="custmenu">
>>>                   <ul-tag>
>>>                                <li-tag wicket:id="repater">
>>>                                </li-tag>
>>>                   </ul-tag>
>>>                </span-tag>
>>>        </wicket:fragment>
>>>
>>>        <wicket:fragment wicket:id="frag2">
>>>                        <span-tag wicket:id="customlink">
>>>                                <A-tag href="#"
>>> wicket:id="link"><label-tag
>>> wicket:id="lbl"></label-tag></A-tag>
>>>                        </span-tag>
>>>        </wicket:fragment>
>>>
>>> am I doing right for using fragment ?  and
>>> this is the exception iam getting
>>> org.apache.wicket.markup.MarkupException: Unable to find component with
>>> id
>>> 'custmenu' in [MarkupContainer [Component id = custmenu, page =
>>> com.uprr.app.csr.webapp.pages.Index, path =
>>> 0:csrHome:custmenu.Index$CustomMenuComponent, isVisible = true,
>>> isVersioned
>>> = true]]. This means that you declared wicket:id=custmenu in your markup,
>>> but that you either did not add the component to your page at all, or
>>> that
>>> the hierarchy does not match.
>>>
>>>
>>>
>>> Nino.Martinez wrote:
>>>>
>>>> Hi
>>>>
>>>> like so:
>>>>
>>>> class$innerclass.html
>>>>
>>>> example
>>>>
>>>> MyPanel$MyInnerPanel.html
>>>>
>>>> Or just have the panels in their own classes...
>>>>
>>>> If you take a look at the wizard example(wicket library) theres an
>>>> example there on a wizard with panels..
>>>>
>>>> miro wrote:
>>>>> I have custom components
>>>>>
>>>>>      protected class CustomMenuComponent extends Panel {
>>>>>              private String headerlabel;
>>>>>              private RepeatingView   repeatingView = new
>>>>> RepeatingView("repater");
>>>>>
>>>>>              public CustomMenuComponent() {
>>>>>                      super("custmenu");
>>>>>                      add(repeatingView);
>>>>>              }
>>>>>
>>>>>              protected void addCustomLink(CustomLinkComponenet
>>>>> customLinkComponenet){
>>>>>                      repeatingView.add(customLinkComponenet);
>>>>>              }
>>>>>
>>>>>              protected Label getHeader(){
>>>>>                      return new Label("hl",headerlabel);
>>>>>              }
>>>>>      }
>>>>>
>>>>>      protected class CustomLinkComponenet extends  Panel  {
>>>>>              String displayName;
>>>>>              Class  clazz;
>>>>>              public CustomLinkComponenet(String displayName, Class
>>>>> clazz) {
>>>>>                      super("customlink");
>>>>>                      this.displayName=displayName;
>>>>>                      this.clazz=clazz;
>>>>>                      add(getBookmarkablePageLink());
>>>>>                      add(getDisplayNameLabel());
>>>>>              }
>>>>>
>>>>>              protected BookmarkablePageLink  getBookmarkablePageLink(){
>>>>>                      return new BookmarkablePageLink("link", clazz);
>>>>>              }
>>>>>
>>>>>              protected  Label  getDisplayNameLabel(){
>>>>>                      return new Label("lbl",displayName);
>>>>>              }
>>>>>      }
>>>>> html for  component  CustomMenuComponent
>>>>>
>>>>>              <span-TAG wicket:id="custmenu">
>>>>>                 <ul-TAG>
>>>>>                              <li-TAG wicket:id="repater"></li-TAG>
>>>>>                 </ul-TAG>
>>>>>                 </span-TAG>
>>>>> html for component   CustomLinkComponenet
>>>>>
>>>>>                                      <span-TAG wicket:id="customlink">
>>>>>                                              <A-TAG  href="#"
>>>>> wicket:id="link">
>>>>>                                                         <label-TAG
>>>>> wicket:id="lbl"></label-TAG>
>>>>>                                                 </A-TAG>
>>>>>                                      </span-TAG>
>>>>> please help me with the options of   specifying this html for the
>>>>> components
>>>>> . I want to tie html along with the components in the java file itself
>>>>> is
>>>>> it possible ?
>>>>>
>>>>
>>>> --
>>>> -Wicket for love
>>>>
>>>> Nino Martinez Wael
>>>> Java Specialist @ Jayway DK
>>>> http://www.jayway.dk
>>>> +45 2936 7684
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>
>>>>
>>>>
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/html-along-with-the-component-tp19918507p19919684.html
>>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> 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
>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/html-along-with-the-component-tp19918507p19919849.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> 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: html along with the component

Posted by Rens Verhage <wi...@gmail.com>.
On Fri, Oct 10, 2008 at 4:51 PM, miro <mi...@yahoo.com> wrote:

>
> -tag is just to   show html , if i donot put that browser would parse that
> html and we dont get to see actual html code .
>
>
What's wrong with &lt;span&gt;?

Re: html along with the component

Posted by miro <mi...@yahoo.com>.
-tag is just to   show html , if i donot put that browser would parse that
html and we dont get to see actual html code .

jwcarman wrote:
> 
> What is <span-tag>?
> 
> On Fri, Oct 10, 2008 at 10:42 AM, miro <mi...@yahoo.com> wrote:
>>
>> This   is what i did to use fragment
>>
>>
>>        protected class CustomMenuComponent extends Fragment {
>>                private String headerlabel;
>>                private RepeatingView   repeatingView = new
>> RepeatingView("repater");
>>
>>                public CustomMenuComponent() {
>>                        super("custmenu","frag1");
>>                        add(repeatingView);
>>                }
>>
>>                protected void addCustomLink(CustomLinkComponenet 
>> customLinkComponenet){
>>
>>                        repeatingView.add(customLinkComponenet);
>>                }
>>
>>                protected Label getHeader(){
>>                        return new Label("hl",headerlabel);
>>                }
>>        }
>>
>>        protected class CustomLinkComponenet extends  Fragment  {
>>                String displayName;
>>                Class  clazz;
>>                public CustomLinkComponenet(String displayName, Class 
>> clazz) {
>>                        super("customlink","frag2");
>>                        this.displayName=displayName;
>>                        this.clazz=clazz;
>>                        add(getBookmarkablePageLink());
>>                        add(getDisplayNameLabel());
>>                }
>>
>>                protected BookmarkablePageLink  getBookmarkablePageLink(){
>>                        return new BookmarkablePageLink("link", clazz);
>>                }
>>
>>                protected  Label  getDisplayNameLabel(){
>>                        return new Label("lbl",displayName);
>>                }
>>        }
>>  in my page constructor
>>
>>                RicolaGroupbox  ricolaGroupbox= new
>> RicolaGroupbox("csrHome","ESP");
>>
>>                CustomMenuComponent  customMenuComponent= new
>> CustomMenuComponent();
>>                customMenuComponent.addCustomLink(new
>> CustomLinkComponenet("Storage
>> Inbox",Index.class));
>>
>>
>>                ricolaGroupbox.add(customMenuComponent);
>>               add(ricolaGroupbox);
>>
>> and  changed html
>> to this
>>
>>        <table-tag class="ricAppIndex"><tr-tag><td-tag>
>>            <div-tag wicket:id="csrHome">
>>                    <table-tag>
>>                        <tr-tag>
>>                            <td-tag>
>>                                                <span-tag
>> wicket:id="custmenu">
>>                                                </span-tag>
>>                            </td-tag>
>>                        </tr-tag>
>>                    </table-tag>
>>            </div-tag>
>>        </td-tag></tr-tag></table-tag>
>>
>>
>>        <wicket:fragment wicket:id="frag1">
>>                <span-tag wicket:id="custmenu">
>>                   <ul-tag>
>>                                <li-tag wicket:id="repater">
>>                                </li-tag>
>>                   </ul-tag>
>>                </span-tag>
>>        </wicket:fragment>
>>
>>        <wicket:fragment wicket:id="frag2">
>>                        <span-tag wicket:id="customlink">
>>                                <A-tag href="#"
>> wicket:id="link"><label-tag
>> wicket:id="lbl"></label-tag></A-tag>
>>                        </span-tag>
>>        </wicket:fragment>
>>
>> am I doing right for using fragment ?  and
>> this is the exception iam getting
>> org.apache.wicket.markup.MarkupException: Unable to find component with
>> id
>> 'custmenu' in [MarkupContainer [Component id = custmenu, page =
>> com.uprr.app.csr.webapp.pages.Index, path =
>> 0:csrHome:custmenu.Index$CustomMenuComponent, isVisible = true,
>> isVersioned
>> = true]]. This means that you declared wicket:id=custmenu in your markup,
>> but that you either did not add the component to your page at all, or
>> that
>> the hierarchy does not match.
>>
>>
>>
>> Nino.Martinez wrote:
>>>
>>> Hi
>>>
>>> like so:
>>>
>>> class$innerclass.html
>>>
>>> example
>>>
>>> MyPanel$MyInnerPanel.html
>>>
>>> Or just have the panels in their own classes...
>>>
>>> If you take a look at the wizard example(wicket library) theres an
>>> example there on a wizard with panels..
>>>
>>> miro wrote:
>>>> I have custom components
>>>>
>>>>      protected class CustomMenuComponent extends Panel {
>>>>              private String headerlabel;
>>>>              private RepeatingView   repeatingView = new
>>>> RepeatingView("repater");
>>>>
>>>>              public CustomMenuComponent() {
>>>>                      super("custmenu");
>>>>                      add(repeatingView);
>>>>              }
>>>>
>>>>              protected void addCustomLink(CustomLinkComponenet
>>>> customLinkComponenet){
>>>>                      repeatingView.add(customLinkComponenet);
>>>>              }
>>>>
>>>>              protected Label getHeader(){
>>>>                      return new Label("hl",headerlabel);
>>>>              }
>>>>      }
>>>>
>>>>      protected class CustomLinkComponenet extends  Panel  {
>>>>              String displayName;
>>>>              Class  clazz;
>>>>              public CustomLinkComponenet(String displayName, Class 
>>>> clazz) {
>>>>                      super("customlink");
>>>>                      this.displayName=displayName;
>>>>                      this.clazz=clazz;
>>>>                      add(getBookmarkablePageLink());
>>>>                      add(getDisplayNameLabel());
>>>>              }
>>>>
>>>>              protected BookmarkablePageLink  getBookmarkablePageLink(){
>>>>                      return new BookmarkablePageLink("link", clazz);
>>>>              }
>>>>
>>>>              protected  Label  getDisplayNameLabel(){
>>>>                      return new Label("lbl",displayName);
>>>>              }
>>>>      }
>>>> html for  component  CustomMenuComponent
>>>>
>>>>              <span-TAG wicket:id="custmenu">
>>>>                 <ul-TAG>
>>>>                              <li-TAG wicket:id="repater"></li-TAG>
>>>>                 </ul-TAG>
>>>>                 </span-TAG>
>>>> html for component   CustomLinkComponenet
>>>>
>>>>                                      <span-TAG wicket:id="customlink">
>>>>                                              <A-TAG  href="#"
>>>> wicket:id="link">
>>>>                                                         <label-TAG
>>>> wicket:id="lbl"></label-TAG>
>>>>                                                 </A-TAG>
>>>>                                      </span-TAG>
>>>> please help me with the options of   specifying this html for the
>>>> components
>>>> . I want to tie html along with the components in the java file itself
>>>> is
>>>> it possible ?
>>>>
>>>
>>> --
>>> -Wicket for love
>>>
>>> Nino Martinez Wael
>>> Java Specialist @ Jayway DK
>>> http://www.jayway.dk
>>> +45 2936 7684
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/html-along-with-the-component-tp19918507p19919684.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> 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
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/html-along-with-the-component-tp19918507p19919849.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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


Re: html along with the component

Posted by James Carman <ja...@carmanconsulting.com>.
What is <span-tag>?

On Fri, Oct 10, 2008 at 10:42 AM, miro <mi...@yahoo.com> wrote:
>
> This   is what i did to use fragment
>
>
>        protected class CustomMenuComponent extends Fragment {
>                private String headerlabel;
>                private RepeatingView   repeatingView = new RepeatingView("repater");
>
>                public CustomMenuComponent() {
>                        super("custmenu","frag1");
>                        add(repeatingView);
>                }
>
>                protected void addCustomLink(CustomLinkComponenet  customLinkComponenet){
>
>                        repeatingView.add(customLinkComponenet);
>                }
>
>                protected Label getHeader(){
>                        return new Label("hl",headerlabel);
>                }
>        }
>
>        protected class CustomLinkComponenet extends  Fragment  {
>                String displayName;
>                Class  clazz;
>                public CustomLinkComponenet(String displayName, Class  clazz) {
>                        super("customlink","frag2");
>                        this.displayName=displayName;
>                        this.clazz=clazz;
>                        add(getBookmarkablePageLink());
>                        add(getDisplayNameLabel());
>                }
>
>                protected BookmarkablePageLink  getBookmarkablePageLink(){
>                        return new BookmarkablePageLink("link", clazz);
>                }
>
>                protected  Label  getDisplayNameLabel(){
>                        return new Label("lbl",displayName);
>                }
>        }
>  in my page constructor
>
>                RicolaGroupbox  ricolaGroupbox= new RicolaGroupbox("csrHome","ESP");
>
>                CustomMenuComponent  customMenuComponent= new CustomMenuComponent();
>                customMenuComponent.addCustomLink(new CustomLinkComponenet("Storage
> Inbox",Index.class));
>
>
>                ricolaGroupbox.add(customMenuComponent);
>               add(ricolaGroupbox);
>
> and  changed html
> to this
>
>        <table-tag class="ricAppIndex"><tr-tag><td-tag>
>            <div-tag wicket:id="csrHome">
>                    <table-tag>
>                        <tr-tag>
>                            <td-tag>
>                                                <span-tag wicket:id="custmenu">
>                                                </span-tag>
>                            </td-tag>
>                        </tr-tag>
>                    </table-tag>
>            </div-tag>
>        </td-tag></tr-tag></table-tag>
>
>
>        <wicket:fragment wicket:id="frag1">
>                <span-tag wicket:id="custmenu">
>                   <ul-tag>
>                                <li-tag wicket:id="repater">
>                                </li-tag>
>                   </ul-tag>
>                </span-tag>
>        </wicket:fragment>
>
>        <wicket:fragment wicket:id="frag2">
>                        <span-tag wicket:id="customlink">
>                                <A-tag href="#" wicket:id="link"><label-tag
> wicket:id="lbl"></label-tag></A-tag>
>                        </span-tag>
>        </wicket:fragment>
>
> am I doing right for using fragment ?  and
> this is the exception iam getting
> org.apache.wicket.markup.MarkupException: Unable to find component with id
> 'custmenu' in [MarkupContainer [Component id = custmenu, page =
> com.uprr.app.csr.webapp.pages.Index, path =
> 0:csrHome:custmenu.Index$CustomMenuComponent, isVisible = true, isVersioned
> = true]]. This means that you declared wicket:id=custmenu in your markup,
> but that you either did not add the component to your page at all, or that
> the hierarchy does not match.
>
>
>
> Nino.Martinez wrote:
>>
>> Hi
>>
>> like so:
>>
>> class$innerclass.html
>>
>> example
>>
>> MyPanel$MyInnerPanel.html
>>
>> Or just have the panels in their own classes...
>>
>> If you take a look at the wizard example(wicket library) theres an
>> example there on a wizard with panels..
>>
>> miro wrote:
>>> I have custom components
>>>
>>>      protected class CustomMenuComponent extends Panel {
>>>              private String headerlabel;
>>>              private RepeatingView   repeatingView = new RepeatingView("repater");
>>>
>>>              public CustomMenuComponent() {
>>>                      super("custmenu");
>>>                      add(repeatingView);
>>>              }
>>>
>>>              protected void addCustomLink(CustomLinkComponenet
>>> customLinkComponenet){
>>>                      repeatingView.add(customLinkComponenet);
>>>              }
>>>
>>>              protected Label getHeader(){
>>>                      return new Label("hl",headerlabel);
>>>              }
>>>      }
>>>
>>>      protected class CustomLinkComponenet extends  Panel  {
>>>              String displayName;
>>>              Class  clazz;
>>>              public CustomLinkComponenet(String displayName, Class  clazz) {
>>>                      super("customlink");
>>>                      this.displayName=displayName;
>>>                      this.clazz=clazz;
>>>                      add(getBookmarkablePageLink());
>>>                      add(getDisplayNameLabel());
>>>              }
>>>
>>>              protected BookmarkablePageLink  getBookmarkablePageLink(){
>>>                      return new BookmarkablePageLink("link", clazz);
>>>              }
>>>
>>>              protected  Label  getDisplayNameLabel(){
>>>                      return new Label("lbl",displayName);
>>>              }
>>>      }
>>> html for  component  CustomMenuComponent
>>>
>>>              <span-TAG wicket:id="custmenu">
>>>                 <ul-TAG>
>>>                              <li-TAG wicket:id="repater"></li-TAG>
>>>                 </ul-TAG>
>>>                 </span-TAG>
>>> html for component   CustomLinkComponenet
>>>
>>>                                      <span-TAG wicket:id="customlink">
>>>                                              <A-TAG  href="#" wicket:id="link">
>>>                                                         <label-TAG
>>> wicket:id="lbl"></label-TAG>
>>>                                                 </A-TAG>
>>>                                      </span-TAG>
>>> please help me with the options of   specifying this html for the
>>> components
>>> . I want to tie html along with the components in the java file itself
>>> is
>>> it possible ?
>>>
>>
>> --
>> -Wicket for love
>>
>> Nino Martinez Wael
>> Java Specialist @ Jayway DK
>> http://www.jayway.dk
>> +45 2936 7684
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/html-along-with-the-component-tp19918507p19919684.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> 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: html along with the component

Posted by miro <mi...@yahoo.com>.
This   is what i did to use fragment 


	protected class CustomMenuComponent extends Fragment {
		private String headerlabel;
		private RepeatingView   repeatingView = new RepeatingView("repater");
		
		public CustomMenuComponent() {
			super("custmenu","frag1");
			add(repeatingView);
		}

		protected void addCustomLink(CustomLinkComponenet  customLinkComponenet){
			
			repeatingView.add(customLinkComponenet);
		}
		
		protected Label getHeader(){
			return new Label("hl",headerlabel);
		}
	}	

	protected class CustomLinkComponenet extends  Fragment  {
		String displayName;
		Class  clazz;
		public CustomLinkComponenet(String displayName, Class  clazz) {
			super("customlink","frag2");
			this.displayName=displayName;
			this.clazz=clazz;
			add(getBookmarkablePageLink());
			add(getDisplayNameLabel());
		}

		protected BookmarkablePageLink  getBookmarkablePageLink(){
			return new BookmarkablePageLink("link", clazz);
		}

		protected  Label  getDisplayNameLabel(){
			return new Label("lbl",displayName);
		}
	}
 in my page constructor

		RicolaGroupbox  ricolaGroupbox= new RicolaGroupbox("csrHome","ESP");
		
		CustomMenuComponent  customMenuComponent= new CustomMenuComponent();
		customMenuComponent.addCustomLink(new CustomLinkComponenet("Storage
Inbox",Index.class));

		
		ricolaGroupbox.add(customMenuComponent);
               add(ricolaGroupbox);

and  changed html 
to this 

	<table-tag class="ricAppIndex"><tr-tag><td-tag>
	    <div-tag wicket:id="csrHome">
		    <table-tag>
		        <tr-tag>
		            <td-tag>
						<span-tag wicket:id="custmenu">
						</span-tag>
		            </td-tag>	
		        </tr-tag>
		    </table-tag>
	    </div-tag>
	</td-tag></tr-tag></table-tag>


	<wicket:fragment wicket:id="frag1">
		<span-tag wicket:id="custmenu">
		   <ul-tag>
		   		<li-tag wicket:id="repater">
		   		</li-tag>
		   </ul-tag>
		</span-tag>
	</wicket:fragment>

	<wicket:fragment wicket:id="frag2">
  			<span-tag wicket:id="customlink">
  				<A-tag href="#" wicket:id="link"><label-tag
wicket:id="lbl"></label-tag></A-tag>
  			</span-tag>	
	</wicket:fragment>

am I doing right for using fragment ?  and
this is the exception iam getting
org.apache.wicket.markup.MarkupException: Unable to find component with id
'custmenu' in [MarkupContainer [Component id = custmenu, page =
com.uprr.app.csr.webapp.pages.Index, path =
0:csrHome:custmenu.Index$CustomMenuComponent, isVisible = true, isVersioned
= true]]. This means that you declared wicket:id=custmenu in your markup,
but that you either did not add the component to your page at all, or that
the hierarchy does not match.



Nino.Martinez wrote:
> 
> Hi
> 
> like so:
> 
> class$innerclass.html
> 
> example
> 
> MyPanel$MyInnerPanel.html
> 
> Or just have the panels in their own classes...
> 
> If you take a look at the wizard example(wicket library) theres an 
> example there on a wizard with panels..
> 
> miro wrote:
>> I have custom components 
>>
>> 	protected class CustomMenuComponent extends Panel {
>> 		private String headerlabel;
>> 		private RepeatingView   repeatingView = new RepeatingView("repater");
>> 		
>> 		public CustomMenuComponent() {
>> 			super("custmenu");
>> 			add(repeatingView);
>> 		}
>>
>> 		protected void addCustomLink(CustomLinkComponenet 
>> customLinkComponenet){
>> 			repeatingView.add(customLinkComponenet);
>> 		}
>> 		
>> 		protected Label getHeader(){
>> 			return new Label("hl",headerlabel);
>> 		}
>> 	}	
>>
>> 	protected class CustomLinkComponenet extends  Panel  {
>> 		String displayName;
>> 		Class  clazz;
>> 		public CustomLinkComponenet(String displayName, Class  clazz) {
>> 			super("customlink");
>> 			this.displayName=displayName;
>> 			this.clazz=clazz;
>> 			add(getBookmarkablePageLink());
>> 			add(getDisplayNameLabel());
>> 		}
>>
>> 		protected BookmarkablePageLink  getBookmarkablePageLink(){
>> 			return new BookmarkablePageLink("link", clazz);
>> 		}
>>
>> 		protected  Label  getDisplayNameLabel(){
>> 			return new Label("lbl",displayName);
>> 		}
>> 	} 
>> html for  component  CustomMenuComponent   
>>
>> 		<span-TAG wicket:id="custmenu">
>> 		   <ul-TAG>
>> 		   		<li-TAG wicket:id="repater"></li-TAG>
>> 		   </ul-TAG>
>>                 </span-TAG>
>> html for component   CustomLinkComponenet
>>
>> 		   			<span-TAG wicket:id="customlink">
>> 		   				<A-TAG  href="#" wicket:id="link">
>>                                                         <label-TAG
>> wicket:id="lbl"></label-TAG>
>>                                                 </A-TAG>
>> 		   			</span-TAG>	
>> please help me with the options of   specifying this html for the
>> components
>> . I want to tie html along with the components in the java file itself 
>> is
>> it possible ?
>>   
> 
> -- 
> -Wicket for love
> 
> Nino Martinez Wael
> Java Specialist @ Jayway DK
> http://www.jayway.dk
> +45 2936 7684
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/html-along-with-the-component-tp19918507p19919684.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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


Re: html along with the component

Posted by Nino Saturnino Martinez Vazquez Wael <ni...@jayway.dk>.
Hi

like so:

class$innerclass.html

example

MyPanel$MyInnerPanel.html

Or just have the panels in their own classes...

If you take a look at the wizard example(wicket library) theres an 
example there on a wizard with panels..

miro wrote:
> I have custom components 
>
> 	protected class CustomMenuComponent extends Panel {
> 		private String headerlabel;
> 		private RepeatingView   repeatingView = new RepeatingView("repater");
> 		
> 		public CustomMenuComponent() {
> 			super("custmenu");
> 			add(repeatingView);
> 		}
>
> 		protected void addCustomLink(CustomLinkComponenet  customLinkComponenet){
> 			repeatingView.add(customLinkComponenet);
> 		}
> 		
> 		protected Label getHeader(){
> 			return new Label("hl",headerlabel);
> 		}
> 	}	
>
> 	protected class CustomLinkComponenet extends  Panel  {
> 		String displayName;
> 		Class  clazz;
> 		public CustomLinkComponenet(String displayName, Class  clazz) {
> 			super("customlink");
> 			this.displayName=displayName;
> 			this.clazz=clazz;
> 			add(getBookmarkablePageLink());
> 			add(getDisplayNameLabel());
> 		}
>
> 		protected BookmarkablePageLink  getBookmarkablePageLink(){
> 			return new BookmarkablePageLink("link", clazz);
> 		}
>
> 		protected  Label  getDisplayNameLabel(){
> 			return new Label("lbl",displayName);
> 		}
> 	} 
> html for  component  CustomMenuComponent   
>
> 		<span-TAG wicket:id="custmenu">
> 		   <ul-TAG>
> 		   		<li-TAG wicket:id="repater"></li-TAG>
> 		   </ul-TAG>
>                 </span-TAG>
> html for component   CustomLinkComponenet
>
> 		   			<span-TAG wicket:id="customlink">
> 		   				<A-TAG  href="#" wicket:id="link">
>                                                         <label-TAG
> wicket:id="lbl"></label-TAG>
>                                                 </A-TAG>
> 		   			</span-TAG>	
> please help me with the options of   specifying this html for the components
> . I want to tie html along with the components in the java file itself  is
> it possible ?
>   

-- 
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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


Re: html along with the component

Posted by James Carman <ja...@carmanconsulting.com>.
Sorry, maybe there's not a "live example" for Fragments.  But, there's
a page that explains them here:

http://wicket.apache.org/examplefragments.html

Also, I would imagine the section on Fragments is pretty good in
Wicket in Action (judging by everything else in that book I've read).
If you have it, you might want to check that out.

On Fri, Oct 10, 2008 at 10:32 AM, James Carman
<ja...@carmanconsulting.com> wrote:
> Have you looked at the "live example" that uses fragments?  At first,
> it might seem a bit weird, but it's really not that bad.  A fragment
> is an "inline panel", meaning that you don't have to supply a separate
> HTML template file for them (the markup template lives along side the
> markup for the other stuff in your component).  If you'd like an
> example, here's one from the wicketopia-example application:
>
> https://wicketopia.svn.sourceforge.net/svnroot/wicketopia/trunk/example/src/main/java/org/wicketopia/example/web/page/HomePage.java
>
> That's the HomePage for the application.  It has a table in it that
> lists all the "widgets" in the database.  For each widget in the
> table, we display an "actions" column that contains a "remove" link.
> So, I use a FragmentColumn (also from wicketopia) and I build up the
> Fragment using an inner class.  The markup for HomePage is here:
>
> https://wicketopia.svn.sourceforge.net/svnroot/wicketopia/trunk/example/src/main/java/org/wicketopia/example/web/page/HomePage.html
>
> I hope that makes sense.  You can check out all of the source code for
> wicketopia and run the example application if you want (you can use
> mvn jetty:run to start it).  That might help you get a better idea of
> what's going on.  Hope that helps!
>
> On Fri, Oct 10, 2008 at 10:25 AM, miro <mi...@yahoo.com> wrote:
>>
>> Here is my concern
>> I will create several such components only for this page and not outside of
>> this page , so I dont want to create a .html  file   for two little
>> components,  instead use fragment and i need help in creating fragment for
>> my two components Please help me ?
>>
>> jwcarman wrote:
>>>
>>> You seem to be asking the same question (or very similarly-related
>>> questions) over and over again.  How about if you just explain your
>>> situation/problem to the group and see if they can help you come up
>>> with the best approach?  It appears as if you might be spinning your
>>> wheels here.
>>>
>>> On Fri, Oct 10, 2008 at 10:07 AM, miro <mi...@yahoo.com> wrote:
>>>>
>>>> I have custom components
>>>>
>>>>        protected class CustomMenuComponent extends Panel {
>>>>                private String headerlabel;
>>>>                private RepeatingView   repeatingView = new
>>>> RepeatingView("repater");
>>>>
>>>>                public CustomMenuComponent() {
>>>>                        super("custmenu");
>>>>                        add(repeatingView);
>>>>                }
>>>>
>>>>                protected void addCustomLink(CustomLinkComponenet
>>>> customLinkComponenet){
>>>>                        repeatingView.add(customLinkComponenet);
>>>>                }
>>>>
>>>>                protected Label getHeader(){
>>>>                        return new Label("hl",headerlabel);
>>>>                }
>>>>        }
>>>>
>>>>        protected class CustomLinkComponenet extends  Panel  {
>>>>                String displayName;
>>>>                Class  clazz;
>>>>                public CustomLinkComponenet(String displayName, Class
>>>> clazz) {
>>>>                        super("customlink");
>>>>                        this.displayName=displayName;
>>>>                        this.clazz=clazz;
>>>>                        add(getBookmarkablePageLink());
>>>>                        add(getDisplayNameLabel());
>>>>                }
>>>>
>>>>                protected BookmarkablePageLink  getBookmarkablePageLink(){
>>>>                        return new BookmarkablePageLink("link", clazz);
>>>>                }
>>>>
>>>>                protected  Label  getDisplayNameLabel(){
>>>>                        return new Label("lbl",displayName);
>>>>                }
>>>>        }
>>>> html for  component  CustomMenuComponent
>>>>
>>>>                <span-TAG wicket:id="custmenu">
>>>>                   <ul-TAG>
>>>>                                <li-TAG wicket:id="repater"></li-TAG>
>>>>                   </ul-TAG>
>>>>                </span-TAG>
>>>> html for component   CustomLinkComponenet
>>>>
>>>>                                        <span-TAG wicket:id="customlink">
>>>>                                                <A-TAG  href="#"
>>>> wicket:id="link">
>>>>                                                        <label-TAG
>>>> wicket:id="lbl"></label-TAG>
>>>>                                                </A-TAG>
>>>>                                        </span-TAG>
>>>> please help me with the options of   specifying this html for the
>>>> components
>>>> . I want to tie html along with the components in the java file itself
>>>> is
>>>> it possible ?
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/html-along-with-the-component-tp19918507p19918507.html
>>>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> 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
>>>
>>>
>>>
>>
>> --
>> View this message in context: http://www.nabble.com/html-along-with-the-component-tp19918507p19919378.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> 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: html along with the component

Posted by James Carman <ja...@carmanconsulting.com>.
Have you looked at the "live example" that uses fragments?  At first,
it might seem a bit weird, but it's really not that bad.  A fragment
is an "inline panel", meaning that you don't have to supply a separate
HTML template file for them (the markup template lives along side the
markup for the other stuff in your component).  If you'd like an
example, here's one from the wicketopia-example application:

https://wicketopia.svn.sourceforge.net/svnroot/wicketopia/trunk/example/src/main/java/org/wicketopia/example/web/page/HomePage.java

That's the HomePage for the application.  It has a table in it that
lists all the "widgets" in the database.  For each widget in the
table, we display an "actions" column that contains a "remove" link.
So, I use a FragmentColumn (also from wicketopia) and I build up the
Fragment using an inner class.  The markup for HomePage is here:

https://wicketopia.svn.sourceforge.net/svnroot/wicketopia/trunk/example/src/main/java/org/wicketopia/example/web/page/HomePage.html

I hope that makes sense.  You can check out all of the source code for
wicketopia and run the example application if you want (you can use
mvn jetty:run to start it).  That might help you get a better idea of
what's going on.  Hope that helps!

On Fri, Oct 10, 2008 at 10:25 AM, miro <mi...@yahoo.com> wrote:
>
> Here is my concern
> I will create several such components only for this page and not outside of
> this page , so I dont want to create a .html  file   for two little
> components,  instead use fragment and i need help in creating fragment for
> my two components Please help me ?
>
> jwcarman wrote:
>>
>> You seem to be asking the same question (or very similarly-related
>> questions) over and over again.  How about if you just explain your
>> situation/problem to the group and see if they can help you come up
>> with the best approach?  It appears as if you might be spinning your
>> wheels here.
>>
>> On Fri, Oct 10, 2008 at 10:07 AM, miro <mi...@yahoo.com> wrote:
>>>
>>> I have custom components
>>>
>>>        protected class CustomMenuComponent extends Panel {
>>>                private String headerlabel;
>>>                private RepeatingView   repeatingView = new
>>> RepeatingView("repater");
>>>
>>>                public CustomMenuComponent() {
>>>                        super("custmenu");
>>>                        add(repeatingView);
>>>                }
>>>
>>>                protected void addCustomLink(CustomLinkComponenet
>>> customLinkComponenet){
>>>                        repeatingView.add(customLinkComponenet);
>>>                }
>>>
>>>                protected Label getHeader(){
>>>                        return new Label("hl",headerlabel);
>>>                }
>>>        }
>>>
>>>        protected class CustomLinkComponenet extends  Panel  {
>>>                String displayName;
>>>                Class  clazz;
>>>                public CustomLinkComponenet(String displayName, Class
>>> clazz) {
>>>                        super("customlink");
>>>                        this.displayName=displayName;
>>>                        this.clazz=clazz;
>>>                        add(getBookmarkablePageLink());
>>>                        add(getDisplayNameLabel());
>>>                }
>>>
>>>                protected BookmarkablePageLink  getBookmarkablePageLink(){
>>>                        return new BookmarkablePageLink("link", clazz);
>>>                }
>>>
>>>                protected  Label  getDisplayNameLabel(){
>>>                        return new Label("lbl",displayName);
>>>                }
>>>        }
>>> html for  component  CustomMenuComponent
>>>
>>>                <span-TAG wicket:id="custmenu">
>>>                   <ul-TAG>
>>>                                <li-TAG wicket:id="repater"></li-TAG>
>>>                   </ul-TAG>
>>>                </span-TAG>
>>> html for component   CustomLinkComponenet
>>>
>>>                                        <span-TAG wicket:id="customlink">
>>>                                                <A-TAG  href="#"
>>> wicket:id="link">
>>>                                                        <label-TAG
>>> wicket:id="lbl"></label-TAG>
>>>                                                </A-TAG>
>>>                                        </span-TAG>
>>> please help me with the options of   specifying this html for the
>>> components
>>> . I want to tie html along with the components in the java file itself
>>> is
>>> it possible ?
>>> --
>>> View this message in context:
>>> http://www.nabble.com/html-along-with-the-component-tp19918507p19918507.html
>>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> 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
>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/html-along-with-the-component-tp19918507p19919378.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> 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: html along with the component

Posted by miro <mi...@yahoo.com>.
Here is my concern 
I will create several such components only for this page and not outside of
this page , so I dont want to create a .html  file   for two little
components,  instead use fragment and i need help in creating fragment for
my two components Please help me ?

jwcarman wrote:
> 
> You seem to be asking the same question (or very similarly-related
> questions) over and over again.  How about if you just explain your
> situation/problem to the group and see if they can help you come up
> with the best approach?  It appears as if you might be spinning your
> wheels here.
> 
> On Fri, Oct 10, 2008 at 10:07 AM, miro <mi...@yahoo.com> wrote:
>>
>> I have custom components
>>
>>        protected class CustomMenuComponent extends Panel {
>>                private String headerlabel;
>>                private RepeatingView   repeatingView = new
>> RepeatingView("repater");
>>
>>                public CustomMenuComponent() {
>>                        super("custmenu");
>>                        add(repeatingView);
>>                }
>>
>>                protected void addCustomLink(CustomLinkComponenet 
>> customLinkComponenet){
>>                        repeatingView.add(customLinkComponenet);
>>                }
>>
>>                protected Label getHeader(){
>>                        return new Label("hl",headerlabel);
>>                }
>>        }
>>
>>        protected class CustomLinkComponenet extends  Panel  {
>>                String displayName;
>>                Class  clazz;
>>                public CustomLinkComponenet(String displayName, Class 
>> clazz) {
>>                        super("customlink");
>>                        this.displayName=displayName;
>>                        this.clazz=clazz;
>>                        add(getBookmarkablePageLink());
>>                        add(getDisplayNameLabel());
>>                }
>>
>>                protected BookmarkablePageLink  getBookmarkablePageLink(){
>>                        return new BookmarkablePageLink("link", clazz);
>>                }
>>
>>                protected  Label  getDisplayNameLabel(){
>>                        return new Label("lbl",displayName);
>>                }
>>        }
>> html for  component  CustomMenuComponent
>>
>>                <span-TAG wicket:id="custmenu">
>>                   <ul-TAG>
>>                                <li-TAG wicket:id="repater"></li-TAG>
>>                   </ul-TAG>
>>                </span-TAG>
>> html for component   CustomLinkComponenet
>>
>>                                        <span-TAG wicket:id="customlink">
>>                                                <A-TAG  href="#"
>> wicket:id="link">
>>                                                        <label-TAG
>> wicket:id="lbl"></label-TAG>
>>                                                </A-TAG>
>>                                        </span-TAG>
>> please help me with the options of   specifying this html for the
>> components
>> . I want to tie html along with the components in the java file itself 
>> is
>> it possible ?
>> --
>> View this message in context:
>> http://www.nabble.com/html-along-with-the-component-tp19918507p19918507.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> 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
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/html-along-with-the-component-tp19918507p19919378.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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


Re: html along with the component

Posted by James Carman <ja...@carmanconsulting.com>.
You seem to be asking the same question (or very similarly-related
questions) over and over again.  How about if you just explain your
situation/problem to the group and see if they can help you come up
with the best approach?  It appears as if you might be spinning your
wheels here.

On Fri, Oct 10, 2008 at 10:07 AM, miro <mi...@yahoo.com> wrote:
>
> I have custom components
>
>        protected class CustomMenuComponent extends Panel {
>                private String headerlabel;
>                private RepeatingView   repeatingView = new RepeatingView("repater");
>
>                public CustomMenuComponent() {
>                        super("custmenu");
>                        add(repeatingView);
>                }
>
>                protected void addCustomLink(CustomLinkComponenet  customLinkComponenet){
>                        repeatingView.add(customLinkComponenet);
>                }
>
>                protected Label getHeader(){
>                        return new Label("hl",headerlabel);
>                }
>        }
>
>        protected class CustomLinkComponenet extends  Panel  {
>                String displayName;
>                Class  clazz;
>                public CustomLinkComponenet(String displayName, Class  clazz) {
>                        super("customlink");
>                        this.displayName=displayName;
>                        this.clazz=clazz;
>                        add(getBookmarkablePageLink());
>                        add(getDisplayNameLabel());
>                }
>
>                protected BookmarkablePageLink  getBookmarkablePageLink(){
>                        return new BookmarkablePageLink("link", clazz);
>                }
>
>                protected  Label  getDisplayNameLabel(){
>                        return new Label("lbl",displayName);
>                }
>        }
> html for  component  CustomMenuComponent
>
>                <span-TAG wicket:id="custmenu">
>                   <ul-TAG>
>                                <li-TAG wicket:id="repater"></li-TAG>
>                   </ul-TAG>
>                </span-TAG>
> html for component   CustomLinkComponenet
>
>                                        <span-TAG wicket:id="customlink">
>                                                <A-TAG  href="#" wicket:id="link">
>                                                        <label-TAG
> wicket:id="lbl"></label-TAG>
>                                                </A-TAG>
>                                        </span-TAG>
> please help me with the options of   specifying this html for the components
> . I want to tie html along with the components in the java file itself  is
> it possible ?
> --
> View this message in context: http://www.nabble.com/html-along-with-the-component-tp19918507p19918507.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> 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