glassfish « validation « JSF Q&A





2. JSF validation question    java.net

I have a LineItem object that is part of an Order. The LineItem references a Product and contains a quantity. Because some ProductS are sold only in packs and not as individual items, I need to prevent the user from specifying an illegal quantity. For example, if the pack size = 4, the quantity can be a multiple of 4, but ...