Showing posts with label name. Show all posts
Showing posts with label name. Show all posts
Thursday, September 7, 2017
SUSECon 2016 Coding in the Name of Rage Against the Machine Parody
SUSECon 2016 Coding in the Name of Rage Against the Machine Parody

I ragazzi di SUSE hanno deciso di deliziarci con una nuova canzone parodia che va ad affiancarsi a Dopo Cant Stop the SUSE di cui vi ho parlato laltro giorno.
La nuova canzone parodia � Coding in the Name of cover parodia della famosissima "Killing in the Name" de Rage Against the Machine.
download file now
Sunday, August 6, 2017
Struts Error Exception No getter method available for property name for bean under name
Struts Error Exception No getter method available for property name for bean under name
Recently I was using Struts v1.x and I needed to display a select list. The information about how to use the html:optionsCollection tag was sketchy. I was able to get the tag working this way:
On the JSP page, I added this inside the html:form tag:
<html:select property="selectedEquipment"> <html:optionsCollection property="equipment" label="name" value="id"/> </html:select>
Then I create a Java class called SelectOption like this:
package com.codebits.struts; public class SelectOption { String id; String name; SelectOption() { } SelectOption(final String _id, final String _name) { setId(_id); setName(_name); } public String getId() { return id; } public void setId(String id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } } Next I created an ActionForm bean:
package com.codebits.struts; public class AddForm extends ActionForm { private Integer selectedEquipment = null; private List equipment = new ArrayList(); public Integer getSelectedEquipment() { return selectedEquipment; } public void setSelectedEquipment(Integer selectedEquipment) { this.selectedEquipment = selectedEquipment; } public List getEquipment() { return equipment; } public void addEquipment(final String equipmentId, final String emtEquipmentId) { this.equipment.add(new SelectOption(equipmentId, emtEquipmentId)); } public void setEquipment(List equipment) { this.equipment = equipment; } } And finally, in my action class, I prepopulated the ActionForm bean:
AddForm addForm = (AddForm)form; addForm.addEquipment("1", "AAA"); addForm.addEquipment("2", "BBBB"); download file now
Subscribe to:
Posts (Atom)