views:

17

answers:

1

Hello,I m trying to call a model Panel through CommandButton in Windows Vista Mozilla Firefox:-Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.11) Gecko/20101012 Firefox/3.6.11 GTB7.1 (.NET CLR 3.5.30729)

When Ever i m clicking On the CommandButton IT is showing a blank white Page and its look like Browser Serching anything.and No any bean calling and also no any exception is coming

<a4j:commandLink id="showItem" action="#{addCompWL.addCompanynavigation}" 
        onclick="Richfaces.showModalPanel('addWatchListCompanyPanel',{width:500, top:200});"
        actionListener="#{addCompWL.addCompany}"
        rerender="modalPanelDiv" value="Add Stock to Watch List">
         <f:attribute name="companyId" value="#{navigationBean._company_id}"/>
         <f:attribute name="companyName" value="#{navigationBean._companyName}"/>
         <a4j:ajaxListener type="org.ajax4jsf.ajax.ForceRender" />
        </a4j:commandLink>

i m using jsf1.2,Richfaces3.3.2.SR1,Preetyfaces3.0.2

ThANKS

+1  A: 

Maybe it is better to display the Modal Panel after the Ajax call is made?

<a4j:commandLink id="showItem" action="#{addCompWL.addCompanynavigation}" 
    oncomplete="Richfaces.showModalPanel('addWatchListCompanyPanel',{width:500, top:200});"
    ...

Other point: you have a rerender="modalPanelDiv". What is modalPanelDiv exactly? Is it the modalPanel itself, a div that contains the modalPanel or a div inside the modalPanel?

romaintaz
i made changes according to u But Still this is not working,
subodh
<a4j:commandButton id="showItem" action="#{addCompWL.addCompanynavigation}" oncomplete="Richfaces.showModalPanel('addWatchListCompanyPanel',{width:500, top:200});" actionListener="#{addCompWL.addCompany}" value="Add Stock to Watch List"> <f:attribute name="companyId" value="#{navigationBean._company_id}"/> <f:attribute name="companyName" value="#{navigationBean._companyName}"/> </a4j:commandButton>
subodh
Why do you have an action **and** an actionListener on your button? You must use only one of them...
romaintaz