Tuesday, May 31, 2016

CLOB to String ADF


  • call a function or a ROVO which returns CLOB;
  • pass it to this method
  • Call this method
private String clobToString(Clob data) {
        ADFContext adfCtx = ADFContext.getCurrent();
    
        Map pageFlowScope = adfCtx.getPageFlowScope();
        
       
    StringBuilder sb = new StringBuilder();
    try {
        Reader reader = data.getCharacterStream();
        BufferedReader br = new BufferedReader(reader);

        String line;
        while(null != (line = br.readLine())) {
            sb.append(line);
        }
        br.close();
    } catch (SQLException e) {
        // handle this exception
    } catch (IOException e) {
        // handle this exception
    }
 pageFlowScope.put("clobString",sb.toString());

    return sb.toString();
}


  • Use RichInputTextEditor to paint the screen using html tags in the CLOB (assuming CLOB has formatted text)
layout:scroll; simple format will get rid of extra components in RichInputTextEditor**

Wednesday, May 25, 2016

Flip an image on mouse hover ADF


CSS:


 /*entire container, keeps perspective */
.flip-container {
perspective: 1000px;
}
/* flip the pane when hovered */
.flip-container:hover .flipper, .flip-container.hover .flipper {
transform: rotateY(180deg);
}

.flip-container, .front, .back {
width: 320px;
height: 480px;
}

/* flip speed goes here */
.flipper {
transition: 0.6s;
transform-style: preserve-3d;

position: relative;
}

/* hide back of pane during swap */
.front, .back {
backface-visibility: hidden;

position: absolute;
top: 0;
left: 0;
}

/* front pane, placed above back */
.front {
z-index: 2;
/* for firefox 31 */
transform: rotateY(0deg);
}

/* back, initially hidden pane */
.back {
transform: rotateY(180deg);
}

jspx page:




  <af:panelGroupLayout id="pgl3">

        <div id="card" class="flip-container" ontouchstart="this.classList.toggle('hover');"> 
  <div class="flipper"> 
   <div class="front"> 
    Front content
     <af:image source="/images/saved-complete.png" id="id2"/>
  </div> 
  <div class="back">
    Back content
     <af:image source="/images/saved-img.jpg" id="id1"/>
  </div> 
  </div> 
</div>
  
        </af:panelGroupLayout>



 https://davidwalsh.name/css-flip

Wednesday, May 11, 2016

How to start SVN Repo

Step 1: Login to UNIX and go to the folder (cd /bravo/WL12c/src/csvn/bin)
Step 2: Start svn (./csvn start)
Step 3: Click start button (http://host:3343/csvn/)

Example:

  • cd /bravo/WL12c/src/csvn/bin 
  • ./csvn start
  • http://165.235.32.21:3343/csvn/ click start button





Edit the comments after Commit SVN



  • login to the unix box where svn is installed
  • go the directory (/home/WL12c/src/csvn/data/repositories/(**Name of the Repository**)
  • execute the command -   svn propset --revprop -r (revision no.) --force "svn:log" "New Comments" (URL of the connection)

Example:

cd /bravo/WL12c/src/csvn/data/repositories/JavaMailApp

svn propset --revprop -r 6 --force "svn:log" "New Comments" http://host.jnj.com:18080/svn/JavaMailApp

*After the commands are executed the system would ask for the svn admin username/password

If there is an error 


svn: DAV request failed; it's possible that the repository's pre-revprop-change hook either failed or is non-existent
svn: At least one property change failed; repository is unchanged
svn: Error setting property 'log':


Create a hook by executing these:

[someXapp@hostName hooks]$ cp pre-revprop-change.tmpl pre-revprop-change
[someXapp@hostName hooks]$ chmod u+x pre-revprop-change
[someXapp@hostName hooks]$ chown apache:apache pre-revprop-change  //ignore if it's not successful