The moment.

Fill my hands with sand,
Fill my mind with sighs.

Let the time flow through our veins,
Let the distance bind our sight.

Soaking into each others embrace,
We blur the future and sublime the past.

We are frozen in the moment,
Devoid of hue, devoid of flickers, devoid of bout.


(archive 2013)

Happy New Year

​One last breath of purified air,
One last view of the undulating valleys.

Owesome being with family,
Owesome meeting old and new friends.

Back to the city of thieves and donors,
Back to the city of misfortunes and opportunities.

Routines will make the days,
Creative prompts will break the days.

Happy new year again to you all.


Full Moon at Christmas

The grass felt furry, a natural carpet so awesome
Semi-lit in the starry night, all prickly yet soft and tender
We lay on our backs, the cosmos slowly gliding above our eyes

In the distance a stream of light struck through the hills and canopy
Long shadows criss-crossed our bare skin,the random tattoos almost felt real
I could sense the deepest of aura’s arise as we tightened the embrace

The landscapes before us turned amber, an energy beckoning
The horizon glowed in strokes of Gold, as the full moon rose
Our hearts mellowed in the splendor,our minds wondered in its magnificence

A tender peck and a sigh of pleasure escapes her curled lips
The long lashes of light engulfed us like sheets of silk,gentle on the skin
Thawing our very soul as we melted into each other, giving in to the yearning

As the rising moon took the night skies with an increasing passion
So did we take each others emotion to the next level, love at its utmost core
Watery tides rising with every rhythm, stars twinkling with every mourn

Heart beating fast,soul kisses interrupted by hot breath
What could beat a beautiful sunrise ten-fold, surpass its enchanted awe
‘A full moon rising to the wake of lovers, witnessed by the stars’

Script & Rhyme
by Shedyk.

(from 2010 archive)

Black & White

It is not a contrasting white on black or vice versa
It is not the achromatic absence of light
Neither is it a glaring visual void of hue
It is the neutral spectrum that sets a captivating mood
The essence of a remarkable spirit very alluring

An absence of color reveals a continuum
An appealing visual presentation
The calmness is utmost aesthetic
The skin tone just right in gray-scale
The depth in the portrait is infinite

Script & Rhyme

By Shedyk
(Archive from 2012)

{Debug Mode}

Tired geek at the end of the week
Content not coded to the Intent
Wanting to ‘run’ life in debug mode

Building main life always returns an error
At the rate of amnesia being high
Why is debugging so memory intensive

The team server is offline half the time
Profiler indicating worn out snap shots
Yet revert modifications is disabled

Checking out a new template every New Year
Importing and adding to favorites
Only to forget to compile and process it

A quick version checks ‘aging fast!
Time to package and upgrade
Settle down on permanent storage

Advanced commands defining responsibility
Hard to trace, calibration all the tougher
All the time, a need to scan for external changes

The pallets come in handy
Dragging and dropping from that scripture
Auto running feeds from that soap

Looking up to the skies
Wondering who’s got the source code
Refactor, Rename, looming in our minds

Tweeting a prayer to whoever it is
Hoping one can apply a patch
Merge history or update differences

Script n’ Rhyme
by Shedyk.

Dynamic Menus

I need to manage the display of menus based on user roles and in order to achieve this feat I would have to store this menu items and their respective urls in the database.  Then accordingly relate them to their respective window/form permission that have sets of permission maps for each role.

The permissions and permission maps for the various roles is already done so what is of concern now is being able to create the menus dynamically from a database table.

Step one: Lets create the table Dynamicmenu  with the following columns;

  • ID- pk
  • Label -menu title
  • url
  • parentMenu -self referencing fk to ID
  • parent – Boolean identifying if menu has submenus

There are many more attributes that go with a menu item and you can add columns for them as you wish. What is important to note here is the ‘parentMenu’ foreign key that is self referencing, I will use this to define child menu items and sub-menus.

Once we have the table set, the next step is to define the class that will read this table and derive the menu tree. There will definitely be a recursive method to iterate through your table as it creates the sub-menus and menus items. I will be using the Primefaces DefaultMenuModel. Here is a snippet of the class showing the recursive method.

/* Other methods */

DefaultMenuModel model = new DefaultMenuModel();

public DefaultSubMenu getFileMenu() {
List<Dynamicmenu> dMenuList = (List<Dynamicmenu>) dynamicmenuService
.findByQuery(“select * from dynamicmenu where parentMenu is null”);
DefaultSubMenu fileMenu = new DefaultSubMenu(“MENU”);

for (Dynamicmenu dMenu : dMenuList) {
if (dMenu.isParent()) {
DefaultSubMenu pMenu = new DefaultSubMenu(dMenu.getLabel());
pMenu.setIcon(“ui-icon ui-icon-triangle-1-e”);
if (getSubmenus(dMenu, pMenu) > 0) {
} else {
DefaultMenuItem mItem = new DefaultMenuItem(dMenu.getLabel());
mItem.setStyleClass(“FontNormal Fs15”);


return fileMenu;

public int getSubmenus(Dynamicmenu pMenu, DefaultSubMenu parentMenu) {
List<Dynamicmenu> dMenuList = (List<Dynamicmenu>) dynamicmenuService
.findByQuery(“select * from dynamicmenu where parentMenu=”+pMenu.getId()+” “);
for (Dynamicmenu childMenu : dMenuList) {
if (childMenu.isParent()) {
DefaultSubMenu subMenu = new DefaultSubMenu(childMenu.getLabel());
subMenu.setIcon(“ui-icon ui-icon-triangle-1-e”);
if (getSubmenus(childMenu, subMenu) > 0) {
} else {
DefaultMenuItem mItem = new DefaultMenuItem(childMenu.getLabel());

return parentMenu.getElementsCount();

The getFileMenu() method is responsible for getting all the top-level (parent) menus. Once we have that we need to iterate through the list and determine if we need to create a MenuItem or a SubMenu for each. Here is where the parent boolean column comes in handy, so I check if isParent() I create a submenu expecting more menus under it and then call the getSubmenus(childMenu, subMenu) method to get sublevel menus, otherwise I create a menu item and add it to the fileMenu.

The getSubmenus(Dynamicmenu pMenu, DefaultSubMenu parentMenu) is the recursive loop that calls itself for every time the Dynamicmenu object isParent() and adding it to a submenu until it reaches the last level menu and creates a menu item and exits to the next submenu and repeats. It returns a count of the elements is has created inside it and I use this to determine if to add it to the parent menu or not. Some sub menus would turnout empty because a user has not been assigned any of the items under it or has no credentials to access them, if its empty there is no need to add it.

No you add it to your page and that’s it.

    <h:form id=”menuform”>
<p:menu model=”${mainMenuModel.model}” />