voyent
Passing managedproperty from a managedBean to another  XML
Forum Index -> General Help
Author Message
salvatore82


Joined: 03/Mar/2011 08:40:57
Messages: 18
Offline


Hi All, I have a managedbean with another managedbean inside. The input fields on the page are related to the managedbean inside. It looks like this:

@ManagedBean(name = "publishWebBean")
@ViewScoped
public class PublishWebBean implements Serializable {

private static final long serialVersionUID = 1L;

@ManagedProperty(name = "publishFormBean", value = "#{publishFormBean}")
private PublishFormBean publishFormBean;

....
}

and the publish.xhtml with the input like this

<ice:inputText id="title" tabindex="2" value="#{publishFormBean.title}"/>

Now, I have to open another window/tab, called preview.xhtml to show a preview of what user has inserted in the publish.xhtml. How can I do this?

I've tried many ways and the only one that worked for me is to create an outputlink with target blank, passing all the parameters with f:param, but I will see all in the request. I'd like a more clean solution, passing an object instead or accessing the publishwebbean directly from the preview (tried both but not working, opening the preview create a new publishformbean in the publishwebbean, because all attributes are null).

Thanks in advance.
salvatore82


Joined: 03/Mar/2011 08:40:57
Messages: 18
Offline


anyone???
philip.breau


Joined: 08/May/2006 00:00:00
Messages: 2989
Offline


You can try using Flash Scope. Think of it as a temporary session storage that only survives past a redirect.

http://www.jroller.com/HazemBlog/entry/understanding_the_jsf_2_0

.
salvatore82


Joined: 03/Mar/2011 08:40:57
Messages: 18
Offline


It works if I don't open a new window.If I try to open a new window thi won't work...
 
Forum Index -> General Help
Go to:   
Powered by JForum 2.1.7ice © JForum Team