Dipesh Patel wrote:
> Hello,
>
> I am using alert component.
>
> i have delete button which delete the item and shows message in alert
> component and on click of delete component i have used the following
> script
>
> <webuijsf:button
> actionExpression="#{products$ProductHome.btndeletproducteattachment_action}"
>
> binding="#{products$ProductHome.btndeletproducteattachment}"
> id="btndeletproducteattachment"
> onClick="return
> btndeleteproductattachment(this);" primary="true"
> style="width: 71px" text="Delete"/>
>
> function btndeleteproductattachment(temp) {
> var h=confirm("Are you sure you want to delete this product");
>
> if(h==true)
> {
> var h=temp.value;
> document.getElementById('form1:hiddenid').setProps({value:h});
>
> DynaFaces.fireAjaxTransaction(temp,{execute:temp.id+',form1:hiddenid',render:'*form1:mainpanel:alertpanel:alert1*,form1:mainpanel:layoutPanel2:layoutPanel4:tabSet1:tbattachments:layoutPanel17:attachmenttablepanel'});
> }
> return false;
>
> }
>
> here *form1:mainpanel:alertpanel:alert1 *is the alert component i want
> to rendered using dynafaces but it is not rendered
>
> but when i do not use ajax i.e dynafaces the alert is rendered.
1. What version of Woodstock are you using?
2. Do you have any JavaScript errors?
3. Have you included JSF Extensions in the page? If not, please read the
Woodstock release notes.
>
> *and also
> document.getElementById('form1:mainpanel:alertpanel:alert1').refresh()
> does not work.
>
> *
Calling refresh without any properties simply renders the component in
its original state. If the alert was hidden when the page was loaded, it
will not be visible after a refresh. That is, unless you submit another
value (e.g., from a hidden field) so you can change the state before it
is re-rendered. You provided the execute property to DynaFaces, so
you'll have to do the same here.
Dan