Results 1 to 11 of 11
  1. #1
    amma2009 is offline Member
    Join Date
    Apr 2009
    Posts
    6
    Rep Power
    0

    Default struts2 with jquery

    Iam new to struts2 and I was trying to use jquery tabs in my jsp page. The fieldset is not working in my JSP page.....I am using built in jquery theme
    any suggessions?

    Thanks in advance.
    Last edited by amma2009; 12-19-2009 at 11:21 PM. Reason: wrong description

  2. #2
    jogep is offline Member
    Join Date
    Dec 2009
    Location
    Germany
    Posts
    43
    Rep Power
    0

    Default

    try the jquery plugin for struts2

    code.google.com /p/ struts2-jquery

    in the showcase you can find some tabs examples.

    Johannes

  3. #3
    mackzayab is offline Member
    Join Date
    Dec 2009
    Location
    phil's
    Posts
    1
    Rep Power
    0

    Default

    dont know too...

  4. #4
    jogep is offline Member
    Join Date
    Dec 2009
    Location
    Germany
    Posts
    43
    Rep Power
    0

    Default

    its easy.

    just download the plugin and put in in your WEB-INF/lib folder

    For Local Content:
    Java Code:
    <%@ taglib prefix="s" uri="/struts-tags"%>
    <%@ taglib prefix="sj" uri="/struts-jquery-tags"%>
    <html>
      <head>
        <sj:head jqueryui="true"/>
      </head>
      <body>
        <sj:tabbedpanel id="mytabs" animate="true" collapsible="true" useSelectedTabCookie="true">
          <sj:tab id="tab1" target="tone" label="Tab One"/>
          <sj:tab id="tab2"  target="ttwo" label="Tab Two"/>
          <sj:tab id="tab3"  target="tthree" label="Tab Three"/>
          <div id="tone"> Test 1 </div>
          <div id="ttwo"> Test 2 </div>
          <div id="tthree"> Test 3 </div>
        </sj:tabbedpanel>
      </body>
    </html>
    and for AJAX Content:
    Java Code:
    <%@ taglib prefix="s" uri="/struts-tags"%>
    <%@ taglib prefix="sj" uri="/struts-jquery-tags"%>
    <html>
      <head>
        <sj:head jqueryui="true"/>
      </head>
      <body>
        <s:url id="remoteurl1" action="myremoteactionone"/>
        <s:url id="remoteurl2" action="myremoteactiontwo"/>
        <s:url id="remoteurl3" action="myremoteactionthree"/>
        <sj:tabbedpanel id="mytabs2" selectedTab="1">
          <sj:tab id="tab1" href="%{remoteurl1}" label="Tab One"/>
          <sj:tab id="tab2" href="%{remoteurl2}" label="Tab Two"/>
          <sj:tab id="tab3" href="%{remoteurl3}" label="Tab Three"/&>
        </sj:tabbedpanel>
      </body>
    </html>

  5. #5
    amma2009 is offline Member
    Join Date
    Apr 2009
    Posts
    6
    Rep Power
    0

    Default

    Quote Originally Posted by jogep View Post
    its easy.

    just download the plugin and put in in your WEB-INF/lib folder

    For Local Content:
    Java Code:
    <%@ taglib prefix="s" uri="/struts-tags"%>
    <%@ taglib prefix="sj" uri="/struts-jquery-tags"%>
    <html>
      <head>
        <sj:head jqueryui="true"/>
      </head>
      <body>
        <sj:tabbedpanel id="mytabs" animate="true" collapsible="true" useSelectedTabCookie="true">
          <sj:tab id="tab1" target="tone" label="Tab One"/>
          <sj:tab id="tab2"  target="ttwo" label="Tab Two"/>
          <sj:tab id="tab3"  target="tthree" label="Tab Three"/>
          <div id="tone"> Test 1 </div>
          <div id="ttwo"> Test 2 </div>
          <div id="tthree"> Test 3 </div>
        </sj:tabbedpanel>
      </body>
    </html>
    and for AJAX Content:
    Java Code:
    <%@ taglib prefix="s" uri="/struts-tags"%>
    <%@ taglib prefix="sj" uri="/struts-jquery-tags"%>
    <html>
      <head>
        <sj:head jqueryui="true"/>
      </head>
      <body>
        <s:url id="remoteurl1" action="myremoteactionone"/>
        <s:url id="remoteurl2" action="myremoteactiontwo"/>
        <s:url id="remoteurl3" action="myremoteactionthree"/>
        <sj:tabbedpanel id="mytabs2" selectedTab="1">
          <sj:tab id="tab1" href="%{remoteurl1}" label="Tab One"/>
          <sj:tab id="tab2" href="%{remoteurl2}" label="Tab Two"/>
          <sj:tab id="tab3" href="%{remoteurl3}" label="Tab Three"/&>
        </sj:tabbedpanel>
      </body>
    </html>
    Thanks for the reply....If I give the text inside the tabs its working...but when I was trying to use the <fieldset> the total alignment screwed....any idea how to use the <fieldsets>

  6. #6
    jogep is offline Member
    Join Date
    Dec 2009
    Location
    Germany
    Posts
    43
    Rep Power
    0

    Default

    Thanks for the reply....If I give the text inside the tabs its working...but when I was trying to use the <fieldset> the total alignment screwed....any idea how to use the <fieldsets>
    Without any code it is hard to find the bug. Have you check your HTML Code with an HTML Validator?

    Do you have the Error in all Browsers?

  7. #7
    amma2009 is offline Member
    Join Date
    Apr 2009
    Posts
    6
    Rep Power
    0

    Default

    Hi jogep,

    Now my fieldset is working...I am using jquery "cupertino" theme for all the web pages...and its displaying fields with big font with Italicized....how can I go and change the font( I assume its taking default jquery font for text)...any suggestions?

    I appreciate your help.

  8. #8
    jogep is offline Member
    Join Date
    Dec 2009
    Location
    Germany
    Posts
    43
    Rep Power
    0

    Default

    fine!!

    The font settings are in the css files distributed with cupertino theme.
    With the jQuery UI Themeroller you can create you own theme with costume Fonts and colors. it is really easy.

  9. #9
    amma2009 is offline Member
    Join Date
    Apr 2009
    Posts
    6
    Rep Power
    0

    Default

    thank you so much! its working :)

  10. #10
    Join Date
    Nov 2010
    Posts
    1
    Rep Power
    0

    Default Problem with Submit Button in IE7

    Prob: I want to send a Ajax request on click on submit button
    for Ajax i am using Jquery Struts Plugins
    Now the prob is when i try to use
    <s:form id="form" action="echo" theme="simple" cssClass="yform">
    <fieldset>
    <legend>AJAX Form</legend>
    <div class="type-text">
    <label for="echo">Echo: </label>
    <s:textfield id="echo" name="echo" value="Hello World!!!"/>
    </div>
    <div class="type-button">
    <sj:submit disabled="false" targets="formResult" value="AJAX Submit" indicator="indicator"/>
    <s:url id="simpleecho" value="/simpleecho.action"/>
    <sj:submit href="%{simpleecho}" targets="formResult" value="AJAX Submit 2" indicator="indicator"/>
    </div>
    </fieldset>
    <sj:div name="formResult"></sj:div>
    </s:form>


    then on ie i m getting the submit button disabled.
    I have attached the screen shot with this post
    Plz help me on this
    Attached Thumbnails Attached Thumbnails struts2 with jquery-jquerystruts2.jpg  

  11. #11
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,450
    Rep Power
    19

    Default

    Open a new thread rather than resurrect a long dead one?
    If this thread is somehow relevant you can add a link to it in your one.

Similar Threads

  1. Two jquery plugins in one page
    By NewInJava in forum Web Frameworks
    Replies: 0
    Last Post: 09-18-2009, 07:41 PM
  2. issue with the jquery bubble window..
    By jazz2k8 in forum Advanced Java
    Replies: 0
    Last Post: 06-12-2009, 11:19 AM
  3. struts2
    By catchme33 in forum Web Frameworks
    Replies: 4
    Last Post: 03-25-2009, 10:35 PM
  4. Datepicker Calender - month change event - jquery
    By rmpatel101 in forum Advanced Java
    Replies: 0
    Last Post: 04-02-2008, 06:42 PM
  5. jQuery 1.2.1
    By JavaBean in forum Java Software
    Replies: 0
    Last Post: 10-25-2007, 04:21 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •