on 05-17-2006 9:10 PM
Hi,
I am making a call in my java class in method
doProcessBeforeOuput with the following call
table = (TableView) this.getComponentByName("tableview_AddMaterial");
Object[] objs = this.getComponents();
Both return nulls for the object, how does someone access the jsp tables or text fields defined by id in htmlb in your java code I did check and all these are defined
private IPageContext pageContext;
private IPortalComponentRequest request;
private IPortalComponentResponse response;
private IPortalComponentSession session;
private IPortalComponentContext userContext;
private IPortalComponentProfile userProfile;
Also here is my htmltable in the jsp
<hbj:tableView
id="tableview_AddMaterial"
model="DHB.queryResultsModel"
design="TRANSPARENT"
headerVisible="false"
footerVisible="true"
visibleRowCount="50"
visibleFirstRow="1"
selectionMode="MULTISELECT">
</hbj:tableView>
Any help would be greatly appreciated and I do reward points for helpful answers
Cheers,
Devlin
Hi Devlin
You can access the fields in jsp as follows.For example, consider tableview with id "myTableView".
<b>TableView table = (TableView) this.getComponentByName("myTableView");</b>
If you add this line, you can get all the values related to tableview.For example, to get the first visible row of the tableview, the code goes as follows.
<b>int firstVisibleRow = table.getVisibleFirstRow();</b>
Jsp for the same:
==================
<hbj:tableView
id="myTableView"
model="tablebean.model"
design="ALTERNATING"
headerVisible="true"
footerVisible="true"
selectionMode="MULTISELECT"
headerText="Office locations"
visibleFirstRow="1"
visibleRowCount="5"
rowCount="16"
width="500px">
</hbj:tableView>
Try and let me know the results.
Hope this helps.
Regards
Yoga
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey I actually figured out the problem before but I still rewarded you points because it was correct.
Basically that was it as I had before the problem I had the jsp in a if statement so that part of the jsp wasn't active until an event had been fired from another iview, and I threw it in to test, so I moved it on the rowclicked method to ensure that part of the jsp was active and it worked
I am putting another post up on how to add a title to the checkbox if you know that please answer
Cheers,
Devlin
User | Count |
---|---|
86 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.