raunak tuladhar

Greenhorn
+ Follow
since Jan 11, 2010
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by raunak tuladhar

hi tim,

thanks for the information about richfaces. now i am using the rich faces tags and the a4j tags also . I am very new to these components of jsf

I solved out my problem that i specified and would like to share here

1. first i stored the required values in javascript array
2. then i initialize the stored javascript array in hiddeninput component by means of javascript "document.getElementById('hidden').value = array
3. then hidden variable was binded in java as string n there i stored string in java array by using the "split function" (which is a cool method to use) and i was done with my problem


but another problem arised and i would like to ask it here again. i would like to tell my requirement first

i have three <h:selectOneListbox>. now i am trying to render
1. the second selectOneListbox from first selectOneListbox and
2. render third selectOneListbox from second selectOneListbox (which is rendered by first selectOneListbox ).

No. 1 works ok for me
When i go for number 2 then it gives the error

Error


The Relevant Code for this

JSF code


java code

i tried it many times but cant fix this problem. please help :S and thanks once again
14 years ago
JSF
hello team,

this is my first post here in this forum. i am trying to implement javascript filter in <h:selectManyListbox>. selectmanylistbox takes the arraylist as its value type.

When i try to pass the #{bean.arraylist} from jsf in javascript filter function it reads as object , not the list of string value. how can i pass and convert this arraylist object (#{bean.arraylist}) into javascript array?. searched a lot in this topic but very less documentation in this topic. In jsp it is easy but i find really unfriendly using javascript in jsf. i am nearly close to my filter :P.

thanks


the relevant code:

jsf code

<h:inputText value="#{addRelServiceBean.addRelDTO.filtervalue}" id="filter"
onkeyup="handleKeyUp('Form:filter','Form:availablelist','Form:selectedlist','#{addRelServiceBean.availablelist}','9999');"/>

javascript src code

function handleKeyUp(input,select,selected,userList,maxNumToShow)
{
var selectObj, textObj, functionListLength;
var i, searchPattern, numShown,addval;
textObj = $(input);
selectObj = $(select);
functionListLength = userList.length;
if(textObj.value=='Enter name to filter')
searchPattern="^";
else
searchPattern = "^"+textObj.value;
re = new RegExp(searchPattern,"gi");
selectObj.length = 0;
numShown = 0;
for(i = 0; i < functionListLength; i++)
{
if(userList[i].search(re) != -1)
{
selectObj[numShown] = new Option(userList[i],"");
numShown++;
}
if(numShown == maxNumToShow)
{
break;
}
}
if(selectObj.length == 1)
{
selectObj.options[0].selected = true;
}
}
function addSelectedValue(source,destination){
sourceObj = $(source);
destinationObj = $(destination);
if(sourceObj.selectedIndex>=0)
{
destinationObj[destinationObj.length]=new Option(sourceObj.options[sourceObj.selectedIndex].text,sourceObj.options[sourceObj.selectedIndex].value);
sourceObj.options[sourceObj.selectedIndex]=null;
}
}
14 years ago
JSF