That's ok from my side, but Kirans ideas also sounds good.
On 08/04/2015 12:19 PM, Emmanuel Lécharny wrote:
> Hi,
>
> a Text widget does not accept null values. It forces us to test if the
> value is null, and if so, we inject a "".
>
> I'm willing to add a method in common-ui CommonUIUtils class that do
> this check instead of having to test that all over the code. May be
> tehre is already such a method spmewhere else ?
>
> Here is what I want to add :
>
>
>
> /**
> * An utility method that return a String which is never null.
> *
> * @param value The incoming value, which can be null
> * @return The String if it's not null, "" otherwise
> */
> public static String getTextvalue( String value )
> {
> if ( value == null )
> {
> return "";
> }
> else
> {
> return value;
> }
> }
>
> Dead simple...
>
> Let me konw if it's ok.
>
> Thanks !
>