views:

51

answers:

1

I've found some questions that seem related to this one, but none describes exaclty what is happening to my web app.

Here it goes: it's a very simple app, with a left menu bar, a header and a central panel to show some texts. The menu bar has a lot of commandLinks which will define which page is going to be loaded in the central panel. The strange problem is that none of these links work when the page is just loaded. In other words, my first click does nothing. From the second click on, the links work.

I'm using JSF 1.2 and IceFaces 1.8.1. This is the code snippet with the first commandLink (all of the others are similar):

<f:view>
    <html>
    <head>
    <ice:outputStyle href="./xmlhttp/css/rime/rime.css" />
    </head>
    <body>
    <ice:form id="nav_form" partialSubmit="true">
        <ice:messages />
        <ice:panelGrid columns="1" width="152">
            <ice:panelCollapsible expanded="true">
            <f:facet name="header">
                <ice:panelGroup>
                    <ice:outputText value="Cliente"
                        style="font:bold 12px;color:#484848" />
                </ice:panelGroup>
            </f:facet>
                <ice:panelGrid columns="1">
                    <ice:commandLink actionListener="#{cliente.defineText}" 
                        action="cliente" id="consulta">
                        <ice:outputText value="Consulta" />
                    </ice:commandLink>

Important remarks:

  • I'm using some includes, but there are no nested forms.
  • There is no data model. At the time the app is only a prototype, with links and static texts.
  • I'm using regular html <table> ... </table> tags to design the main page, even though I know this is not necessarily the best choice.
A: 

Same answer as this one: http://stackoverflow.com/questions/3900925/page-does-not-refresh-after-an-action-is-called

I removed the JSF 1.2 Apache Myfaces and substituted by the Sun RI jars.

Paulo Guedes
i don't feel comfortable accepting my own answer, but...
Paulo Guedes