gpt4 book ai didi

org.apache.tapestry5.corelib.components.Zone.getBody()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-17 08:43:31 26 4
gpt4 key购买 nike

本文整理了Java中org.apache.tapestry5.corelib.components.Zone.getBody()方法的一些代码示例,展示了Zone.getBody()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Zone.getBody()方法的具体详情如下:
包路径:org.apache.tapestry5.corelib.components.Zone
类名称:Zone
方法名:getBody

Zone.getBody介绍

[英]Returns the zone's body (the content enclosed by its start and end tags). This is often used as part of an Ajax partial page render to update the client with a fresh render of the content inside the zone.
[中]返回区域的主体(由其开始和结束标记包围的内容)。这通常作为Ajax部分页面呈现的一部分使用,以使用区域内内容的新呈现更新客户端。

代码示例

代码示例来源:origin: stackoverflow.com

@Inject
private Zone myZone;

Object onClickFromAddNew(String value) {
  // do stuff
  return myZone.getBody();
}

代码示例来源:origin: apache/tapestry-5

Object onActionFromRunGC()
{
  Runtime runtime = Runtime.getRuntime();
  long initialFreeMemory = runtime.freeMemory();
  runtime.gc();
  long delta = runtime.freeMemory() - initialFreeMemory;
  alertManager.info(String.format("Garbage collection freed %,.2f Kb of memory.",
      ((double) delta) / 1024.0d));
  return pagesZone.getBody();
}

代码示例来源:origin: apache/tapestry-5

Object onSuccess()
  {
    return valueZone.getBody();
  }
}

代码示例来源:origin: apache/tapestry-5

Object onActionFromReload()
  {
    reloadHelper.forceReload();

    return devmodezone.getBody();
  }
}

代码示例来源:origin: apache/tapestry-5

Object onSuccess()
{
  message = "Zone updated";
  return zone.getBody();
}

代码示例来源:origin: apache/tapestry-5

Object onActionFromClearCaches()
{
  reloadHelper.forceReload();
  failures = null;
  return pagesZone.getBody();
}

代码示例来源:origin: apache/tapestry-5

Object onSuccess()
{
  return output.getBody();
}

代码示例来源:origin: apache/tapestry-5

Object onActionFromUpdateZoneWithEmptyBody()
{
  return zoneWithEmptyBody.getBody();
}

代码示例来源:origin: apache/tapestry-5

public Block onReset()
{
  return wholeLoopZone.getBody();
}

代码示例来源:origin: apache/tapestry-5

Object onUpdateZone() {
  return zone.getBody();
}

代码示例来源:origin: apache/tapestry-5

Object onActionFromReset()
{
  if (!productionMode)
  {
    resources.discardPersistentFieldChanges();
    alertManager.info("Page state discarded.");
  }
  return devmodezone.getBody();
}

代码示例来源:origin: org.got5/tapestry5-jquery

Object onZoneDrop(Object[] context)
{
 CaptureResultCallback<Object> callback = new CaptureResultCallback<Object>();
 resources.triggerEvent(JQueryEventConstants.DROP, context, callback);
 
 if(callback.getResult() != null){
   return callback.getResult();
 }
 
 return zone.getBody();
}

代码示例来源:origin: org.got5/tapestry5-jquery

Object onZoneRefresh()
{
 CaptureResultCallback<Object> callback = new CaptureResultCallback<Object>();
 resources.triggerEvent(JQueryEventConstants.REFRESH, context, callback);
 
 if(callback.getResult() != null){
   return callback.getResult();
 }
 
 return zone.getBody();
}

代码示例来源:origin: apache/tapestry-5

Object onZoneRefresh(EventContext eventContext)
{
  CaptureResultCallback<Object> callback = new CaptureResultCallback<Object>();
  resources.triggerContextEvent(EventConstants.REFRESH, eventContext, callback);
  if (callback.getResult() != null)
  {
    return callback.getResult();
  }
  return zone.getBody();
}

代码示例来源:origin: apache/tapestry-5

Object onActionFromKill()
{
  if (!productionMode)
  {
    Session session = request.getSession(false);
    if (session == null)
    {
      alertManager.info("No server-side session currently exist.");
    } else
    {
      session.invalidate();
      alertManager.info("Server-side session invalidated.");
    }
  }
  return devmodezone.getBody();
}

代码示例来源:origin: apache/tapestry-5

Object onSuccessFromAjax()
{
  alertManager.info("Ajax form submission");
  alertManager.alert(duration, severity, message, markup);
  if (redirectToIndex)
  {
    return Index.class;
  }
  return formZone.getBody();
}

代码示例来源:origin: apache/tapestry-5

Object onSuccessFromSinglePageLoad()
{
  boolean found = !F.flow(getPages()).filter(new Predicate<Page>()
  {
    public boolean accept(Page element)
    {
      return element.getName().equals(pageName) && element.getSelector().equals(selector);
    }
  }).isEmpty();
  if (found)
  {
    alertManager.warn(String.format("Page %s has already been loaded for '%s'.",
        pageName, selector.toShortString()));
    return null;
  }
  long startTime = System.currentTimeMillis();
  // Load the page now (may cause an exception).
  pageSource.getPage(pageName);
  alertManager.info(String.format("Loaded page %s for selector '%s' (in %,d ms).", pageName,
      selector.toShortString(), System.currentTimeMillis() - startTime));
  return pagesZone.getBody();
}

代码示例来源:origin: apache/tapestry-5

@Log
Object onActionFromSelect(String name, @RequestParameter(QueryParameterConstants.ZONE_ID)
String zoneId)
{
  if (!zoneId.equals("output"))
    throw new AssertionError("Expected zoneId 'output' to be passed up in request.");
  this.name = name;
  if (name.equals("Registration"))
  {
    return registrationForm;
  }
  if (name.equals("Vote"))
  {
    return voteForm;
  }
  if (name.equals("CSS Injection"))
  {
    ajaxResponseRenderer.addCallback(new JavaScriptCallback()
    {
      public void run(JavaScriptSupport javascriptSupport)
      {
        javascriptSupport.importStylesheet(viaAjaxCSS);
      }
    });
    return ajaxCSS;
  }
  return output.getBody();
}

代码示例来源:origin: stackoverflow.com

return new RenderCommand() {
  public void render(MarkupWriter writer, RenderQueue queue) {
    RenderCommand zoneBody = typeCoercer.coerce(zone.getBody(), RenderCommand.class);
    zoneBody.render(writer, queue);
    javaScriptSupport.addScript(

代码示例来源:origin: apache/tapestry-5

@Log
public Object onValueChangedFromSelectValue1(SelectObj selectObj, Integer integer, RetentionPolicy retentionPolicy)
{
  final String suffix = String.format(", number %03d, retention policy %s", integer, retentionPolicy);
  List<SelectObj> select2List = new ArrayList();
  select2List.add(new SelectObj(4, "4 post ajax" + suffix));
  select2List.add(new SelectObj(5, "5 post ajax" + suffix));
  select2List.add(new SelectObj(6, "6 post ajax" + suffix));
  select2List.add(new SelectObj(7, "7 post ajax" + suffix));
  select2Model = new SelectObjModel(select2List);
  if (request.isXHR())
  {
    return new MultiZoneUpdate("select1ValueZone", select1ValueZone.getBody()).add("select2ValueZone",
        select2ValueZone.getBody());
  }
  else
  {
    return this;
  }
}

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com