Hi Andreas,

 I would like to thank you for your help in Hibernate and in Java but really I want to do what I was asked for simply because this is the Design that I was asked to follow.

anyway if you find that
characters dataScroller looks ugly you can rename it as elementFilter
which will be a new component that you will pass to it the alphabetic range and it will render the result categorized into it and will alow the filtering based on the character you will choose.

anyway my main question was
 "  can I customize the data Scroller or can I develop my Owen components and how to do
    this is there any standards or templates I should use like
    implementing  or extending interface/class
"

and by exploring the web I find that link

http://today.java.net/pub/a/today/2004/07/16/jsfcustom.html

I think it is useful

thank you Andreas for your reply,
Best regards

On 4/9/06, Andreas Zeller - zit-systems < [EMAIL PROTECTED]> wrote:
Hi Ali,

The best thing to do would be implementing your own data model, as you
should anyway. The datascroller is based on element count, not on
specific start/end characters. So, something completely different.

What you want to do is use simple java methods that are bound to your
data model.

For example, if you are using hibernate, you would initially collect all
the elemtents and filter them into result sets, starting with the
desired letter. You could achieve that by making speficic statements...
Fill a selectOneMenu with all the start-letters you have and onchange
perform a select on your database that fits your needs.

Using a dataScroller-like element for that would look ugly. Do you
really want to have 26 letters visible to the user at all time? Better
take a pulldown menu like the selectOneListBox, and only fill it with
those letters that are actually available, which you collected on init.

Anyway... If you are not using hibernate or any database, just plain
lists the come from whereever, you could just use the method
startsWith(String s) on the type String.

Building your own component for that would be a real bloat from my point
of view.

Andreas

robinhoo wrote:

> Hello All,
> I need to customize the data Scroller that are <t:dataScroller> --
> tomahawk's component
> so that it displays alphabetic instead of numbers and make other
> modifications like formatting spaces between alphabetic and
> displaying all alphabet and disabling the ones that are not returned
> in the results.
>
>  for example suppose that the returned data contains only names so I
> need to display all characters and disabling the ones the are not
> returned in the result.
>
> Also I'm wondering if I can develop my Owen components and how to do
> this is there any standards or templates I should use like
> implementing  or extending interface/class ?
>
> best regards,
>
>
> --
> Ali Abd El Aziz Ali





--
Ali Abd El Aziz Ali
Software Developer OpenCraft
http://aabdelaziz.blogspot.com/

Reply via email to