fixed bug on submit(user could submit product with empty fields)

added some comments for javadoc