If I understand you sorrectly, this is done in your faces-config.xml file.
You would define a managed bean that would be linked to your class that containes the setters and getters.
ANd just substitue in whatever name you want to name it for BeanName and substitue your package and class that has your setters and getters where I put package.class. Then on your xml page, when you want to save something, you would just do soething like this (using example from your code):
and just substitute attribute with whatever attribute your wnating to save the value to.
I think this is what your asking, if not my apologies
True wisdom is in knowing you know nothing - Socrates