You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by arterzatij <ar...@gmail.com> on 2012/09/07 01:15:44 UTC
datefiled and null value 2
Hi all,
There is a way to display an empty datefiled avoiding the NPE, I have the
next code on my tml file
<t:datefield t:id="date" value="expense.date" style="width: 7em;" />
but if the date is null, tapestry rise the NPE...
Failure reading parameter 'value' of component expenses/Expenses:date:
Property 'expense' (within property expression 'expense.date', of
com.rimsamex.app.expenses.pages.Expenses@1b26a992) is null.
So, if the value is null I want to display an empty field, How can I reach
that?
Thanks in advance!
--
View this message in context: http://tapestry.1045711.n5.nabble.com/datefiled-and-null-value-2-tp5716109.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: datefiled and null value 2
Posted by arterzatij <ar...@gmail.com>.
thanks my bad...
--
View this message in context: http://tapestry.1045711.n5.nabble.com/datefiled-and-null-value-2-tp5716109p5716129.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: datefiled and null value 2
Posted by Muhammad Gelbana <m....@gmail.com>.
It's "expense*?*.date" *not* "expense.date*?*"
DateField already handles formatting null values
// org.apache.tapestry5.corelib.components.DateField.formatCurrentValue()
private String formatCurrentValue()
> {
> if (value == null)
> return "";
> return format.format(value);
> }
On Fri, Sep 7, 2012 at 1:29 AM, ICE Ernesto Arteaga Zavala <
arterzatij@gmail.com> wrote:
> Hi Muhammad, thanks for quick ans but I try it before but I got the next
> exp...
>
>
> Exception assembling root component of page expenses/Expenses: Could not
> convert 'expense.date?' into a component parameter binding: Error parsing
> property expression 'expense.date?': Unable to parse input at character
> position 14.
>
>
> 2012/9/6 Muhammad Gelbana <m....@gmail.com>
>
> > <t:datefield t:id="date" value="expense?.date" style="width: 7em;" />
> >
> > Check this page: http://tapestry.apache.org/property-expressions.html
> > Search for: Property Chain
> >
> > On Fri, Sep 7, 2012 at 1:15 AM, arterzatij <ar...@gmail.com> wrote:
> >
> > > Hi all,
> > >
> > > There is a way to display an empty datefiled avoiding the NPE, I
> have
> > > the
> > > next code on my tml file
> > >
> > > <t:datefield t:id="date" value="expense.date" style="width: 7em;" />
> > >
> > >
> > > but if the date is null, tapestry rise the NPE...
> > >
> > > Failure reading parameter 'value' of component expenses/Expenses:date:
> > > Property 'expense' (within property expression 'expense.date', of
> > > com.rimsamex.app.expenses.pages.Expenses@1b26a992) is null.
> > >
> > >
> > > So, if the value is null I want to display an empty field, How can I
> > reach
> > > that?
> > >
> > > Thanks in advance!
> > >
> > >
> > >
> > >
> > > --
> > > View this message in context:
> > >
> >
> http://tapestry.1045711.n5.nabble.com/datefiled-and-null-value-2-tp5716109.html
> > > Sent from the Tapestry - User mailing list archive at Nabble.com.
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > For additional commands, e-mail: users-help@tapestry.apache.org
> > >
> > >
> >
>
>
>
> --
> Saludos,
>
> -------------------------------------------------------------------
> "Nada que se consiga sin pena y sin trabajo
> es verdaderamente valioso."
> Joseph Addison
> -------------------------------------------------------------------
>
> ICE Ernesto Arteaga Zavala
> Ingeniero de Desarrollo
>
Re: datefiled and null value 2
Posted by ICE Ernesto Arteaga Zavala <ar...@gmail.com>.
Hi Muhammad, thanks for quick ans but I try it before but I got the next
exp...
Exception assembling root component of page expenses/Expenses: Could not
convert 'expense.date?' into a component parameter binding: Error parsing
property expression 'expense.date?': Unable to parse input at character
position 14.
2012/9/6 Muhammad Gelbana <m....@gmail.com>
> <t:datefield t:id="date" value="expense?.date" style="width: 7em;" />
>
> Check this page: http://tapestry.apache.org/property-expressions.html
> Search for: Property Chain
>
> On Fri, Sep 7, 2012 at 1:15 AM, arterzatij <ar...@gmail.com> wrote:
>
> > Hi all,
> >
> > There is a way to display an empty datefiled avoiding the NPE, I have
> > the
> > next code on my tml file
> >
> > <t:datefield t:id="date" value="expense.date" style="width: 7em;" />
> >
> >
> > but if the date is null, tapestry rise the NPE...
> >
> > Failure reading parameter 'value' of component expenses/Expenses:date:
> > Property 'expense' (within property expression 'expense.date', of
> > com.rimsamex.app.expenses.pages.Expenses@1b26a992) is null.
> >
> >
> > So, if the value is null I want to display an empty field, How can I
> reach
> > that?
> >
> > Thanks in advance!
> >
> >
> >
> >
> > --
> > View this message in context:
> >
> http://tapestry.1045711.n5.nabble.com/datefiled-and-null-value-2-tp5716109.html
> > Sent from the Tapestry - User mailing list archive at Nabble.com.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>
--
Saludos,
-------------------------------------------------------------------
"Nada que se consiga sin pena y sin trabajo
es verdaderamente valioso."
Joseph Addison
-------------------------------------------------------------------
ICE Ernesto Arteaga Zavala
Ingeniero de Desarrollo
Re: datefiled and null value 2
Posted by Muhammad Gelbana <m....@gmail.com>.
<t:datefield t:id="date" value="expense?.date" style="width: 7em;" />
Check this page: http://tapestry.apache.org/property-expressions.html
Search for: Property Chain
On Fri, Sep 7, 2012 at 1:15 AM, arterzatij <ar...@gmail.com> wrote:
> Hi all,
>
> There is a way to display an empty datefiled avoiding the NPE, I have
> the
> next code on my tml file
>
> <t:datefield t:id="date" value="expense.date" style="width: 7em;" />
>
>
> but if the date is null, tapestry rise the NPE...
>
> Failure reading parameter 'value' of component expenses/Expenses:date:
> Property 'expense' (within property expression 'expense.date', of
> com.rimsamex.app.expenses.pages.Expenses@1b26a992) is null.
>
>
> So, if the value is null I want to display an empty field, How can I reach
> that?
>
> Thanks in advance!
>
>
>
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/datefiled-and-null-value-2-tp5716109.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>