You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Luka Surija <lu...@iytim.hr> on 2007/08/08 16:10:37 UTC

[Trinidad] Multiple dialogs

Is there any chance to use multiple popup dialogs? For example, i 1. 
dialog, I want to open 2. dialog, but 2. dialog opens when I close 1. 
dialog?

I'm calling always the same dialog, because I use facelets <ui:include> 
in popup.xhtml. If this is cousing problems, what I have to do, to open 
2. dialog from 1. dialog.

popup.xhtml:
<f:view xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:tr="http://myfaces.apache.org/trinidad"
locale="#{MainMB.locale}" id="#{PopUp.page}">

<f:loadBundle basename="hr.iytim.resource.messages" var="msg" />
<tr:document title="#{msg.main_title}" >
<tr:form >
<tr:panelPage>
<tr:panelButtonBar halign="right" rendered="#{PopUp.closeButtonVisible}" >
<tr:commandButton text="#{msg.close}" 
actionListener="#{PopUp.closePopup}" />
</tr:panelButtonBar>
<tr:messages />
<ui:include src="#{PopUp.page}">
<ui:param name="loadedInPopUp" value="#{PopUp.loadedInPopUp}" />
</ui:include>
</tr:panelPage>
</tr:form>
</tr:document>
</f:view>

tnx

Re: [Trinidad] Multiple dialogs

Posted by Luka Surija <lu...@iytim.hr>.
Yes, I tryed to call this method:

public String showPopup(){
    System.out.println("trigger");
    return "dialog:popup";
}

and every time i click on link in server log is displayed "trigger", but 
the popup doesn't show. If I remove partiaSubmit="true" then the page is 
refreshing so, I don't know what is happening?

It works only if I call this method in a popup window, but the new popup 
is shown when I close the first popup window.


Adam Winer wrote:
> I agree, that doesn't make any sense...  are you sure
> your action is really getting called at all?
>
> -- Adam
>
>
>
> On 8/9/07, Luka Surija <lu...@iytim.hr> wrote:
>   
>> Maybe I've found the problem, but it doesn't make any sense.
>>
>> If I call a dialog like this:
>>
>> <tr:commanLink action="dialog:popup" useWindow="true" />
>> then the popup window is opening, but if I call :
>>
>> <tr:commandLink action="#{Popup.showPopup}" useWindow="true" />
>>
>> and showPopup method is like this:
>> public String showPopup(){
>>     return "dialog:popup";
>> }
>> then nothing happens (popup window is not opening, and there is no
>> server log on this).
>>
>> So is it something broken i trinidad 1.0.2. because I recall it worked
>> before.
>>
>> Did something changed in Dialog Framework between trinidad version
>> m1-incubating and 1.0.2.?
>>
>>
>>
>> Luka Surija wrote:
>>     
>>> Is there any chance to use multiple popup dialogs? For example, i 1.
>>> dialog, I want to open 2. dialog, but 2. dialog opens when I close 1.
>>> dialog?
>>>
>>> I'm calling always the same dialog, because I use facelets
>>> <ui:include> in popup.xhtml. If this is cousing problems, what I have
>>> to do, to open 2. dialog from 1. dialog.
>>>
>>> popup.xhtml:
>>> <f:view xmlns:ui="http://java.sun.com/jsf/facelets"
>>> xmlns:f="http://java.sun.com/jsf/core"
>>> xmlns:h="http://java.sun.com/jsf/html"
>>> xmlns:tr="http://myfaces.apache.org/trinidad"
>>> locale="#{MainMB.locale}" id="#{PopUp.page}">
>>>
>>> <f:loadBundle basename="hr.iytim.resource.messages" var="msg" />
>>> <tr:document title="#{msg.main_title}" >
>>> <tr:form >
>>> <tr:panelPage>
>>> <tr:panelButtonBar halign="right"
>>> rendered="#{PopUp.closeButtonVisible}" >
>>> <tr:commandButton text="#{msg.close}"
>>> actionListener="#{PopUp.closePopup}" />
>>> </tr:panelButtonBar>
>>> <tr:messages />
>>> <ui:include src="#{PopUp.page}">
>>> <ui:param name="loadedInPopUp" value="#{PopUp.loadedInPopUp}" />
>>> </ui:include>
>>> </tr:panelPage>
>>> </tr:form>
>>> </tr:document>
>>> </f:view>
>>>
>>> tnx
>>>
>>>       
>>     
>
>   


Re: [Trinidad] Multiple dialogs

Posted by Adam Winer <aw...@gmail.com>.
I agree, that doesn't make any sense...  are you sure
your action is really getting called at all?

