thank You for you for taking Time to Answer!! i will trie it out today and the give a response Sam
craigmcc wrote: > > On 6/8/07, samju <[EMAIL PROTECTED]> wrote: >> >> ok it make i think i misunderstood the way how Dialog work! >> for the moment i got: >> 08.06.2007 18:07:58 org.apache.catalina.core.ApplicationDispatcher invoke >> SCHWERWIEGEND: Servlet.service() for servlet jsp threw exception >> javax.faces.FacesException: Could not retrieve value of component with >> path >> : {Component-Path : [Class: >> org.apache.shale.view.faces.ShaleViewRoot,ViewId: >> /loginfinished.jsp][Class: >> javax.faces.component.html.HtmlForm,Id: back][Class: >> javax.faces.component.UINamingContainer,Id: userpanel][Class: >> javax.faces.component.html.HtmlOutputText,Id: username]} >> >> Question: how can i retrieve the value of "username"? >> <h:outputText id="username" value="#{dialogScope.user}" /> >> loginfinished.jsp include userpanel.jsp username value was delivered by >> parentdialog. >> >> any proposition? > > Two ideas for how to do this: > > * (As I mentioned in the previous response), store a > reference to your parent dialog's data object *separately* > in session scope so that it can be accessed directly. > > * Ensure that the subdialog receives the same data object > as the parent dialog does. Note that it is not good enough > to have the same data *class*, you really need the same > *instance* of that class in order to share data. > > Craig > > >> Sam >> >> >> craigmcc wrote: >> > >> > On 6/8/07, samju <[EMAIL PROTECTED]> wrote: >> >> >> >> one more attempt to provide more clarity, >> >> >> >> dialog : Parent Dialog take care of Login and Logout actions >> >> subdialog : refresh, delete,.....etc. user information >> >> AppMainClass: this class provide login and logout action and launch >> the >> >> subdialog activity >> >> >> >> >> >> public class AppMainClass extends AbstractViewController{ >> >> public String lauchSubdialogA(){ >> >> >> >> 1.get the currrentuser data >> >> my suggestion: dcontext.getData(); //From Bean "A" >> >> 2. transfer this data to the subdialog "dataClassName" >> >> ?? setValue("#{BBean}") >> >> >> >> 3.invoke return "logical Outcome to activate the subdialog" >> >> } >> >> } >> >> other actions will take place in the subdialog. < subdialog End state> >> >> should be terminated and give the control back to AppMainClass. >> >> >> >> using one Parent Dialog for the entire application and several >> Subdialog >> >> (Babys Dialog) for updating the Parent Dialog data... in my App. the >> >> Subdialog need the Information Data from the Parent Dialog but each >> >> subdialog had the own Actions for manipulating the data provided from >> the >> >> Parent Dialog "DataClassName" >> >> and give it back. and so on... >> >> the Subdialog live only for a Request Scope Time >> >> Dialog had a Application Scope Time ("=Dialog Scope" in my case) >> > >> > This helps a lot in understanding what you are trying to do. One >> > thing to remember is that subdialog instances get their *own* data >> > objects, rather than sharing the same data object as the parent. At >> > the moment, there is no easy way to automatically access the parent's >> > data object (making this possible would be a good enhancement >> > request). As a workaround for now, consider exposing the parent's >> > data object as a separate session scope attribute, in addition to >> > being a data object. >> > >> > Note that *all* DialogContext instances, and therefore the data >> > objects they reference, are held in session scope, because they are >> > specific to a particular user. You cannot store the dialog context >> > instances in application scope, because they would then be shared by >> > all users -- and one user performing a transition between states would >> > mess up the navigation for everyone else. >> > >> > Craig >> > >> > >> >> -- >> View this message in context: >> http://www.nabble.com/transition-between-2-Dialog-tf3885103.html#a11029950 >> Sent from the Shale - User mailing list archive at Nabble.com. >> >> > > -- View this message in context: http://www.nabble.com/transition-between-2-Dialog-tf3885103.html#a11038218 Sent from the Shale - User mailing list archive at Nabble.com.