Hi Iryna,
Iryna Stetska wrote:
> Hello,
>
> I have 2 questions on Tobago toolBarCommand component.
>
> 1. How can I implement functionality on both executing script and
> executing action of the backing bean while pressing the toolbar
> button?
> This mean that if I press the toolbar button some java script should
> be executed (e.g. showing alert) and then the bean action should be
> executed.
> Can it be somehow implemented?
If you want to show a confirm dialog you can add a confirmation facet:
<tc:toolBarCommand label="Submit" >
<f:facet name="confirmation">
<tc:out value="Do you really want submit this form?" />
</f:facet>
</tc:toolBarCommand>
For other things you must use type="script" and call the default submit
function (see onclick attribute of generated html buttons) yourself.
>
> 2. What can I write in the toolBarCommand Body?
> Is this code implemented only after pressing this button or always?
> Please explain.
> <t:toolBarCommand>
> BODY
> </t:toolBarCommand>
Any body content of toolBarCommand, except some special facets (see
above) is ignored.
>
> Thanks,
> Iryna
>
Regards,
Volker
--
Don't answer to From: address!
Mail to this account are droped if not recieved via mailinglist.
To contact me direct create the mail address by
concatenating my forename to my senders domain.