Thanks Pranav for sharing this article.
In this exercise we are restricting the user to enter Character in UPPERCASE.
Brief about the steps we are performing
1. Create custom CSS.
2. Attaching this CSS to bean via personalization.
Step1. FTP the latest custom.css from server $Common_Top/html/cabo/style to desktop
Step2. Add the below text in custom.xss
Step 3: Now, FTP the updated custom.xss file to same path on the server i.e. $Common_Top/html/cabo/style.
Step 4: Set the CSS Class Property through Personalization.
CSS Class : XXOraUpperText
Finally after setting css for Project Name bean user can only enter in UPPERCASE only.
Here is another more simpler approach.
Here in the processRequest we are setting the CSS to the Bean without making changes to custom.xss file.
In this exercise we are restricting the user to enter Character in UPPERCASE.
Brief about the steps we are performing
1. Create custom CSS.
2. Attaching this CSS to bean via personalization.
Step1. FTP the latest custom.css from server $Common_Top/html/cabo/style to desktop
Step2. Add the below text in custom.xss
Step 3: Now, FTP the updated custom.xss file to same path on the server i.e. $Common_Top/html/cabo/style.
Step 4: Set the CSS Class Property through Personalization.
CSS Class : XXOraUpperText
Finally after setting css for Project Name bean user can only enter in UPPERCASE only.
Here is another more simpler approach.
Here in the processRequest we are setting the CSS to the Bean without making changes to custom.xss file.
- import oracle.cabo.style.CSSStyle;
- import oracle.apps.fnd.framework.webui.beans.message.OAMessageTextInputBean;
- public void processRequest(OAPageContext pageContext, OAWebBean webBean)
- {
- super.processRequest(pageContext, webBean);
- CSSStyle css =new CSSStyle();
- css.setProperty("text-transform","uppercase");
- OAMessageTextInputBean mtib=(OAMessageTextInputBean)webBean.findChildRecursive("HelloName");
- if(mtib!=null) {
- mtib.setInlineStyle(css);
- }
Hi All,
ReplyDeleteWe have to write the code in ProcessFormRequest to save the text in to CAPS in the database. Please find the prcess below
find the VO associated to that field and add this piece of code in the extended controller and replace the VO .
public void processFormRequest(OAPageContext pageContext, OAWebBean webBean) {
OAApplicationModule oaapplicationmodule2 = pageContext.getApplicationModule(webBean);
OAViewObject oaviewobject = (OAViewObject)oaapplicationmodule2.findViewObject("HzPuiOrganizationProfileQuickAM1.HzPuiOrganizationProfileQuickVO");
if(oaviewobject != null)
{
Row row = oaviewobject.getCurrentRow();
if(row != null)
{
row.setAttribute("OrganizationName", row.getAttribute("OrganizationName").toString().toUpperCase());
}
}
super.processFormRequest(pageContext, webBean);