-
1. Re: Show hotKeys in contextmenu
ilya_shaikovsky Jul 16, 2009 4:50 AM (in response to thinkwise)rich:hotKey should help you.
-
2. Re: Show hotKeys in contextmenu
thinkwise Jul 16, 2009 6:01 AM (in response to thinkwise)Sorry, I think the meaning of my post was not clear.
The hotkeys are working fine, but I want to show the user what the shortkey is of that action. I would like to show this in the contextmenu near the items with a right alignment.
Is this possible or can this be a new feature of the contextmenu? -
3. Re: Show hotKeys in contextmenu
ilya_shaikovsky Jul 16, 2009 10:32 AM (in response to thinkwise)why not possible. just define the label of the menu not using attribute but using nested components so you could achieve needed markup.
-
4. Re: Show hotKeys in contextmenu
thinkwise Jul 16, 2009 10:41 AM (in response to thinkwise)I tried that, but I could not align the two labels left and right because they are in a span. I tried to use float i inline style, but than my 2nd label jumps to below.
-
5. Re: Show hotKeys in contextmenu
abuit Jul 21, 2009 10:13 AM (in response to thinkwise)"ilya_shaikovsky" wrote:
why not possible. just define the label of the menu not using attribute but using nested components so you could achieve needed markup.
We are using dynamic JSF, and it's not possible to set an UIComponent as the value of the HtmlMenuItem. (Well, you can but it'll show a memory reference, it won't be encoded).
Since the HtmlMenuItems are rendered with some non-default renderer, it's hard to squeeze in some other UIComponents during the render phase.
This is the issue, help would be greatly appricated. -
6. Re: Show hotKeys in contextmenu
ilya_shaikovsky Jul 21, 2009 11:41 AM (in response to thinkwise)you should not define UIComponent as value but just add it as child.
-
7. Re: Show hotKeys in contextmenu
abuit Jul 22, 2009 3:37 AM (in response to thinkwise)Ilya, thanks for your reply.
The items from the context menu are rendered as followed:<div "The item"> <span "The icon"><img/></span> <span "The text">...</span> </div>
When I add a child to the component, it'll be rendered nested in the text span.<div "The item"> <span "The icon"><img/></span> <span "The text">...<child components></span> </div>
result: http://img136.imageshack.us/img136/9889/contextmenunofloat.png
Because the child components are rendered inside this span element, I cannot align them to the right properly. When I add the float:right; attribute to the child components, the outline will be messed up.
result: http://img115.imageshack.us/img115/8223/contextmenufloatright.png
The desired situation is that the child component is rendered after the span, so a div can be placed in the wrapper div, to align the text to the proper position, the same way context menu groups have their > icon rendered. Or, ofcourse, a facet for this feature.<div "The item"> <span "The icon"><img/></span> <span "The text">...</span> <child components> </div>
Thanks again for your time. -
8. Re: Show hotKeys in contextmenu
ilya_shaikovsky Jul 22, 2009 3:51 AM (in response to thinkwise)how about to use table? I understand that not looks good enough but just as workaround?
-
9. Re: Show hotKeys in contextmenu
abuit Jul 22, 2009 11:17 AM (in response to thinkwise)A block element inside an inline element will make everything look.. a bit funky.
I would really appriciate it if the children would be rendered after the icon and text span tags, this would help us out alot.
Thanks again for your reply! -
10. Re: Show hotKeys in contextmenu
ilya_shaikovsky Jul 22, 2009 12:26 PM (in response to thinkwise)yes.. sounds not good at all :/ please feel free to create an RFC to RF jira.
-