gigaZhang / struts2-jquery

Automatically exported from code.google.com/p/struts2-jquery
0 stars 0 forks source link

How to specify nav parameters for the Navigator when creating grid? #1071

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
(This is for feature requests and bugs in Struts2 jQuery Plugin - for
getting help, please use the User Group.
http://groups.google.com/group/struts2-jquery )

What steps will reproduce the problem?
Hello,
Firstly, I have tried to post questions on the User Group but my posts never 
seem to appear, so apologies for posting a question here.
When creating a grid with the grid plugin, I see that there are attributes to 
supply options to the various parts of the Navigator, e.g. navigatorAddOptions, 
navigatorEditOptions, navigatorDeleteOptions etc., however there doesn't appear 
to be an attribute to supply parameters to the Navigator itself. For example, I 
wish to change the hover over text of the add button, according to the jqGrid 
Wiki (http://www.trirand.com/jqgridwiki/doku.php?id=wiki:navigator), I need to 
be able to specify the addtitle property as a parameter to the navGrid.
Is there any way of achieving this with the plugin?

What is the expected output? What do you see instead?
I expect to see new hover text, however default text is displayed.

Which struts2 version?
2.3.15.3

Which struts2-jquery plugin version?
3.6.1

Please provide any additional information below.

Original issue reported on code.google.com by stevendj...@gmail.com on 10 Jan 2014 at 9:23

GoogleCodeExporter commented 9 years ago
How do you have tried it? Have you seen the Grid Showcase with various examples?

Original comment by johgep on 10 Apr 2014 at 7:53

GoogleCodeExporter commented 9 years ago
Hi Johannes,
I originally tried adding the properties to the navigatorAddOptions but they 
appeared to be ignored.
Eventually I had to update the grid options using jQuery after the grid had 
been created, for example:

$('#myGrid').jqGrid('navGrid','#myPager',{addtitle:'My Add Button Hover Text',
                                          addfunc: function(){$.publish("displayAdd");},
                                          edittitle:'My Edit Button Hover Text',
                                          editfunc: function(stopSlotId){$.publish("displayEdit");},
                                          deltitle:'My Delete Button Hover Text',
                                          searchtitle:'My Search Button Hover Text',
                                          refreshtitle:'My Refresh Button Hover Text'},
                                          {}, // add options
                                          {}, // edit options
                                          {}, // delete options
                                          {}, // search options
                                          {}  // view options
                                          );

Maybe the plugin should include a new 'navigatorOptions' attribute within which 
the above (and more) grid navigator properties can be specified.

Regards
Steve

Original comment by stevendj...@gmail.com on 22 Apr 2014 at 9:46