azizlabib2015 / jmesa

Automatically exported from code.google.com/p/jmesa
0 stars 0 forks source link

How to add new buttons to Toolbar. #338

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
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

Original issue reported on code.google.com by pramodpr...@gmail.com on 19 Jun 2012 at 9:01

GoogleCodeExporter commented 8 years ago
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.

http://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.

http://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

Original comment by jeff.johnston.mn@gmail.com on 20 Jun 2012 at 6:39

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
@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

Original comment by pramodpr...@gmail.com on 21 Jun 2012 at 1:27