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/02/06 23:07:25 UTC
override the css of the AbstractFormDialog
I have created a class that extends the
com.googlecode.wicket.jquery.ui.widget.dialog.AbstractFormDialog in order to
create a modal dialog in my page.
The dialog needs to be customized in its appearance. How to do that ?
I have tried to override the css modal.css (it comes in
wicket-extensions-1.5.4.jar ), but to no avail, what css is the
AbstractFormDialog using ?
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/override-the-css-of-the-AbstractFormDialog-tp4656135.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: override the css of the AbstractFormDialog
Posted by grazia <Gr...@gmail.com>.
Thanks to you for your generous help.
Part A of the problem:
I have a com.googlecode.wicket.jquery.ui.calendar.Calendar on my page. Each
cell contains CalendarEvents with titles that display counts of items on a
given day. Something like "3 Inbound Orders", "4 Outbound Orders". The user
should be able to click on the "3 Inbound Orders" CalendarEvent and be
directed to the page where the user can maintain the inbound orders. Or the
user could clik on the "4 Outbound Orders" CalendarEvent and be directed to
the page where to maintain the Outbound Orders.
Hence I asked whether there was a way to include a page link in the
CalendarEvent, for which I have received a suggestion already
http://apache-wicket.1842946.n4.nabble.com/Page-link-in-CalendarEvent-td4656141.html
Part B of the problem (addressed in this thread): what to do with the empty
calendar's cells in order to allow the user to choose the page where to go
(Inbound or Outbound orders) ?
My attempts with the class extending the AbstractDialog have ended up in
dialog firmly affectionate to the top left corner of the window (I can drag
it, I can customize its look, but it likes to appear in the top left corner,
and my customer will not like it)
So, maybe a wicket based ContextMenu ? I am working with Wicket 1.5
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/override-the-css-of-the-AbstractFormDialog-tp4656135p4656179.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: override the css of the AbstractFormDialog
Posted by grazia <Gr...@gmail.com>.
Sebastien,
Thanks again for your quick replies and huge help. I hope the jQUery Menu
can be available soon since there is evindently a good number of people
waiting for it.
I will give another try to the dialog. Yes, I read in the specs it should be
centered by default, what breaks this thing in my code ?! Well, I will let
you all know once I discover it, for the moment I will move forward on my
other tasks on my project and then come back to the calendar dialog.
I wish I were more skilled in creating my own Wicket components and
integrating jQuery ...
Sigh ! (I like the menu more ...)
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/override-the-css-of-the-AbstractFormDialog-tp4656135p4656209.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: override the css of the AbstractFormDialog
Posted by Sebastien <se...@gmail.com>.
Hi Grazia,
I still have to integrate the jQuery UI menu.
http://jqueryui.com/menu/
I will do it shortly but I do not have a precise date.
For the short term solution, I would have investigated why the dialog is
not centered by default (because it should be, maybe another part of your
page is "breaking" something). Try to put a dialog in an empty page (just a
form+ajaxbutton and a dialog)
I have nothing else to propose to you for the moment, unfortunately...
Best regards,
Sebastien.
On Fri, Feb 8, 2013 at 3:25 PM, grazia <Gr...@gmail.com>wrote:
> I am hopeful one of the Wicket gurus will put me on the right track ... I
> see
> old (2008!) threads on integrating YUI contextmenus with Wicket, and I
> imagine there is something more current available for wicket 1.5 ...
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/override-the-css-of-the-AbstractFormDialog-tp4656135p4656207.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: override the css of the AbstractFormDialog
Posted by grazia <Gr...@gmail.com>.
I am hopeful one of the Wicket gurus will put me on the right track ... I see
old (2008!) threads on integrating YUI contextmenus with Wicket, and I
imagine there is something more current available for wicket 1.5 ...
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/override-the-css-of-the-AbstractFormDialog-tp4656135p4656207.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: override the css of the AbstractFormDialog
Posted by Colin Rogers <Co...@objectconsulting.com.au>.
I honestly could kill for a JQuery based, nested context menu, that could be activated by Ajax and defined dynamically.
I get the feeling I might have to make my own, tho. I think it would be easy in terms of activation and definition, but the menu triggering Wicket Ajax commands is the bit I'm missing in my head...
-----Original Message-----
From: grazia [mailto:Grazia.RussoLassner@gmail.com]
Sent: 08 February 2013 11:38
To: users@wicket.apache.org
Subject: Re: override the css of the AbstractFormDialog
I did try the suggestion you made, and it worked great. THank you !
The only remaining issue for me is the empty calendar cells, where something like a ContextMenu would be a better solution than the dialog. Any Wicket based ContextMenu ?
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/override-the-css-of-the-AbstractFormDialog-tp4656135p4656185.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
EMAIL DISCLAIMER This email message and its attachments are confidential and may also contain copyright or privileged material. If you are not the intended recipient, you may not forward the email or disclose or use the information contained in it. If you have received this email message in error, please advise the sender immediately by replying to this email and delete the message and any associated attachments. Any views, opinions, conclusions, advice or statements expressed in this email message are those of the individual sender and should not be relied upon as the considered view, opinion, conclusions, advice or statement of this company except where the sender expressly, and with authority, states them to be the considered view, opinion, conclusions, advice or statement of this company. Every care is taken but we recommend that you scan any attachments for viruses.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: override the css of the AbstractFormDialog
Posted by grazia <Gr...@gmail.com>.
I did try the suggestion you made, and it worked great. THank you !
The only remaining issue for me is the empty calendar cells, where something
like a ContextMenu would be a better solution than the dialog. Any Wicket
based ContextMenu ?
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/override-the-css-of-the-AbstractFormDialog-tp4656135p4656185.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: override the css of the AbstractFormDialog
Posted by Sebastien <se...@gmail.com>.
Hi Grazia,
Is the purpose of the dialog only the redirection to a page when you click
a Calendar Event?
If yes, did you try the suggestion I made about setting the event's url
property?
If not, I will need more detail about what you trying to achieve with the
calendar and the dialog (and the positioning because it is not clear to me)
Thanks & best regards,
Sebastien.
On Thu, Feb 7, 2013 at 10:18 PM, grazia <Gr...@gmail.com>wrote:
> I think I should replace this dialog with a ContextMenu, any in Wicket ?
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/override-the-css-of-the-AbstractFormDialog-tp4656135p4656175.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: override the css of the AbstractFormDialog
Posted by grazia <Gr...@gmail.com>.
I think I should replace this dialog with a ContextMenu, any in Wicket ?
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/override-the-css-of-the-AbstractFormDialog-tp4656135p4656175.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: override the css of the AbstractFormDialog
Posted by grazia <Gr...@gmail.com>.
Nothing seems to move the dialog from the top left corner of the page.
I decided to eliminate the form, so myDialog class extends directly
AbstractDialog.
I did override the onconfigure as suggested ... I am at a loss, and I
believe I have followed the specs.
Here is my Dialog class:
public abstract class CalendarDialog extends AbstractDialog<CalendarEvent>
{
public CalendarDialog(String id, String title)
{
super(id, title, emptyModel(), true);
this.init();
}
private void init()
{
this.add(new BookmarkablePageLink("scheduling", MyScheduling.class));
}
@Override
protected void onConfigure(JQueryBehavior behavior) {
super.onConfigure(behavior);
Options options = new Options();
options.set("position", "{ my: \"center center\", at: \"center center\",
of: window}");
options.set("width", WIDTH);
behavior.setOptions(options);
}
}
My CalendarDialog.html
<html xmlns:wicket="http://wicket.apache.org">
<wicket:panel>
Scheduling
</wicket:panel>
</html>
Usage in my TestPage.html:
(...)
<div wicket:id="dialog" />
and
TestPage.java
private final CalendarDialog dialog = new CalendarDialog("dialog",
"Redirection options:") {
/**
*
*/
private static final long serialVersionUID = 1L;
} ;
etc.
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/override-the-css-of-the-AbstractFormDialog-tp4656135p4656173.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: override the css of the AbstractFormDialog
Posted by Sebastien <se...@gmail.com>.
Hi,
Right, you can set options #onConfigure(JQueryBehavior) time
new AbstractFormDialog<String>("id", "title") {
@Override
protected void onConfigure(JQueryBehavior behavior) {
super.onConfigure(behavior);
behavior.setOption("position", "{ my: \"left top\", at:
\"left bottom\", of: button }");
}
Position option is detailed here:
http://api.jqueryui.com/dialog/#option-position
Best regards,
Sebastien
On Thu, Feb 7, 2013 at 4:57 PM, Martin Grigorov <mg...@apache.org>wrote:
> I think you can override #configure(JQueryBehavior) method or something
> similar, where you can set the specifics.
>
>
> On Thu, Feb 7, 2013 at 4:45 PM, grazia <Grazia.RussoLassner@gmail.com
> >wrote:
>
> >
> > My problem is with allowing the dialog element to be anywhere else except
> > in
> > the top left of the window where it currently shows up. Overriding the
> > ui-dialog css entries has no effect.
> > When the dialog is generated wicket creates a javascript like this below,
> > it
> > sets some properties of the dialog (width, resizable, modal ) but nothing
> > about the position. How coudl I add a "position:center" property ?
> > My Dialog extends AbstractFormDialog, which extends AbstracDialog, which
> > overrides JQueryBehavior newWidgetBehavior, and that is where these
> > properties are set ....
> >
> >
> >
> >
> > grazia wrote
> > > I in the juery ui theme I see .ui-dialog entries that I will try to
> > > change.
> >
> >
> >
> >
> >
> > --
> > View this message in context:
> >
> http://apache-wicket.1842946.n4.nabble.com/override-the-css-of-the-AbstractFormDialog-tp4656135p4656159.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
> >
> >
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com <http://jweekend.com/>
>
Re: override the css of the AbstractFormDialog
Posted by Martin Grigorov <mg...@apache.org>.
I think you can override #configure(JQueryBehavior) method or something
similar, where you can set the specifics.
On Thu, Feb 7, 2013 at 4:45 PM, grazia <Gr...@gmail.com>wrote:
>
> My problem is with allowing the dialog element to be anywhere else except
> in
> the top left of the window where it currently shows up. Overriding the
> ui-dialog css entries has no effect.
> When the dialog is generated wicket creates a javascript like this below,
> it
> sets some properties of the dialog (width, resizable, modal ) but nothing
> about the position. How coudl I add a "position:center" property ?
> My Dialog extends AbstractFormDialog, which extends AbstracDialog, which
> overrides JQueryBehavior newWidgetBehavior, and that is where these
> properties are set ....
>
>
>
>
> grazia wrote
> > I in the juery ui theme I see .ui-dialog entries that I will try to
> > change.
>
>
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/override-the-css-of-the-AbstractFormDialog-tp4656135p4656159.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
>
>
--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com <http://jweekend.com/>
Re: override the css of the AbstractFormDialog
Posted by grazia <Gr...@gmail.com>.
My problem is with allowing the dialog element to be anywhere else except in
the top left of the window where it currently shows up. Overriding the
ui-dialog css entries has no effect.
When the dialog is generated wicket creates a javascript like this below, it
sets some properties of the dialog (width, resizable, modal ) but nothing
about the position. How coudl I add a "position:center" property ?
My Dialog extends AbstractFormDialog, which extends AbstracDialog, which
overrides JQueryBehavior newWidgetBehavior, and that is where these
properties are set ....
grazia wrote
> I in the juery ui theme I see .ui-dialog entries that I will try to
> change.
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/override-the-css-of-the-AbstractFormDialog-tp4656135p4656159.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: override the css of the AbstractFormDialog
Posted by grazia <Gr...@gmail.com>.
I in the juery ui theme I see .ui-dialog entries that I will try to change.
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/override-the-css-of-the-AbstractFormDialog-tp4656135p4656138.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: override the css of the AbstractFormDialog
Posted by grazia <Gr...@gmail.com>.
it would be so helpful if you could help me narrow down the jquery ui options
....
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/override-the-css-of-the-AbstractFormDialog-tp4656135p4656137.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: override the css of the AbstractFormDialog
Posted by Martin Grigorov <mg...@apache.org>.
I think jQuery UI theme.
On Wed, Feb 6, 2013 at 11:07 PM, grazia <Gr...@gmail.com>wrote:
> I have created a class that extends the
> com.googlecode.wicket.jquery.ui.widget.dialog.AbstractFormDialog in order
> to
> create a modal dialog in my page.
> The dialog needs to be customized in its appearance. How to do that ?
> I have tried to override the css modal.css (it comes in
> wicket-extensions-1.5.4.jar ), but to no avail, what css is the
> AbstractFormDialog using ?
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/override-the-css-of-the-AbstractFormDialog-tp4656135.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
>
>
--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com <http://jweekend.com/>