本文整理汇总了Java中org.apache.tapestry5.annotations.SetupRender类的典型用法代码示例。如果您正苦于以下问题:Java SetupRender类的具体用法?Java SetupRender怎么用?Java SetupRender使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SetupRender类属于org.apache.tapestry5.annotations包,在下文中一共展示了SetupRender类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: checkClientId
import org.apache.tapestry5.annotations.SetupRender; //导入依赖的package包/类
@SetupRender
public void checkClientId(){
//Be sure that clientId is set
if (this.clientId==null){
clientId = javascript.allocateClientId(resources);
}
//Organize options to send
this.opts= new JSONObject();
opts.put("id", this.getClientId());
opts.put("dataSet", this.dataSet);
JSONObject specificOptions = this.getSpecificOptions();
opts.put("extra", specificOptions==null? new JSONObject():specificOptions);
}
示例2: setupRender
import org.apache.tapestry5.annotations.SetupRender; //导入依赖的package包/类
@SetupRender
void setupRender() {
Integer year = new GregorianCalendar().get(Calendar.YEAR);
Integer maxYear = max == null ? year + 10 : max;
years = "";
for ( ; year <= maxYear; year++ ) {
years += String.format("%d,", year);
}
}
示例3: init
import org.apache.tapestry5.annotations.SetupRender; //导入依赖的package包/类
@SetupRender
void init(final MarkupWriter writer)
{
writer.getDocument().raw("<!DOCTYPE html>");
this.pageName = resources.getPageName();
}
示例4: init
import org.apache.tapestry5.annotations.SetupRender; //导入依赖的package包/类
@SetupRender
void init()
{
this.title = resources.getPageName();
}
示例5: init
import org.apache.tapestry5.annotations.SetupRender; //导入依赖的package包/类
@SetupRender
void init()
{
this.title = resources.getPageName();
}
示例6: setupRender
import org.apache.tapestry5.annotations.SetupRender; //导入依赖的package包/类
@SetupRender
public void setupRender() {
String channelId = request.getParameter("channelId");
String searchTime = request.getParameter("searchTime");
Optional<Channel> channel;
if (channelId != null) {
channel = dataService.getChannel(getChannelUuid(), channelId);
} else {
channel = Optional.empty();
}
if (epgCriteria.isReset() || channel.isPresent()) {
epgCriteria.setReset(false);
groups = dataService.getGroups(getChannelUuid()).orElse(Collections.emptyList()) //
.stream() //
.filter(s -> securityService.hasPermission("channel:group:" + s)) //
.collect(Collectors.toList());
if (channel.isPresent()) {
epgCriteria.setChannelGroup(channel.get().getGroup());
epgCriteria.setChannel(channel.get());
channels = dataService.getChannelsInGroup(getChannelUuid(), channel.get().getGroup(), true).get();
} else {
if (groups.size() > 0) {
channels = dataService.getChannelsInGroup(getChannelUuid(), groups.get(0), true)
.orElse(Collections.emptyList());
epgCriteria.setChannelGroup(groups.get(0));
} else {
channels = dataService.getChannels(getChannelUuid(), true).orElse(Collections.emptyList());
epgCriteria.setChannelGroup(null);
}
if (channels.size() > 0) {
epgCriteria.setChannel(channels.get(0));
}
}
}
if (searchTime != null) {
epgCriteria.setTime(Long.parseLong(searchTime));
}
updateData();
}
示例7: setupRender
import org.apache.tapestry5.annotations.SetupRender; //导入依赖的package包/类
@SetupRender
void setupRender() {
setup();
}