小编Dev*_*eve的帖子

R.Java在动作栏样式更改后未生成

我正在设计动作栏.我试图改变主动作栏的颜色.我在style.xml中编写了一个样式.直到我的项目工作正常.在我在xml文件中声明我的风格后,R.Java自杀了.以下是我编写的xml代码.我曾尝试过本网站提供的所有解决方案.他们都没有为我工作.

<resources> 
    <style name="MyCustomTheme" parent="Theme.AppCompat.Light">
        <item name="android:actionBarStyle">@style/MyActionBarTheme</item>
    </style>

    <style name="MyActionBarTheme" parent="Widget.AppCompat.Light.ActionBar">
        <item name="android:background">F757575</item>
    </style>
</resources>
Run Code Online (Sandbox Code Playgroud)

谁来帮帮我

谢谢 :)

xml android r.java-file android-actionbar

2
推荐指数
1
解决办法
53
查看次数

从Controller向JSP页面发送响应时发生异常

我试图从spring mvc控制器发送响应到jsp页面,我得到了一个例外

首先,我尝试将列表返回给jsp页面

列表代码:

@RequestMapping(value = "/Users", method = RequestMethod.POST)
@ResponseBody 
public List<Users> getUsers(@RequestParam(value = "intermediate" ,required = false) String intermediate)throws java.text.ParseException{
    List<Users> list = null;

    int intermediateSelection = Integer.parseInt(intermediate);

    list = getUsersBySelection(IntermediateSelection) //This will return list of users  

    return list;
    }
Run Code Online (Sandbox Code Playgroud)

然后我尝试将JSONObject返回到JSP页面

JSONObject的代码:

@RequestMapping(value = "/Users", method = RequestMethod.POST)
@ResponseBody 
public JSONObject getUsers(@RequestParam(value = "intermediate" ,required = false) String intermediate) throws java.text.ParseException{
    List<Users> list = null;

    int IntermediateSelection = Integer.parseInt(intermediate);

    list = getUsersBySelection(IntermediateSelection);  //This will return list of users …
Run Code Online (Sandbox Code Playgroud)

ajax json jsp controller spring-mvc

1
推荐指数
1
解决办法
2109
查看次数