struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Laurie Harper <lau...@holoweb.net>
Subject Re: Struts 2.1 TabbedPanel scenario
Date Thu, 03 Apr 2008 22:01:22 GMT
Have you looked at the s:action tag? It sounds like that could solve at 
least part of your problem. I'm still not clear how you expect two 
actions designed in isolation to suddenly be able to work in tandem 
without modification. As I say, you can't submit a request to more than 
one action at once -- at least, not without creating a third action to 
delegate to the other two...

L.

Shoaib Gauhar wrote:
> First of all, thanks for replying. I really appreciate it. Making a single
> action class will make the classes very bulky and complex. I dont want to
> have that. I used the remote tabs functionality in tabbed panel but all it
> does is that it goes into a infinite recursive loop. It adds infinite number
> of tabs and the page hangs. Maybe its an implementation error.
> 
> I dont know how to make the dataset common other than make one action class
> which in my case is certainly achievable but not acceptable.
> 
> Let me make the scenario a bit more understandable.
> 
> I am working on a product which generates jsp pages and action classes in
> struts 2. Lets suppose that the user has built two different jsps and action
> classes. They work separately perfectly. Now, we are giving him the option
> to make a tabbed pane by using those two sets of jsps and action classes.
> One way would be to merge them and make one jsp and one action class. Which
> in my case is again achievable but very complex and the code will not be
> readable. The next idea which came to my mind (i dont know if it is
> achievable or not) is to make one jsp but have two separate action classes.
> Each tab remotely accessing the dataset of each action class.
> 
> There is no other idea which is coming to my mind at the moment. So, any
> other idea will be highly appreciated. The worst thing is that the solution
> must be generic. :,(
> 
> Thanks again,
> 
> Shoaib Ahmad Gauhar
> 
> 
> 
> Laurie Harper wrote:
>> Shoaib Gauhar wrote:
>>> Hello,
>>>
>>> Here is the scenrio. I have two action classes. ClassA and ClassB. There
>>> is
>>> no relationship among these classes. You might say that if there is no
>>> relationship then why i have to put them in one single jsp. Well its a
>>> client's requirement.
>> That's an implementation detail, not a functional requirement. Why does 
>> the client care how you structure your actions?
>>
>>> In a single jsp there are two tabs. Tab1ForClassA and Tab2ForClassB.
>>>
>>> Each tab has fields concerned to their classes as defined above. Tab1 ->
>>> ClassA and Tab2 -> ClassB.
>>>
>>> Can we do it? I have tried this but what happens is that when i submit
>>> the
>>> data on Tab1, Tab2's data becomes empty.
>> A request is only processed by one action. If you need both actions to 
>> be able to process all the input from both tabs, you'll have to have 
>> them both aware of the full dataset. There are a number of ways you 
>> might achieve that, depending on what you're trying to achieve.
>>
>>> So, any ideas will be highly appreciated. Furthermore, i am quite new to
>>> tabbed panel and would require clear tips and ideas.
>> I haven't used that widget in Struts 2 so can't offer specific tips. 
>> However, if you start by defining the functional requirements (rather 
>> than the implementation details), it'll be easier to offer advice.
>>
>> L.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>>
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message