-
1. Re: command Button error 'A4J is undefined'
waq May 21, 2009 12:35 PM (in response to waq)ok i got the issue. i didn't define the filter in XML.
Now i have another problem, when i press this button the datatable gets updated. I want to show the message 'Processing....' to the user when he press the button till the table gets updated. -
2. Re: command Button error 'A4J is undefined'
nbelaevski May 21, 2009 2:15 PM (in response to waq)Hi, use a4j:status
-
3. Re: command Button error 'A4J is undefined'
waq May 22, 2009 4:32 AM (in response to waq)do we also need to define the region? if no then what should be the value of 'for' attribute of a4j:status?
-
4. Re: command Button error 'A4J is undefined'
ilya_shaikovsky May 22, 2009 5:32 AM (in response to waq)status could be just placed without any for definitions for simplest case.. It will be applied to region where it placed. If no regions defined it will be applied to the whole page.
-
5. Re: command Button error 'A4J is undefined'
nbelaevski May 22, 2009 5:36 AM (in response to waq)Take a look at: livedemo examples, RF RefCard and userguide.
-
6. Re: command Button error 'A4J is undefined'
waq May 22, 2009 6:49 AM (in response to waq)ok thanks for the valuable information. It works.
Can you please give me the link for livedemo examples, RF RefCard -
7. Re: command Button error 'A4J is undefined'
ilya_shaikovsky May 22, 2009 6:52 AM (in response to waq)visit the links in our signatures ;)
-
8. Re: command Button error 'A4J is undefined'
waq May 22, 2009 9:01 AM (in response to waq)ok now i have one datatable which populates at runtime. When user clicks the button it fetch the values and populate the table. I want to show the table only if any record found. I did as:
<a4j:commandButton action="#{dictionary.searchWord}" reRender="detail_table"/> <h:dataTable rendered="#{dictionary.visible}" id ="detail_table"/>
public void searchWord() { if(no record) { this.setVisible(false); }//end if else { this.setVisible(true); }//end else }
But it does not show the table even if the record is found -
9. Re: command Button error 'A4J is undefined'
nbelaevski May 22, 2009 10:33 AM (in response to waq)You can not re-render component that has not been rendered. Enclose it into <a4j:outputPanel layout="none"> or another container component and re-render it.
-
10. Re: command Button error 'A4J is undefined'
waq May 26, 2009 5:36 AM (in response to waq)How to change the layout in case if data found? Can we use EL for layout attribute?
-
11. Re: command Button error 'A4J is undefined'
nbelaevski May 26, 2009 5:44 AM (in response to waq)No need to change, use "none" in all cases.
-
12. Re: command Button error 'A4J is undefined'
waq May 26, 2009 5:55 AM (in response to waq)It shows empty table with headings, when pages loads for the first time.
It also shows empty table with headings when no data found.
In both of the above cases table should not be displayed.
Code is:<a4j:commandButton value="Search" action="#{dictionary.searchWord}" reRender="detail_table, table_div" id="searchBtn"/> <br /> <a4j:status> <f:facet name="start"> <h:graphicImage url="images/Loading12.gif"/> </f:facet> </a4j:status> <br /> <a4j:outputPanel id="table_div" layout="none"> <h:dataTable id="detail_table" value="#{dictionary.dictionayList}" var="dic" border="1"> <h:column> <f:facet name="header"> <h:outputText value="Word" /> </f:facet> <h:outputText value="#{dic.word}" /> </h:column> <h:column> <f:facet name="header"> <h:outputText value="Description" /> </f:facet> <h:outputText value="#{dic.description}" /> </h:column> </h:dataTable> </a4j:outputPanel> <br /> <rich:message for="search_form" />
-
13. Re: command Button error 'A4J is undefined'
nbelaevski May 26, 2009 6:51 AM (in response to waq)"rendered" still should be present on rich:dataTable.
-
14. Re: command Button error 'A4J is undefined'
waq May 26, 2009 7:29 AM (in response to waq)OK thanks it works now. But i have two question regarding it?
1) Do we still need to re-render outputPanel?
2) When data found it shows the table, but the table is enclosed in panel with layout = none. So why(how) it shows something which is enclose in layout = none.
Thanks