我有这个 JSF 2 Web 应用程序,它从数据库中检索推文列表并将它们显示为带有 Primefaces 的数据列表
(最好是试试看我的意思。去www.tweetreference.org,点击“read a tweet reference”,然后输入“@seinecle”)
如何使此列表可收藏,以便可以直接返回该页面?甚至可能吗?[我已经阅读了 JSF2 中的 GET 请求和 url 书签,但没有成功...]
页面源代码:
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:p="http://primefaces.org/ui">
<h:head>
<title>TweetReference</title>
<h:outputStylesheet library="css" name="index.css" />
</h:head>
<h:body>
<h:link value="back to the home page" outcome="index.xhtml" />
<div id="box">
<div id="text">
<div id="title">Tweet references for #{controllerBean.searchTerm}:</div>
<div class="datalist-noborder">
<p:dataList value="#{searchResultsBean.references}" var="ref" itemType="none">
<br></br>
<br></br>
<br></br>
<span style="float: left;"><img src="#{ref.author.pic_url}" width="85"></img></span>
<span style="font-size: 12px;padding-left: 10px;">
<b>#{ref.author.realName} (@#{ref.author.screenName})</b></span>
<br></br>
<span style="font-size: 12px;padding-left: 10px;">#{ref.author.description}</span>
<br></br>
<span style="font-size: 12px;padding-left: 10px;"><b>#{ref.author.location}</b></span>
<br></br>
<span style="font-size: 12px;padding-left: 10px;">[#{ref.author.followersCount} followers on Twitter].</span>
<br></br>
<br></br>
said in #{ref.monthYear}:
<span style="font-size: 40px;">“</span>#{ref.text}<span style="font-size: 40px;">”</span>
</p:dataList>
</div>
</div>
</div>
</h:body>
</html>
谢谢!