8

I'm using Seam and Richfaces to make a menu bar. The code is like this:

<rich:dropDownMenu showDelay="250" hideDelay="0" submitMode="none">
        <f:facet name="label">Tools</f:facet>

        <rich:menuItem>
            <s:link view="/pages/tools/ppaParameters/PpaParametersEdit.xhtml" value="Parameters" id="PpaParametersId" includePageParams="false" propagation="none"/>
        </rich:menuItem>

        <rich:menuGroup value="Security">
            <rich:menuItem>
                <s:link view="/pages/tools/security/ppaModule/PpaModuleEdit.xhtml" value="Module" id="PpaModuleId" includePageParams="false" propagation="none" />
            </rich:menuItem>
        </rich:menuGroup>

    </rich:dropDownMenu>

How can I make the menu item aligns to its "father"?

alt text

Ferramentas = Tools

Segurança = Security

Módulo = Module

Gondim
  • 3,038
  • 8
  • 44
  • 62
  • did you compare your code to the demo source? http://livedemo.exadel.com/richfaces-demo/richfaces/dropDownMenu.jsf?c=menuGroup&tab=usage – stacker Dec 02 '10 at 20:19
  • I'll try to make it like the demo source tomorrow once I start to work, hopefully it will work. – Gondim Dec 03 '10 at 02:47
  • I tried it and still didn't work. – Gondim Dec 03 '10 at 12:52
  • pringlesinn, instead of s.link can you try with menuItem's action property? – zinan.yumak Dec 28 '10 at 21:48
  • i'll do it once i get into my work, and i'll let you know – Gondim Dec 29 '10 at 01:21
  • This is more a CSS than JSF issue. For the ones who don't know RichFaces in depth (read: who can't tell the generated HTML from top of head), consider posting both the generated HTML and CSS so that the CSS experts can assist in finetuning the CSS. – BalusC Dec 29 '10 at 04:02
  • Does this happen on all browsers or just a specific one? – turtlepick Dec 30 '10 at 03:49
  • I haven't tried another browser, didn't think it should have this difference. I use FireFox though.. I'll try some browser else. – Gondim Dec 30 '10 at 09:45
  • @zinan.yumak: i've tried this, still didn't work. – Gondim Dec 30 '10 at 09:46
  • I added display:block to cssStyle and it kinda worked. Not perfectly, but better than before... – Gondim Jan 28 '11 at 14:31

4 Answers4

1

best way for styling is to use chrome dev tool included in it or firebug with firefox to tell which exact styles are being used with which element.

try to set align to inherit

1

This happens to me so often you'd think I'd have learned by now: make sure your menu is surrounded by <h:form></h:form> tags.

Flexo
  • 87,323
  • 22
  • 191
  • 272
gebuh
  • 797
  • 14
  • 40
0

Set the positioning of the menu items to absolute. This will make it position according to its parent. Then tweaking with the margins will get it in the desired location.

amitdatta
  • 51
  • 4
0

if you can get a it on the website as a test one, i think WE can try it out... i would say get Firefox, and Firebug and do some workaround. That should help!

MrAJ
  • 95
  • 5