SUPER HELPFUL LINK HERE: http://www.nthuleen.com/teach/grammar/adjektivendungenexpl.html
The ending depends on three factors:
1.) article before the noun (der-words, ein-words or unpreceded)
2.) gender/number of the noun (masculine, feminine, neuter or plural)
3.) the case of the noun (nominative, accusative, dative or genitive)
E.g. in your example ("Ich esse weißen Reis"):
For more information, including charts of the endings, see the chapters on adjectives here: http://coerll.utexas.edu/gg/gr/index.html?si=adj
this chart http://www.nthuleen.com/teach/images/adjendflowchart.gif that almost always works, would suggest using weiß instead of weißen, as there is no article. could you clarify as to why the rule doesn't apply in this case so that we might know how to identify it in the future?
I have my own (more visual) strategy for memorizing all this info. It's tough, but arranging it this way made it easier for me.