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/02/06 14:18:45 UTC
[tobago] tc:popup and 1.0.10-SNAPSHOT
Hi all,
I've came across another popup problem:
I have a popup to change password, there is one button for Cancel and
one button for Change Password. Now, when user presses Change Password
there are two possibilities:
if all the data he has entered is correct, then I want to execute some
action and close the popup, this works fine
but if he has entered too short passwords or the old password doesn't
match, then I want to display some error message in tc:out and leave
the popup open.
Is there a way to achieve this? <tc:attribute name="popupClose" ... >
will always close the window
regards
Michael
--
stawicki@gmail.com
http://stawicki.jasliska.pl
GG: 3691111
JID: stawicki@gmail.com
Re: [tobago] tc:popup and 1.0.10-SNAPSHOT
Posted by Bernd Bohmann <be...@atanion.com>.
Hello,
you can use a <tc:popupReference /> tag inside a button.
This page contains a working example:
http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-tool/gendoc/src/main/webapp/screenshot/popup.jsp?view=markup
I will look why the valuebinding why doesn't work, later.
Bernd
Michał 'Gandalf' Stawicki wrote:
> Hey,
>
> thanks for help
>
>> if you enable or disable the popup with a valueBinding you can place the
>> popup outside the sheet. Maybe popup inside the sheet is a problem.
>
> by valueBinding you mean using the rendered attribute? That's how it
> was originally (with 1.0.8), but after upgrading to yesterdays 1.0.10
> SNAPSHOT it has stopped working, so I moved it into the sheet. Still
> no luck getting it to work again, though.
>
> Regards
>
> michael
Re: [tobago] tc:popup and 1.0.10-SNAPSHOT
Posted by Michał 'Gandalf' Stawicki <st...@gmail.com>.
Got it working using the popupReference tag just like suggested, thank you Bernd
michael
--
stawicki@gmail.com
http://stawicki.jasliska.pl
GG: 3691111
JID: stawicki@gmail.com
Re: [tobago] tc:popup and 1.0.10-SNAPSHOT
Posted by Bernd Bohmann <be...@atanion.com>.
Please look at this thread
http://www.mail-archive.com/users@myfaces.apache.org/msg33051.html
Bernd
Michał 'Gandalf' Stawicki wrote:
> Hey,
>
> thanks for help
>
>> if you enable or disable the popup with a valueBinding you can place the
>> popup outside the sheet. Maybe popup inside the sheet is a problem.
>
> by valueBinding you mean using the rendered attribute? That's how it
> was originally (with 1.0.8), but after upgrading to yesterdays 1.0.10
> SNAPSHOT it has stopped working, so I moved it into the sheet. Still
> no luck getting it to work again, though.
>
> Regards
>
> michael
Re: [tobago] tc:popup and 1.0.10-SNAPSHOT
Posted by Michał 'Gandalf' Stawicki <st...@gmail.com>.
Hey,
thanks for help
> if you enable or disable the popup with a valueBinding you can place the
> popup outside the sheet. Maybe popup inside the sheet is a problem.
by valueBinding you mean using the rendered attribute? That's how it
was originally (with 1.0.8), but after upgrading to yesterdays 1.0.10
SNAPSHOT it has stopped working, so I moved it into the sheet. Still
no luck getting it to work again, though.
Regards
michael
--
stawicki@gmail.com
http://stawicki.jasliska.pl
GG: 3691111
JID: stawicki@gmail.com
Re: [tobago] tc:popup and 1.0.10-SNAPSHOT
Posted by Bernd Bohmann <be...@atanion.com>.
Hello,
if you enable or disable the popup with a valueBinding you can place the
popup outside the sheet. Maybe popup inside the sheet is a problem.
For you second question.
In the 1.0.10 version you can throw a validation error, in this case the
popup should not closed or using a valueBinding for the rendered
attribute should help.
Regards
Bernd
Michał 'Gandalf' Stawicki wrote:
> And yet another problem (bug?), 1.0.10-SNAPSHOT I have this code:
>
> <tc:form>
> <tc:sheet
>
> value="#{clientManagedBean.newOrderControler.attachmentsController.tempAttachments}"
>
> id="sheet"
> columns="*;*;*"
> var="tempAttachments"
> showHeader='false'
> showRowRange='none'
> showPageRange='none'
> showDirectLinks='none'>
> />
> <tc:column
> id="file"
> align="center">
> <tc:out value="#{tempAttachments.file.name}" />
> </tc:column>
> <tc:column>
> <tc:button label="Details"
> action="#{tempAttachments.showDetails}">
> <%-- Popup --%>
> <f:facet name="popup">
> <tc:popup width="250" height="300"
> rendered="#{clientManagedBean.newOrderControler.attachmentsController.fileDetailsController.showDetails}">
>
> <tc:box label="Szczegóły pliku">
> <f:facet name="layout">
> <tc:gridLayout rows="*;fixed;fixed" />
> </f:facet>
> <tc:out escape="false"
> value="#{clientManagedBean.newOrderControler.attachmentsController.fileDetailsController.details}"
>
> />
>
> <tc:cell spanY="2">
> <tc:button label="Zamknij"
> action="#{clientManagedBean.newOrderControler.attachmentsController.fileDetailsController.hideDetails}"
>
> />
> </tc:cell>
> </tc:box>
> </tc:popup>
> </f:facet>
> </tc:button>
> </tc:column>
>
> <tc:column
> id="delete"
> align="center">
> <tc:button label="Delete"
> action="#{tempAttachments.delete}"/>
> </tc:column>
> </tc:sheet>
> </tc:form>
>
>
> After pressing Details button the rendered property of popup turns to
> true but the popup is not rendered :(
>
>
> On 06/02/07, Michał 'Gandalf' Stawicki <st...@gmail.com> wrote:
>> Hi all,
>>
>> I've came across another popup problem:
>>
>> I have a popup to change password, there is one button for Cancel and
>> one button for Change Password. Now, when user presses Change Password
>> there are two possibilities:
>>
>> if all the data he has entered is correct, then I want to execute some
>> action and close the popup, this works fine
>>
>> but if he has entered too short passwords or the old password doesn't
>> match, then I want to display some error message in tc:out and leave
>> the popup open.
>>
>> Is there a way to achieve this? <tc:attribute name="popupClose" ... >
>> will always close the window
>>
>> regards
>> Michael
>>
>> --
>> stawicki@gmail.com
>> http://stawicki.jasliska.pl
>> GG: 3691111
>> JID: stawicki@gmail.com
>>
>
>
Re: [tobago] tc:popup and 1.0.10-SNAPSHOT
Posted by Michał 'Gandalf' Stawicki <st...@gmail.com>.
And yet another problem (bug?), 1.0.10-SNAPSHOT I have this code:
<tc:form>
<tc:sheet
value="#{clientManagedBean.newOrderControler.attachmentsController.tempAttachments}"
id="sheet"
columns="*;*;*"
var="tempAttachments"
showHeader='false'
showRowRange='none'
showPageRange='none'
showDirectLinks='none'>
/>
<tc:column
id="file"
align="center">
<tc:out value="#{tempAttachments.file.name}" />
</tc:column>
<tc:column>
<tc:button label="Details" action="#{tempAttachments.showDetails}">
<%-- Popup --%>
<f:facet name="popup">
<tc:popup width="250" height="300"
rendered="#{clientManagedBean.newOrderControler.attachmentsController.fileDetailsController.showDetails}">
<tc:box label="Szczegóły pliku">
<f:facet name="layout">
<tc:gridLayout rows="*;fixed;fixed" />
</f:facet>
<tc:out escape="false"
value="#{clientManagedBean.newOrderControler.attachmentsController.fileDetailsController.details}"
/>
<tc:cell spanY="2">
<tc:button label="Zamknij"
action="#{clientManagedBean.newOrderControler.attachmentsController.fileDetailsController.hideDetails}"
/>
</tc:cell>
</tc:box>
</tc:popup>
</f:facet>
</tc:button>
</tc:column>
<tc:column
id="delete"
align="center">
<tc:button label="Delete" action="#{tempAttachments.delete}"/>
</tc:column>
</tc:sheet>
</tc:form>
After pressing Details button the rendered property of popup turns to
true but the popup is not rendered :(
On 06/02/07, Michał 'Gandalf' Stawicki <st...@gmail.com> wrote:
> Hi all,
>
> I've came across another popup problem:
>
> I have a popup to change password, there is one button for Cancel and
> one button for Change Password. Now, when user presses Change Password
> there are two possibilities:
>
> if all the data he has entered is correct, then I want to execute some
> action and close the popup, this works fine
>
> but if he has entered too short passwords or the old password doesn't
> match, then I want to display some error message in tc:out and leave
> the popup open.
>
> Is there a way to achieve this? <tc:attribute name="popupClose" ... >
> will always close the window
>
> 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