You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Georg Sendt <ge...@web.de> on 2007/11/17 16:15:23 UTC

PageLogic works different with Firefox and IE

Hi,

I have a problem with page logic works different in Firefox and IE.

The code shows 4 buttons but only 2 are visible at the same time. There is
a Candidate/NotCandidate-Button pair and a Observer/Not-Observer pair.

With Firefox it works perfectly but with IE only the candidate logic is
processed
regardless which button you press.

Any hints?

Regards,

Georg


<html>
    <head>
        <title>Wicket Quickstart Archetype Homepage</title>
    </head>
    <body>

     &lt;span wicket:id="result"&gt;[RESULT]&lt;/span&gt;
     <form wicket:id="buttonForm">
        <div>
          <button wicket:id="candidate"  type="submit">
            Candidate
          </button>
          <button wicket:id="dontCandidate"  type="submit">
            Dont Candidate
          </button>
        </div>
        <div>
          <button wicket:id="observe"  type="submit">
            Observe
          </button>
          <button wicket:id="dontObserve"  type="submit">
            Dont Observe
          </button>
        </div>
      </form>

    </body>
</html>

--- --- ---
/**
 * Homepage
 */
public class HomePage extends WebPage {

  private static final long serialVersionUID = 1L;

  private boolean m_isCandidate;
  private boolean m_isObserver;

  /**
   * Constructor that is invoked when page is invoked without a session.
   *
   * @param parameters
   *          Page parameters
   */
  public HomePage(final PageParameters parameters) {

    add(new Label("result", new Model() {

      private static final long serialVersionUID = 1L;

      @Override
      public Object getObject() {
        return "Observer: " + m_isObserver + " Candidate:" + m_isCandidate;
      }

    }));

    Form form = new Form("buttonForm");
    add(form);

    Button btCandidate = new Button("candidate") {

      private static final long serialVersionUID = 1L;

      public void onSubmit() {
        m_isCandidate = true;
      }

      public boolean isVisible() {
        return m_isCandidate == false;
      }
    };
    form.add(btCandidate);

    Button btDontCandidate = new Button("dontCandidate") {

      private static final long serialVersionUID = 1L;

      public void onSubmit() {
        m_isCandidate = false;
      }

      public boolean isVisible() {
        return m_isCandidate;
      }
    };

    form.add(btDontCandidate);

    Button btObserve = new Button("observe") {

      private static final long serialVersionUID = 1L;

      public void onSubmit() {
        m_isObserver = true;
      }

      public boolean isVisible() {
        return m_isObserver == false;
      }
    };

    form.add(btObserve);

    Button btDontObserve = new Button("dontObserve") {

      private static final long serialVersionUID = 1L;

      public void onSubmit() {
        m_isObserver = false;
      }

      public boolean isVisible() {
        return m_isObserver;
      }
    };

    form.add(btDontObserve);

  }
}
-- 
View this message in context: http://www.nabble.com/PageLogic-works-different-with-Firefox-and-IE-tf4826855.html#a13810056
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: PageLogic works different with Firefox and IE

Posted by Dmitry Kandalov <no...@gmail.com>.
On Saturday 17 November 2007 19:15:23 Georg Sendt wrote:
> Hi,
>
> I have a problem with page logic works different in Firefox and IE.
>
> The code shows 4 buttons but only 2 are visible at the same time. There is
> a Candidate/NotCandidate-Button pair and a Observer/Not-Observer pair.
>
> With Firefox it works perfectly but with IE only the candidate logic is
> processed
> regardless which button you press.
>
> Any hints?

I also experienced that problem which seems to be a bug in IE6. If it's still 
important, I used <input type="submit"/> tag rather than <button.../> as a 
workaround.

Dima

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org