Olá, em minha página eu criei uma rich:dataTable, em cada linha desta tabela há uma coluna com um h:selectOneMenu:
<h:selectOneMenu value="#{t.fichaSelecionada}" rendered="#{(manterUsuario.sessaoPerfil eq 'e') or (manterUsuario.sessaoPerfil eq 'p') or (manterUsuario.sessaoPerfil eq 'd') or (manterUsuario.sessaoPerfil eq 'r')}">
<f:selectItem itemValue="" itemLabel="Abrir ficha"/>
<f:selectItem itemValue="subviewFichas:AnamnesePanel" itemLabel="Anamnese"/>
<f:selectItem itemValue="subviewFichas:EndodonticaPanel" itemLabel="Endodontia"/>
<f:selectItem itemValue="subviewFichas:EstomatologiaPanel" itemLabel="Estomatologia"/>
<f:selectItem itemValue="subviewFichas:OclusalPanel" itemLabel="Oclusão"/>
<f:selectItem itemValue="subviewFichas:OdontogeriatricaPanel" itemLabel="Odontogeriatria"/>
<f:selectItem itemValue="subviewFichas:OdontopediatricaPanel" itemLabel="Odontopediatria"/>
<f:selectItem itemValue="subviewFichas:PeriodontiaPanel" itemLabel="Periodontia"/>
<f:selectItem itemValue="subviewFichas:ProtesePanel" itemLabel="Prótese"/>
<f:selectItem itemValue="subviewFichas:CirurgiaPanel" itemLabel="Cirurgia"/>
<a4j:support event="onchange" reRender="rpanel"></a4j:support>
</h:selectOneMenu>
Este valor que estou setando na variável t.fichaSelecionada, eu gostaria de usar no commandLink que aparece logo ao seu lado:
<a4j:commandLink id="linkAbrirFicha" rendered="#{!(empty t.fichaSelecionada)}"
action="#{manterProntuario.abrirFicha}"
oncomplete="#{rich:component('loading')}.hide(); #{rich:component('#{t.fichaSelecionada}')}.show()"
reRender="#{t.fichaSelecionada}">
<h:graphicImage value="/images/icons/play_disabled.png" style="border:0" />
<f:setPropertyActionListener value="#{t}" target="#{manterProntuario.currentItem}" />
<f:setPropertyActionListener value="#{t.fichaSelecionada}" target="#{manterProntuario.fichaSelecionada}" />
<f:setPropertyActionListener value="#{t.p}" target="#{manterProntuario.currentProntuario}" />
<f:setPropertyActionListener value="#{manterUsuario.currentUser.nome}" target="#{manterProntuario.currentUser}" />
</a4j:commandLink>
O problema que tenho é que quando eu clico no botão ele simplesmente dá o erro 404 e a mensagem “The requested resource (/SistemaProntuarioWeb/) is not available”.
Após selecionar um item do selectOneMenu eu inspecionei o commandLink pelo Chrome e constatei que o trecho do código que deveria chamar o modalPanel está assim:
Quando eu coloco o id de algum modalPanel no parametro do rich:component.show de forma estática, o html da página fica com o código correto e abre o modalPanel sem erros.
Alguem tem alguma idéia de que forma posso resolver isso?
Qualquer informação adicional que acharem necessária para a resolução do problema é só pedir que posto aqui.
Abraços