Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
struts2-jquery tabs calling pages with jgrid issue
19/01/2010
01:35
Avatar
ram2010
Member
Members
Forum Posts: 43
Member Since:
13/01/2010
sp_UserOfflineSmall Offline

Hi

I am trying to implement the tabbing functionality using the struts2 jquery plugin.

As per the struts2-jquery-showcase 1.8.1, I have simpe a jsp page which has code like so to call 3 seperate jsp pages which should all execute an action to load a grid:

   <s:url id="remoteurl1" action="goToDocumentDistGridAction" namespace="/setup"/>

   <s:url id="remoteurl2" action="goToDocumentTypeGridAction" namespace="/setup"/>

   <s:url id="remoteurl3" action="goToDocumentStatusGridAction" namespace="/setup"/>

    <sj:tabbedpanel id="remotetabs" spinner="Please wait ...">
      <sj:tab id="tab1" href="%{remoteurl1}" label="Remote Tab One" />
      <sj:tab id="tab2" href="%{remoteurl2}" label="Remote Tab Two"/>
      <sj:tab id="tab3" href="%{remoteurl3}" label="Remote Tab Three" />
    </sj:tabbedpanel> 

The problem is that only the 1st tab will load the jsp containing the grid information. When i click on the 2nd or 3rd tab, the jsp is partially loaded(as in the header text value <h2> shows on the page), however the code after that on the jsp page doesnt execute :

<s:url id="remoteurl" action="jsontable"/>

<s:url id="editurl" action="editjsontable"/>

When I debug the jsp page, I just seem to step over it in debug mode withouth the action classes execute() being called!

 <sj:grid> tag to display the grid does not execute the remoteurl and thus the grid doesnt display!

If I call the actions individually and withouth any tab, they all work perfectly well!!

Does anyone know is there anything different I need to set to ensure that remote tabs which show up grids work? Would appreicate your help on this matter.

My struts actions are:

//action below gets called by the tab to take me to my jsp page

   <action name="goToDocumentTypeGridAction" class="documentTypeTableAction" method="goToGrid">
        <result name="success">documentTypeGrid.jsp</result>
  </action>
        

//as the jsp page loads up, this action should be executed to load the grid. its executed only when its the 1st tab & not 2nd

//or 3rd tabs!!
    <action name="jsontable" class="documentTypeTableAction">
      <result type="json" name="success">
     </result>
    </action>

        <action name="editjsontable" class="documentTypeTableAction" method="edit">
      <result type="json" name="success">
     </result>
    </action>

Thanks in advance!

01/02/2010
22:34
Avatar
ram2010
Member
Members
Forum Posts: 43
Member Since:
13/01/2010
sp_UserOfflineSmall Offline

Has anyhone managed to get the a tabbed pane working whereby the remote contents of all the tabs displaying an sjgrid? If so, can you help me out please.

I still cant get this to work even with the new struts jquery plugin 1.8.2.

Looking at firebug I am getting an error on line 5927 in the jquery-ui-1.7.2.js

o.ajaxOptions.success is not a function

My jsp page which contains the tab is very simple as mentioned in the above post.

(please note all the grids load up fine when they are not in a tab, so dont think there is anything wrong in my grid jsps)

In plugin 1.8.1, my first tab loaded up fine but the other tabs didnt show. But now in this new plugin, none of the tabs show anything!

Thanks in advance for any assistance.

03/02/2010
20:35
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

I'm not sure, but this maybe should be addressed to the creators of this plugin (Maybe they say the same - that you should address the problem here)

Also short - I never worked with struts2, so I can not help. Try to see what options in the grid are diffrent from those set in the struts2 plugin. Maybe you will look here

http://www.trirand.com/blog/?p.....se-assist/

where the autoencode by default is false, but in this plugin is set to true.

Not sure if this will help a lot, but..

Best Regards

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

08/02/2010
14:42
Avatar
ram2010
Member
Members
Forum Posts: 43
Member Since:
13/01/2010
sp_UserOfflineSmall Offline

Hi Tony

I tried your suggestion and set autoencode to false.  The first tab loads fine, however when I click on the 2nd and 3rd tab, the grid doesnt display!.. I can see in my console that the action is executed and I arrive at the jsp containing the grid. However, the grid doesnt display. Other texts in that jsp do display but the grid! very strange.

If you have any further suggestions, I would be happy to try them.

The showcase for this plugin does give an example of remote ajax calls with tabs. However it doesnt include one for tabs that include the jqgrid. Im sure its just a setting I need to modify but its difficult when I dont know which one.

thanks

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
65 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

OlegK: 1255

markw65: 179

kobruleht: 144

phicarre: 132

YamilBracho: 124

Renso: 118

Member Stats:

Guest Posters: 447

Members: 11373

Moderators: 2

Admins: 1

Forum Stats:

Groups: 1

Forums: 8

Topics: 10592

Posts: 31289

Newest Members:

, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information