You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Red Man <an...@enactor.co.uk> on 2009/05/26 10:18:20 UTC

Trinidad fileUpload in Portlet 2.0

The file upload component in Trinidad does not appear to work within a portal
environment. I am using trunk versions of trinidad, portlet bridge and
pluto. It appears to be the addition of enctype="multipart/form-data" that
is stopping the form being processed properly. In fact the addition of this
stops all components on the page from operating correctly. Tracing it
through it appears that the FileUploadConfiguratorImpl is being invoked and
is splitting the form data into parameters and the binary data. But then it
never gets to my backing bean. Out of the portal it works fine. There
appears to be lots of discussions in this area but I have yet to find
anything that clearly says that this will work and certainly not how to get
it to work. Am I missing something obvious?
-- 
View this message in context: http://www.nabble.com/Trinidad-fileUpload-in-Portlet-2.0-tp23718627p23718627.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.


requestContext.launchDialog parameters

Posted by Eisenträger, Tobias <To...@arag.de>.
Hello Community,

I am trying to launch an error dialog programmatically, but the arguments of  requestContext.launchDialog won't work - did something change here? I was following the tutorial on http://myfaces.apache.org/trinidad/devguide/dialogs.html#Manually%20Launching%20A%20Dialog but instead of null for the parameter I would like to provide the exception.

public void launchErrorDialog(Exception pException) {
      FacesContext ctx = FacesContext.getCurrentInstance();
      ViewHandler viewHandler = ctx.getApplication().getViewHandler();
      
      UIViewRoot dialog  = viewHandler.createView(ctx, "/error.jspx");
      
      Map windowProperties = new HashMap();
      windowProperties.put("width", new Integer(300));
      windowProperties.put("height", new Integer(200));
      
      Map dialogParameters = new HashMap();
      dialogParameters.put("exception", pException);
      
      RequestContext requestContext = RequestContext.getCurrentInstance();
      
      requestContext.launchDialog(dialog,
            null, // not launched from any component
            dialogParameters, // dialog parameters - this doesn't work! - it expects UIComponent here, but on the tutorial it expects a map.
            true, // show it in a dialog
            windowProperties // width and height
            );
   }

Thanks! 

Tobias Eisenträger