No words wasted! Getting to the point about the work I do, the problems I deal with, and some links to posts about where I work.
Translate
Saturday, January 28, 2012
Struts 2 - Dynamic Map Key
To get a value from a map that is in our action class declared as:
private HashMap<String, String> Values;
with a getter decalred as:
public String getValue(String key) {
return Values.get(key);
}
with a key declared as:
private String keyName;
In the JSP, call the getter like this:
<s:property value="%{getValue(keyName)}"/>
private HashMap<String, String> Values;
with a getter decalred as:
public String getValue(String key) {
return Values.get(key);
}
with a key declared as:
private String keyName;
In the JSP, call the getter like this:
<s:property value="%{getValue(keyName)}"/>
Monday, January 23, 2012
Windows - Making A Slideshow
I made this slideshow using Photo Story 3 and this Prism. Photo Story 3 isn't overloaded with features, making it very easy to use.
Saturday, January 21, 2012
MyBatis Dynamic Table Name
There may be times when you need to dynamically specify the name of the table you're accessing. In my case I have a few look-up tables with the same structure. I did it like this:
<select id="getKeyValue" resultMap="KeyValueMap" parameterType="java.lang.String">
select ID, Value from ${value}
</select>
The only parameter is the name of the table. You can see another nice example at Dynamic MyBatis.
<select id="getKeyValue" resultMap="KeyValueMap" parameterType="java.lang.String">
select ID, Value from ${value}
</select>
The only parameter is the name of the table. You can see another nice example at Dynamic MyBatis.
Monday, January 16, 2012
MS SQL Import Truncation Error
I was having a problem importing an Excel spreadsheet into SQL Server that I just couldn't figure out.
After many attempts I decided to try importing into MS Access. It worked and it showed me where the errors are!
After fixing the errors I imported the Access table into SQL Server.
After many attempts I decided to try importing into MS Access. It worked and it showed me where the errors are!
After fixing the errors I imported the Access table into SQL Server.
Saturday, January 14, 2012
SharePoint 2010 - Mapping missing LDAP atrributes
Ran into a problem when I was adding user properties for the user profile in SharePoint 2010. Followed the instructions found at http://trayontheweb.com/2011/07/20/missing-ldap-attributes-when-adding-a-new-property-to-the-user-profile-service-in-sharepoint-2010/ and I was able to add a property for the missing attribute. Had to run SharePoint PowerShell with SP_Farm credentials. Ran synchronization and the field was populated. Additional information can be found at http://blogs.msdn.com/b/tehnoonr/archive/2010/11/22/mapping-user-profile-properties-in-sharepoint-2010-to-ldap-attributes.aspx
Subscribe to:
Posts (Atom)