authorsearchbean.java
来自「struts框架的jsf组件的核心实用例子集合」· Java 代码 · 共 38 行
JAVA
38 行
package com.corejsf;import com.corejsf.amazon.AmazonSearchPort;import com.corejsf.amazon.AmazonSearchService_Impl;import com.corejsf.amazon.AuthorRequest;import com.corejsf.amazon.Details;import com.corejsf.amazon.ProductInfo;public class AuthorSearchBean { private String name; private String type; private Details[] details; private String token; public String getName() { return name; } public void setName(String newValue) { name = newValue; } public void setToken(String newValue) { token = newValue; } public String search() { try{ AmazonSearchPort asp = (AmazonSearchPort) (new AmazonSearchService_Impl().getAmazonSearchPort()); AuthorRequest req = new AuthorRequest(name, "1", "books", "", "lite", "", token, "", "", ""); ProductInfo pinfo = asp.authorSearchRequest(req); details = pinfo.getDetails(); return "success"; } catch(Exception e) { e.printStackTrace(); return "failure"; } } public Details[] getDetails() { return details; }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?