<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[安道生練功房 - Latest posts for "acer123"]]></title>
		<link>https://forum.andowson.com/posts/listByUser/57</link>
		<description><![CDATA[Latest posts for "acer123"]]></description>
		<generator>JForum - http://www.jforum.net</generator>
			<item>
				<title>[JForum中文社群 JForum Chinese Users Community] Re:JForum 2.2.0 Released</title>
				<description><![CDATA[ Thanks dude. If you check my previous posts i fixed some of the bugs which i encountered in 2.1.8. We still have not gone live but was just wondering if all of those were fixed in the 2.1 release which you created. 
<br>
<br>
I already download it and testing but have not tested it heavily. Thinking of doing a thorough testing next week for 2.1 and will let you know..]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/429/892</guid>
				<link>https://forum.andowson.com/posts/preList/429/892</link>
				<pubDate><![CDATA[Fri, 27 Aug 2010 23:45:21]]> GMT</pubDate>
				<author><![CDATA[ acer123]]></author>
			</item>
			<item>
				<title>[JForum中文社群 JForum Chinese Users Community] Re:JForum 2.2.0 Released</title>
				<description><![CDATA[ Thanks man. Trying it now. I saw the new libraries included in this new version but does all the other pagination, SSO bug were also fixed in this one ?]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/429/890</guid>
				<link>https://forum.andowson.com/posts/preList/429/890</link>
				<pubDate><![CDATA[Fri, 27 Aug 2010 01:13:25]]> GMT</pubDate>
				<author><![CDATA[ acer123]]></author>
			</item>
			<item>
				<title>[JForum中文社群 JForum Chinese Users Community] Re:关于搜索，有问题求教~</title>
				<description><![CDATA[ BTW just curious what is LuceneIndex functionality ? I search it on wiki and it states something like a backup. When i try to execute under Admin control panel i see some files created but when opened are all in ASCII characters. Whats the use of it ?]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/249/684</guid>
				<link>https://forum.andowson.com/posts/preList/249/684</link>
				<pubDate><![CDATA[Wed, 28 Oct 2009 15:20:52]]> GMT</pubDate>
				<author><![CDATA[ acer123]]></author>
			</item>
			<item>
				<title>[JForum中文社群 JForum Chinese Users Community] Re:Postgre CURRVAL issue</title>
				<description><![CDATA[ Never mind i got it :--)]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/357/683</guid>
				<link>https://forum.andowson.com/posts/preList/357/683</link>
				<pubDate><![CDATA[Wed, 28 Oct 2009 11:48:25]]> GMT</pubDate>
				<author><![CDATA[ acer123]]></author>
			</item>
			<item>
				<title>[JForum中文社群 JForum Chinese Users Community] Re:Pagination issue</title>
				<description><![CDATA[ Could you please show me the code for the one which you are having issues with pagination ?. All you need to do is in xyzAction.java add :- 
<br>
<br>
this.context.put("action",action); 
<br>
<br>
and in the JSP page at the bottom where they have the pagination you need to put action in there thats all]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/354/682</guid>
				<link>https://forum.andowson.com/posts/preList/354/682</link>
				<pubDate><![CDATA[Wed, 28 Oct 2009 10:16:13]]> GMT</pubDate>
				<author><![CDATA[ acer123]]></author>
			</item>
			<item>
				<title>[JForum中文社群 JForum Chinese Users Community] Postgre CURRVAL issue</title>
				<description><![CDATA[ I install JForums on postgres. I am assuming that the only SQL file JForum uses for all it's queries is generic_queries.sql because the DB which i have consist of schemaname.tablename and because of that i had to change all of my SQL file. 
<br>
<br>
Since this was an issue so inserted everything manually and implemented SSO which is working just fine. There were several bug which i faced on PSQL JForums which i will post in your JIRA site. 
<br>
<br>
I have a question. Everytime i post a message on JForums or create a topic or send a PVT message to a user i get a PSQLException :- 
<br>
<br>
Error: currval of sequence "jforum_privmsgs_seq" is not yet defined in the session. 
<br>
<br>
I saw in postgresql.sql file it has :- 
<br>
<br>
select CURRVAL('jforum_privmsgs_seq') 
<br>
select CURRVAL('jforum_topics_seq')]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/357/681</guid>
				<link>https://forum.andowson.com/posts/preList/357/681</link>
				<pubDate><![CDATA[Wed, 28 Oct 2009 10:09:40]]> GMT</pubDate>
				<author><![CDATA[ acer123]]></author>
			</item>
			<item>
				<title>[JForum中文社群 JForum Chinese Users Community] 回覆:Possible bug in the forums</title>
				<description><![CDATA[ Thanks man. I will sure do that. The more I play around with it the more I get issues and the more I fix it with your help also <img src="https://forum.andowson.com/images/smilies/69934afc394145350659cd7add244ca9.gif" alt="smilie">. Hope to continue support and report bugs and their fixes also.]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/355/673</guid>
				<link>https://forum.andowson.com/posts/preList/355/673</link>
				<pubDate><![CDATA[Mon, 19 Oct 2009 11:28:27]]> GMT</pubDate>
				<author><![CDATA[ acer123]]></author>
			</item>
			<item>
				<title>[JForum中文社群 JForum Chinese Users Community] 回覆:Possible bug in the forums</title>
				<description><![CDATA[ Ok i found the solution. Hope this is helpful for everyone. in UserAction.java under commonData() add :-
<br>
<br>
this.context.put("action","list");
<br>
<br>
And then change the bottom line in user_list.htm :-
<br>
<br>
&lt;table width="100%"&gt;
<br>
 &lt;tr&gt;
<br>
 &lt;td align="right"&gt;&lt;#if thisPage?exists&gt;&lt;@pagination.doPagination action/&gt;&lt;/#if&gt;&lt;/td&gt;
<br>
 &lt;/tr&gt;
<br>
&lt;/table&gt;
<br>
<br>
That's it. As commonData() is always called for any kind of action in UserAction.java whether you edit a user or edit a group. So now we know that action will always be list whenever it goes in commonData(). I don't know why a user when edited through the Admin page and click submit it always have the last action of editSave(). so when you click on the second page hence you get the exception. When the page refreshes everything works fine. 
<br>
<br>
Hope this helps other people.]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/355/671</guid>
				<link>https://forum.andowson.com/posts/preList/355/671</link>
				<pubDate><![CDATA[Mon, 19 Oct 2009 07:38:19]]> GMT</pubDate>
				<author><![CDATA[ acer123]]></author>
			</item>
			<item>
				<title>[JForum中文社群 JForum Chinese Users Community] Possible bug in the forums</title>
				<description><![CDATA[ I cannot find any jira site for the forums where i can post the possible bugs which i have found and been trying to fix recently. andwoson site looks pretty good and active also which is still suporting for JForums. I will also post my bugs and the fix i did so other people might find useful. One of them which i encountered lately is with the pagination:- 
<br>
<br>
1) Go to Admin Control Panel 
<br>
2) In page1 click on any user Edit link. Just click on submit when you are in edit page or try to edit any kind of information like firstname, lastname, etc for the user. Once clicked submit it will redirect you to the user listing page under admin control panel 
<br>
3) Now click on page 2 and you will see the exception . 
<br>
<br>
The problem is when you get returned from editing the user information jforums shows the next page link as :- 
<br>
<br>
http://localhost:8080/jforums/adminUsers/editSave/30.page (This link throws an exception as there is nothing defined in urlpattern for editSave) 
<br>
<br>
where originally it is suppose to show :- 
<br>
<br>
http://localhost:8080/jforums/adminUsers/list/30.page 
<br>
<br>
Any clue if this has to do something with the pagination.ftl ? or if you have encountered this issue ?]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/355/670</guid>
				<link>https://forum.andowson.com/posts/preList/355/670</link>
				<pubDate><![CDATA[Mon, 19 Oct 2009 05:45:23]]> GMT</pubDate>
				<author><![CDATA[ acer123]]></author>
			</item>
			<item>
				<title>[JForum中文社群 JForum Chinese Users Community] 回覆:Pagination issue</title>
				<description><![CDATA[ Ok i was able to fix the issue by adding :- 
<br>
<br>
adminGroups.list.0 = 
<br>
<br>
It worked perfectly. Hopefully people who are trying to do pagination can find this post helpful.]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/354/669</guid>
				<link>https://forum.andowson.com/posts/preList/354/669</link>
				<pubDate><![CDATA[Mon, 19 Oct 2009 05:41:36]]> GMT</pubDate>
				<author><![CDATA[ acer123]]></author>
			</item>
			<item>
				<title>[JForum中文社群 JForum Chinese Users Community] 回覆:Pagination issue</title>
				<description><![CDATA[ And in the group-list.htm where it uses the group-macros.ftl i replaced the looping with th &lt;#list&gt;. I am sure that should not be an issue]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/354/668</guid>
				<link>https://forum.andowson.com/posts/preList/354/668</link>
				<pubDate><![CDATA[Fri, 16 Oct 2009 21:33:08]]> GMT</pubDate>
				<author><![CDATA[ acer123]]></author>
			</item>
			<item>
				<title>[JForum中文社群 JForum Chinese Users Community] 回覆:Pagination issue</title>
				<description><![CDATA[ Hi adwoson. Thanks for your reply. I output the URL and it states :- 
<br>
<br>
http://localhost:8080/jforum/adminGroups/list-30?null 
<br>
<br>
The parameter i get for the second page is null hence the exception. I tried several senarious but just could not find a way to fix it. Any hints.]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/354/667</guid>
				<link>https://forum.andowson.com/posts/preList/354/667</link>
				<pubDate><![CDATA[Fri, 16 Oct 2009 21:28:52]]> GMT</pubDate>
				<author><![CDATA[ acer123]]></author>
			</item>
			<item>
				<title>[JForum中文社群 JForum Chinese Users Community] 回覆:Pagination issue</title>
				<description><![CDATA[ Ah appologies for the double post. Actually i was trying to edit and instead i later on realized that i quoted :--(. I was able to make it work. What i did is made some changes in group_list.htm file in admin. I can see the pagination and the first page displays 30 records. But when i click on second page i get a nasty exception. 
<br>
<br>
<pre class="line-numbers"><code class="language-java match-braces"><br><br>&lt;#list grouping as group&gt;<br><br>    &lt;tr&gt;<br>        &lt;td class="row1"&gt;&lt;span class="gen"&gt;${group.name}&lt;/span&gt;&lt;/td&gt;<br>        &lt;td class="row1" align="center"&gt;&lt;span class="gen"&gt;&lt;a href="${contextPath}/${moduleName}/edit/${group.id}${extension}"&gt;${I18n.getMessage("Groups.List.Edit")}&lt;/a&gt;&lt;/span&gt;&lt;/td&gt;<br>        &lt;td class="row1" align="center"&gt;&lt;input type="checkbox" name="group_id" value="${group.id}" /&gt;&lt;/td&gt;<br>        &lt;td class="row1" align="center"&gt;&lt;span class="gen"&gt;&lt;a href="${contextPath}/${moduleName}/permissions/${group.id}${extension}"&gt;${I18n.getMessage("Permissions")}&lt;/a&gt;&lt;/span&gt;&lt;/td&gt;<br>    &lt;/tr&gt;<br><br>    &lt;/#list&gt;<br>.<br>.<br>.<br><br>&lt;table width="100%"&gt;<br>&lt;tr&gt;<br>&lt;td align="right"&gt;&lt;#if thisPage?exists&gt;&lt;@pagination.doPagination grouping/&gt;&lt;/#if&gt;&lt;/td&gt;<br>&lt;/tr&gt;<br>&lt;/table&gt;<br><br></code></pre>
<br>
<br>
When i click on the second page this is what i get :-
<br>
<br>
&lt;a id="myprofile" class="mainmenu" href=" Expression session is undefined on line 67, column 162 in default/header.htm. The problematic instruction: ---------- ==&gt; ${session.userId} [on line 67, column 160 in default/header.htm] in include "header.htm" [on line 1, column 1 in default/message.htm] in include "${templateName}/message.htm" [on line 7, column 9 in exception.html] ---------- Java backtrace for programmers: ---------- freemarker.core.InvalidReferenceException: Expression session is undefined on line 67, column 162 in default/header.htm. at freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:124) at freemarker.core.TemplateObject.invalidTypeException(TemplateObject.java:134) at freemarker.core.Dot._getAsTemplateModel(Dot.java:78) at freemarker.core.Expression.getAsTemplateModel(Expression.java:89) at freemarker.core.Expression.getStringValue(Expression.java:93) at freemarker.core.DollarVariable.accept(DollarVariable.java:76) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.Environment.renderElementToString(Environment.java:1461) at freemarker.core.StringLiteral.getStringValue(StringLiteral.java:95) at freemarker.core.StringLiteral._getAsTemplateModel(StringLiteral.java:80) at freemarker.core.Expression.getAsTemplateModel(Expression.java:89) at freemarker.core.ListLiteral.getModelList(ListLiteral.java:119) at freemarker.core.MethodCall._getAsTemplateModel(MethodCall.java:89) at freemarker.core.Expression.getAsTemplateModel(Expression.java:89) at freemarker.core.Expression.getStringValue(Expression.java:93) at freemarker.core.DollarVariable.accept(DollarVariable.java:76) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:79) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.Environment.include(Environment.java:1375) at freemarker.core.Include.accept(Include.java:155) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.Environment.include(Environment.java:1375) at freemarker.core.Include.accept(Include.java:155) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.IfBlock.accept(IfBlock.java:82) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.Environment.process(Environment.java:176) at freemarker.template.Template.process(Template.java:232) at net.jforum.exceptions.ExceptionWriter.handleExceptionData(ExceptionWriter.java:115) at net.jforum.JForum.handleException(JForum.java:285) at net.jforum.JForum.service(JForum.java:205) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at net.jforum.util.legacy.clickstream.ClickstreamFilter.doFilter(ClickstreamFilter.java:59) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) at java.lang.Thread.run(Thread.java:595)]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/354/665</guid>
				<link>https://forum.andowson.com/posts/preList/354/665</link>
				<pubDate><![CDATA[Fri, 16 Oct 2009 13:23:00]]> GMT</pubDate>
				<author><![CDATA[ acer123]]></author>
			</item>
			<item>
				<title>[JForum中文社群 JForum Chinese Users Community] 回覆:Pagination issue</title>
				<description><![CDATA[ And i created a variable in ConfigKeys.java also for GROUPS_PER_PAGE]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/354/663</guid>
				<link>https://forum.andowson.com/posts/preList/354/663</link>
				<pubDate><![CDATA[Fri, 16 Oct 2009 12:09:42]]> GMT</pubDate>
				<author><![CDATA[ acer123]]></author>
			</item>
			<item>
				<title>[JForum中文社群 JForum Chinese Users Community] Pagination issue</title>
				<description><![CDATA[ Hello. I am trying to do some pagination under Admin Panel for Groups. I made the appropriate changes to the code and i can see the pagination at the end of the page (When admin clicks on groups link under Admin Control Panel). The problem is that the groups page still shows all the groups in one page and shows the pagination at the bottom also which i am sure is not correct because i get a macro exception.
<br>
<br>
Can someone point me out what am i doing wrong. Thanks.
<br>
<br>
GroupAction
<br>
<pre class="line-numbers"><code class="language-java match-braces"><br>    public void list()<br>    {<br>        System.out.println("Inside list()");<br>        int start = this.preparePagination(DataAccessDriver.getInstance().newGroupDAO().getTotalGroups());<br>        System.out.println("Start is [ " + start + " ] ");<br>        int groupsPerPage = SystemGlobals.getIntValue(ConfigKeys.GROUPS_PER_PAGE);<br>        System.out.println("Groups per page [ " + groupsPerPage + " ] ");<br>        this.context.put("groups", new TreeGroup().getNodes());<br>        this.context.put("grouping", DataAccessDriver.getInstance().newGroupDAO().selectAll(start ,groupsPerPage));<br>        //this.commonData();<br>        <br>        this.setTemplateName(TemplateKeys.GROUP_LIST);<br>    }<br>    <br>    private int preparePagination(int totalGroups)<br>    {<br>        int start = ViewCommon.getStartPage();<br>        LOG.info("Start is [ " + start + " ]");<br>        int groupsPerPage = SystemGlobals.getIntValue(ConfigKeys.GROUPS_PER_PAGE);<br>        LOG.info("Groups Per Page is [ " + groupsPerPage + " ] ");<br>        ViewCommon.contextToPagination(start, totalGroups, groupsPerPage);<br>        <br>        return start;<br>    }<br></code></pre>
<br>
<br>
GroupDAO
<br>
<pre class="line-numbers"><code class="language-java match-braces"><br>    public int getTotalGroups() ;<br>    <br>    public List selectAll(int startFrom, int count) ;<br></code></pre>
<br>
<br>
GenericGroupAction
<br>
<br>
<pre class="line-numbers"><code class="language-java match-braces"><br>    /**<br>     * @see net.jforum.dao.GroupDAO#getTotalGroups()<br>     */<br>    <br>    public int getTotalGroups()<br>    {<br>        PreparedStatement preparedStatement = null;<br>        try {<br>            preparedStatement = JForumExecutionContext.getConnection().prepareStatement(<br>                    SystemGlobals.getSql("GroupModel.totalGroups"));<br>            return this.getTotalGroupsCommon(preparedStatement);<br>        }<br>        catch (SQLException e) {<br>            throw new DatabaseException(e);<br>        }<br>        finally {<br>            DbUtils.close(preparedStatement);<br>        }<br>    }<br>    <br>    protected int getTotalGroupsCommon(PreparedStatement p) throws SQLException<br>    {<br>        System.out.println("Insid egetTotalGroupsCommon");<br>        ResultSet rs = p.executeQuery();<br>        rs.next();<br><br>        int total = rs.getInt(1);<br><br>        rs.close();<br>        p.close();<br><br>        return total;<br>    }<br>    <br>    protected List processSelectAll(ResultSet rs) throws SQLException<br>    {<br>        System.out.println("Inside processSelectAll()");<br>        List list = new ArrayList();<br><br>        while (rs.next()) {<br>            Group g = new Group();<br>            g.setId(rs.getInt("group_id"));<br>            g.setName(rs.getString("group_name"));<br>            g.setParentId(rs.getInt("parent_id"));<br>            g.setDescription(rs.getString("group_description"));<br>            list.add(g);<br>        }<br><br>        return list;<br>    }<br>    <br>    public List selectAll(int startFrom, int count)<br>    {<br>        System.out.println("Inside selectAll()");<br>        PreparedStatement p = null;<br>        ResultSet rs = null;<br><br>        try {<br>            if (count &gt; 0) {<br>                p = JForumExecutionContext.getConnection().prepareStatement(<br>                        SystemGlobals.getSql("GroupModel.selectAllByLimit"));<br>                p.setInt(1, startFrom);<br>                p.setInt(2, count);<br>            }<br>            else {<br>                p = JForumExecutionContext.getConnection()<br>                        .prepareStatement(SystemGlobals.getSql("GroupModel.selectAll"));<br>            }<br><br>            rs = p.executeQuery();<br><br>            return this.processSelectAll(rs);<br>        }<br>        catch (SQLException e) {<br>            throw new DatabaseException(e);<br>        }<br>        finally {<br>            DbUtils.close(rs, p);<br>        }<br>    }<br></code></pre>
<br>
<br>
SystemGlobals.properties
<br>
<br>
groupsPerPage = 30
<br>
<br>
genericqueries.sql
<br>
<br>
<pre class="line-numbers"><code class="language-sql match-braces"><br>GroupModel.totalGroups = SELECT COUNT(1) as total_groups FROM jforum_groups<br>GroupModel.selectAllByLimit = SELECT group_id, group_name, parent_id, group_description \<br>    FROM jforum_groups ORDER BY group_name LIMIT ?, ?<br></code></pre>
<br>
<br>
group_list.htm
<br>
<br>
<pre class="line-numbers"><code class="language-html match-braces"><br>&lt;table width="100%"&gt;<br>    &lt;tr&gt;<br>        &lt;td align="right"&gt;&lt;#if thisPage?exists&gt;&lt;@pagination.doPagination groups/&gt;&lt;/#if&gt;&lt;/td&gt;<br>    &lt;/tr&gt;<br>&lt;/table&gt;<br></code></pre>]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/354/662</guid>
				<link>https://forum.andowson.com/posts/preList/354/662</link>
				<pubDate><![CDATA[Fri, 16 Oct 2009 12:03:45]]> GMT</pubDate>
				<author><![CDATA[ acer123]]></author>
			</item>
	</channel>
</rss>