-- Adam



On 8/9/07, Luka Surija <lu...@iytim.hr> wrote:
> Maybe I've found the problem, but it doesn't make any sense.
>
> If I call a dialog like this:
>
> <tr:commanLink action="dialog:popup" useWindow="true" />
> then the popup window is opening, but if I call :
>
> <tr:commandLink action="#{Popup.showPopup}" useWindow="true" />
>
> and showPopup method is like this:
> public String showPopup(){
>     return "dialog:popup";
> }
> then nothing happens (popup window is not opening, and there is no
> server log on this).
>
> So is it something broken i trinidad 1.0.2. because I recall it worked
> before.
>
> Did something changed in Dialog Framework between trinidad version
> m1-incubating and 1.0.2.?
>
>
>
> Luka Surija wrote:
> > Is there any chance to use multiple popup dialogs? For example, i 1.
> > dialog, I want to open 2. dialog, but 2. dialog opens when I close 1.
> > dialog?
> >
> > I'm calling always the same dialog, because I use facelets
> > <ui:include> in popup.xhtml. If this is cousing problems, what I have
> > to do, to open 2. dialog from 1. dialog.
> >
> > popup.xhtml:
> > <f:view xmlns:ui="http://java.sun.com/jsf/facelets"
> > xmlns:f="http://java.sun.com/jsf/core"
> > xmlns:h="http://java.sun.com/jsf/html"
> > xmlns:tr="http://myfaces.apache.org/trinidad"
> > locale="#{MainMB.locale}" id="#{PopUp.page}">
> >
> > <f:loadBundle basename="hr.iytim.resource.messages" var="msg" />
> > <tr:document title="#{msg.main_title}" >
> > <tr:form >
> > <tr:panelPage>
> > <tr:panelButtonBar halign="right"
> > rendered="#{PopUp.closeButtonVisible}" >
> > <tr:commandButton text="#{msg.close}"
> > actionListener="#{PopUp.closePopup}" />
> > </tr:panelButtonBar>
> > <tr:messages />
> > <ui:include src="#{PopUp.page}">
> > <ui:param name="loadedInPopUp" value="#{PopUp.loadedInPopUp}" />
> > </ui:include>
> > </tr:panelPage>
> > </tr:form>
> > </tr:document>
> > </f:view>
> >
> > tnx
> >
>
>

Re: [Trinidad] Multiple dialogs

Posted by Luka Surija <lu...@iytim.hr>.
Maybe I've found the problem, but it doesn't make any sense.

If I call a dialog like this:

<tr:commanLink action="dialog:popup" useWindow="true" />
then the popup window is opening, but if I call :

<tr:commandLink action="#{Popup.showPopup}" useWindow="true" />

and showPopup method is like this:
public String showPopup(){
    return "dialog:popup";
}
then nothing happens (popup window is not opening, and there is no 
server log on this).

So is it something broken i trinidad 1.0.2. because I recall it worked 
before.

Did something changed in Dialog Framework between trinidad version 
m1-incubating and 1.0.2.?



Luka Surija wrote:
> Is there any chance to use multiple popup dialogs? For example, i 1. 
> dialog, I want to open 2. dialog, but 2. dialog opens when I close 1. 
> dialog?
>
> I'm calling always the same dialog, because I use facelets 
> <ui:include> in popup.xhtml. If this is cousing problems, what I have 
> to do, to open 2. dialog from 1. dialog.
>
> popup.xhtml:
> <f:view xmlns:ui="http://java.sun.com/jsf/facelets"
> xmlns:f="http://java.sun.com/jsf/core"
> xmlns:h="http://java.sun.com/jsf/html"
> xmlns:tr="http://myfaces.apache.org/trinidad"
> locale="#{MainMB.locale}" id="#{PopUp.page}">
>
> <f:loadBundle basename="hr.iytim.resource.messages" var="msg" />
> <tr:document title="#{msg.main_title}" >
> <tr:form >
> <tr:panelPage>
> <tr:panelButtonBar halign="right" 
> rendered="#{PopUp.closeButtonVisible}" >
> <tr:commandButton text="#{msg.close}" 
> actionListener="#{PopUp.closePopup}" />
> </tr:panelButtonBar>
> <tr:messages />
> <ui:include src="#{PopUp.page}">
> <ui:param name="loadedInPopUp" value="#{PopUp.loadedInPopUp}" />
> </ui:include>
> </tr:panelPage>
> </tr:form>
> </tr:document>
> </f:view>
>
> tnx
>