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.
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???
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:
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!!
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.
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:
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.
if my changes work fine and doing more than display the latest items I will sent you that.
Thanks for your time.