You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Ashika Umanga Umagiliya <au...@biggjapan.com> on 2010/02/24 03:31:24 UTC

Dynamic HTML mark-up ?

Greeting friends,

In the datagrid-cell , I want to add links which direct to some other 
pages.But the number of links change.I want to do something like in the 
following code-snippet(Pseudo code):


new AbstractColumn<Object>(new Model("Description/Function")) {

    public void populateItem(Item<ICellPopulator<Object>> cellitem,
            String id, IModel<Object> model) {

          //Pseudo code
          SomeDynamicPanel apanel=new SomeDynamicPanel(id);
         
          for(String id:links) //Number of links depend on 'links' array
          {
                apanel.add(new Link("link"+id){
                          public void onClick(){
                               //Direct to page using 'id'
                         }
               }
           }
         
          cellitem.add(apanel);

}

Any tips?
thanks
umanga

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


Re: Dynamic HTML mark-up ?

Posted by kellerautomat <fj...@gmail.com>.
Take a look at ListView:
http://cwiki.apache.org/WICKET/listview-and-other-repeaters.html


Umanga wrote:
> 
> Greeting friends,
> 
> In the datagrid-cell , I want to add links which direct to some other 
> pages.But the number of links change.I want to do something like in the 
> following code-snippet(Pseudo code):
> 
> 
> new AbstractColumn(new Model("Description/Function")) {
> 
>     public void populateItem(Item<ICellPopulator> cellitem,
>             String id, IModel model) {
> 
>           //Pseudo code
>           SomeDynamicPanel apanel=new SomeDynamicPanel(id);
>          
>           for(String id:links) //Number of links depend on 'links' array
>           {
>                 apanel.add(new Link("link"+id){
>                           public void onClick(){
>                                //Direct to page using 'id'
>                          }
>                }
>            }
>          
>           cellitem.add(apanel);
> 
> }
> 
> Any tips?
> thanks
> umanga
> 
> ---------------------------------------------------------------------
> 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://old.nabble.com/Dynamic-HTML-mark-up---tp27714018p27714184.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: Dynamic HTML mark-up ?

Posted by Martin Makundi <ma...@koodaripalvelut.com>.
Hi!

Strange. Works for me:

http://localhost:8080/Wicket-Quickstart/HomePage

 Directory of C:\workspaces\testspace\wicket-mashup

24.02.2010  08:50    <DIR>          .
24.02.2010  08:50    <DIR>          ..
24.02.2010  08:50               500 .classpath
24.02.2010  08:50               571 .project
24.02.2010  08:50    <DIR>          .settings
24.02.2010  08:50             4 325 pom.xml
24.02.2010  08:50    <DIR>          src
24.02.2010  08:50    <DIR>          target
               3 File(s)          5 396 bytes
               5 Dir(s)  201 536 442 368 bytes free

C:\workspaces\testspace\wicket-mashup>mvn jetty:run
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building quickstart
[INFO]    task-segment: [jetty:run]
[INFO] ------------------------------------------------------------------------
[INFO] Preparing jetty:run
[INFO] [resources:resources {execution: default-resources}]
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered
resources, i.e. bui
[INFO] Copying 1 resource
[INFO] Copying 11 resources
[INFO] ...
[INFO] Configuring Jetty for project: quickstart
[INFO] Webapp source directory =
C:\workspaces\testspace\wicket-mashup\src\main\webapp
[INFO] Reload Mechanic: automatic
[INFO] ...
[INFO] web.xml file =
C:\workspaces\testspace\wicket-mashup\src\main\webapp\WEB-INF\web.
[INFO] Webapp directory = C:\workspaces\testspace\wicket-mashup\src\main\webapp
[INFO] Starting jetty 6.1.22 ...
[INFO] ...
2010-02-24 08:56:47.249:INFO::Started SelectChannelConnector@0.0.0.0:8080
[INFO] Started Jetty Server


Works fine for me. Try it also in eclipse.

**
Martni

2010/2/24 Ashika Umanga Umagiliya <au...@biggjapan.com>:
> Thanks Martin,
>
> I checked-out the source and tried to give it a test run by 'mvn jetty:run'
> , but throws the error
>
> "WicketMessage: Markup of type 'html' for component
> 'com.samplecompany.gui.MashUpPanel' not found. Enable debug messages for
> org.apache.wicket.util.resource to get a list of all filenames tried.:
> [MarkupContainer [Component id = root-mashup-container-id]]"
>
>
>
>
> Martin Makundi wrote:
>>
>> ListView can be used like in the mashup container. Ofcourse we would
>> prefer if oneday such container could be used without the dummy
>> component id:
>>
>> http://code.google.com/p/wicket-mashup/
>>
>> **
>> Martin
>>
>> 2010/2/24 Ashika Umanga Umagiliya <au...@biggjapan.com>:
>>
>>>
>>> I guess the answer is  'ListView' right?
>>>
>>> Ashika Umanga Umagiliya wrote:
>>>
>>>>
>>>> Greeting friends,
>>>>
>>>> In the datagrid-cell , I want to add links which direct to some other
>>>> pages.But the number of links change.I want to do something like in the
>>>> following code-snippet(Pseudo code):
>>>>
>>>>
>>>> new AbstractColumn<Object>(new Model("Description/Function")) {
>>>>
>>>>  public void populateItem(Item<ICellPopulator<Object>> cellitem,
>>>>          String id, IModel<Object> model) {
>>>>
>>>>        //Pseudo code
>>>>        SomeDynamicPanel apanel=new SomeDynamicPanel(id);
>>>>                for(String id:links) //Number of links depend on 'links'
>>>> array
>>>>        {
>>>>              apanel.add(new Link("link"+id){
>>>>                        public void onClick(){
>>>>                             //Direct to page using 'id'
>>>>                       }
>>>>             }
>>>>         }
>>>>                cellitem.add(apanel);
>>>>
>>>> }
>>>>
>>>> Any tips?
>>>> thanks
>>>> umanga
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> 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: Dynamic HTML mark-up ?

Posted by Ashika Umanga Umagiliya <au...@biggjapan.com>.
Thanks Martin,

I checked-out the source and tried to give it a test run by 'mvn 
jetty:run' , but throws the error

"WicketMessage: Markup of type 'html' for component 'com.samplecompany.gui.MashUpPanel' not found. Enable debug messages for org.apache.wicket.util.resource to get a list of all filenames tried.: [MarkupContainer [Component id = root-mashup-container-id]]"




Martin Makundi wrote:
> ListView can be used like in the mashup container. Ofcourse we would
> prefer if oneday such container could be used without the dummy
> component id:
>
> http://code.google.com/p/wicket-mashup/
>
> **
> Martin
>
> 2010/2/24 Ashika Umanga Umagiliya <au...@biggjapan.com>:
>   
>> I guess the answer is  'ListView' right?
>>
>> Ashika Umanga Umagiliya wrote:
>>     
>>> Greeting friends,
>>>
>>> In the datagrid-cell , I want to add links which direct to some other
>>> pages.But the number of links change.I want to do something like in the
>>> following code-snippet(Pseudo code):
>>>
>>>
>>> new AbstractColumn<Object>(new Model("Description/Function")) {
>>>
>>>   public void populateItem(Item<ICellPopulator<Object>> cellitem,
>>>           String id, IModel<Object> model) {
>>>
>>>         //Pseudo code
>>>         SomeDynamicPanel apanel=new SomeDynamicPanel(id);
>>>                 for(String id:links) //Number of links depend on 'links'
>>> array
>>>         {
>>>               apanel.add(new Link("link"+id){
>>>                         public void onClick(){
>>>                              //Direct to page using 'id'
>>>                        }
>>>              }
>>>          }
>>>                 cellitem.add(apanel);
>>>
>>> }
>>>
>>> Any tips?
>>> thanks
>>> umanga
>>>       
>> ---------------------------------------------------------------------
>> 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: Dynamic HTML mark-up ?

Posted by Martin Makundi <ma...@koodaripalvelut.com>.
ListView can be used like in the mashup container. Ofcourse we would
prefer if oneday such container could be used without the dummy
component id:

http://code.google.com/p/wicket-mashup/

**
Martin

2010/2/24 Ashika Umanga Umagiliya <au...@biggjapan.com>:
> I guess the answer is  'ListView' right?
>
> Ashika Umanga Umagiliya wrote:
>>
>> Greeting friends,
>>
>> In the datagrid-cell , I want to add links which direct to some other
>> pages.But the number of links change.I want to do something like in the
>> following code-snippet(Pseudo code):
>>
>>
>> new AbstractColumn<Object>(new Model("Description/Function")) {
>>
>>   public void populateItem(Item<ICellPopulator<Object>> cellitem,
>>           String id, IModel<Object> model) {
>>
>>         //Pseudo code
>>         SomeDynamicPanel apanel=new SomeDynamicPanel(id);
>>                 for(String id:links) //Number of links depend on 'links'
>> array
>>         {
>>               apanel.add(new Link("link"+id){
>>                         public void onClick(){
>>                              //Direct to page using 'id'
>>                        }
>>              }
>>          }
>>                 cellitem.add(apanel);
>>
>> }
>>
>> Any tips?
>> thanks
>> umanga
>
>
> ---------------------------------------------------------------------
> 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: Dynamic HTML mark-up ?

Posted by Ashika Umanga Umagiliya <au...@biggjapan.com>.
I guess the answer is  'ListView' right?

Ashika Umanga Umagiliya wrote:
> Greeting friends,
>
> In the datagrid-cell , I want to add links which direct to some other 
> pages.But the number of links change.I want to do something like in 
> the following code-snippet(Pseudo code):
>
>
> new AbstractColumn<Object>(new Model("Description/Function")) {
>
>    public void populateItem(Item<ICellPopulator<Object>> cellitem,
>            String id, IModel<Object> model) {
>
>          //Pseudo code
>          SomeDynamicPanel apanel=new SomeDynamicPanel(id);
>                  for(String id:links) //Number of links depend on 
> 'links' array
>          {
>                apanel.add(new Link("link"+id){
>                          public void onClick(){
>                               //Direct to page using 'id'
>                         }
>               }
>           }
>                  cellitem.add(apanel);
>
> }
>
> Any tips?
> thanks
> umanga


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