Oddlabs Layout: Change the order the panels (divs)?

9 views
Skip to first unread message

chrisp

unread,
Sep 2, 2011, 6:32:00 AM9/2/11
to wiquery-plugins
Hi!

I am just now looking into fallback strategies for disabled js and how
to handle the oddlabs layout components right now.

I just realized that no matter how i setup the layout, the order of
the EAST/WEST/NORTH/SOUTH components and their corresponding divs in
the generated markup will render the South component's div between
the CENTER- and the WEST component, making it impossible to define a
float left/right layout in CSS for fallback strategies.

Is it because they are initialized in the probably "incorrect" order?

Example:

From "svn/ trunk/ wiquery-plugins/ other-plugins/ src/ main/ java/
org/ odlabs/ wiquery/ plugin/ layout/ Layout.java":

public Layout(String id, boolean topLevel) {
super(id);
this.topLevel = topLevel;
options = new Options();
if(!topLevel)
setOutputMarkupId(true);
else
setRenderBodyOnly(true);

initialize(getLayoutCenterComponent("layoutCenter"),
"paneCenter",
PanePositionEnum.CENTER);

initialize(getLayoutEastComponent("layoutEast"),
"paneEast",
PanePositionEnum.EAST);

initialize(getLayoutNorthComponent("layoutNorth"),
"paneNorth",
PanePositionEnum.NORTH);

initialize(getLayoutSouthComponent("layoutSouth"),
"paneSouth",
PanePositionEnum.SOUTH);

initialize(getLayoutWestComponent("layoutWest"),
"paneWest",
PanePositionEnum.WEST);
}

If I am right, the correct order would be: WEST-CENTER-EAST.NORTH, so
for fallback, floats can be defined in css?

Thanks in advance,

Chris!

P.s.: If I took action and started working on the source code for this
plugin, what would be the way to get the changes into the maven repo
we are using at work to include these plugins?

chrisp

unread,
Sep 2, 2011, 6:36:07 AM9/2/11
to wiquery-plugins
Ok, I just realize it's also about the order in the markup file.
http://code.google.com/p/wiquery-plugins/source/browse/trunk/wiquery-plugins/other-plugins/src/main/java/org/odlabs/wiquery/plugin/layout/Layout.html:

<body>
<wicket:panel>
<div class="ui-layout-center"
wicket:id="paneCenter">
<span wicket:id="layoutCenter"></span>
</div>
<div class="ui-layout-north"
wicket:id="paneNorth">
<span wicket:id="layoutNorth"></span>
</div>
<div class="ui-layout-south"
wicket:id="paneSouth">
<span wicket:id="layoutSouth"></span>
</div>
<div class="ui-layout-east"
wicket:id="paneEast">
<span wicket:id="layoutEast"></span>
</div>
<div class="ui-layout-west"
wicket:id="paneWest">
<span wicket:id="layoutWest"></span>
</div>
</wicket:panel>
</body>

..and I just wanted to add, that if I am wrong, please tell me. Until
now, I am just in the very beginning of a process called learning :-)

Ernesto Reinaldo Barreiro

unread,
Sep 2, 2011, 7:02:32 AM9/2/11
to wiquery...@googlegroups.com
Cristian,

You can override the layout yourself. Just create

public class MyLayout extends Layout {
...
}

and in MyLayout.html put what you want.

Not sure I understand what is your problem.

Best,

Ernesto

chrisp

unread,
Sep 2, 2011, 8:48:03 AM9/2/11
to wiquery-plugins
Well...

of course your hint is working...
but still, I wonder, why the elements are ordered the way they are:)



On 2 Sep., 13:02, Ernesto Reinaldo Barreiro <reier...@gmail.com>
wrote:
> Cristian,
>
> You can override the layout yourself. Just create
>
> public class MyLayout extends Layout {
> ...
>
> }
>
> and in MyLayout.html put what you want.
>
> Not sure I understand what is your problem.
>
> Best,
>
> Ernesto
>
>
>
>
>
>
>
> On Fri, Sep 2, 2011 at 12:36 PM, chrisp <christian.pol...@googlemail.com> wrote:
> > Ok, I just realize it's also about the order in the markup file.
> >http://code.google.com/p/wiquery-plugins/source/browse/trunk/wiquery-...
Reply all
Reply to author
Forward
0 new messages