Is it possible to have the right attitude but with the wrong action? Is it also possible to have the right action but with a wrong attitude? Which of the two is better?
I would say yes. You can have good intentions but go about it the wrong way. You can also do something grudgingly but the right thing still gets done. If I had to pick, I would say doing the right thing with the wrong attitude is better - as the right thing still gets done. Your attitude is less likely to effect someone else compared to a wrong action. However, why not just do the right thing with the right attitude... that way - everyone's happy.
things can be both ways...it depends on inspiration and character it's in our power of decision to choose which way it's suitable for the situation...
I would say you are right on both accounts; You can definitely do the right thing in the wrong way and you can do the wrong thing but be doing it with good intentions I would say it's best to do the right thing but be doing it wrong as you can always learn to do it right!