This content has been marked as final. Show 9 replies
pageContext.getApplicationModule return is for generic OAApplicationModule.
So, (PPRAMImpl) is used for type-casting the AM to type PPRAMImpl.
EVENT_PARAM contains any event fired on a page. So, if you want to perform any operation on an event, you can simply write as:
// logic here
Thank you for your quick response.
so PPRAMImpl am = (PPRAMImpl)pageContext.getApplicationModule(webBean) equal to PPRAMImpl am = pageContext.getApplicationModule(webBean) ???
, I am asking this because , we are defining the variable "am" of type "PPRAMImpl" and then assigning the AM name to that variable .
No. These are not equal.
pageContext.getApplicationModule(webBean) return AM of type OAApplicationModule.
It would be fine if your variable am, is of type OAApplicationModule:
OAApplicationModule am = pageContext.getApplicationModule(webBean) // this would be fine.
But as you are using of type PPRAMImpl, you must have to type-cast that externally using:
PPRAMImpl am = (PPRAMImpl)pageContext.getApplicationModule(webBean);
If you are still not clear, then refer any java book or google for internal & external type-casting in java.
Nw I understand the difference between those two . Your explanation is really great.
And by the way , I need help on setting a default value for one of my search parameters in a search region .
Correct me If I am wrong, this is what I thought
1. EOImpl has setters and getters for that attribute. So call the setter method in controller and set the value , if this is right then I don't know how to right the code ,can you give me some sample code ?
2. get the view object name and then set the value for that . like viewobject.setattribute('att name',att value'),if this is right then I don't know how to right the code ,can you give me some sample code ?
I am missing something here .
I created a simple search page with 10 columns to display and out of those 3 has search allowed flag=true.
Then when I run the page these 3 appeared as search fields and I can search the data based on these.
So search fields are based on EO/VO. How can they be not based on EO/VO ?
And when I try to print messages using System.out.println("test2"); in controller , i am not able to see them on the form . Anything I am missing ??
Sorry to bother you with so many questions . I am really new to java and framework.
This is not the right approach.
For search region - Create 3 separate fields not based on any EO/VO.
Create a VO having all the columns you require.
For result - create a table region using wizard and select the VO created above.
In controller check for go/search button and call logic of searching in AM.