Regarding tableView Model
Hi,
I've created a tableView model using HTMLB & populated d data in it using a bean.I've used checkbox for each row.
What method shud be implemented to check if a row is selected & to get d details of the row??
Any help would b appreciated.
Thanks in Advance
Message was edited by: Subathra Murugesan
you cud do something like this:
Say ur tableview is something like below,
JSP:
<hbj:tableView
id="myTableView"
model="myBean.model"
design="STANDARD"
headerVisible="true"
footerVisible="true"
fillUpEmptyRows="true"
navigationMode="BYPAGE"
selectionMode="MULTISELECT"
onNavigate="myOnNavigate"
visibleFirstRow = "<%=myBean.getVisibleRow() %>"
visibleRowCount="6"
rowCount="10"
width="500 px" >
<%myTableView.useRowSelection(myBean.getOldTableView());%>
</hbj:tableView>
DynPage:
public void useRowSelection(Event event) throws PageException{
TableView table = (TableView) this.getComponentByName("myTableView");
int firstVisibleRow = table.getVisibleFirstRow();
int lastVisibleRow = table.getVisibleLastRow();
StringBuffer strBuff = new StringBuffer();
for (int i = firstVisibleRow; i <= lastVisibleRow; i++) {
if (table.isRowSelected(i)) {
<b>strBuff.append(i);</b>
myBean.setSelectedRowString(strBuff.toString());
myBean.setOldTableView(table);
Bean:
private String selectedRowString;
public DefaultTableViewModel model;
public TableView oldTableView;
private String visibleRow = "1";
public void setVisibleRow(String visibleRow){
this.visibleRow = visibleRow;
public String getVisibleRow(){
return this.visibleRow;
public void setSelectedRowString(String selectedRows) {
this.selectedRowString = selectedRows;
public String getSelectedRowString(){
return this.selectedRowString;
public TableView getOldTableView()
return this.oldTableView;
public void setOldTableView(TableView Table)
this.oldTableView = Table;
Highlited Line wud get all the rows u check on the table.
You cud a button or link, clicking which cud display the rows you selected.
<b>Plz don't forget points, if it helped</b>
Regards.
P.
Similar Messages
-
Hi guys...
I'm trying to show a TableView in HTMLB, but I get the following execption :
I debugged the JSPDynpage and I do get the data succesfully from the data base.
I think the problem is when the tableview tries to get the model. I am not sure, because I'm new to PAR development.
Could you please help me?
Thank you.
The Exception is :
Date : 06/08/2008
Time : 19:01:26:438
Message : null
[EXCEPTION]
java.lang.ClassCastException
at com.sapportals.htmlb.table.DefaultTableViewModel.getValueAt(DefaultTableViewModel.java:186)
at com.sapportals.htmlb.table.DefaultTableViewModel.getValueAt(DefaultTableViewModel.java:196)
at com.sapportals.htmlb.table.TableColumn.getValueAt(TableColumn.java:478)
at com.sapportals.htmlb.table.DefaultCellRenderer.renderCell(DefaultCellRenderer.java:275)
at com.sapportals.htmlb.unifiedrendering.ie5.TableViewRenderer.renderTableViewCellFragment(TableViewRenderer.java:2504)
at com.sapportals.htmlb.unifiedrendering.ie5.TableViewRenderer.renderTableViewRowFragment(TableViewRenderer.java:1792)
at com.sapportals.htmlb.unifiedrendering.ie5.TableViewRenderer.renderTableViewFragment(TableViewRenderer.java:500)
at com.sapportals.htmlb.unifiedrendering.ie5.TableViewRenderer.render(TableViewRenderer.java:99)
at com.sapportals.htmlb.rendering.PageContext.render(PageContext.java:983)
at com.sapportals.htmlb.taglib.TableViewTag.doEndTag(TableViewTag.java:139)
at pagelet._sapportalsjsp_ReporteVisita.subDoContent(_sapportalsjsp_ReporteVisita.java:190)
at pagelet._sapportalsjsp_ReporteVisita.doContent(_sapportalsjsp_ReporteVisita.java:40)
at pagelet._sapportalsjsp_ReporteVisita.service(_sapportalsjsp_ReporteVisita.java:24)
My code is :
JSPDynPage
public static class JSPDynPageReporteVisitaDynPage extends JSPDynPage{
public TablaReporteModel myBean = null;
public void doInitialization(){
Vector vectData = new Vector();
Vector vectColumn = new Vector();
try
java.sql.Connection conn;
com.indelpro.bd.SQLConnection sqlConn = new com.indelpro.bd.SQLConnection();
conn = sqlConn.getConnection();
BdReporteDeVisitaPorProducto bdReporteDeVisitaPorProducto = new BdReporteDeVisitaPorProducto(conn);
vectData = bdReporteDeVisitaPorProducto.obtenerReporteDeVisitasPorProducto();
conn.close();
conn = null;
catch (java.lang.SecurityException e) {e.printStackTrace(); }
catch (java.lang.NullPointerException e) {e.printStackTrace();}
catch (java.sql.SQLException e) { e.printStackTrace(); }
catch (javax.naming.NamingException e) {e.printStackTrace(); }
catch (java.lang.ClassNotFoundException e) { e.printStackTrace(); }
catch (java.lang.IllegalAccessException e) {e.printStackTrace(); }
catch (java.lang.InstantiationException e) {e.printStackTrace(); }
catch (java.lang.Exception e) {e.printStackTrace(); }
IPortalComponentSession componentSession = ((IPortalComponentRequest)getRequest()).getComponentSession();
myBean = new TablaReporteModel(vectData);
componentSession.putValue("myBean",myBean);
My JSP is :
<%@ taglib uri= "tagLib" prefix="hbj" %>
<jsp:useBean id="myBean" scope="session" class="bean.TablaReporteModel" />
</jsp:fallback>
<hbj:content id="myContext" >
<hbj:page title="PageTitle">
<hbj:form id="myFormId" >
<hbj:tableView
id="myTableView1"
model="myBean.model"
design="ALTERNATING"
headerVisible="true"
footerVisible="true"
fillUpEmptyRows="true"
navigationMode="BYLINE"
selectionMode="SINGLESELECT"
headerText="Visitas a Productos"
visibleFirstRow="1"
visibleRowCount="20"
rowCount="20"
width="600 px"/>
</hbj:form>
</hbj:page>
</hbj:content>
An the Bean class is :
public class TablaReporteModel extends DefaultTableViewModel implements Serializable {
private DefaultTableViewModel model;
public TablaReporteModel()
super();
model = new DefaultTableViewModel();
public TablaReporteModel(Vector vRepVisita)
Vector colName = new Vector();
Vector retVector = new Vector();
colName.addElement("Usuario");ja
colName.addElement("Familia");
colName.addElement("Producto");
colName.addElement("Visitas");
Vector dataVect = null;
ReporteDeVisitaPorProducto reporte = null;
for (int i=0;i<vRepVisita.size();i++)
dataVect = new Vector();
reporte = new ReporteDeVisitaPorProducto((ReporteDeVisitaPorProducto) vRepVisita.elementAt(i));
dataVect.addElement(reporte.getCodUsuario());
dataVect.addElement(reporte.getCodTiProducto());
dataVect.addElement(reporte.getCodProducto());
dataVect.addElement(new Integer(reporte.getCanVisita()));
retVector.addElement(dataVect);
this.model = new DefaultTableViewModel (colName, retVector);
public DefaultTableViewModel getModel()
return this.model;I solved it and report the bug for others:
In the constructor of the DefaultTableViewModel of the above example the data vector is the first argument and the column name vector the 2nd. This was turned around and the implementation tried to cast the Strings in the column name vector to Vectors for rows.
Hope this will be improved by a type safe API sometimes...
kind regards,
Achim -
Web Service as Web Dynpro tableView Model
Hi people!
I´ve developed a WebService with a findAllClients method which brings out all the rows from a MaxDB table. Everything works fine when I test it from de WebServices perspective, but when I create a model for my Web Dynpro tableView importing the mentioned WS, I get the following error message:
The Java type of the cmp-field that is stored in column ID, table DB_CLIENTES does not fit to the JDBC type INTEGER of the column. The expected JDBC type is VARCHAR.
I´ve set the built-in type of the column ID in my Java Dictionary project to integer. The corresponding CMP-Field in the entity EJB is java.lang.Integer. I´ve deleted the column from the tableView.
What´s wrong? Any idea please? Where could I find some documentation about this mapping requirements topic?
Thanks very much in advance.Is this the only way?
Anyways, thanks a lot. I haven't been working with ODI yet, I just have to find out, if it is possible to use it for our project. So I just read through the user's guide... -
Regarding Integration Model to CIF from ECC to APO
Hi ,
Please assist me in the following issues:
What will the impact if any material is ciffed twice or multiple times from ECC to APO through IM ...will it generate inconsistency ? if so, how we can avoid this ?
While I'm ciffing the material from ECC to APO through IM, the ' Find Master Data Object ' is showing certain number say 'X' but when I'm running CTM for it the explosion of BOM of Master Data is showing less number of material than 'X'...in that case what might be the possible issue ?
While generating IM , can I club Sale Order, Sale Order Stock, Planned Order, Prodn order under same variant ? or ill it generate inconsistency ?
TIA
-MichaelHi Michael,
1. It is not a problem. Is is quite common to CIF materials twice a days or even more. It shoul not generate inconsistencies.
2. You could have more materials than materials bith BOM. In other words, maybe not all your materials have a BOM.
3. Its recommended to have a separate integration model for your object.
Read this document with the Best Practices:
https://websmp102.sap-ag.de/~sapidb/011000358700000715082008E
Also, note that I was mentioned by Dog Boy, it is convinient asking single questions in your threads. This way you will find more responses.
Kind Regards,
Mariano -
Access deep structures from tableView model binding
Hi,
I have a problem with accessing a deep structure component from a tableView control.
The structure is defined like this:
structure project_data
main_data type structure
data_table1 type table
data_table2 type table
end structure
The deep structure project_data is an attribute of my model class.
When I have a table attribute, it can directly be accessed by using table="//model/table_data" in the tableView.
What do I have to write in my table attribute to access the deep structure directly via model binding.
table="//model/project_data.table_data" doesn't work, it throws a bsp exception.
Thanks in advance!So there is no direct way of doing this?
But why does it work for textEdits like this: value="//model/project_data.main_data-description"
What would I have to do in the interface methods to get it work, or is it simpler to just add the elements of the deep structure directly to my model class? -
Question Regarding metadata modeling
hi you can please tell me the meaning and roll of metadata modeling
Thanks
Regards
Gurkiranhi
meta data - data on data
example: index page of any text book ( which will give the info of the exact reference (page number))
In general, metamodeling or meta-modeling is the analysis, construction and development of the frames, rules, constraints, models and theories applicable and useful for the modeling in a predefined class of problems.
jeeva -
Dear Experts,
Currently I'm working with CRM version 5. And the Org Model in SAP CRM use the SAP HR Org Model in R/3 and the replication is one way, i.e. from SAP R/3 to SAP CRM.
Is it possible to create another organization unit in CRM if Org Model in SAP CRM used that scenario?
I have tried to create an org unit and got run time error 'MOVE_TO_LIT_NOTALLOWED_NODATA'.
Please advice.
Best Regards.
eddhieHello
I am not a law expert, but if you can create users, I am sure you can create a dummy position and assign your role there.
Anyway, if your company doesn't allow to use the PPOMA_CRM assignment for these users, the only option you have is assigning user parameter CRM_UI_PROFILE.
A little comment about user parameter: There is no authorization object to prevent users to modify their own user parameters. If you don't want these users to modify their own parameters via SU3, you should create a transaction variant.
Regards
Joaquin -
Hi All,
Here we are facing a different problem in Rule Modeler.
We are using ICWC 5.0 Version.I have added one category in Category Modeler and that Category should be Routed automatically to a particular group.So in Rule Modeler i have added that categories defined condition and actions so for that categories after defining when i am creating the service ticket after classifying all the categories when i click save and Assign it is shwing a message that "No routing has been maintained" Actually it should rout to that particular group where i have defined in Rule modeler.Kindly suggest me any more settings are required for automatic routing.
Regards
Sekhar.Hi,
In your rule modeler screen ..what is the category you are assigning and are you storing it in the subject profile codes?
please check for a subject profile assignement in your rule modeler.
I hope it helps
Regards
Raj -
Dear Frds
I created ejb using java code
I am using java model and imported using
"old webservice model" i need to set socket time to 3 mins for my webdynpro application...
So if want change my old webservice model to adaptive RFC model
what should i do?
Can i use Ejb written in java in Adaptive RFC model...
where are this adaptive RFC model used?
Thanks and Regards
ShravanGHi
oh sorry..
Actually i mean to say adaptive webservice model
Can i increase socket time if i reipmport my model from
old depricated model to adaprive RFC model..
what benefits will i get if i use Adaptive RFC Model
over Old Depricated model..
Can i use public parts of EJB in webdynpro..
thanks
Shravan
i mean can i use -
hi all
i want to have some example scenarios involving
Webdynpro-Xi-BW and
Webdynpro-Xi-r/3.
i want the procees in volved using webservicesHi
Lakshmi Narayana Chowdary Namala
If your question is answered please allot points also.
Regards
SURYA -
execute sdo_net.create_sdo_table('road_network,1,true,true)
please explain how it will work the how it will creates the (nodes,links,path,pathlink)From Spatial Manual :
SDO_NET.CREATE_SDO_NETWORK
Format
SDO_NET.CREATE_SDO_NETWORK(
network IN VARCHAR2,
no_of_hierarchy_levels IN NUMBER,
is_directed IN BOOLEAN,
node_with_cost IN BOOLEAN DEFAULT FALSE);
Description
Creates a spatial network containing non-LRS SDO_GEOMETRY objects, creates all necessary tables, and updates the network metadata.
Parameters
network
Network name.
no_of_hierarchy_levels
Number of hierarchy levels for links in the network. (For an explanation of network hierarchy, see Section 5.5.)
is_directed
A Boolean value. TRUE indicates that the links are directed; FALSE indicates that the links are undirected (not directed).
node_with_cost
A Boolean value. TRUE causes a column named COST to be included in the <network-name>NODE$ table; FALSE (the default) causes a column named COST not to be included in the <network-name>NODE$ table.
node_table_name
Name of the node table to be created. (The node table is explained in Section 5.9.1.) If you use the format that does not specify this parameter, a node table named <network-name>_NODE$ is created.
node_geom_column
Name of the geometry column in the node table. (The node table is explained in Section 5.9.1.) If you use the format that does not specify this parameter, the geometry column is named GEOMETRY.
node_cost_column
Name of the cost column in the node table. (The node table is explained in Section 5.9.1.) If you use the format that does not specify this parameter, the geometry column is named COST.
link_table_name
Name of the link table to be created. (The link table is explained in Section 5.9.2.) If you use the format that does not specify this parameter, a link table named <network-name>_LINK$ is created.
link_geom_column
Name of the geometry column in the link table. (The link table is explained in Section 5.9.2.) If you use the format that does not specify this parameter, the geometry column is named GEOMETRY.
link_cost_column
Name of the cost column in the link table. (The link table is explained in Section 5.9.2.) If you use the format that does not specify this parameter, the geometry column is named COST.
path_table_name
Name of the path table to be created. (The path table is explained in Section 5.9.3.) If you use the format that does not specify this parameter, a path table named <network-name>_PATH$ is created.
path_geom_column
Name of the geometry column in the path table. (The path table is explained in Section 5.9.3.) If you use the format that does not specify this parameter, the geometry column is named GEOMETRY.
path_link_table_name
Name of the path-link table to be created. (The path-link table is explained in Section 5.9.4.) If you use the format that does not specify this parameter, a path-link table named <network-name>_PLINK$ is created.
Usage Notes
This procedure provides a convenient way to create a spatial network when the node, link, and optional related tables do not already exist. The procedure creates the network; creates the node, link, path, and path-link tables for the network; and inserts the appropriate information in the xxx_SDO_NETWORK_METADATA views (described in Section 5.10.1).
An exception is generated if any of the tables to be created already exists.
The procedure has two formats. The simpler format creates the tables using default values for the table name and the geometry and cost column names. The other format lets you specify names for the tables and the geometry and cost columns.
As an alternative to using this procedure, you can create the network using the SDO_NET.CREATE_SDO_NETWORK procedure; create the tables using the SDO_NET.CREATE_NODE_TABLE, SDO_NET.CREATE_LINK_TABLE, SDO_NET.CREATE_PATH_TABLE, and SDO_NET.CREATE_PATH_LINK_TABLE procedures; and insert the appropriate row in the USER_SDO_NETWORK_METADATA view.
Examples
The following example creates a directed spatial network named SDO_NET1. The example creates the SDO_NET1_NODE$, SDO_NET1_LINK$, SDO_NET1_PATH$, and SDO_NET1_PLINK$ tables, and updates the xxx_SDO_NETWORK_METADATA views. All geometry columns are named GEOMETRY. Both the node and link tables contain a cost column named COST.
EXECUTE SDO_NET.CREATE_SDO_NETWORK('SDO_NET1', 1, TRUE, TRUE); -
Each time I use a USB,IPHOTO,DVD or VMware Fusion connection the desktop mouse pointer freezes regards Model Name: Regards John
Model Identifier:MacBookPro10.6.8, 2
Model Name: MacBook Pro 10.6.8
Model Identifier: MacBookPro 8.2
Processor Name: Intel Core i7
Processor Speed: 2 GHz
Number of Processors: 1
Total Number of Cores: 4
L2 Cache (per Core): 256 KB
L3 Cache: 6 MB
Memory: 4 GB
Boot ROM Version: MBP81.0047.B27
SMC Version (system): 1.69f4
Serial Number (system): C2*******F8V
Hardware UUID: *****
Sudden Motion Sensor:
State: En
<Edited By Host>Hi Allan,
Thank you for your early response, I eventually managed to unZip the requested download, each time I tried the computer froze.
EtreCheck version: 1.9.12 (48)
Report generated 19 July 2014 19:27:23 GMT+01:00
Hardware Information:
MacBook Pro (15-inch, Early 2011) (Verified)
MacBook Pro - model: MacBookPro8,2
1 2 GHz Intel Core i7 CPU: 4 cores
4 GB RAM
Video Information:
AMD Radeon HD 6490M - VRAM: 256 MB
Intel HD Graphics 3000 - VRAM: 384 MB
Color LCD 1440 x 900
System Software:
Mac OS X 10.6.8 (10K549) - Uptime: 0 days 0:4:34
Disk Information:
Hitachi HTS545050B9A302 disk0 : (465.76 GB)
- (disk0s1) : 200 MB
Macintosh HD (disk0s2) / : 465.44 GB (58.8 GB free)
MATSHITADVD-R UJ-898
USB Information:
Apple Inc. FaceTime HD Camera (Built-in)
Apple Inc. BRCM2070 Hub
Apple Inc. Bluetooth USB Host Controller
Apple Inc. Apple Internal Keyboard / Trackpad
Apple Computer, Inc. IR Receiver
Thunderbolt Information:
Apple, Inc. MacBook Pro
Kernel Extensions:
com.NovatelWireless.driver.NovatelWirelessUSBCDCECMControl (3.0.13) Support
com.NovatelWireless.driver.NovatelWirelessUSBCDCECMData (3.0.13) Support
com.ZTE.driver.ZTEUSBCDCACMData (1.3.35) Support
com.ZTE.driver.ZTEUSBMassStorageFilter (1.3.35) Support
com.novamedia.driver.IceraUSB_MSD_Bypass (1.3.0) Support
com.novatelwireless.driver.3G (3.0.13) Support
com.novatelwireless.driver.3GData (3.0.13) Support
com.novatelwireless.driver.DisableAutoInstall (3.0.13) Support
com.option.driver.Option72 (2.15.0) Support
com.option.driver.OptionHS (3.26.0) Support
com.option.driver.OptionMSD (1.21.0) Support
com.option.driver.OptionQC (1.11.0) Support
com.rim.driver.BlackBerryUSBDriverInt (0.0.67) Support
com.rim.driver.BlackBerryUSBDriverVSP (0.0.67) Support
com.tomtom.driver.UsbEthernetGadget (1.0.0d1) Support
com.vmware.kext.vmci (3.1.2) Support
com.vmware.kext.vmioplug (3.1.2) Support
com.vmware.kext.vmnet (3.1.2) Support
com.vmware.kext.vmx86 (3.1.2) Support
com.vodafone.driver (3.0.9) Support
com.vodafone.driver.Data (3.0.9) Support
com.vodafone.driver.DisableAutoInstall (2.0.6) Support
com.zte.driver.cdc_ecm_qmi (1.0.26) Support
com.zte.driver.cdc_usb_bus (1.0.26) Support
de.novamedia.driver.NMSamsung (0.0.2) Support
de.novamedia.driver.NMSmartplugSCSIDevice (1.0.1) Support
de.novamedia.driver.NMUSBCDCACMControl (3.2.12) Support
de.novamedia.driver.NMUSBCDCACMData (3.2.12) Support
de.novamedia.oem.vodafone.vtp.huawei.cdc (0.0.2) Support
net.kromtech.kext.AVKauth (2.3.6 - SDK 10.8) Support
net.kromtech.kext.Firewall (2.3.6 - SDK 10.8) Support
Startup Items:
HWNetMgr: Path: /Library/StartupItems/HWNetMgr
HWPortDetect: Path: /Library/StartupItems/HWPortDetect
Problem System Launch Daemons:
de.novamedia.nmnetmgrd.plist Support
Launch Daemons:
com.adobe.fpsaud.plist Support
com.citrixonline.GoToMyPC.CommAgent.plist Support
com.trusteer.rooks.rooksd.plist Support
com.vmware.launchd.vmware.plist Support
com.zeobit.MacKeeper.AntiVirus.plist Support
Launch Agents:
com.citrixonline.GoToMyPC.LaunchAgent.plist Support
com.conduit.loader.agent.plist Support
com.epson.ews.launcher.plist Support
com.hp.devicemonitor.plist Support
com.hp.messagecenter.launcher.plist Support
com.trusteer.rapport.rapportd.plist Support
de.novamedia.VodafoneDeviceObserver.plist Support
User Launch Agents:
com.adobe.ARM.[...].plist Support
com.apple.CSConfigDotMacCert-[...]@me.com-SharedServices.Agent.plist
com.google.keystone.agent.plist Support
com.zeobit.MacKeeper.Helper.plist Support
User Login Items:
VMCStatusMenu
Dropbox
Vodafone Mobile Broadband
HP Product Research
Internet Plug-ins:
Flip4Mac WMV Plugin: Version: 2.4.4.2 Support
FlashPlayer-10.6: Version: 14.0.0.145 - SDK 10.6 Support
JavaAppletPlugin: Version: 13.9.8 - SDK 10.6 Check version
AdobePDFViewerNPAPI: Version: 10.1.7 Support
Flash Player: Version: 14.0.0.145 - SDK 10.6 Support
AdobePDFViewer: Version: 10.1.7 Support
QuickTime Plugin: Version: 7.6.6
Google Earth Web Plug-in: Version: 7.1 Support
GarminGpsControl: Version: 4.0.4.0 Release - SDK 10.6 Support
Silverlight: Version: 5.1.20913.0 - SDK 10.6 Support
iPhotoPhotocast: Version: 7.0 - SDK 10.7
iTunes Plug-ins:
Quartz Composer Visualizer: Version: 1.2
3rd Party Preference Panes:
Flash Player Support
Flip4Mac WMV Support
GoToMyPC Preferences Support
Trusteer Endpoint Protection Support
Top Processes by CPU:
18% mdworker
7% WindowServer
2% Dock
2% Vodafone Mobile Broadband
1% SystemUIServer
Top Processes by Memory:
242 MB AntiVirus
78 MB Dropbox
53 MB WindowServer
45 MB rapportd
37 MB MacKeeper Helper
Virtual Memory Information:
2.00 GB Free RAM
864 MB Active RAM
182 MB Inactive RAM
995 MB Wired RAM
164 MB Page-ins
0 B Page-outs
I appreciate your assistance in this problem
Regards
John (omegajon) -
Displaying a link in a tableView
Hi,
I am trying to display a link in column of a tableview in a jsp page.
the source code is:
public void initAttachmentsModel() {
Vector colName = new Vector(2);
colName.addElement("File Name");
colName.addElement("URL");
attachmentsModel = new DefaultTableViewModel(attachmentsList, colName);
TableColumn col = attachmentsModel.getColumn("URL");
col.setType(TableColumnType.LINK);
col.setEncode(false);
But no link is displayed within the tableview.
I also tried setUserTypeCellRenderer() and still no results.
Message was edited by: Mark FinnernHi Aviad,
You can do this in two ways. Populate the value of all columns in Table Model.
<u>I Way</u>: Set the column type as Link in TableView Model.
<hbj:tableView id="myTableView"
model= "myTableViewBean.model"
design = "ALTERNATING"
headerVisible = "true"
footerVisible = "true"
fillUpEmptyRows = "true"
selectionMode = "MULTISELECT"
navigationMode = "BYLINE"
headerText = "<h3>tableView</h3>"
visibleFirstRow = "1"
visibleRowCount = "4"
onNavigate="onNavigate" >
<%
myTableView.setColumnType(TableColumnType.LINK,column no);
%>
</hbj:tableView>
<u>II Way</u> Set the column type as TableColumnType.USER and write the cell renderer.
<%
myTableView.setColumnType(TableColumnType.USER,column no);
myTableView.setUserTypeCellRenderer(new TableViewCellRenderer()); %>
In Cell Renderer "TableViewCellRenderer.java"
import com.sapportals.htmlb.*;
import com.sapportals.htmlb.rendering.IPageContext;
import com.sapportals.htmlb.table.ICellRenderer;
import com.sapportals.htmlb.table.TableView;
public class TableViewCellRenderer implements ICellRenderer {
public void renderCell(int row, int column, TableView tableView, IPageContext rendererContext) {
if (column == 1) {
Link mylink = new Link();
String linkText = tableView.getValueAt(row,
column).toString();
mylink.addText(linkText);
// Set the renderer
ddlb.render(rendererContext);
Hope this helps.
Regards,
Praveen
PS. Dont foget to award points if it is useful/solved -
BSP Tableview error when trying to bind an itab within an itab
Hello dear forum members,
I got a requirement to dynamically generate tableviews and bind them to a model's attribute (an itab 'model->gt_prd_grps' which holds the actual internal table to display as tableview 'model->gt_prd_grps-prods_table' within it). Below code would give you a correct picture.
BSP View code:
LOOP AT model->gt_prd_grps INTO ls_prd_grps.
lv_idx = sy-tabix.
CONCATENATE 'ProductsList_' ls_prd_grps-prod_group INTO lv_tableid.
CONCATENATE '//model/' 'gt_prd_grps[' lv_idx '].prods_table' INTO lv_bind_str.
CREATE OBJECT lr_tableview.
lr_tableview->id = lv_tableid.
lr_tableview->headertext = ls_prd_grps-prod_grp_desc.
lr_tableview->_table = lv_bind_str.
lr_tableview->headerVisible = 'true'.
lr_tableview->footerVisible = 'true'.
lr_tableview->filter = 'SERVER'.
lr_tableview->design = 'alternating'.
lr_tableview->sort = 'SERVER'.
lr_tableview->fillUpEmptyRows = 'false'.
lr_tableview->selectionMode = 'NONE'.
lr_tableview->iterator = lo_prdctschtb_iter.
lr_tableview->emptyTableText = 'No Products available.'.
tableview_str = lr_tableview->if_bsp_bee~render_to_string( page_context ). %>
<% lv_col_count_default = 1. lv_row_count_default = lv_row_count_default + 1. %>
<htmlb:gridLayoutCell columnIndex = "<%= lv_col_count_default %>"
rowIndex = "<%= lv_row_count_default %>"
colSpan = "3" >
<%= tableview_str %>
</htmlb:gridLayoutCell>
<% ENDLOOP. %>
I am encountering dump while trying to run the above BSP view and the error says "BSP exception: No structure component with the name "PRODS_TABLE[1].PRODUCT_ID" exists"
Actually the user would select from the tableview via a 'select' column which would be rendered as checkbox and the MVC binding would greatly reduce the effort of manually transferring the user selections to the respective model table(s).
Please suggest if the above way is possible and if so how to overcome the exception i am facing OR do i have to manually capture the tableview selection via CL_HTMLB_MANAGER=>GET_DATA.
Huge thanks in advance,
RamHi Raja,
I am getting the dump as soon as the view is called. The tableview to be displayed is indeed the nested table only and the user can select the records via the 'checkbok' column in the tableview.
Also, when i debugged, the dump occurs exactly at the below point:
tableview_str = lr_tableview->if_bsp_bee~render_to_string( page_context ).
Regards,
Ram
Edited by: Ram Mohan Venkatraman on Mar 11, 2010 12:12 PM -
Tableview tag in htmlb visible controls
hi gurus,
i am trying to create a table view using the "tableView" tag presents in the htmlb visible controls.
i am using the"help.sap.com" as reference website.i understood the details given there partially.so i couldnt complete my task.
if anybody completed these type of task please send me ur sample code for reference with the codes for jsp file,model (bean) and controller (.java file).....
regards,
tamilHi,
In JavaDeveloper role you have working examples of TableView.
I am pasting the code, incase you dont have JavaDeveloper on your server.
TableViewExample.java
import bean.TableViewBean;
import com.sapportals.htmlb.event.Event;
import com.sapportals.htmlb.event.TableNavigationEvent;
import com.sapportals.htmlb.page.DynPage;
import com.sapportals.htmlb.page.PageException;
import com.sapportals.htmlb.table.TableView;
import com.sapportals.portal.htmlb.page.JSPDynPage;
import com.sapportals.portal.htmlb.page.PageProcessorComponent;
import com.sapportals.portal.prt.component.IPortalComponentContext;
import com.sapportals.portal.prt.component.IPortalComponentProfile;
import com.sapportals.portal.prt.component.IPortalComponentRequest;
public class TableViewExample extends PageProcessorComponent {
public DynPage getPage() {
return new MyDynPage();
// JSPDynPage
public class MyDynPage extends JSPDynPage {
public TableView table;
TableViewBean myBean;
Used for user initialization. called when the application is started
public void doInitialization() {
// Get the request, context and profile from portal platform
IPortalComponentRequest request = (IPortalComponentRequest) this.getRequest();
IPortalComponentContext myContext = request.getComponentContext();
IPortalComponentProfile myProfile = myContext.getProfile();
// Initialization of bean
TableViewBean myBean = new TableViewBean();
setBeanFromProfile(myProfile, myBean);
// Put the bean into the application context
myContext.putValue("myBeanName", myBean);
Used for handling the input. Generally called each time
after doInitialization
public void doProcessAfterInput() throws PageException {
// Get the request, context and profile from portal platform
IPortalComponentRequest request = (IPortalComponentRequest) this.getRequest();
IPortalComponentContext myContext = request.getComponentContext();
IPortalComponentProfile myProfile = myContext.getProfile();
// Get the bean from application context
table = (TableView) this.getComponentByName("myTableView");
myBean = (TableViewBean) myContext.getValue("myBeanName");
setBeanFromProfile(myProfile, myBean);
myBean.setOldTableView(table);
Used for handling the output. This method is always called.
public void doProcessBeforeOutput() throws PageException {
// set the name of your JSP page
setJspName("tableview.jsp");
public void onMyOnNavigate(Event event) throws PageException {
// NAVIGATION - get the event to recover the actual position
TableNavigationEvent tne = (TableNavigationEvent) event;
// With the event we can use method getFirstVisibleRowAfter(); which gives
// us the actual position (after the event)
if (myBean != null) { // just for the first time, when there is no bean
// set the new visibleRow
myBean.setVisibleFirstRow(new Integer(tne.getFirstVisibleRowAfter()).toString());
public void onMyOnHeaderClick(Event event) throws PageException {
public void onMyOnCellClick(Event event) throws PageException {
public void onMyOnRowSelection(Event event) throws PageException {
private void setBeanFromProfile(IPortalComponentProfile myProfile, TableViewBean myBean) {
myBean.setDesign(myProfile.getProperty("design"));
myBean.setHeaderVisible(myProfile.getProperty("headerVisible"));
myBean.setFooterVisible(myProfile.getProperty("footerVisible"));
myBean.setFillUpEmptyRows(myProfile.getProperty("fillUpEmptyRows"));
myBean.setNavigationMode(myProfile.getProperty("navigationMode"));
myBean.setSelectionMode(myProfile.getProperty("selectionMode"));
myBean.setHeaderText(myProfile.getProperty("headerText"));
myBean.setVisibleFirstRow(myProfile.getProperty("visibleFirstRow"));
myBean.setVisibleRowCount(myProfile.getProperty("visibleRowCount"));
myBean.setRowCount(myProfile.getProperty("rowCount"));
myBean.setTableWidth(myProfile.getProperty("width"));
D:\usr\sap\J2E\JC00\j2ee\cluster\server0\apps\sap.com\irj\servlet_jsp\irj\root\WEB-INF\portal\portalapps\com.sap.pct.pdk.htmlbcontrols\pagelet\tableview.jsp
<%--- TableView.jsp --%>
<%@ taglib uri= "tagLib" prefix="hbj" %>
<%--- Get the Bean named myBeanName from the application context --%>
<jsp:useBean id="myBeanName" scope="application" class="bean.TableViewBean" />
<hbj:content id="myContext" >
<hbj:page title="Template for a portal component">
<hbj:form id="myFormId">
<hbj:tableView
id="myTableView"
model="myBeanName.model"
design="<%=myBeanName.getDesign() %>"
headerVisible="<%=myBeanName.isHeaderVisible() %>"
footerVisible="<%=myBeanName.isFooterVisible() %>"
fillUpEmptyRows="<%=myBeanName.isFillUpEmptyRows() %>"
navigationMode="<%=myBeanName.getNavigationMode() %>"
selectionMode="<%=myBeanName.getSelectionMode() %>"
headerText="<%=myBeanName.getHeaderText() %>"
visibleFirstRow="<%=myBeanName.getVisibleFirstRow() %>"
visibleRowCount="<%=myBeanName.getVisibleRowCount() %>"
rowCount="<%=myBeanName.getRowCount() %>"
width="<%=myBeanName.getTableWidth() %>"
onNavigate="myOnNavigate">
<% myTableView.setOnHeaderClick("myOnHeaderClick");
myTableView.setOnCellClick(1,"myOnCellClick");
myTableView.useRowSelection(myBeanName.getOldTableView());
myTableView.setOnRowSelection("myOnRowSelection"); %>
</hbj:tableView>
</hbj:form>
</hbj:page>
</hbj:content>
TableViewBean.java
package bean;
import com.sapportals.htmlb.table.DefaultTableViewModel;
import com.sapportals.htmlb.table.TableColumn;
import com.sapportals.htmlb.table.TableView;
// Bean for dataexchange between DynPage and JSP
public class TableViewBean {
public String design;
public String headerVisible;
public String footerVisible;
public String fillUpEmptyRows;
public String navigationMode;
public String selectionMode;
public String headerText;
public String visibleFirstRow;
public String visibleRowCount;
public String rowCount;
public String tableWidth;
public DefaultTableViewModel model;
private TableView oldtableview;
public TableView getOldTableView() {
return this.oldtableview;
public void setOldTableView(TableView table) {
this.oldtableview = table;
public DefaultTableViewModel getModel() {
return model;
public void setModel(DefaultTableViewModel model) {
this.model = model;
public String getDesign() {
return design;
public void setDesign(String design) {
this.design = design;
public String isHeaderVisible() {
return headerVisible;
public void setHeaderVisible(String headerVisible) {
this.headerVisible = headerVisible;
public String isFooterVisible() {
return footerVisible;
public void setFooterVisible(String footerVisible) {
this.footerVisible = footerVisible;
public String isFillUpEmptyRows() {
return fillUpEmptyRows;
public void setFillUpEmptyRows(String fillUpEmptyRows) {
this.fillUpEmptyRows = fillUpEmptyRows;
public String getNavigationMode() {
return navigationMode;
public void setNavigationMode(String navigationMode) {
this.navigationMode = navigationMode;
public String getSelectionMode() {
return selectionMode;
public void setSelectionMode(String selectionMode) {
this.selectionMode = selectionMode;
public String getHeaderText() {
return headerText;
public void setHeaderText(String headerText) {
this.headerText = headerText;
public String getVisibleFirstRow() {
return visibleFirstRow;
public void setVisibleFirstRow(String visibleFirstRow) {
this.visibleFirstRow = visibleFirstRow;
public String getVisibleRowCount() {
return visibleRowCount;
public void setVisibleRowCount(String visibleRowCount) {
this.visibleRowCount = visibleRowCount;
public String getRowCount() {
return rowCount;
public void setRowCount(String rowCount) {
this.rowCount = rowCount;
public String getTableWidth() {
return tableWidth;
public void setTableWidth(String tableWidth) {
this.tableWidth = tableWidth;
public TableViewBean() {
String[][] data = createData();
// get a new array for the titles
String[] colNames = {"LASTNAME", "FIRSTNAME", "STREET", "ZIP", "CITY"};
// set titles
/// By default the title also defines the column name - we use both methods to create a
/// proper title and a column name that is better to work with. You should omit
/// blanks or other special characters in the column name.
/// The column name is important later (Part 2) to retrieve data from the tableView
model = new DefaultTableViewModel(data, colNames);
model.setKeyColumn(1);
// To set the cell event we have to get the column and set the setOnCellClick
// for every column.
// Get the column with the specified column name.
TableColumn column = model.getColumn("LASTNAME");
// Set the event.
column.setOnCellClick("onMyOnCellClick"); // set the TableCellClickEvent
column.setTitle("Last Name");
// Repeat that with the other column. Every cell can have its own onCellClick
// method names of course. We use the same event method for all cells.
column = model.getColumn("FIRSTNAME");
column.setOnCellClick("onMyOnCellClick"); // set the TableCellClickEvent
column.setTitle("First Name");
column = model.getColumn("STREET");
column.setOnCellClick("onMyOnCellClick"); // set the TableCellClickEvent
column.setTitle("Street");
column = model.getColumn("ZIP");
column.setOnCellClick("onMyOnCellClick"); // set the TableCellClickEvent
column.setTitle("ZIP - Code");
column = model.getColumn("CITY");
column.setOnCellClick("onMyOnCellClick"); // set the TableCellClickEvent
column.setTitle("City");
private String[][] createData() {
// just a simple way to produce data, not real life indeed
String[][] retVal = {
{"Backer", "Melissa", "528 34th Ave", "94121", "San Francisco"},
{"Hamilton", "Ann", "4752 17th St", "94117", "San Francisco"},
{"Hudson", "Bree", "16 Hudson Ct", "94124", "San Francisco"},
{"Watson", "David", "168 Cervantes Blvd", "94123", "San Francisco"},
{"Eastwood", "Kenneth", "3367 Troy Dr", "90068", "Los Angeles"},
{"Peter", "Smith", "524 Arvin St", "93308", "Bakersfield"},
{"Antony", "Miller", "10430 Wilshire Blvd", "90024", "Los Angeles"},
{"Moore", "Roger", "1815 W 82d", "90001", "Los Angeles"},
{"Jackson", "Michael", "3450 Sawtelle Blvd", "90066", "Los Angeles"}
return retVal;
Greetings,
Praveen Gudapati
[Points are always welcome for helpful answers]
Maybe you are looking for
-
I would like to use an Airport to share a HD on my wireless network. Is it possible to access the shared HD from the internet (ie. while away from home and not logged into the network)? If so, it the ability to do this a function of the router or the
-
Mail accounts - how to make IMAP
I have a Gmail account that I want to access with Apple Mail, and it can be accessed as a POP or an IMAP server. Iwish to use imap. But the account creation process gives me no choice, and makes it a POP account. How can I create an email account in
-
Display an error and cancel the job in F110
Hi all. I use a BTE's to check some data in F110 transaction. I want to display some error and abort the proposal creation JOB. I can to abort the Proposal creation JOB with RAISE_EXCEPTION command, but I cannot display the error. how I can to displa
-
What can I do to make IE detect my Shockwave?
So, first of all, this is my first time posting here. Thank you all in advance for reading this. I've read through all the troubleshooting pages on Adobe's site but can't seem to work my way around this. I do have Adobe Shockwave (not Flash) installe
-
Base Photoshop version (4.0) won't lod on 64 bit computer
I first bought Photoshop 4.0 many years ago. Upgraded to 6.0 and finally CS2. I want to load Photoshop on my new computer but it won't accept the 4.0 full version. What does Adobe offer its long term customers in this case? Thanks Kurt Schoelman