Develop and Download Open Source Software

Browse CVS Repository

Diff of /pal/blog/src/java/jp/sf/pal/blog/bean/BlogEditPageBean.java

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.14 by shinsuke, Sat Jul 1 00:45:34 2006 UTC revision 1.15 by tigercat, Wed Feb 6 03:53:02 2008 UTC
# Line 1  Line 1 
1  /*  /*
2   * Copyright 2005-2006 The Portal Application Laboratory Team.   * Copyright 2005-2008 The Portal Application Laboratory Team.
3   *   *
4   * Licensed under the Apache License, Version 2.0 (the "License");   * Licensed under the Apache License, Version 2.0 (the "License");
5   * you may not use this file except in compliance with the License.   * you may not use this file except in compliance with the License.
# Line 30  import javax.faces.model.SelectItem; Line 30  import javax.faces.model.SelectItem;
30    
31  import jp.sf.pal.blog.BlogConstants;  import jp.sf.pal.blog.BlogConstants;
32  import jp.sf.pal.blog.converter.Converter;  import jp.sf.pal.blog.converter.Converter;
 import jp.sf.pal.blog.importer.Importer;  
33  import jp.sf.pal.blog.model.BlogMessage;  import jp.sf.pal.blog.model.BlogMessage;
34  import jp.sf.pal.blog.util.BlogDaoUtil;  import jp.sf.pal.blog.util.BlogDaoUtil;
35  import jp.sf.pal.blog.util.BlogMessaging;  import jp.sf.pal.blog.util.BlogMessaging;
36    import jp.sf.pal.blog.util.BlogMessagingKeyToken;
37    
38  import org.apache.commons.logging.Log;  import org.apache.commons.logging.Log;
39  import org.apache.commons.logging.LogFactory;  import org.apache.commons.logging.LogFactory;
# Line 67  public class BlogEditPageBean Line 67  public class BlogEditPageBean
67      public BlogEditPageBean()      public BlogEditPageBean()
68      {      {
69          Long id = null;          Long id = null;
70            BlogMessagingKeyToken keyToken = new BlogMessagingKeyToken();
71            keyToken.setPrefix(BlogConstants.BLOG_MESSAGE_ID);
72            ExternalContext externalContext = FacesContext.getCurrentInstance()
73                    .getExternalContext();
74            keyToken.setOwner(externalContext.getRemoteUser());
75          try          try
76          {          {
77              id = (Long) BlogMessaging              id = (Long) BlogMessaging.receiveForEdit(keyToken.toString());
                     .receiveForEdit(BlogConstants.BLOG_MESSAGE_ID);  
78          }          }
79          catch (ClassCastException e)          catch (ClassCastException e)
80          {          {
# Line 219  public class BlogEditPageBean Line 223  public class BlogEditPageBean
223      {      {
224          if (getId() != null)          if (getId() != null)
225          {          {
226              BlogMessaging.cancelForEdit(BlogConstants.BLOG_MESSAGE_ID);              BlogMessagingKeyToken keyToken = new BlogMessagingKeyToken();
227                keyToken.setPrefix(BlogConstants.BLOG_MESSAGE_ID);
228                ExternalContext externalContext = FacesContext.getCurrentInstance()
229                        .getExternalContext();
230                keyToken.setOwner(externalContext.getRemoteUser());
231                BlogMessaging.cancelForEdit(keyToken.toString());
232              // i18n              // i18n
233              FacesMessageUtil.addInfoMessage(PortletResourceBundleUtil              FacesMessageUtil.addInfoMessage(PortletResourceBundleUtil
234                      .getString(LocaleUtil.getLocale(),                      .getString(LocaleUtil.getLocale(),

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.15

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26