Problem with Accordion

4 messages Options
Embed this post
Permalink
BigMike

Problem with Accordion

Reply Threaded More More options
Print post
Permalink
Hi,
I am new at developing Wickext web application. I wrote a small simple program(see below). One problem is I want 2nd content to be disappeared if I press the title 1 panel. How can I overcome?

import org.apache.wicket.markup.html.WebPage;

import org.objetdirect.wickext.ui.accordion.Accordion;

public class HomePage extends WebPage {

    public HomePage() {
        Accordion accordion = new Accordion("accordion");
        add(accordion);
    }
}

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns:wicket>
  <head>
    <title>HomePage</title>
  </head>
  <body>
    <center>
        <strong>Home Page</strong>
    </center>
    <ul wicket:id="accordion">
        <li class="ui-accordion-group">
            <h4 class="ui-accordion-header">Panel 1 title</h4>
            <p class="ui-accordion-content">Content1</p>
        </li>
        <li class="ui-accordion-group">
            <h4 class="ui-accordion-header">Panel 2 title</h4>
            <p class="ui-accordion-content">Content2</p>
        </li>
    </ul>

  </body>
</html>


Looking forward to hearing from you.

Regards.
Lionel Armanet

Re: Problem with Accordion

Reply Threaded More More options
Print post
Permalink
Hello,

The principle of an accordion panel is to show one and only one panel
at a time. Therefore, you can't open two panels at the same time.

More info on this page: http://ui.jquery.com/demos/accordion#default

Lionel

On Tue, Jan 6, 2009 at 2:06 PM, BigMike (via Nabble)
<[hidden email]> wrote:

> Hi,
> I am new at developing Wickext web application. I wrote a small simple
> program(see below). One problem is I want 2nd content to be disappeared if I
> press the title 1 panel. How can I overcome?
>
> import org.apache.wicket.markup.html.WebPage;
>
> import org.objetdirect.wickext.ui.accordion.Accordion;
>
> public class HomePage extends WebPage {
>
>     public HomePage() {
>         Accordion accordion = new Accordion("accordion");
>         add(accordion);
>     }
> }
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
> "http://www.w3.org/TR/html4/loose.dtd">
> <html xmlns:wicket>
>   <head>
>     <title>HomePage</title>
>   </head>
>   <body>
>     <center>
>         <strong>Home Page</strong>
>     </center>
>     <ul wicket:id="accordion">
>         <li class="ui-accordion-group">
>             <h4 class="ui-accordion-header">Panel 1 title</h4>
>             <p class="ui-accordion-content">Content1</p>
>         </li>
>         <li class="ui-accordion-group">
>             <h4 class="ui-accordion-header">Panel 2 title</h4>
>             <p class="ui-accordion-content">Content2</p>
>         </li>
>     </ul>
>
>   </body>
> </html>
>
>
> Looking forward to hearing from you.
>
> Regards.
>
> ________________________________
> View message @
> http://n2.nabble.com/Problem-with-Accordion-tp2117385p2117385.html
> To start a new topic under WickeXt - User forum, email
> [hidden email]
> To unsubscribe from WickeXt - User forum, click here.
>



--
__________________________________

Lionel Armanet
http://www.wickext.org
gmail: lionel.armanet*at*gmail.com
Alexander Lendl

Re: Problem with Accordion

Reply Threaded More More options
Print post
Permalink
Hello,

I have the same issue with my Accordion test example. Both panel contents are displayed. Is there some documentation available, how to use it correctly? I also haven’t found a wicket sample project in the svn repository yet, which shows e.g. how the components for the “UI components page” are used (http://www.wickext.org/documentation/ui/jquery-ui-wicket-integration.html).

Can you please give us some hints (or an example project) how to integrate the Accordion component the right way?

TIA
Alexander Lendl  

Lionel Armanet

Re: Problem with Accordion

Reply Threaded More More options
Print post
Permalink
Hello,

I think I'll add the sample components on the SVN directory. Anyway, the problems you have with accordion panels was problems I had too when I built these components.

Let me find a little bit of time to upload my (noTooMuchDirty ^_^) example sources.

Lionel