Monday, March 11, 2013

Error: Missing message for key "label.username" in bundle "(default bundle)" for locale en_IN

Error: HTTP Status 500 - javax.servlet.ServletException: javax.servlet.jsp.JspException: Missing message for key "label.username" in bundle "(default bundle)" for locale en_IN

struts.config file
<message-resources parameter="resource.MessageResource" />

Folder Structure







Solution:
Change the struts.config file line to given below
<message-resources parameter="MessageResource" />

Error: javax.servlet.ServletException: javax.servlet.jsp.JspException: Exception creating bean of class

Error:
javax.servlet.ServletException: javax.servlet.jsp.JspException: Exception creating bean of class

Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:568)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:455)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)

Solution
In struts-config.xml  check in <action-mappings> whether the type path is correct.

Tuesday, March 05, 2013

And Condition in Column Validation SharePoint Portal

How to check and condition in SharePoint Portal

=AND([field_column1]="field_value", [field_column2] = "field_value")

Example
=AND([Current Status]="Closed", [Closed Date] = "")

Wednesday, February 27, 2013

Using insertRow Vs insertRowAtRangeIndex

Using insertRow Vs insertRowAtRangeIndex

Scenario 1

    OAViewObjectImpl pervo = getDataVO1();
    if(!pervo.isPreparedForExecution())
         pervo.executeQuery();
     Row prow = pervo.createRow();
     prow.setAttribute("field",fieldvalue);
     pervo.insertRowAtRangeIndex(0,prow);
     prow.setNewRowState(Row.STATUS_INITIALIZED);

Scenario 2
    OAViewObjectImpl pervo = getDataVO1();
    if(!pervo.isPreparedForExecution())
         pervo.executeQuery();
     Row prow = pervo.createRow();
     prow.setAttribute("field",fieldvalue);
     pervo.last();
     pervo.next();
     pervo.insertRow(prow);
     prow.setNewRowState(Row.STATUS_INITIALIZED);


If you use the first method, it will add a row to the first record of the current page. Whereas if you use the second method it will add to last record of the last page

if you use pervo.insertRowAtRangeIndex(pervo.getRowCount-1,prow); it will work when there is 1 page only, if it goes to second page it will throw error

Monday, February 25, 2013

Get Profile settings user level from Database

Query to retrieve profile seetings which are customized for user

select user_profile_option_name,
       decode(level_id,
              10001,
              'Site',
              10002,
              'Application',
              10003,
              'Responsibility',
              10004,
              'User',
              10005,
              'Server',
              'UnDef'),
       usr.user_Name,
       optval.*
  from fnd_profile_option_values optval
  join FND_PROFILE_OPTIONS_VL opt
    on opt.profile_option_id = optval.PROFILE_OPTION_ID
  join FND_USER usr
    on optval.level_value = usr.user_id
 where level_id = 10004