Map<String, Object> parameters = new HashMap<String, Object>();
for ( Page page: getPageStack(viewId) )
{
for ( Param pageParameter: page.getParameters() )
{
ValueBinding valueBinding = pageParameter.getValueBinding();
Object value;
if (valueBinding==null)
{
value = Contexts.getPageContext().get( pageParameter.getName() );
}
else
{
value = valueBinding.getValue();
}
if (value!=null)
{
parameters.put( pageParameter.getName(), value );
}