You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Michał 'Gandalf' Stawicki <st...@gmail.com> on 2007/03/26 13:41:13 UTC

[Tobago] Popup inside tc:sheet

Hello,

I have following code inside tc:column of tc:sheet

			    <tc:button label="Powód"
rendered="#{adminManagedBean.ordersManagementController.selectedOrderHelper.complaint}">
				<f:facet name="popup">
				    <tc:popup width="300px" height="300px" id="popup">
					<tc:box label="#{fileHelper.fileRaw.orgFileName}">
					    <f:facet name="layout">
						<tc:gridLayout rows="*;fixed" columns="*"/>
					    </f:facet>
					    <tc:out escape="false" value="#{fileHelper.complaintReason}" />		
					    <tc:button label="Zamknij">
						<tc:attribute name="popupClose" value="immediate" />
					    </tc:button>
					</tc:box>
				    </tc:popup>
				</f:facet>
			    </tc:button>

When I press the button, the popup appears, but unfortunately El's
aren't evaluated and I don't get any label nor tc:out.

If I put tc:out outside the button, it works ok.

Any suggestions what could be wrong?

regards,
michael

-- 
stawicki@gmail.com
http://stawicki.jasliska.pl
GG: 3691111
JID: stawicki@gmail.com

Re: [Tobago] Popup inside tc:sheet

Posted by Michał 'Gandalf' Stawicki <st...@gmail.com>.
Yes, it's exactly as you have understood it. Thanks for the solution

regards,
michał

On 26/03/07, Volker Weber <v....@inexso.de> wrote:
> Hi Michał,
>
> to less information provided, but if fileHelper is the 'var' or the sheet:
>
> rendering of the popup and evaluation of el expressions is outside the
> sheet rendering, so the var is not set.
>
> Solution:
> use another bean (could be request scope) for popup values and set
> them via actionListener on the button.
>
> <tc:button label="Powód" actionListener="#{bean.setPopupValues}"
> rendered="#{adminManagedBean.ordersManagementController.selectedOrderHelper.complaint}">
>    <f:facet name="popup">
>      <tc:popup width="300px" height="300px" id="popup">
>        <tc:box label="#{bean.orgFileName}">
>          <f:facet name="layout">
>            <tc:gridLayout rows="*;fixed" columns="*"/>
>          </f:facet>
>          <tc:out escape="false" value="#{bean.complaintReason}" />
>          <tc:button label="Zamknij">
>            <tc:attribute name="popupClose" value="immediate" />
>          </tc:button>
>        </tc:box>
>      </tc:popup>
>    </f:facet>
> </tc:button>
>
> public void setPopupValues(ActionEvent event) {
>     UIData sheet = (UIData) event.getUIComponent();
>     Object fileHelper = sheet.getRowData();
>     complaintReason = fileHelper.getComplaintReason();
>     orgFileName = fileHelper.getFileRaw.getOrgFileName();
> }
>
>
> Regards,
>   Volker
>
>
>
>
>
> 2007/3/26, Michał 'Gandalf' Stawicki <st...@gmail.com>:
> > Hello,
> >
> > I have following code inside tc:column of tc:sheet
> >
> >                             <tc:button label="Powód"
> > rendered="#{adminManagedBean.ordersManagementController.selectedOrderHelper.complaint}">
> >                                 <f:facet name="popup">
> >                                     <tc:popup width="300px" height="300px" id="popup">
> >                                         <tc:box label="#{fileHelper.fileRaw.orgFileName}">
> >                                             <f:facet name="layout">
> >                                                 <tc:gridLayout rows="*;fixed" columns="*"/>
> >                                             </f:facet>
> >                                             <tc:out escape="false" value="#{fileHelper.complaintReason}" />
> >                                             <tc:button label="Zamknij">
> >                                                 <tc:attribute name="popupClose" value="immediate" />
> >                                             </tc:button>
> >                                         </tc:box>
> >                                     </tc:popup>
> >                                 </f:facet>
> >                             </tc:button>
> >
> > When I press the button, the popup appears, but unfortunately El's
> > aren't evaluated and I don't get any label nor tc:out.
> >
> > If I put tc:out outside the button, it works ok.
> >
> > Any suggestions what could be wrong?
> >
> > regards,
> > michael
> >
> > --
> > stawicki@gmail.com
> > http://stawicki.jasliska.pl
> > GG: 3691111
> > JID: stawicki@gmail.com
> >
>


-- 
stawicki@gmail.com
http://stawicki.jasliska.pl
GG: 3691111
JID: stawicki@gmail.com

Re: [Tobago] Popup inside tc:sheet

Posted by Volker Weber <v....@inexso.de>.
Hi Michał,

to less information provided, but if fileHelper is the 'var' or the sheet:

rendering of the popup and evaluation of el expressions is outside the
sheet rendering, so the var is not set.

Solution:
use another bean (could be request scope) for popup values and set
them via actionListener on the button.

<tc:button label="Powód" actionListener="#{bean.setPopupValues}"
rendered="#{adminManagedBean.ordersManagementController.selectedOrderHelper.complaint}">
   <f:facet name="popup">
     <tc:popup width="300px" height="300px" id="popup">
       <tc:box label="#{bean.orgFileName}">
         <f:facet name="layout">
           <tc:gridLayout rows="*;fixed" columns="*"/>
         </f:facet>
         <tc:out escape="false" value="#{bean.complaintReason}" />
         <tc:button label="Zamknij">
           <tc:attribute name="popupClose" value="immediate" />
         </tc:button>
       </tc:box>
     </tc:popup>
   </f:facet>
</tc:button>

public void setPopupValues(ActionEvent event) {
    UIData sheet = (UIData) event.getUIComponent();
    Object fileHelper = sheet.getRowData();
    complaintReason = fileHelper.getComplaintReason();
    orgFileName = fileHelper.getFileRaw.getOrgFileName();
}


Regards,
  Volker





2007/3/26, Michał 'Gandalf' Stawicki <st...@gmail.com>:
> Hello,
>
> I have following code inside tc:column of tc:sheet
>
>                             <tc:button label="Powód"
> rendered="#{adminManagedBean.ordersManagementController.selectedOrderHelper.complaint}">
>                                 <f:facet name="popup">
>                                     <tc:popup width="300px" height="300px" id="popup">
>                                         <tc:box label="#{fileHelper.fileRaw.orgFileName}">
>                                             <f:facet name="layout">
>                                                 <tc:gridLayout rows="*;fixed" columns="*"/>
>                                             </f:facet>
>                                             <tc:out escape="false" value="#{fileHelper.complaintReason}" />
>                                             <tc:button label="Zamknij">
>                                                 <tc:attribute name="popupClose" value="immediate" />
>                                             </tc:button>
>                                         </tc:box>
>                                     </tc:popup>
>                                 </f:facet>
>                             </tc:button>
>
> When I press the button, the popup appears, but unfortunately El's
> aren't evaluated and I don't get any label nor tc:out.
>
> If I put tc:out outside the button, it works ok.
>
> Any suggestions what could be wrong?
>
> regards,
> michael
>
> --
> stawicki@gmail.com
> http://stawicki.jasliska.pl
> GG: 3691111
> JID: stawicki@gmail.com
>