8 Replies Latest reply on Apr 16, 2004 6:09 AM by itchiban

    [News] some news

    itchiban Newbie

      i have just done a cvs update, and I notice that there some news in the news module.
      e-g the submitter storie...
      Thanks for this,it was exactly what I want.
      I'm working on a new module which allow you to display the latest news stories, you may have some repies to do about my question in the future;thank you in advance!!!

        • 1. Re: [News] some news
          jae Master

          could you explain this further? this type of functionality will eventually be included w/ the news module that already exists.

          right now my primary concern is making the code more maintainable and making sure that the functionality that currently exists is rock solid.

          • 2. Re: [News] some news
            itchiban Newbie

            For testing I just add a new method in News.java and NewsModule.java,in jboss-service.xml I add the needed lines.My new function appear in the main block and display the last news but I can't set this to the defaultPage index.html!!
            where could I configure the default operation for news???

            • 3. Re: [News] some news
              jae Master

              i'm still not understanding your question. what do you mean by "default page index.html"?

              all links in nukes start w/ "index.html", unless it was an uploaded html. if you want to invoke a specific method in the NewsModule, your link would look something like:

              index.html?module=news&op=latest&....

              • 4. Re: [News] some news
                itchiban Newbie

                In jmx-console I can place in core module a defaultPage,I write the string news,consequently all my news are displayed.I wanted to change this default operation in news module.
                Sorry for my english!!

                • 5. Re: [News] some news
                  jae Master

                  ok - i see what you're saying w/ the page default.

                  is your question about making it so when you click the "news index page" link, it automatically shows you the latest news items?

                  if yes, the news module already does this (but it doesn't limit the amount of news item that are shown. that will become a per user configurable parameter once more of the porlet code is rolled out).

                  are you looking to do something more or completely different then this for the main page?
                  -----
                  in answer to your original question...

                  if you wanted to change the default index page that is displayed, you would need a method in the NewsModule that exposes this functionality, and then you could replace the the following line in the jboss-service.xml file w/ your method name:

                  <operation
                   name="newsindexpage" <-- change this
                   display-name="News"
                   description="The news."
                   image=""
                   hint=""/>
                  


                  just as an fyi, an customizations you've made to the current news module is going to be completely incompatible w/ the 1.1 release (the code is being cleaned up dramtically).

                  if your enhancement is doing something more then just displaying the latest items, i would appricate it if you could send me your changes and i can investigate integrating them into what will be the 1.1 release.

                  • 6. Re: [News] some news
                    Sherman Wood Apprentice


                    itchiban,

                    From your comment about changing the Core module via JMX, do you mean that you want to have your news page be the default displayed when a user logs in?

                    If so, you need to change the jboss-service.xml for the main nukes SAR. There is the DefaultUserPage parameter on the Core module MBean that defines this. Jae indicated before what the URL should look like, namely:

                    index.html?module=news&op=yourOperation


                    Sherman

                    • 7. Re: [News] some news
                      jae Master

                      if sherman is correct, then your best bet is to just change it via the jmx-console using the available setter method, rather then editting the jboss-service.xml file directly.

                      • 8. Re: [News] some news
                        itchiban Newbie

                        jjae77,
                        if my changes work fine and doing more than display the latest items I will sent you that.
                        Thanks for your time.