aspose file tools*
The moose likes Struts and the fly likes Struts 2 with JQuery tab Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts 2 with JQuery tab" Watch "Struts 2 with JQuery tab" New topic
Author

Struts 2 with JQuery tab

Nitesh Patel
Ranch Hand

Joined: Mar 16, 2008
Posts: 33
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
Johannes Geppert
Ranch Hand

Joined: Jan 12, 2010
Posts: 67
the url should only be executed when the user click on the particular tab.
can you give a code example?

Johannes


My Java and Webprogramming Blog
Nitesh Patel
Ranch Hand

Joined: Mar 16, 2008
Posts: 33
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

    Joined: Jan 12, 2010
    Posts: 67
    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

    Joined: Mar 16, 2008
    Posts: 33
    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
     
    Don't get me started about those stupid light bulbs.
     
    subject: Struts 2 with JQuery tab