Creator Tip: Adding components to dynamically created table
I saw some query in the Sun Java Studio Creator forum about adding components dynamically to a Table component if the table itself is dynamically created. I've already blogged on how to dynamically create a Table component. Read about how to add a Button component to the dynamic table at
http://winstonprakash.com/articles/jsf/dynamic_table2
Posted at 02:22PM May 06, 2006 | Permanent link to this entry
Posted by Joel Fradkin on June 01, 2006 at 11:45 AM PDT #
Posted by Ismael Sanchez on June 16, 2006 at 01:38 AM PDT #
Posted by 192.18.43.249 on June 16, 2006 at 06:59 AM PDT #
Posted by Sudiyanto on September 21, 2006 at 12:19 AM PDT #
tableColumn1.setStyle(String.valueOf(getValue("#{page1.columnStyle}")));and this is the method binded:
public String getColumnStyle(){ TableRowDataProvider trdp = (TableRowDataProvider) getBean("currentRow"); RowKey rowKey = trdp.getTableRow(); System.out.println(rowKey); if ((Integer.parseInt(rowKey.getRowId()) % 2) == 0){ return " "; } else { return "background-color: #eeeeee"; } }Thanks in advance.Posted by Sudiyanto on September 21, 2006 at 12:25 AM PDT #
Posted by Kapsalis Nikos on September 28, 2006 at 09:35 AM PDT #
Posted by Kapsalis Nikos on September 28, 2006 at 09:35 AM PDT #
Posted by Abdul ghani on June 07, 2007 at 12:06 AM PDT #
Posted by Mohammed Rizwan on June 12, 2007 at 10:25 PM PDT #
Posted by Waseem Kayani on July 28, 2007 at 05:22 AM PDT #
Hello Winston,
I am tired, Please give me some suggections.
I am using studio creator 2 update 1 and mysql.
I created a Dynamic table for Emp Names and Emp Skills, in that table for Emp Skills i put Text Feild.I am getting text feild in my table.
here is my doubt
I am trying to implement the functionality of editing table cells when clicked/doubleclicked on it. I am trying to make the cells editable(textboxes) only after clicking/double clicking them. It should display static text otherwise.
I am trying to do this one in Javascript onClick event.
Any sample code I can refer to.Help me.
Thanks in advance,
Jose
Posted by jose on August 21, 2007 at 11:35 PM PDT #
Hi Jose, unfortunately this kind of direct support is not there in Java Studio Creator components. However, the new woodstock components included in VWP (NB 6.0) has such support.
Posted by Winston Prakash on August 22, 2007 at 09:50 PM PDT #
Hello winston,
I am trying to get Text feild in my dynamic table in studio creator 2 update 1.
please look at the below link and tell me how to implement javascript in jsc 2 update 1.
http://iharder.sourceforge.net/current/misc/inlineeditor/index.html
Please tell me what are the changes i have to do in that havascript page.
i thing it may work, please help me to do this.
Regards,
Jose.p
Posted by jose on August 29, 2007 at 03:10 AM PDT #
Hi Prakash,
I am not sure whether this is the right place to post my requirement. Here is the requirement.
I have a table which has 3 columns (2 columns contain database data - one is a staticText component and the other is textfield component) and the 3rd column is a buttton(with value "Save"). Now when I click on the save button in one of the rows, That particular row's button's text should change to "Update" and that row's second column should change from textfield component to static text. Please let me know whether this is possible and how?
Thanks a lot,
Srinivas
Posted by Srinivas on November 16, 2007 at 10:32 AM PST #
I am developing a test engin with netbean 6.0. using visual web included with the ide.
I binded some labels to database columns that represent the question. I used the code clip
TableRowDataProvider.cursorNext(). It only retrieved my first row that come with page load, and second one when I click the button. There are more than two records in the database. How can i make it to retrieve everything (each every time I click the button)?
Here is my sample code:
public String button1_action() {// Next Row in DB Rowset
try {
boolean cursorNext = questionsDataProvider.cursorNext();*/
} catch (Exception ex) {
throw new FacesException(ex);
}
return null;
Posted by Ogunfunminiyi Frankfurt on February 29, 2008 at 07:01 AM PST #
Hi Ogunfunminiyi, What I would suggest you is to create the List of objects of your questions from the database once in the session bean. In your pages access that list from the session bean, rather than retrieving the questions from the database for each click.
Posted by Winston Prakash on March 03, 2008 at 07:58 AM PST #
Hello Jose P., I would strongly recommend you to move Netbeans 6.0.1 and use the visual web. It comes wit state of the art Woodstock components which supports client side JavaScript rendering which would allow you to do stuff as in http://iharder.sourceforge.net/current/misc/inlineeditor/index.html
Posted by Winston Prakash on March 03, 2008 at 08:01 AM PST #
http://www.batteryfast.co.uk/sony/vgp-bpl2c.htm sony vgp-bpl2c battery,
http://www.batteryfast.co.uk/sony/vgp-bps2.htm sony vgp-bps2 battery,
http://www.batteryfast.co.uk/sony/pcga-bp2t.htm sony pcga-bp2t battery,
Posted by laptop battery on October 23, 2008 at 11:57 PM PDT #