📄 recordlistbean.java
字号:
package cn.hxex.library.view.bean;
import java.util.List;
import cn.hxex.library.exception.LibraryException;
import cn.hxex.library.model.Product;
import cn.hxex.library.view.util.FacesUtils;
import cn.hxex.library.view.util.ViewUtils;
public class RecordListBean extends BaseBean
{
private String productId;
private Product product;
private List records;
/**
* @return Returns the records.
*/
public List getRecords()
{
return records;
}
/**
* @param records The records to set.
*/
public void setRecords(List records)
{
this.records = records;
}
/**
* @return Returns the productId.
*/
public String getProductId()
{
return productId;
}
/**
* @param productId The productId to set.
*/
public void setProductId(String productId)
{
this.productId = productId;
}
/**
* @return Returns the product.
*/
public Product getProduct()
{
return product;
}
/**
* @param product The product to set.
*/
public void setProduct(Product product)
{
this.product = product;
}
public void init()
{
this.logger.info( "Initialize the RecordListBean!" );
if( this.productId!=null )
{
try
{
this.product = this.getServiceLocator().getProductService().getProduct( this.productId );
this.records = ViewUtils.convertToList( product.getRecords() );
}
catch( LibraryException ex )
{
}
}
}
public String listAction()
{
this.logger.info( "The method listAction in RecordListBean was invoked!");
return NavigationResults.RECORD_LIST;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -