Hello All,

Thanks, it's working ..

On Wednesday 23 July 2003 12.32, Peter Courcoux wrote:
> I use bigints in postgresql all the time and have to append .intValue()
> to get a good comparison. If this is the case here try :-
> #if ($item.state.intValue() == 0)
>
> Regards,
>
> Peter
>
> On Wed, 2003-07-23 at 08:58, Zamek wrote:
> > Hi All,
> >
> > There is an integer value in my context, which is coming from a
> > postgresql database:
> >
> >     public static List selectNewStudents (int startId, int limit) throws
> > Exception {
> >        if (limit <= 0)
> >           limit = DEFAULT_LIST_ROWS;
> >
> >        List qResult = StudentPeer.executeQuery("Select * from newStudents("
> > + startId + "," +   limit + ");");
> >        List result = new ArrayList (qResult.size());
> >
> >        for (int i = 0; i < qResult.size(); i++) {
> >               Record row = (Record) qResult.get(i);
> >               Hashtable record = new Hashtable(row.size());
> >               ...
> >               ...
> >               record.put("state", row.getValue(33) );
> >               result.add(record);
> >        }
> >
> >        return result;
> >     }
> >
> >
> > In my vm:
> >                     <td>
> >                       #if($item.state == 0) -
> >                       #elseif($item.state == 1) Start
> >                       #elseif($item.state==2) Full
> >                       #else ??
> >                       #end
> >                     </td>
> >
> > if I wrote value of state with
> >    $item.state
> > it is 0, but the result of expression is: ??, which means value is not
> > 0,1 or 2.
> >
> > And when I set value to 0,1, or 2 with
> >
> >     #set ($item.state=0)
> >
> > it is working good.
> >
> > Does anybody an idea?

-- 
udv,
Zoltan Zidarics programmer
PTE University Pecs, Hungary
icq: 43288694


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to