Horizontal scroll in webdynpro java table
Hello,
I have a webdynpro java application in which i have a table with 15 columns. I have set the scrollableColCount property of the table to 5.
Now on click of some link(LinkToAction), i want to scroll horizontally to column 8. Can i do this from the program?
Please help me with the code.
Thank you,
Navya
Dear navya,
IWDTable table = (IWDTable)view.getElement("TableName");
table.setFirstVisibleScrollableCol("columID");
here table name is your tablename , and columnID is your 8th Coulmn name
what you can do is create an attribute of type IWDTable in context , and set your table id to it in view
wdDoModifyView() method
if(firstTime)
wdContext.current**********Element().set******TablelID((IWDTable)view.getElement("TableName"));
onActionLink() // which is binded to your linktoAction UI Element
wdContext.current**********Element().get******TablelID.setFirstVisibleScrollableCol("columID");
Regards
Govardan
Similar Messages
-
How to get the Horizontal Scroll Bar for a Table?
Hi All,
As per my requirement, I am displaying several records in a Screen in a Tabular Format. But here I have to show 21 Columns in that table which is too high. I am able to display it but due to it I am getting a Horizontal scroll bar for the whole screen since all the columns are not getting displayed in the normal window screen space. But its looking too odd since once I am scrolling it to right the columns are getting displayed but the above Header Bar and Global buttons are not displaying, they are bound to the normal screen space.
Is there a way to have a Horizontal scroll bar only for that table instead of the entire screen so that on scrolling that bar only the table rows will beshifted ant got displayed?
With Thanks
Kumar Gautamtry this approach.
include a raw text item before and table item.
include the appropriate HTML tags in raw text item to enable horizontal scroll
--Prasanna -
Webdynpro java table didn't working correct on Blackberry mobile simulator
Hello,
I am using BlackBerry Simulator 9630 the application developed using webdynpro java AS 7.00 sp 17
In the table I am using check box to select rows.
but when the application rendered the table , using button to select / de-select rows, I can't see the result on the context node
(It is mark as selected on the simulator).
I also can't get the lead selection when using link to action event from the table.
I am using full domain name and also sap-wd-client = WmlClient.
Thanks in advance for the help.
NirHi Nir,
This parameter (WmlClient) generates an output wml. Default this output is no longer used or recommended. Opt for the Blackberry OS 5.x and do not use render parameters, or try with the parameter Pie03Client.
regards,
Angelo -
Hi Unable to see any horizontal scroll bar on tree table
Hi my tree table is in this format
<af:treeTable rowBandingInterval="0" columnStretching="last"
horizontalGridVisible="false"
verticalGridVisible="false"
inlineStyle="text-align:center; background-color:White;height:220px;"
value="#{C2SearchBean.treeModel}" var="node2"
initiallyExpanded="false" contentDelivery="lazy"
id="ProductCharcTreeId"
width="189px">
i was not able to see the horizontal scroll bat can you please help me out.surround your treeTable with a panleCollection, or place it in a component that will stretch it like in the center facet of a panelStretchLayout.
-
Scrollable bar in webdynpro java tables
Hi All,
Is it possible to have a vertical scroll bar in tables? i have used the scrollable container UI element,and increased the table row visiblity as 20 still i'm not getting the scroll bar.
Can anybody help on this?
Regards,
V KarthiHi karthi,
Refer the thread.
Vertical Scroll Bar in Table
Vertical scroll bar for the table
Regards,
Sri
Edited by: Srikanth Thatipally on Jul 7, 2009 2:09 PM -
Urgent!!!!Add a Horizontal Scroll Bar for Table Control
Hi Experts,
I want to have a Horizontal Scroll Bar on my Table control.
I tried with few properties for the Table UI Element but not able to solve it.
If any one who had already done this please help me out.
Thanks in advance..
Regards, Kishore KHI Koen,
Thanks for early Reply.
When I use this I get
Page Down ( ->!!, Arrown with lines pointing Down)
Page UP
Page Top ( ->, Arrown with lines pointing Top)
Page Down ( ->, Arrown with lines pointing Down)
But I need only Page top and Page down for this Table UI .
I think my question is clear enough.
Please let me know this also.
Thanks & Regards,
Kishore K -
Hello!
I have a JTable inside a JScrollPane when the table has horizontal scroll it looks strange. When the user clicks in arrows of horizontal scroll the headers of table don't follow the scroll.
What am I doing wrong?
Thanks,
PatiThat's my code
import java.awt.Dimension;
import javax.swing.JFrame;
import javax.swing.JScrollPane;
import javax.swing.JTable;
public class Teste extends JFrame{
public Teste()
this.setSize(320,270);
JTable table = new JTable(10,15);
JScrollPane scroll = new JScrollPane(table, JScrollPane.VERTICAL_SCROLLBAR_NEVER, JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
table.getColumnModel().getColumn(0).setPreferredWidth(150);
table.getTableHeader().setPreferredSize(new Dimension(150,15));
table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
scroll.setBounds(10,10,300,250);
this.getContentPane().add(scroll);
this.setVisible(true);
public static void main(String args[]){
Teste obj = new Teste();
The problem is in line:
table.getTableHeader().setPreferredSize(new Dimension(150,15));
When I remove it, the table works well. -
Horizontal scroll bar for the adf page
Hi,
We have around 7 tables in single jsff page. Here , we have a requirement like :
We need to show horizontal scroll bar for the entire page instead of each table. Is there any way to get this.
As of now, we have horizontal scroll bar for each table, but our customer is not accepting this, that want the scroll bar for the entire page.
Please suggest the approach.
ThanksI have grouped all the tables in panelgrouplayout.So, what is the problem (because it is not quite clear what you need)?
If your PanelGroupLayout is with layout="horizontal", then the tables will be rendered next to each other horizontally but there will be no horizontal scrollbar on the page.
If your PanelGroupLayout is with layout="scroll", then the tables will be next to each other vertically and there will be a horizontal and a vertical scrollbar on the page (if necessary).
If you need your tables to be relocated next to each other horizontally and to have a horizontal scrollbar on the page, then use a PanelGroupLayouts(horizontal) inside a PanelGroupLayout(scroll):
<af:panelGroupLayout layout="scroll">
<af:panelGroupLayout layout="horizontal">
<af:table> ... </af:table>
<af:table> ... </af:table>
<af:table> ... </af:table>
</af:panelGroupLayout>
</af:panelGroupLayout>If your problem is that you still have horizontal scrollbars inside the tables, then you should set appropriate widths to the corresponding tables (e.g. to <af:table> tags) such that they are large enough to fit the sum of corresponding column widths.
ya, I know that its not god design, but its customer requirement, so we need to do that.If you expect some table(s) to be stretched automatically according to the size of browser's window, then you should re-think your UI design because PanelGroupLayouts do not stretch their children. A possible solution is to use a combination of PanelSplitters or other layout containers that stretch their children.
Dimitar -
Delete the Record in Webdynpro java
Hi Gurus
I had one issue in webdynpro java , I need to delete row in Table if I delete the row in webdynpro java table at the same time the row it needs to delete in Back end table also .
We are useing NWDS 7.2 and we are using Adaptive Web Service model for to consume function module
Guys it's a urgent requirement for me please share your knowledge
ThanksHi
ABAPERS already they given one funtion module , for that in back end they written a querry for to delete the record ,
So now I want to Import that Adaptive webservice into webdynpro java , I will create a button in webdynpro java for Delete
here what code I neeed to mention , If I Delete the record in Table it has to delete in the backend also.
Guys please share your ideas
Thanks
Sony -
How to add table in SAP Non interactive forms in webdynpro java
Hi Experts,
I have a requirement in webdynpro java.I have a print button.On clicking print button a pdf will be opened.
This pdf will have data from the webdynpro view.I want to know how to add table in the adobe pdf.The webdynpro view will have many rows of table(rows will keep changing as per the size of the data output).How to send this data to adobe.How do we bind the node to the table in the adobe.How to automatically
Please suggest.
Thanks,
Rajani
Edited by: Rajani Nandagiri on Dec 26, 2008 8:58 AMRajani,
Take a look at below links, it will help you.
[Handling Dynamic Length Tables in Adobe Forms|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e0859ad1-53aa-2a10-78ae-99e41c407669]
[Integrate tables & Images in Adobe Web Dynpro|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/user-interface-technology/wd%20java/wdjava%20archive/dynamic%20non-interactive%20pdf%20form.pdf]
[How to Handle Table Input and Output|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/user-interface-technology/wd%20java/7.0/adobe/how%20to%20handle%20table%20input%20and%20output.pdf]
[How Tou2026deal with Table input and display in Interactive Forms|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/00c4041d-188d-2910-6ea2-b4d5155f56e0]
Chintan -
Dynamic table in Webdynpro Java
Hi Colleagues,
I need to develop a table dynamically in webdynpro(Java), the table should not contain scrollbar, header, lines and border...Actual requirement is to group 12 elements in the from of a table
could anyone please help me here?
Thanks & Regards
SwethaHi Armin,
In a window i have to develop a part of window which looks like this
Image URL Description
Image URL Description
Image URL Description
Image URL Description
I have tried doing this using Flow layout for each line
But when i follwed that the last column "description" is not alligned in a straight line(for all rows)
structure is not even as shown above
(varying depending upon the length of the URL)
Here i have attached the piece of code i used
IWDTransparentContainer MainContainer1 = (IWDTransparentContainer)view.createElement(IWDTransparentContainer.class);
IWDFlowLayout flowlayout1 = (IWDFlowLayout)MainContainer1.createLayout(IWDFlowLayout.class);
////For adding Image
IWDImage image = (IWDImage)view.createElement(IWDImage.class);
image.createLayoutData(IWDFlowData.class);
image.setSource("~sapicons/s_b_alet.gif");
/////for Adding URL
IWDLinkToAction link1 = (IWDLinkToAction)view.createElement(IWDLinkToAction.class);
IWDTextAccessor link1text = wdComponentAPI.getTextAccessor();
link1.setText("Collaboration Window");
IWDAction Action1 = (IWDAction)view.getAction("Openlink");
link1.setOnAction(Action1);
IWDFlowData linkdata1 = link1.createLayoutData(IWDFlowData.class);
WDLayoutCellDesign rightpad = WDLayoutCellDesign.R_PAD;
WDLayoutCellSeparator seperator = WDLayoutCellSeparator.LARGE;
linkdata1.setCellDesign(rightpad);
linkdata1.setVGutter(seperator);
///for adding description
IWDTextView text1 = (IWDTextView)view.createElement(IWDTextView.class);
text1.setText("Testing");
IWDFlowData textdata1 = text1.createLayoutData(IWDFlowData.class);
textdata1.setCellDesign(rightpad);
textdata1.setVGutter(seperator);
MainContainer1.addChild(image);
MainContainer1.addChild(link1);
MainContainer1.addChild(text1);
IWDGridData maincont1 = MainContainer1.createLayoutData(IWDGridData.class);
maincont1.setPaddingLeft("10px");
maincont1.setPaddingTop("20px");
I found that this static way of adding rows is not the right way( Keeping in mind the future enhancements)
So thought of trying it through table
i have used IWDtable ...but the look does'nt meets the requirement at all(it has header....border..scrollbar..rows and colums are seperated by lines---> which are not needed)
Could you please let me know is there a approach to do this?
Thanks & Regards
Swetha
Edited by: Swetha Nellore on Feb 18, 2009 12:32 PM
Edited by: Swetha Nellore on Feb 18, 2009 12:33 PM
Edited by: Swetha Nellore on Feb 18, 2009 12:34 PM -
Build gui for existing oracle database tables with webdynpro java?
hi
i want to build a GUI to maintain existing oracle tables
so far we used oracleFORMS to do so
is there a good approach for webdynpro java? or do you recommend other sap tools?
can we generate the gui with a wizard based on the fields in the table?
do we have to generate sql statements or type in manually?
regards
joergHi Joerg,
generally that is possible, but you'll have to implement the data access by yourself, by means of EJB or another Java persistance framework such as JDO, SQLMaps, Hibernate, whatever...
Web Dynpro allows to build a GUI based upon a model - in this case this could be some POJOs (DTOs) representing your database tables, which are communicated to the GUI by your data access layer. Consider a model as a simple Java bean representing database data.
This approach would require to build a data access layer which incorporates manually generated sql statements, so you'll have to have expert database and java knowledge.
There might be other approaches, this is just to demonstrate one working possibility.
regards,
Christian -
Table ui element in webdynpro java.
Hi Friends,
I am krishna i am working as sap webdynpro abap consultant . But right now i got the requirement on sap webdynpro java.
so please give me the required details.
Here are my questions.
1. how to populate the data into the table.
2. and the back end is erp, i have to use rfc. to display the data into the table .
3. so how to integrate the rfc into webdynpro java.
if u send with screen shots that would be very help for me.
Waiting for your reply.
Thanks & Regards.
Krishna.It's very simple.
1) Import your RFC.
For this:
-Right click on Models->Create Model->Select Import Adaptaive RFC then follow the steps.
-Go to Used Models. Right click -> Add... -> then select the model that you created.
2) I guess you have a view that is using a controller (Custom/Component) so:
-Go to Context Tab-
-Create a model node.
-Bind the model node with the model that you created.
-Go to the view where you want to put the Table ui element and add the table (Outline window->right click->Insert Child->Table)
-Go to context tab, add a model node, en map it (Edit context mapping) with the model node that you created in the controller.
-Go back to layout tab. Then in table properties, in datasource click on the "..." and select the output node of the model that you have created in the view.
-Then in Outline Window-> Right click on the table element-> Create binding-> check the attributes that you want to be binded to the table.
-Then follow the steps.
You have now your table binded to the rfc.
Finally what you have to do is to create a method to execute the rfc. Usually it is written in the controller. Something like this:
public void execute<YourBapiName>( )
//@@begin execute<YourBapiName>()
IWDMessageManager manager = wdComponentAPI.getMessageManager();
try
wdContext.current<YourBapiName>Element().modelObject().execute();
wdContext.node<YourBapiOutputNode>().invalidate();
wdContext.current<YourBapiName>Element().modelObject().modelInstance().disconnectIfAlive();
catch(WDDynamicRFCExecuteException e)
manager.reportException(e.getMessage(), false);
//@@end
To call this method, first, you have to bind the input parameters and then execute it (you can do this wherever you want):
<YourBapiName> input = new <YourBapiName>();
input.set<YourBapiParameters>(<YourParameter>);
wdContext.current<YourBapiName>Element.bind(input);
wdThis.wdGet<YourControllerName>(Controller().execute <YourBapiName>();
I hope it helps.
Bye bye. -
How to insert a button on the column header of a table in webdynpro java
Hi
Can anyone tell me how to insert a button on the column header of a table in webdynpro java?
regards
sunitHi sunit,
Instead of adding button in the column header , in the column
add a fixed top cell.
right click on the column
Insert FixedTopCell
Right click on the fixedTopCell
insert Editor.
select button.
then button will be only in the top most row.
Hope it will satisfy ur requirement
Regards
Smitha -
Binding and displaying data to table in webdynpro java
hi all,
i want to know how to bind the output values to table in webdynpro java.
i know how to bind values in context to table,but if we want to display the values from database(back end ) and display in table present in the view.
eg: i have table in view and want to get values from backend(SQL server) and display it in that table.
plz help me to know ..
thanks
sirishaHi Saisirisha,
Try this.
1> Take a Value Node(Employee) cardinality 0..n.
Employee Structure
Employee
|------Surname(Attribute)
|------FirstName(Attribute)
|------Category(Attribute)
2> Bind this value node(Employee) in the View datasource of table.
3> Try the code inside wdDoInit method.
try {
// Load the JDBC-ODBC bridge
Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver");
// specify the ODBC data source's URL
String url = "jdbc:odbc:SSPer";
// connect
Connection con = DriverManager.getConnection(url,"North","Ken");
// create and execute a SELECT
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery
("SELECT Surname,FirstName,Category FROM Per");
while (rs.next()) {
// get current row values
String Surname = rs.getString(1);
String FirstName = rs.getString(2);
int Category = rs.getInt(3);
//create table row and add the value in the table
IPrivate<Put View Name>.IEmployeeElement empElm = wdContext.createEmployeeElement();
empElm.setSurname(Surname);
empElm.setFirstName(FirstName);
empElm.setCategory(Category);
wdContext.nodeEmployee().addElement(empElm);
// close statement and connection
stmt.close();
con.close();
} catch (java.lang.Exception ex) {
wdComponentAPI.getMessageManager().reportException("Exception : "ex.getMessage()+,true);
http://www.developer.com/java/data/article.php/3417381
Regards,
Mithu
Maybe you are looking for
-
PDF visibility issue in Firefox and Safari on Windows
Hi Guys, I am using iframe to embed pdf in html:- <iframe visible="true" id="ipdf" src="pdf/filename.pdf" height="600" width="665" runat="server" frameborder="0" scrolling="auto" allowtransparency="true"> </iframe> My problem is in some browsers it a
-
Linksys PCI cards and WLC problems
/* Style Definitions */ table.MsoNormalTable {mso-style-name:Standardowy; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm
-
Hello. Using JDeveloper 11.1.2.3 ADF Essentials - Glassfish 3.1 I'm trying to use FORM type (web.xml) security in my adf essentials application. I created a login.jspx page, but I don't know how can I call the j_security_check from my page because th
-
Pass a string in Oracle Procedure
Hi, I have a procedure and i want to pass 1,2 as a single parameter and inside the procedure I will check where product in (parameter ) Pls help Thanks Regards Amit
-
Hey I am going to set up my car so that it will play my Zen Touch. Currently I am planning on using the Belkin Tunecast II as an FM transmitter but I haven't found a power cord that will plug into my cigarette lighter. Anyone out there that has done