NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Visual Web Project (Woodstock) Table

 
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users
View previous topic :: View next topic  
Author Message
ouribeb930



Joined: 01 Apr 2009
Posts: 93

PostPosted: Fri May 29, 2009 8:34 am    Post subject: Visual Web Project (Woodstock) Table Reply with quote

Thanks in advance

I got a lot of questions about Visual Web Project (Woodstock)... But today I got this one:

I need a Table with some caracteristics, I neet to filter the info that should be viewed, but I need it in the table, I mean, I need a row in the top of the table, the first row, and all the row data after this row; All the columns of the first row, will filter the info with "AND", and this row columns can be edited and cleared.

Like the image.

Is this posible, can sombody tellme how or referme to an example?

Please help

Thanks!!


Last edited by ouribeb930 on Sun Sep 12, 2010 9:37 pm; edited 1 time in total
Back to top
tcesenthil



Joined: 07 Aug 2009
Posts: 2

PostPosted: Fri Aug 07, 2009 8:25 pm    Post subject: Reply with quote

Hi,
Did you arrive upon any solution ?



Cheers,
Senthil
Back to top
ouribeb930



Joined: 01 Apr 2009
Posts: 93

PostPosted: Sat Aug 08, 2009 3:56 pm    Post subject: Sorry Reply with quote

Sorry but no... I coudlnt find any solution
Back to top
mnbvmnbv



Joined: 13 Oct 2009
Posts: 1

PostPosted: Tue Oct 13, 2009 8:24 am    Post subject: Reply with quote

Excuseme, do you know how can i get one value from one cell in Woodstock Table.

I explain:

I have the first column with the name of students and i have one second column with textFields and i want this value when i click in some button.

Obiously , its a dynamic table...
I dont know how can i get the value for one cell...

thanks
Back to top
Futaleufu_John
Posted via mailing list.





PostPosted: Tue Oct 13, 2009 5:45 pm    Post subject: Visual Web Project (Woodstock) Table Reply with quote

The following discussion assumes the button you refer to is also in the
table. In addition, it also assumes the table is data bound.

An important question to be answered: Are you using Hibernate (or other
persistence architecture such as JPA) or directly querying the database? I
will assume you are using JPA (which is what I use in my projects).

Let's call the Table component myTable, the Table's RowGroup component
myRowGroup, and the button component myButton. Let's also assume the table
is populated with an ObjectArrayDataProvider called studentsOADP. The data
provider points to an array of entities called myStudent. myStudent has two
fields - studentName and studentInfo.

Add a binding attribute for myRowGroup. (Right-click on the RowGroup
component and select Add Binding Attribute.)

Right-click on the button and select Edit Action Event Handler.

Here's the action handler:

public String myButton_action() {

// Get's row key of selected row
RowKey rowKey = myRowGroup.getRowKey();

// Get student name and info from selected row.
String name = (String)studentsOADP.getValue("studentName", rowKey);
String info = (String)studentsOADP.getValue("studentInfo", rowKey);
}


That's all there is to it. Creating the table, defining the data provider,
and binding the data provider to the table's columns are the hard parts.
Once that's done, getting the information out is easy.


mnbvmnbv wrote:
Quote:

I have the first column with the name of students and i have one second
column with textFields and i want this value when i click in some button.

I dont know how can i get the value for one cell...



-----
Any ads or links to ads that appear in this post are not endorsed nor
recommended by this poster.
--
View this message in context: http://www.nabble.com/Visual-Web-Project-%28Woodstock%29-Table-tp25869167p25877546.html
Sent from the Netbeans - J2EE mailing list archive at Nabble.com.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo