Re: [Wicket-user] Best way to create large groups of similar tags

2007-05-28 Thread Martijn Dashorst
How do you determine if a feature is available or not? How do you know
which feature you are currently processing? Are the features coming
from a database/cms backend?

If so, then why isn't the description available? Is that something you
plan on adding in the future?

Why does the page need to be wicketified? Is it dynamic? Can't you use
CSS instead?

The menu can still be a Wicket component, but the table of features
seems a bit odd to use Wicket components just for the images. A nested
repeater or listview seems better suited, or else just make it an
include editable by your marketing department.

Martijn

On 5/28/07, Thomas Singer <[EMAIL PROTECTED]> wrote:
> Well, I guess I could use a Fragment (if it would work inside a Border)
> inside a RepeatingView, but then I would need to have all feature texts in
> the Java code, which is not nice but would work.
>
> Tom
>
>
> Herman Bovens wrote:
> > Hm, can't you iterate over your collection of features and add the
> > corresponding component in each iteration?  Something like that?
> >
> >
> > Thomas Singer-3 wrote:
> >> Thanks, Alexey and Kent, for your feed-back. Unfortunately, I still have
> >> do
> >> add a lot of components to the Page instance, for each line one.
> >>
> >> Tom
> >>
> >>
> >> Kent Tong wrote:
> >>> Put that code into a panel, eg, FeatureAvailability.html:
> >>>
> >>> 
> >>> 
> >>>  >>> border="0"
> >>> alt="+" width="9" height="9">
> >>> 
> >>> 
> >>>
> >>> FeatureAvailability.java:
> >>>
> >>> public class FeatureAvailability extends Panel {
> >>> public FeatureAvailability(String id, IModel model) {
> >>> super(id, model);
> >>> boolean isPresent = ((Boolean) 
> >>> getModelObject()).booleanValue();
> >>> WebMarkupContainer img = new WebMarkupContainer("img");
> >>> img.add(new SimpleAttributeModifier("src",
> >>> String.format("/graphics/feature-%s.gif",
> >>> new Object[] {
> >>> isPresent ? "present" : "absent" })));
> >>> img.add(new SimpleAttributeModifier("alt",
> >>> isPresent ? "+" : "-"));
> >>> add(img);
> >>> }
> >>> }
> >
>
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>


-- 
Join the wicket community at irc.freenode.net: ##wicket
Wicket 1.2.6 contains a very important fix. Download Wicket now!
http://wicketframework.org

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Best way to create large groups of similar tags

2007-05-28 Thread Thomas Singer
Well, I guess I could use a Fragment (if it would work inside a Border) 
inside a RepeatingView, but then I would need to have all feature texts in 
the Java code, which is not nice but would work.

Tom


Herman Bovens wrote:
> Hm, can't you iterate over your collection of features and add the
> corresponding component in each iteration?  Something like that?
> 
> 
> Thomas Singer-3 wrote:
>> Thanks, Alexey and Kent, for your feed-back. Unfortunately, I still have
>> do 
>> add a lot of components to the Page instance, for each line one.
>>
>> Tom
>>
>>
>> Kent Tong wrote:
>>> Put that code into a panel, eg, FeatureAvailability.html:
>>>
>>> 
>>> 
>>> >> border="0" 
>>> alt="+" width="9" height="9">
>>> 
>>> 
>>>
>>> FeatureAvailability.java:
>>>
>>> public class FeatureAvailability extends Panel {
>>> public FeatureAvailability(String id, IModel model) {
>>> super(id, model);
>>> boolean isPresent = ((Boolean) getModelObject()).booleanValue();
>>> WebMarkupContainer img = new WebMarkupContainer("img");
>>> img.add(new SimpleAttributeModifier("src", 
>>> String.format("/graphics/feature-%s.gif",
>>> new Object[] { 
>>> isPresent ? "present" : "absent" })));
>>> img.add(new SimpleAttributeModifier("alt", 
>>> isPresent ? "+" : "-"));
>>> add(img);
>>> }
>>> }
> 

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Best way to create large groups of similar tags

2007-05-28 Thread Herman Bovens

Hm, can't you iterate over your collection of features and add the
corresponding component in each iteration?  Something like that?


Thomas Singer-3 wrote:
> 
> Thanks, Alexey and Kent, for your feed-back. Unfortunately, I still have
> do 
> add a lot of components to the Page instance, for each line one.
> 
> Tom
> 
> 
> Kent Tong wrote:
>> Put that code into a panel, eg, FeatureAvailability.html:
>> 
>> 
>> 
>> > border="0" 
>> alt="+" width="9" height="9">
>> 
>> 
>> 
>> FeatureAvailability.java:
>> 
>> public class FeatureAvailability extends Panel {
>>  public FeatureAvailability(String id, IModel model) {
>>  super(id, model);
>>  boolean isPresent = ((Boolean) getModelObject()).booleanValue();
>>  WebMarkupContainer img = new WebMarkupContainer("img");
>>  img.add(new SimpleAttributeModifier("src", 
>> String.format("/graphics/feature-%s.gif",
>>  new Object[] { 
>> isPresent ? "present" : "absent" })));
>>  img.add(new SimpleAttributeModifier("alt", 
>> isPresent ? "+" : "-"));
>>  add(img);
>>  }
>> }
> 

-- 
View this message in context: 
http://www.nabble.com/Best-way-to-create-large-groups-of-similar-tags-tf3804614.html#a10835999
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Best way to create large groups of similar tags

2007-05-28 Thread Thomas Singer
Thanks, Alexey and Kent, for your feed-back. Unfortunately, I still have do 
add a lot of components to the Page instance, for each line one.

Tom


Kent Tong wrote:
> Thomas Singer  regnis.de> writes:
> 
>> Generally, I want to keep the text (including the links to other pages in 
>> it) in the HTML files for now. My problem is the creation of these tags 
>> without adding a separate component for each one:
>>
>> 
>>> height="9">
>> 
>>
>> and
>>
>> 
>> >  height="9">
>> 
> 
> Put that code into a panel, eg, FeatureAvailability.html:
> 
> 
> 
>  alt="+" width="9" height="9">
> 
> 
> 
> FeatureAvailability.java:
> 
> public class FeatureAvailability extends Panel {
>   public FeatureAvailability(String id, IModel model) {
>   super(id, model);
>   boolean isPresent = ((Boolean) getModelObject()).booleanValue();
>   WebMarkupContainer img = new WebMarkupContainer("img");
>   img.add(new SimpleAttributeModifier("src", 
> String.format("/graphics/feature-%s.gif",
>   new Object[] { 
> isPresent ? "present" : "absent" })));
>   img.add(new SimpleAttributeModifier("alt", 
> isPresent ? "+" : "-"));
>   add(img);
>   }
> }
> 
> 
> 
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
> 

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Best way to create large groups of similar tags

2007-05-26 Thread Kent Tong
Thomas Singer  regnis.de> writes:

> Generally, I want to keep the text (including the links to other pages in 
> it) in the HTML files for now. My problem is the creation of these tags 
> without adding a separate component for each one:
> 
> 
> height="9">
> 
> 
> and
> 
> 
>   height="9">
> 

Put that code into a panel, eg, FeatureAvailability.html:







FeatureAvailability.java:

public class FeatureAvailability extends Panel {
public FeatureAvailability(String id, IModel model) {
super(id, model);
boolean isPresent = ((Boolean) getModelObject()).booleanValue();
WebMarkupContainer img = new WebMarkupContainer("img");
img.add(new SimpleAttributeModifier("src", 
String.format("/graphics/feature-%s.gif",
new Object[] { 
isPresent ? "present" : "absent" })));
img.add(new SimpleAttributeModifier("alt", 
isPresent ? "+" : "-"));
add(img);
}
}



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Best way to create large groups of similar tags

2007-05-23 Thread Alexey Maksimov
On Wed, 23 May 2007 15:42:15 +0200
Thomas Singer <[EMAIL PROTECTED]> wrote:

> I'm trying to create following page in Wicket:
> 
>   http://www.syntevo.com/smartcvs/comparison.jsp
> 
> Generally, I want to keep the text (including the links to other
> pages in it) in the HTML files for now. My problem is the creation of
> these tags without adding a separate component for each one:
> 
> 
> width="9" height="9">
> 
> 
> and
> 
> 
>  width="9" height="9">
> 
> 
> What approach the Wicket experts suggest? Thanks in advance.

I'm not sure  should go into this component. You may eventually use
this outside of a  ;) and align="center" should probably go to
css.

As for ...
One way is to subclass wicket Image and
override onComponentTag.

protected void onComponentTag (ComponentTag tag) {
checkComponentTag (tag, "img");
super.onComponentTag (tag);
tag.put ("alt", "+");
tag.put ("border", "0");
//so on
  }

Is this considered a hack, I wonder?

There is also something like AttributeAppender or something like this,
don't remember.

Best regards,
Alexey.

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Best way to create large groups of similar tags

2007-05-23 Thread Thomas Singer
I'm trying to create following page in Wicket:

  http://www.syntevo.com/smartcvs/comparison.jsp

Generally, I want to keep the text (including the links to other pages in 
it) in the HTML files for now. My problem is the creation of these tags 
without adding a separate component for each one:


   


and





What approach the Wicket experts suggest? Thanks in advance.

--
Tom


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user