BITs or INTEGERs? (J2EE EL related)



Currently I have a fairly large SQL table. Half way through it is an integer
field that I'm using to represent 5 checkboxes on a JSP form. The reason I
used a single INTEGER instead of many BIT fields is I could well be adding
more checkboxes later, and I don't really want to see the new fields
somewhere other than next to the 5 existing ones.

Now I started to doubt this approach when I realised that Sun's EL for JSP
pages doesn't cater for the bit operators. The following won't compile:

<c:if test="${(myflags & 0x01) == 0x01}">

So to get around this I have to just use a scriplet, i.e.:

<c:if test="<%= (myflags & 0x01) == 0x01 %>">

It still leaves a bad taste in my mouth though and makes me wonder if
there's a better approach, so I'm asking for advice here. Maybe I shouldn't
get attached to having the SQL look nice and ordered, in favour of more
readability in the Java? (Incidently, the 0x01 shown here is represented by
a static constant in my code for readability).


.



Relevant Pages

  • RE: Creating a list of checkboxes dynamically
    ... // Get a SqlDataReader from the datalayer - basically a rowset from SQL ... you'll see there are 3 or 4 sections of checkboxes. ... the table called Gifts has two ... strTempRow = strTempRow + 1 ...
    (microsoft.public.dotnet.framework.aspnet)
  • Help with search query
    ... available amenities in a home. ... when the user selects various checkboxes from this list ... how do I structure the SQL statement to do the search? ... should be displayed first, along with an indicator: Percentage Match: x%. ...
    (microsoft.public.sqlserver.programming)
  • Search Query Question
    ... available amenities in a home. ... when the user selects various checkboxes from this list ... how do I structure the SQL statement to do the search? ... should be displayed first, along with an indicator: Percentage Match: x%. ...
    (microsoft.public.sqlserver.programming)
  • Help with search query
    ... available amenities in a home. ... when the user selects various checkboxes from this list ... how do I structure the SQL statement to do the search? ... should be displayed first, along with an indicator: Percentage Match: x%. ...
    (microsoft.public.dotnet.framework.aspnet)