views:

351

answers:

0

Hi, I am quite new to struts.

I have a sx:tabbedpanel with three s:divs inside of it.

<sx:tabbedpanel id="mainContainer" >  
 <sx:div label="View Files" 
   cssStyle="height:200px;margin:20%;" 
   href="ShowFiles.action"> 
   loading...
 </sx:div> 
 <sx:div label="Upload Files"
   href="ShowFileUpload.action"
   closable="false"> 
   ............loading ShowFileView.jsp ...........
 </sx:div>
 <sx:div label="View my Info" 
   href="ShowUserInfo.action"
   closable="false"> 
   loading...
 </sx:div>  
</sx:tabbedpanel>

Lets suppose when uploading file (the second tab panel) a error occurs so the error message () should be shown inside the second panel(the second div). How can I implement this?

This is what I am doing but not working. In the struts.xml I have the following: (DoUpload is the action sent by submit button from ShowFileView.jsp form)

<action name="DoUpload" class="userPackage.UploadAction">
 <result name="input">/jsp/UserFilesView.jsp</result>
 <result name="error">/jsp/UserFilesView.jsp</result>
 <result name="success">/jsp/FileUploadSuccessView.jsp</result>
</action>

and with this configuration i will not have the current s:div changed but the hole screen will change to UserFilesView.jsp

Also when result is "success" my complete screen will change to FileUploadSuccessView.jsp but I want only second tab s:div's content to be changed. How can i do this?? I hope my explanation was good enough. Thanks in advance.