• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Struts 2 with JQuery tab

 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I am new to JQuery with Struts2. I already added JQuery plug-in and successfully cofigure it for remoteUrl. But issue I am facing is, when I load page having this tab (Jquery tab), in backend, it also execute all there Url which is Struts2 action. Basically, I want to restrict it from executing all Url. It should only execute Url when user click on particular tab.

Regards,
Nitesh
 
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
the url should only be executed when the user click on the particular tab.
can you give a code example?

Johannes
 
Nitesh Patel
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Johannes,

Thanks for reply. Sorry late reply but I was busy with other stuff. You are right about the URL, it invoked only when user click on it . But what we need to do is, when user click on menu link, it should open page having tab . Let's say three tab. At first tab, I need to disable other tab and I can do this. But once user fill all required data on first tab and click on SAVE button, it should save data on first tab and then enable other tabs. I tried different way, but I am unable to load page(having tab) with save data. Below is our approach for this,
  • TabPannelDemo.java :- Action class which will load the tabpannel.jsp which has tabs.
  • tabpannel.jsp :- This page has tab tags.
  • Tab2Demo.java :- Action class for 2nd tab loading
  • tab2demo.jsp :- UI page for tab 2
  • Tab3Demo.java :- Action class for 3rd tab loading
  • tab3demo.jsp :- UI page for tab 3.


  • Below is code of main jsp page,


    Regards,
    Nitesh
     
    Johannes Geppert
    Ranch Hand
    Posts: 67
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    in the showcase "Remote Tabs with Topics" you find an
    example to select an other tab when a user clicks on a
    specific tab.
     
    Nitesh Patel
    Ranch Hand
    Posts: 33
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Hi Jojannes,

    Thanks for reply. What we need to do is, when user enter required data on first tab and click on save. It will save data into DB and then remaining tab should be enable. Currently, on first tab, if I click on save button then it is forwarded to Tab1Demo.java (responsible for first tab) and it should redirect to first tab again . Or I can set action as TabPannelDemo.java to submit formdata and again redirect to first tab.

    Same logic apply for other tab. If user click on 3rd tab then it should load it and once user click on "SAVE" button then it should save data of 3rd page and again display the same tab (3rd) with whatever status.


    Regards,
    Nitesh
     
    reply
      Bookmark Topic Watch Topic
    • New Topic