Newbie - How to retrieve a "Boolean" value in a jsp via jsf ?
Is it possible to retrieve a Boolean value from a BBean from, from let's say a 'rendered' tag ?
class BBean
Boolean secure;
public Boolean getSecure() {...}
From the jsf:
<h:outputText value="#{somebean.whatever}" rendered="#{BBean.? == false}" />
How do I use the Boolean object in an expression like the one above ?
Note: I've simplified the example above, but I cannot use a primitive boolean for this, the objects I use
are generated with "Boolean"s and I have no control.
Thanks in advance !
Mark
You should just use boolean instead of Boolean;
class BBean
boolean secure;
public boolean getSecure() {...}
<h:outputText value="#{somebean.whatever}" rendered="#{bBean.secure == false}" />
Similar Messages
-
How to retrieve the procedure value and pass the value to a form field
How to retrieve the procedure value and pass the value to a form field?
Set property for the field and the value is the actual procedure/function.
Cheers -
How to retrieve dynamic filter value submitted from control query to broadcast query.....
I'm trying to change the hierarchy version determined by a userexit variable in the broadcast query.
The Hierarchy Version should be dependent on the input filter delivered by the bursting query.
But how do I catch the dynamic filter value which has been submitted by the bursting query,
with other words: where does the bursting query store it's out put while sequentially starting the broadcast query value by value?
BTW: the filter value from the bursting query appears under "dynamic filter values" in the information of the broadcast query...
Any thoughts are welcome!
Edited by: Heinrich Krupp on Jun 24, 2009 1:25 PMFurther information,
Report is used via webi only, not Xcelsius or Dashboard.
Report is consuming BI Web Services.
Although we can pass in prompt values to BI Services, I couldn't find if we could pass a variable or dimension object into this field. Anyone knows? -
How to retrieve the parameter names from a JSP page ? Urgent Please
Hello,
Can anybody tell me how to retrieve the parameter names from the JSP
page. (without using getParameterNames() method.)
The problem with the getParameterNames() method is I get the Jumbled output.
I need it very badly
With regards
Ananth R
email:[email protected]
[email protected]Dear duffymo,
My primary intention is to convert the JSP form information into a XML file.
If I do not get the Parameter names in the correct order how can I maintain
tag order in XML file.
For ex: (JSP PAGE VIEW)
Name--
FirstName
MiddleName
LastName
Address--
Street1
Street2
City
Country
&so on
(XML File to be generated)
<Name>
<FirstName>Value</FirstName>
</Name>
<Address>
<street1>value</street1>
</Address>
& so on
If I use getParameterNames() to get all the parameter names(Which form the tag names in the XML file ) the Enumeration object it returns will not be in the same order as the text fields in JSP.From this I can not construct a meaningful XML file.
order means: Order of entry on the page, from top to bottom
That's it
Waiting for your responses -
How to retrieving attributes old values from a OBJECT_CHANGED event
Hi,
I have installed Sun ONE Directory Server 5.2. I have registared Event Listener which implements both name space change and object change interfaces. After chaning some attribute value, i am able to get the new values of attributes using getNewBinging method. But when i call getOldBinding to get attributes, it is returning null. Can any one help me how to get the old values. This is very much urgent and we are trying to write custom connectors to synchronize the data in Sun ONE directory server with other directory servers like Oracle Internet Directory.
I am new to Java and JNDI.
It would be great help if any one can light me in this regard. Thanks in advance.
Thanks & Regards
SreedharI have been also working for the same issue. getOldBinding() does not return old attributes in case of ObjectChanged event. So far I did not find any solution. Does anyone know any solution?
-
How to Retrieve the Selected Values from selectOrderShuttle using ADF 11g
Hi Every One,
Does anyone has idea how to retrieve the selected Items using shuttle and Order of the items using 'SelectOrderShuttle' component ?
Thanksshuttle's valuechangeevent would fire when you shuttle items back and forth.
public void selectOrderShuttle1_valueChangeListener(ValueChangeEvent valueChangeEvent) {
ArrayList list = new ArrayList(Arrays.asList(valueChangeEvent.getNewValue()));
if (list != null){
for (int i=0; i<list.size(); i++) {
int l = list.size()-1;
val = list.get(l).toString(); //returns , delimited string
if (val != null){
val = val.replaceAll("[\\[\\]]", "");
StringTokenizer st = new StringTokenizer (val, ",");
int nto = st.countTokens ();
for (int j = 0; j < nto; j++)
String token = st.nextToken ();
.......... -
How to retrieve a property value from an iview in the back-end?
Hi,
I am looking for a back-end function module or any other way to retrieve the property value of an iview in the portal.
Is this possible?
thanks,
Bert CarynHi,
Look at the following threads,
For programmatically getting the iview properties,
Programmatically getting iView Properties
Also,
Get Properties of IView Programmatically
Permanent change of iView property programmatically
Hope these threads help u.
Regards
Srinivasan T -
Passing values to included jsp via bean
Hi people
I've got a jsp fragment which is used by many jsp's. It outputs a dynamic menu. It gets its data from a bean, say MenuBean. The jsp which "includes" menu.jsp does a jsp:usebean then jsp:setproperty's on MenuBean. When I run the project nothing comes up in the menu (It works if I hardcode the values in MenuBean).
Under debug I can see that after the first jsp:usebean an instance (say #9360) is created with the properties set correctly. But when menu.jsp runs, it looks like a new instance of MenuBean (say #110636) is created with the properties blank.
in home.jsp:
<jsp:useBean id="menubean" class="web.MenuBean" scope="session"/>
<jsp:setProperty name="menubean" property="login"
value="${userBean.login}"/>
<jsp:setProperty name="menubean" property="topLevel" value="Home"/>
<jsp:include page="/WEB-INF/jspf/menu.jsp" />
in menu.jsp:
<jsp:useBean id="menubean" class="web.MenuBean" scope="session"/>
I've tried changing the scope to request or application, but it's always the same result. A new instance of MenuBean is created when menu.jsp runs. What I need is a single instance of MenuBean running throughout the session and accessible by every jsp that's called up. How can I do/achieve this?
I'd appreciate any help on this matter.
Thanks.Hi Ram - thanks for your reply.
I have made it work, but I'm not sure which of the changes I made is the one that fixed it. I believe it is because I didn't implement serializable in my MenuBean. By doing so it now works!!
thankyou & bye -
How to retrieve the max value from a cursor in procedure
Hi,
In a procedure, I defined a cursor:
cursor c_emp is select empno, ename, salary from emp where ename like 'J%';
but in the body part, I need to retrieve the max(salary) from the cursor.
could you please tell me how I can get the max value from the cursor in the procedure.
Thanks,
PaulHere is one sample but you should just get the max directly. Using bulk processing should be a last resort.
DECLARE
CURSOR c1 IS (SELECT * FROM emp where sal is not null);
TYPE typ_tbl IS TABLE OF c1%rowtype;
v typ_tbl;
max_sal number;
BEGIN
OPEN c1;
max_sal := -9999999999999;
LOOP --Loop added
FETCH c1 BULK COLLECT INTO v LIMIT 3; -- process 3 records at a time
-- process the records
DBMS_OUTPUT.PUT_LINE('Processing ' || v.COUNT || ' records.');
FOR i IN v.first..v.last LOOP
if v(i).sal > max_sal then
max_sal := v(i).sal;
end if;
DBMS_OUTPUT.PUT_LINE(v(i).empno);
END LOOP;
EXIT WHEN c1%NOTFOUND;
END LOOP;
DBMS_OUTPUT.PUT_LINE('Max salary was: ' || max_sal);
END;
Processing 3 records.
7369
7499
7521
Processing 3 records.
7566
7654
7698
Processing 3 records.
7782
7788
7839
Processing 3 records.
7844
7876
7900
Processing 2 records.
7902
7934
Max salary was: 5000 -
Embedded Java Code - How to retrieve multivalue payload value
I'm working in my SOA-Composite which is used with OIM and our approval process. Here is an example of the payload data:
>
<ns2:RequesterDetails>
<ns2:FirstName>System</ns2:FirstName>
<ns2:MiddleName/>
<ns2:LastName>Administrator</ns2:LastName>
<ns2:Login>XELSYSADM</ns2:Login>
<ns2:DisplayName>System Administrator</ns2:DisplayName>
<ns2:ManagerLogin/>
<ns2:OrganizationName>Xellerate Users</ns2:OrganizationName>
<ns2:Email>[email protected]</ns2:Email>
<ns2:StartDate/>
<ns2:EndDate/>
<ns2:Status>Active</ns2:Status>
<ns2:XellerateType>End-User Administrator</ns2:XellerateType>
<ns2:UserType>Full-Time</ns2:UserType>
<ns2:Role>SYSTEM ADMINISTRATORS</ns2:Role>
<ns2:Role>Test Role 1</ns2:Role>
<ns2:Role>Test Role 2</ns2:Role>
</ns2:RequesterDetails>
>
I am able to retrieve single values with code like this:
>
//Retrieve Requester Login
Object requesterXMLElem = getVariableData("inputVariable", "payload","/ns3:process/ns4:RequesterDetails/ns4:Login");
String requesterLogin = ((oracle.xml.parser.v2.XMLElement)requesterXMLElem).getText();
>
How do i retrieve the multivalue Role values and not just a single entry?
Thanks,
KevinI see what i missed with the doube slash, i thought you had a typo and assumed i used it. If i use the following:
//Retrieve Requester Roles
Object requesterRolesXMLElem = getVariableData("inputVariable", "payload","/ns3:process/ns4:RequesterDetails//ns4:Role");
System.out.println("Requester Roles Type[" + requesterRolesXMLElem.getClass() + "]");
int requesterRolesCount = ((oracle.xml.parser.v2.XMLElement)requesterRolesXMLElem).getAttributes().getLength();
System.out.println("Requester Roles Length[" + requesterRolesCount + "]");
String requesterRole = ((oracle.xml.parser.v2.XMLElement)requesterRolesXMLElem).getText();
System.out.println("Requester Roles[" + requesterRole + "]");
I get the following output:
Requester Roles Type[class oracle.xml.parser.v2.XMLElement]
Requester Roles Length[0]
Requester Roles[SYSTEM ADMINISTRATORS]
I am not seeing how to loop through each if the type is class oracle.xml.parser.v2.XMLElement
Thanks,
Kevin -
Hi ,
can anyone let me know how to retrive the max 3 values from a table...
I want to get the top 3 values of salary from emp table
Thanks,
PraveenPraveen,
Consider the following example:
SQL> set pagesize 9999
SQL> select empno, ename, sal
2 from scott.emp;
EMPNO ENAME SAL
7369 SMITH 800
7499 ALLEN 1600
7521 WARD 1250
7566 JONES 2975
7654 MARTIN 1250
7698 BLAKE 2850
7782 CLARK 2450
7788 SCOTT 3000
7839 KING 5000
7844 TURNER 1500
7876 ADAMS 1100
7900 JAMES 950
7902 FORD 3000
7934 MILLER 1300If you want to get the top three salaries, you can use this query
SQL> select sal
2 from
3 (select distinct sal
4 from scott.emp
5 order by sal desc)
6 where rownum<=3;
SAL
5000
3000
2975If you want to see all the employees having any of top-3 salaries you can use the following one:
SQL> select empno, ename, sal
2 from
3 (select empno, ename, sal, dense_rank() over (order by sal desc) dr
4 from scott.emp
5 )
6 where dr<=3;
EMPNO ENAME SAL
7839 KING 5000
7788 SCOTT 3000
7902 FORD 3000
7566 JONES 2975If you want to get the first 3 employees with the highest salaries. You can use the following one.
But, be aware, there might be more employees having $3000,00 salary.
SQL> select empno, ename, sal
2 from
3 (select empno, ename, sal
4 from scott.emp
5 order by sal desc)
6* where rownum<=3
SQL> /
EMPNO ENAME SAL
7839 KING 5000
7788 SCOTT 3000
7902 FORD 3000
SQL> -
How to retrieve query string value from the URL in my portlet
Hi,
When user clicks on "Advance Search", i am redirecting to page in the community. At the same i am adding some more values to the query string (to the URL).
My URL will look like this.
http://ctp-mc0149/portal/server.pt?space=CommunityPage&parentname=CommunityPage&parentid=0&in_hi_userid=200&cached=true&control=SetCommunity&PageID=202&CommunityID=200&searchType=2
Now in one of my portlet in that page, i want to retrieve the query string values from the URL.
Please help me regarding this.
Thanks in advance.
Thanks,
sreekanth.Hi,
Look at the following threads,
For programmatically getting the iview properties,
Programmatically getting iView Properties
Also,
Get Properties of IView Programmatically
Permanent change of iView property programmatically
Hope these threads help u.
Regards
Srinivasan T -
How to compare a boolean value returned from a function in a sql query
Hi all
i have a function which return boolean true or false.
mean while i am writing a sql query which should check this function and will return a result set only when it is true. how will i use a function which returns boolean in a sql query..
thanks in advance'
HariI don't think this is possible - i'm not sure. Can you post your function script? The reason why am i asking this is --
satyaki>set serveroutput on
satyaki>
satyaki>
satyaki>
satyaki>create or replace function test_satf(emno in number)
2 return boolean
3 is
4 v_cnt number(5);
5 v_flg boolean;
6 begin
7 select count(*)
8 into v_cnt
9 from emp
10 where empno = emno;
11
12 if v_cnt = 1 then
13 v_flg := TRUE;
14 else
15 v_flg := FALSE;
16 end if;
17
18 return v_flg;
19 exception
20 when others then
21 v_flg := FALSE;
22 return v_flg;
23 end;
24 /
Function created.
satyaki>
satyaki>
satyaki>
satyaki>
satyaki>
satyaki>desc emp;
Name Null? Type
EMPNO NOT NULL NUMBER(4)
ENAME VARCHAR2(10)
JOB VARCHAR2(9)
MGR NUMBER(4)
HIREDATE DATE
SAL NUMBER(7,2)
COMM NUMBER(7,2)
DEPTNO NUMBER(2)
satyaki>
satyaki>
satyaki>
satyaki>select count(*) from emp;
COUNT(*)
14
satyaki>
satyaki>select empno,test_satf(empno)
2 from emp;
select empno,test_satf(empno)
ERROR at line 1:
ORA-06552: PL/SQL: Statement ignored
ORA-06553: PLS-382: expression is of wrong type
satyaki>select to_char(test_satf(empno))
2 from emp;
select to_char(test_satf(empno))
ERROR at line 1:
ORA-06552: PL/SQL: Statement ignored
ORA-06553: PLS-382: expression is of wrong type
satyaki>
satyaki>create or replace function test_satf(emno in number)
2 return varchar2
3 is
4 v_cnt number(5);
5 v_flg varchar2(10);
6 begin
7 select count(*)
8 into v_cnt
9 from emp
10 where empno = emno;
11
12 if v_cnt = 1 then
13 v_flg := 'TRUE';
14 else
15 v_flg := 'FALSE';
16 end if;
17
18 return v_flg;
19 exception
20 when others then
21 v_flg := 'FALSE';
22 return v_flg;
23 end;
24 /
Function created.
satyaki>
satyaki>
satyaki>select test_satf(empno)
2 from emp;
TEST_SATF(EMPNO)
TRUE
TRUE
TRUE
TRUE
TRUE
TRUE
TRUE
TRUE
TRUE
TRUE
TRUE
TEST_SATF(EMPNO)
TRUE
TRUE
TRUE
14 rows selected.Or, may be i'm missing something.
Regards.
Satyaki De. -
Newbie: How to know index of value choosed in poplist?
Hi!
How can i know index or label/value choosed from poplist?just the same as the way you know for any normal field.
:item_name should do it.
So you can do something like:
if :list_item = '10'
or
message(:list_item) -
How to retrieve the selected value in f4if_int_table_value_request
hi guys,
I have created a search help using fm f4if_int_table_value_request,my value table contains several fields including vbeln. When i am selecting a record the return table is capturing the last column of the record but i want to select the vbeln which is in the first column.
Plz help...MODULE F4_ON_VALUE_REQUEST INPUT.
TYPES : BEGIN OF TYP,
G_VBELN TYPE VBELN,
FKDAT TYPE ZCHEQUEIT-FKDAT,
BASEAMNT TYPE ZCHEQUEIT-AGRV,
SERVTAX TYPE ZCHEQUEIT-SERVT,
BALAMNT TYPE ZCHEQUEIT-BALA,
END OF TYP.
DATA : IT_VAL TYPE TABLE OF TYP,
WA_VAL TYPE TYP,
IT_RET TYPE TABLE OF DDSHRETVAL,
WA_RET TYPE DDSHRETVAL,
IT_DYN TYPE TABLE OF DYNPREAD,
WA_DYN TYPE DYNPREAD,
IT_FIELDTAB TYPE TABLE OF DSELC,
WA_FIELDTAB TYPE DSELC,
LV_VKORG TYPE VKORG,
LV_KUNNR TYPE KUNNR,
INDEX TYPE SY-INDEX.
TYPES : BEGIN OF TY_VBRK,
VBELN TYPE VBRK-VBELN,
KNUMV TYPE VBRK-KNUMV,
FKDAT TYPE VBRK-FKDAT,
NETWR TYPE VBRK-NETWR,
END OF TY_VBRK.
TYPES : BEGIN OF TY_KONV,
KNUMV TYPE KONV-KNUMV,
KSCHL TYPE KONV-KSCHL,
KWERT TYPE KONV-KWERT,
END OF TY_KONV.
DATA : IT_VBRK TYPE STANDARD TABLE OF TY_VBRK,
WA_VBRK TYPE TY_VBRK,
IT_KONV TYPE STANDARD TABLE OF TY_KONV,
WA_KONV TYPE TY_KONV,
G_BASEAMNT TYPE KWERT,
G_SERVTAX TYPE KWERT.
MOVE 'VKORG' TO WA_DYN-FIELDNAME.
APPEND WA_DYN TO IT_DYN.
MOVE 'KUNNR' TO WA_DYN-FIELDNAME.
APPEND WA_DYN TO IT_DYN.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
DYNAME = SY-REPID
DYNUMB = SY-DYNNR
TABLES
DYNPFIELDS = IT_DYN
IF SY-SUBRC <> 0.
* Implement suitable error handling here
ENDIF.
CLEAR WA_DYN.
READ TABLE IT_DYN INTO WA_DYN WITH KEY FIELDNAME = 'VKORG' .
LV_VKORG = WA_DYN-FIELDVALUE .
READ TABLE IT_DYN INTO WA_DYN WITH KEY FIELDNAME = 'KUNNR' .
LV_KUNNR = WA_DYN-FIELDVALUE.
SELECT XBLNR FROM BSID INTO TABLE IT_VAL WHERE
BUKRS = LV_VKORG AND KUNNR = LV_KUNNR AND BLART = 'RV'."
SELECT VBELN KNUMV FKDAT NETWR FROM VBRK INTO TABLE IT_VBRK
FOR ALL ENTRIES IN IT_VAL WHERE VBELN = IT_VAL-G_VBELN.
SELECT KNUMV KSCHL KWERT FROM KONV INTO TABLE IT_KONV
FOR ALL ENTRIES IN IT_VBRK WHERE KNUMV = IT_VBRK-KNUMV.
CLEAR : WA_KONV.
LOOP AT IT_VAL INTO WA_VAL.
READ TABLE IT_VBRK INTO WA_VBRK WITH KEY VBELN = WA_VAL-G_VBELN.
IF SY-SUBRC = 0.
WA_VAL-FKDAT = WA_VBRK-FKDAT.
WA_VAL-BALAMNT = WA_VBRK-NETWR.
ENDIF.
LOOP AT IT_KONV INTO WA_KONV WHERE KNUMV = WA_VBRK-KNUMV.
IF WA_KONV-KSCHL = 'ZAGV'.
WA_VAL-BASEAMNT = WA_VAL-BASEAMNT + WA_KONV-KWERT.
ELSEIF WA_KONV-KSCHL = 'JSRT' OR WA_KONV-KSCHL = 'JEC3' OR WA_KONV-KSCHL = 'JES3'.
WA_VAL-SERVTAX = WA_VAL-SERVTAX + WA_KONV-KWERT.
ENDIF.
ENDLOOP.
MODIFY IT_VAL FROM WA_VAL TRANSPORTING FKDAT BALAMNT. "BASEAMNT SERVTAX
CLEAR : WA_KONV,WA_VBRK,WA_VAL.
ENDLOOP.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
* DDIC_STRUCTURE = 'TYP'
RETFIELD = 'VBELN'
* PVALKEY = ' '
DYNPPROG = SY-REPID
DYNPNR = SY-DYNNR
DYNPROFIELD = 'Invoice No.'
* DYNPROFIELD = 'WA_ZCHEQUEIT-VBELN'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = IT_VAL
* FIELD_TAB = IT_FIELDTAB
RETURN_TAB = IT_RET
* DYNPFLD_MAPPING = it_fieldtab.
IF SY-SUBRC <> 0.
* Implement suitable error handling here
ENDIF.
CLEAR : WA_DYN,LV_VKORG,LV_KUNNR.
REFRESH : IT_DYN,IT_VAL,IT_RET.
ENDMODULE. " F4_ON_VALUE_REQUEST INPUT
Maybe you are looking for
-
Problem: Unable to retrieve workflow data from MDM repository
This is a new MDM installations scenario for version 5.5 SP05 (5.5.40.83). After installing MS Visio, finding problems connecting it with the MDM Data Manager. After doing MDM workflow installations, able to initiate the MS Visio Workflow from MDM Da
-
Third party sales- why MIGO in our system?
Why we do MIGO in third party sales scenario, as we dont have stock movement in our plant? In the case- third party vendor delivers the goods directly to customer? Please clear me? Edited by: arshad ahamad on Feb 4, 2008 9:28 AM
-
My MBP doesn't remember my Time Capsule wireless network when waking from sleep
My MBP (OS 10.5.8) doesn't remember my Time Capsule wireless network when waking from sleep. Thus, every time my MBP wakes from sleep, I need to select the Airport icon in the upper menu bar, select "Join other network", enter SSID and password. Th
-
Cant install the latest versions of Quick time and itunes for my new iphone
Had them both running fine for years and then I tried to upgrade my itunes and then the trouble started. It wont install after i have downloaded it. Keep getting a very complicate error message as follows; An error occured during the installation of
-
Mail sending through proxy client
I have the following simple code to send mail through a SOCKS proxy client: package com.apna.beans; import java.util.Properties; import javax.mail.*; import javax.mail.internet.*; import javax.activation.DataSource; import javax.activation.FileDataSo