Leo, You were right but still no luck it still says 'I wont do whetver Taati wants'..[sigh] It is just skipping the notPresent tag and not printing anything Regards, Taati > From: Leonardo Maciel [SMTP:[EMAIL PROTECTED]] > Sent: Thursday, May 09, 2002 2:01 PM > To: 'Mannem, Taati'; Struts Users Mailing List > Cc: Leonardo Maciel > Subject: RE: Comparing Null using Logic:Equal > > You said "if the subscriptions bean is null" > I am assuming subscriptions is property of user. > You should iterate only when <logic:present name="user" > property="subscriptions"> > That's how I would do: > > <logic:notPresent name="user" property="subscriptions"> > <tr><td>Please do whatever Taati wants > </td> > </tr> > ... > </logic:notPresent> > > <logic:present name="user" property="subscriptions"> > <logic:iterate id="subscription" name="user" property="subscriptions"> > <tr> > <td align="left"> > <bean:write name="subscription" property="host" filter="true"/> > </td> > <td align="left"> > <bean:write name="subscription" property="username" filter="true"/> > </td> > <td align="center"> > <bean:write name="subscription" property="type" filter="true"/> > </td> > ... > ... > ... > .. > </logic:iterate> > > </logic:present> > > > -----Original Message----- > From: Mannem, Taati [mailto:[EMAIL PROTECTED]] > Sent: Thursday, May 09, 2002 1:50 PM > To: Struts Users Mailing List > Cc: [EMAIL PROTECTED] > Subject: RE: Comparing Null using Logic:Equal > > > Leo, > You were clear but still it doesn't work. > I will paste the code here. This is from the registration.jsp of the > struts-example > > <logic:iterate id="subscription" name="user" property="subscriptions"> > <logic:notPresent name="subscription" property="subscriptions"> > <tr><td>Please do whatever Taati wants > </td> > </tr> > > <logic:notPresent> > <logic:present name="subscription" property="subscriptions"> > <tr> > <td align="left"> > <bean:write name="subscription" property="host" filter="true"/> > </td> > <td align="left"> > <bean:write name="subscription" property="username" filter="true"/> > </td> > <td align="center"> > <bean:write name="subscription" property="type" filter="true"/> > </td> > ... > ... > ... > .. > > <logic:present> > > but the result is I wont do whatever Taati wants!;) > It is just the same.. > May I know where I am goofing up! > > Regards, > Taati > > -----Original Message----- > > From: Leonardo Maciel [SMTP:[EMAIL PROTECTED]] > > Sent: Thursday, May 09, 2002 1:38 PM > > To: 'Struts Users Mailing List' > > Subject: RE: Comparing Null using Logic:Equal > > > > so use both > > > > <logic:present ... > > > display column > > </logic:present> > > <logic:notPresent ... > > > display some other data > > </logic:notPresent> > > > > hope I am clear!! > > > > > > > > -----Original Message----- > > From: Mannem, Taati [mailto:[EMAIL PROTECTED]] > > Sent: Thursday, May 09, 2002 1:37 PM > > To: Struts Users Mailing List > > Subject: RE: Comparing Null using Logic:Equal > > > > > > Leo and Jim, > > Thanks a lot it works but not exactly the way my requirement > > demands. > > I will explain to you the scenario.Take the struts-examples for > instance. > > When we click on the edit registration we get a table with the heading > > host,autoconnect,etc.. Now if the subscriptions bean is null it will not > > display the column, that is the results array in the bean user is > returned > > null for the first time and hence the table rows are not printed. When I > > use > > the logic:present tag it works only if I go to subscription and dont > enter > > anything and come back. Actually my requirement is to show some other > data > > when the user clicks on the reigistration and there is no data to be > shown > > in the table.Hope i am clear????? > > > > Regards, > > Taati > > > -----Original Message----- > > > From: James Mitchell [SMTP:[EMAIL PROTECTED]] > > > Sent: Thursday, May 09, 2002 1:31 PM > > > To: Struts Users Mailing List > > > Subject: RE: Comparing Null using Logic:Equal > > > > > > See logic:present > > > > > > JM > > > > > > > -----Original Message----- > > > > From: Mannem, Taati [mailto:[EMAIL PROTECTED]] > > > > Sent: Thursday, May 09, 2002 1:25 PM > > > > To: Struts Users Mailing List > > > > Subject: Comparing Null using Logic:Equal > > > > > > > > > > > > Guys, > > > > Thanks for the help on the previous post. Can anyone tell me > how do > > > > I compare a value "null" using logic equal or someother tag. > > > > This is the requirement.. > > > > If the value returned by a getter method is null in iterator tag > > > > then I have > > > > got to display something else something else.. > > > > > > > > Thanks a lot in advance! > > > > Cheerio, > > > > Taati > > > > > > > > > > > > -- > > > > To unsubscribe, e-mail: > > > > <mailto:[EMAIL PROTECTED]> > > > > For additional commands, e-mail: > > > > <mailto:[EMAIL PROTECTED]> > > > > > > > > > > > > > > -- > > > To unsubscribe, e-mail: > > > <mailto:[EMAIL PROTECTED]> > > > For additional commands, e-mail: > > > <mailto:[EMAIL PROTECTED]> > > > > -- > > To unsubscribe, e-mail: > > <mailto:[EMAIL PROTECTED]> > > For additional commands, e-mail: > > <mailto:[EMAIL PROTECTED]> > > > > -- > > To unsubscribe, e-mail: > > <mailto:[EMAIL PROTECTED]> > > For additional commands, e-mail: > > <mailto:[EMAIL PROTECTED]>
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>