top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Using themes with s: select in struts2

+1 vote
498 views

I am using s:select to create a dropdown and then checked the html. I wanted to add bgcolor as yellow. I referred to the following link

http://struts.apache.org/release/2.2.x/docs/struts-2-themes.html

but still not sure how to put the background clour as yellow. Can anyone provide any pointers? Also, is it OK to use JSTL tags in JSPs in a Struts 2 application ?

posted Sep 9, 2013 by Sumit Pokharna

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

Try cssStyle="background-color:yellow;"

answer Sep 9, 2013 by Ahmed Patel
Similar Questions
0 votes

Dear all,Imagine you have the following scenario:

- a property in your action: private Entity entity;
- Entity has a List entity2List
- Entity2 has a Entity3 entity3

Now, you need an s:select with multiple="true" to populate entity3. This corresponds to having a request in the form entity.entity2List[n].entity3.id (n=0,1,2...depending on how many items are selected).

Question: how should the name parameter of the s:select be like to achieve this?

I have tried the following without success (meaning entity.entity2List has is empty):

<s:select multiple="true" name="%{entity.entity2List[].entity3.id}" list="#someList" listKey="id" listValue="code"/>
<s:select multiple="true" name="entity.entity2List[].entity3.id" list="#someList" listKey="id" listValue="code"/>
0 votes

Have anybody tried with using jersey along with struts for the rest api.

Before I have an execute() method in the rest api that has code for redirecting into get , and now if I replace my code with jersey path annotations how can I use the work done by action in struts

+1 vote

Will it restrict the information being stored at the browser cache.

+2 votes

Anyone have tried struts2 on springboot? can we run it on spring boot? or anyone tested it?

+1 vote

We are in the beginning of the migration to struts2 and it seems like there will be some period when both frameworks will be active at the same time..the only problem now is accessing the session beans managed by struts2 in struts1 and vice-versa form beans from strut1 mapped in struts2 . Half of the jsp would use struts1 tags and other half struts2 tags. So there should be beans instantiated in both frameworks.

Probably struts2 bean can be injected to struts1 action with struts1 form still accessible as execute() argument, but what about other way? accessing struts1 form bean (not just data, but managed bean) in struts2 execute() ?

...