How have you embedded the view? If it has been embedded as an applet then only @Command( [ViewExpandAll] ) will work. If you have embedded in any other way then you need to use URL commands. e.g.
i have this view embedded with html in a form, and i need to create a button to expand and collapse document and for what I have seen I need a button for advance and return page too, how can i do this? i don’t understand very well what you say.