My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 338: How to add new buttons to Toolbar.
1 person starred this issue and may be notified of changes. Back to list
Status:  New
Owner:  ----


 
Reported by pramodpr...@gmail.com, Jun 19, 2012
I am using the latest JMesa version and I need to add a couple of new buttons to the toolbar. So, basically on the table, after the next page items, i need 2 buttons which call my action on click.
I tried the customToolBar Image item and got the image to work like abutton. But it would be great if I can add a button item

Please help.
Thanks,
~Pramod Pradhan
Jun 20, 2012
Project Member #1 jeff.johnston.mn@gmail.com
Really the toolbar items can be anything you want them to be. The current framework tries to give you some structure to make it easier.

But to be honest I feel the current implementation of the toolbar is just too difficult and has been overhauled in the upcoming version 4.0 release.

If you want I can send you a release if you want to try the new code out. There are some big changes so be sure your ok with that. The code is production ready though and we are getting ready to release a site using 4.0.

https://code.google.com/p/jmesa/wiki/JMesa4

This is what the toolbar looks like now. You can see that the factory created explicitly and you can either create the items with that, or create your own. Then a ToolbarItem interface just has a render() method.

https://code.google.com/p/jmesa/source/browse/trunk/jmesa/src/org/jmesa/view/html/toolbar/SimpleToolbar.java

Either way if you want a button you would still have to create your own, but it will be much easier in 4.0!

Just drop me an email at jeff.johnston.mn@gmail.com if your interested.

-Jeff Johnston


Jun 21, 2012
#3 pramodpr...@gmail.com
@Jeff - Thanks a lot. Unfortunately, I cannot upgrade to the 4.0 as of now due to some policy constraints. But I was able to use the render method with the HTMLBuilder and I was able to render the buttons out.
Looked pretty simple after I figured it out.

Thanks a lot for your response. I will play around with the 4.0 when I get a chance.

~Pramod

Powered by Google Project Hosting