Revision history [back]

click to hide/show revision 1
initial version

answered 2016-09-05 10:35:55 +0800

nirmalmandhata gravatar image nirmalmandhata flag of India

If user needs to put some specific style like bold or italic then it is useful, but rather it should work like any style like color, background-color should work eg.

Menuitem idItem = new Menuitem("ID: "+content.getId()); idItem.setStyle("color:red");

When a MenuItem is created then in DOM it creates

  • ID:
  • And when we apply style to the MenuItem then it puts the style

  • tag rather than span tag, hence the style property to the displayed content like Menuitem lable is not applied.

    I think its design is like this or we can say its a bug.

  • If user needs to put some specific style like bold or italic then it is useful, but rather it should work like any style like color, background-color should work eg.

    Menuitem idItem = new Menuitem("ID: "+content.getId()); idItem.setStyle("color:red");

    When a MenuItem is created then in DOM it creates

  • li tag ID:
  • anchor tag i tag start & end span tag > ID: span tag ends anchor tag ends li tag edns

    And when we apply style to the MenuItem then it puts the style

  • tag rather than span tag, hence the style property to the displayed content like Menuitem lable is not applied.

    I think its design is like this or we can say its a bug.

  • If user needs to put some specific style like bold or italic then it is useful, but rather it should work like any style like color, background-color should work eg.

    Menuitem idItem = new Menuitem("ID: "+content.getId()); idItem.setStyle("color:red");

    When a MenuItem is created then in DOM it creates li tag anchor tag i tag start & end span tag > ID: span tag ends anchor tag ends li tag edns

    And when we apply style to the MenuItem then it puts the style

  • tag rather than span tag, hence the style property to the displayed content like Menuitem lable is not applied.

    I think its design is like this or we can say its a bug.

  • If user needs to put some specific style like bold or italic then it is useful, but rather it should work like any style like color, background-color should work eg.

    Menuitem idItem = new Menuitem("ID: "+content.getId()); idItem.setStyle("color:red");

    When a MenuItem is created then in DOM it creates

    li tag tag>
    anchor tag tag>
    i tag start & end end
    span tag > start> ID: span tag ends ends>
    anchor tag ends ends>
    li tag ednsends>

    And when we apply style to the MenuItem then it puts the style

  • tag li tag> rather than span tag, hence the style property to the displayed content like Menuitem lable is not applied.

    I think its design is like this or we can say its a bug.

  • If user needs to put some specific style like bold or italic then it is useful, but rather it should work like any style like color, background-color should work eg.

    Menuitem idItem = new Menuitem("ID: "+content.getId()); idItem.setStyle("color:red");

    When a MenuItem is created then in DOM it creates

    li tag>
    anchor tag>
    i tag start & end
    span tag start> ID: span tag ends>
    anchor tag ends>
    li tag ends>

    And when we apply style to the MenuItem then it puts the style to li tag> rather than in span tag, hence the style property to the displayed content like Menuitem lable is not applied.

    I think its design is like this or we can say its a bug.

    Support Options
    • Email Support
    • Training
    • Consulting
    • Outsourcing
    Learn More