小编new*_*bie的帖子

Spring Social Twitter Oauth

我想使用spring social来开发一个Twitter应用程序,它将更新状态并上传照片.我无法理解如何使用Spring社交进行Oauth身份验证.我看到的所有示例都是关于硬编码即使只是针对该特定的user.I不想硬编码除app键以外的任何东西.

请有人解释我如何使用spring社交来做Twitter Oauth.我浏览了spring框架的官方文档,但在看到其他示例时却感到困惑.

谢谢

twitter spring twitter-oauth spring-social spring-social-twitter

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

使用JSON和jQuery生成HTML标记

我有以下JSON模式

{
"employee":
             {"display_name":"EMPLOYEE NAME:",
              "format":"string",
              "type":"textbox",
              "dflt":"null",
              "isMandatory":"true"}
}
Run Code Online (Sandbox Code Playgroud)

现在我必须生成一个html标签,即

<input type="text" value="name"></input>
Run Code Online (Sandbox Code Playgroud)

如何在jQuery中使用JSON?我知道我必须使用append方法.但我不确定如何附加JSON元素.

谢谢

html jquery json

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

使用@ManagedProperty在托管bean之间调用方法

我有两个jsf控制器说ControllerA和ControllerB.两者都在Session范围内.我想从ControllerA调用ControllerB中的create方法.我用@ManagedProperty来做.但它似乎不起作用

@ManagedBean(name = "manageAccountController")
@SessionScoped
public class ControllerA implements Serializable{

    public void accountSetup()
    {
        @ManagedProperty(value="#{controllerB}")
        private ControllerB details;
        System.out.print("Inside  controller ");
        details.create();

    }

}

    public String prepareCreate() {
          System.out.print("Inside prepare create ");
        current = new ControllerB();
        selectedItemIndex = -1;
        return "Create";
    }

    public String create() {
        try {
            System.out.print("Inside create ");
            getJpaController().create(current);
            JsfUtil.addSuccessMessage(ResourceBundle.getBundle("/Bundle").getString("Created"));
            return prepareCreate();
        } catch (Exception e) {
            JsfUtil.addErrorMessage(e, ResourceBundle.getBundle("/Bundle").getString("PersistenceErrorOccured"));
            return null;
        }
    }
Run Code Online (Sandbox Code Playgroud)

我无法调用controllerB中的方法.控制台显示以下错误

    SEVERE: JSF will be unable to create managed bean controllerA  when it is …
Run Code Online (Sandbox Code Playgroud)

java jsf-2

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