You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by grazia <Gr...@gmail.com> on 2013/03/11 16:54:25 UTC

DropDown in palette's header ?

Hi, 

is there a way to place a dropdown inside the selected header of a palette ? 
Thanks



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/DropDown-in-palette-s-header-tp4657163.html
Sent from the Users forum 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: DropDown in palette's header ?

Posted by Paul Bors <pa...@bors.ws>.
Looks like your component tree is not quite right.

Would you like me to post my working code example?

~ Thank you,
   Paul Bors

On Mon, Mar 11, 2013 at 2:11 PM, grazia <Gr...@gmail.com>wrote:

> If this is the statespanel;
>
> <?xml version="1.0" encoding="UTF-8" ?>
> <wicket:panel xmlns:wicket="http://wicket.apache.org">
>
>     <div>
>         <label class='dataEntryLabel'>Select a State:</label> <select
>             wicket:id="states"></select>
>     </div>
>
> </wicket:panel>
>
> public class StatePanel extends Panel {
>
>     /**
>      *
>      */
>     private static final long serialVersionUID = 1L;
>
>     public StatePanel(final String id, final IModel<String> stateModel,
>             final IModel<List<String>> stateChoicesModel) {
>         super(id);
>
>         final DropDownChoice<String> stateDropdown = new
> DropDownChoice<String>(
>                 "states", stateModel, stateChoicesModel);
>
>
>     }
>
> }
>
> And on the page:
>
> final Palette<Location> palette = new Palette<Location>(
>                 "palette", selectedInstallations, availableInstallations,
>                 new ChoiceRenderer<Location>("location", "locationId"),
>                 25, false) {
>
>             @Override
>             protected Component newAvailableHeader(String componentId) {
>                 return new StatePanel(componentId, stateModel,
>                         stateChoicesModel);
>
>             }
>         };
>         palette.setOutputMarkupId(true);
>
> Iam getting:
>
> WARNING: Detected inconsistency in choice component: class ...
> LocAssociation/form:states. Model returned object: , but this
> object is not available in the list of selected objects.
> Mar 11, 2013 12:57:22 PM org.apache.wicket.MarkupContainer renderNext
> SEVERE: Unable to find component with id 'states' in [StatePanel [Component
> id = availableHeader]]
>         Expected: 'form:palette:availableHeader.states'.
>         Found with similar names: 'form:states'
> Mar 11, 2013 12:57:22 PM org.apache.wicket.DefaultExceptionMapper
> internalMap
> SEVERE: Unexpected error occurred
> Unable to find component with id 'states' in [StatePanel [Component id =
> ava
> ilableHeader]]
>         Expected: 'form:palette:availableHeader.states'.
>         Found with similar names: 'form:states'
>  MarkupStream: [markup =
>
> file:/C:/home/Workspaces/mrdss-dev2/mrdss/web/target/classes/.../StatePanel.html
> <wicket:panel xmlns:wicket="http://wicket.apache.org">
>
>         <div>
>                         <label class='dataEntryLabel'>Select a
> State:</label>
>                                 <select wicket:id="states"></select>
>                         </div>
>
> </wicket:panel>, index = 2, current =  '<select wicket:id="states">' (line
> 0, co
> lumn 0)]
>         at
> org.apache.wicket.markup.MarkupStream.throwMarkupException(MarkupStre
>
> On Mon, Mar 11, 2013 at 11:39 AM, Paul Bors [via Apache Wicket] <
> ml-node+s1842946n4657167h69@n4.nabble.com> wrote:
>
> > Sorry, you wanted inside the selected header... same thing only a
> > different
> > override.
> > Look up the API of the Palette.
> >
> > ~ Thank you,
> >   Paul Bors
> >
> > -----Original Message-----
> > From: Paul Bors [mailto:[hidden email]<
> http://user/SendEmail.jtp?type=node&node=4657167&i=0>]
> >
> > Sent: Monday, March 11, 2013 12:25 PM
> > To: [hidden email] <http://user/SendEmail.jtp?type=node&node=4657167&i=1
> >
> > Subject: RE: DropDown in palette's header ?
> >
> > @Override
> > protected Component newAvailableHeader(String componentId) {
> >     return new Available****HeaderPanel(componentId, form); }
> >
> > Where Available****HeaderPanel is your own panel.
> >
> > ~ Thank you,
> >   Paul Bors
> >
> > -----Original Message-----
> > From: grazia [mailto:[hidden email]<
> http://user/SendEmail.jtp?type=node&node=4657167&i=2>]
> >
> > Sent: Monday, March 11, 2013 11:54 AM
> > To: [hidden email] <http://user/SendEmail.jtp?type=node&node=4657167&i=3
> >
> > Subject: DropDown in palette's header ?
> >
> > Hi,
> >
> > is there a way to place a dropdown inside the selected header of a
> palette
> > ?
> >
> > Thanks
> >
> >
> >
> > --
> > View this message in context:
> >
> >
> http://apache-wicket.1842946.n4.nabble.com/DropDown-in-palette-s-header-tp46
> > 57163.html
> > Sent from the Users forum mailing list archive at Nabble.com.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]<
> http://user/SendEmail.jtp?type=node&node=4657167&i=4>
> > For additional commands, e-mail: [hidden email]<
> http://user/SendEmail.jtp?type=node&node=4657167&i=5>
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]<
> http://user/SendEmail.jtp?type=node&node=4657167&i=6>
> > For additional commands, e-mail: [hidden email]<
> http://user/SendEmail.jtp?type=node&node=4657167&i=7>
> >
> >  ~ Thank you,
> >     Paul@Bors.ws
> >
> >
> > ------------------------------
> >  If you reply to this email, your message will be added to the discussion
> > below:
> >
> >
> http://apache-wicket.1842946.n4.nabble.com/DropDown-in-palette-s-header-tp4657163p4657167.html
> >  To unsubscribe from DropDown in palette's header ?, click here<
> http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4657163&code=R3JhemlhLlJ1c3NvTGFzc25lckBnbWFpbC5jb218NDY1NzE2M3wyMjY4MDg1NDM=
> >
> > .
> > NAML<
> http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
> >
> >
>
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/DropDown-in-palette-s-header-tp4657163p4657171.html
> Sent from the Users forum 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: DropDown in palette's header ?

Posted by grazia <Gr...@gmail.com>.
If this is the statespanel;

<?xml version="1.0" encoding="UTF-8" ?>
<wicket:panel xmlns:wicket="http://wicket.apache.org">

    <div>
        <label class='dataEntryLabel'>Select a State:</label> <select
            wicket:id="states"></select>
    </div>

</wicket:panel>

public class StatePanel extends Panel {

    /**
     *
     */
    private static final long serialVersionUID = 1L;

    public StatePanel(final String id, final IModel<String> stateModel,
            final IModel<List<String>> stateChoicesModel) {
        super(id);

        final DropDownChoice<String> stateDropdown = new
DropDownChoice<String>(
                "states", stateModel, stateChoicesModel);


    }

}

And on the page:

final Palette<Location> palette = new Palette<Location>(
                "palette", selectedInstallations, availableInstallations,
                new ChoiceRenderer<Location>("location", "locationId"),
                25, false) {

            @Override
            protected Component newAvailableHeader(String componentId) {
                return new StatePanel(componentId, stateModel,
                        stateChoicesModel);

            }
        };
        palette.setOutputMarkupId(true);

Iam getting:

WARNING: Detected inconsistency in choice component: class ...
LocAssociation/form:states. Model returned object: , but this
object is not available in the list of selected objects.
Mar 11, 2013 12:57:22 PM org.apache.wicket.MarkupContainer renderNext
SEVERE: Unable to find component with id 'states' in [StatePanel [Component
id = availableHeader]]
        Expected: 'form:palette:availableHeader.states'.
        Found with similar names: 'form:states'
Mar 11, 2013 12:57:22 PM org.apache.wicket.DefaultExceptionMapper
internalMap
SEVERE: Unexpected error occurred
Unable to find component with id 'states' in [StatePanel [Component id = ava
ilableHeader]]
        Expected: 'form:palette:availableHeader.states'.
        Found with similar names: 'form:states'
 MarkupStream: [markup =
file:/C:/home/Workspaces/mrdss-dev2/mrdss/web/target/classes/.../StatePanel.html
<wicket:panel xmlns:wicket="http://wicket.apache.org">

        <div>
                        <label class='dataEntryLabel'>Select a
State:</label>
                                <select wicket:id="states"></select>
                        </div>

</wicket:panel>, index = 2, current =  '<select wicket:id="states">' (line
0, co
lumn 0)]
        at
org.apache.wicket.markup.MarkupStream.throwMarkupException(MarkupStre

On Mon, Mar 11, 2013 at 11:39 AM, Paul Bors [via Apache Wicket] <
ml-node+s1842946n4657167h69@n4.nabble.com> wrote:

> Sorry, you wanted inside the selected header... same thing only a
> different
> override.
> Look up the API of the Palette.
>
> ~ Thank you,
>   Paul Bors
>
> -----Original Message-----
> From: Paul Bors [mailto:[hidden email]<http://user/SendEmail.jtp?type=node&node=4657167&i=0>]
>
> Sent: Monday, March 11, 2013 12:25 PM
> To: [hidden email] <http://user/SendEmail.jtp?type=node&node=4657167&i=1>
> Subject: RE: DropDown in palette's header ?
>
> @Override
> protected Component newAvailableHeader(String componentId) {
>     return new Available****HeaderPanel(componentId, form); }
>
> Where Available****HeaderPanel is your own panel.
>
> ~ Thank you,
>   Paul Bors
>
> -----Original Message-----
> From: grazia [mailto:[hidden email]<http://user/SendEmail.jtp?type=node&node=4657167&i=2>]
>
> Sent: Monday, March 11, 2013 11:54 AM
> To: [hidden email] <http://user/SendEmail.jtp?type=node&node=4657167&i=3>
> Subject: DropDown in palette's header ?
>
> Hi,
>
> is there a way to place a dropdown inside the selected header of a palette
> ?
>
> Thanks
>
>
>
> --
> View this message in context:
>
> http://apache-wicket.1842946.n4.nabble.com/DropDown-in-palette-s-header-tp46
> 57163.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]<http://user/SendEmail.jtp?type=node&node=4657167&i=4>
> For additional commands, e-mail: [hidden email]<http://user/SendEmail.jtp?type=node&node=4657167&i=5>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]<http://user/SendEmail.jtp?type=node&node=4657167&i=6>
> For additional commands, e-mail: [hidden email]<http://user/SendEmail.jtp?type=node&node=4657167&i=7>
>
>  ~ Thank you,
>     Paul@Bors.ws
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://apache-wicket.1842946.n4.nabble.com/DropDown-in-palette-s-header-tp4657163p4657167.html
>  To unsubscribe from DropDown in palette's header ?, click here<http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4657163&code=R3JhemlhLlJ1c3NvTGFzc25lckBnbWFpbC5jb218NDY1NzE2M3wyMjY4MDg1NDM=>
> .
> NAML<http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/DropDown-in-palette-s-header-tp4657163p4657171.html
Sent from the Users forum 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: DropDown in palette's header ?

Posted by Paul Bors <pa...@bors.ws>.
Sorry, you wanted inside the selected header... same thing only a different
override.
Look up the API of the Palette.

~ Thank you,
  Paul Bors

-----Original Message-----
From: Paul Bors [mailto:paul@bors.ws] 
Sent: Monday, March 11, 2013 12:25 PM
To: users@wicket.apache.org
Subject: RE: DropDown in palette's header ?

@Override
protected Component newAvailableHeader(String componentId) {
    return new Available****HeaderPanel(componentId, form); }

Where Available****HeaderPanel is your own panel.

~ Thank you,
  Paul Bors

-----Original Message-----
From: grazia [mailto:Grazia.RussoLassner@gmail.com]
Sent: Monday, March 11, 2013 11:54 AM
To: users@wicket.apache.org
Subject: DropDown in palette's header ?

Hi, 

is there a way to place a dropdown inside the selected header of a palette ?

Thanks



--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/DropDown-in-palette-s-header-tp46
57163.html
Sent from the Users forum 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




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


Re: DropDown in palette's header ?

Posted by grazia <Gr...@gmail.com>.
oh, so my dropdown would have to go into a panel. I'll try it.

Is there a way I can keep track of the items that the user might move from
the left side to the right side of the palette ? And viceversa ?


On Mon, Mar 11, 2013 at 11:25 AM, Paul Bors [via Apache Wicket] <
ml-node+s1842946n4657166h38@n4.nabble.com> wrote:

> @Override
> protected Component newAvailableHeader(String componentId) {
>     return new Available****HeaderPanel(componentId, form);
> }
>
> Where Available****HeaderPanel is your own panel.
>
> ~ Thank you,
>   Paul Bors
>
> -----Original Message-----
> From: grazia [mailto:[hidden email]<http://user/SendEmail.jtp?type=node&node=4657166&i=0>]
>
> Sent: Monday, March 11, 2013 11:54 AM
> To: [hidden email] <http://user/SendEmail.jtp?type=node&node=4657166&i=1>
> Subject: DropDown in palette's header ?
>
> Hi,
>
> is there a way to place a dropdown inside the selected header of a palette
> ?
>
> Thanks
>
>
>
> --
> View this message in context:
>
> http://apache-wicket.1842946.n4.nabble.com/DropDown-in-palette-s-header-tp46
> 57163.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]<http://user/SendEmail.jtp?type=node&node=4657166&i=2>
> For additional commands, e-mail: [hidden email]<http://user/SendEmail.jtp?type=node&node=4657166&i=3>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]<http://user/SendEmail.jtp?type=node&node=4657166&i=4>
> For additional commands, e-mail: [hidden email]<http://user/SendEmail.jtp?type=node&node=4657166&i=5>
>
>  ~ Thank you,
>     Paul@Bors.ws
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://apache-wicket.1842946.n4.nabble.com/DropDown-in-palette-s-header-tp4657163p4657166.html
>  To unsubscribe from DropDown in palette's header ?, click here<http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4657163&code=R3JhemlhLlJ1c3NvTGFzc25lckBnbWFpbC5jb218NDY1NzE2M3wyMjY4MDg1NDM=>
> .
> NAML<http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/DropDown-in-palette-s-header-tp4657163p4657168.html
Sent from the Users forum 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: DropDown in palette's header ?

Posted by Paul Bors <pa...@bors.ws>.
@Override
protected Component newAvailableHeader(String componentId) {
    return new Available****HeaderPanel(componentId, form);
}

Where Available****HeaderPanel is your own panel.

~ Thank you,
  Paul Bors

-----Original Message-----
From: grazia [mailto:Grazia.RussoLassner@gmail.com] 
Sent: Monday, March 11, 2013 11:54 AM
To: users@wicket.apache.org
Subject: DropDown in palette's header ?

Hi, 

is there a way to place a dropdown inside the selected header of a palette ?

Thanks



--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/DropDown-in-palette-s-header-tp46
57163.html
Sent from the Users forum 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



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