hbj:inputField id=" hbj:button ,
Hi Friends,
when I use <hbj:inputField id="> <hbj:button>, I am not getting the Input fields & buttons, Instead I am getting warning like <u><b>" There is no corresponding extension directive for the tag".</b></u> Inspite,If I activate this, I am not getting input fields & buttons.
<%@page language="abap"%>
<%@extension name="htmlb" prefix="htmlb"%>
<hbj:form
id="myFormId"
method="post" target="_blank" encodingType="multipart/form-data" action="/htmlb/servlet/com.sap.htmlb.test.MyTestJsp1Test"
>
This form submits to a new web client window <br>
because of 'target=_blank'.<br><br>
<hbj:inputField
id="myInputField1"
type="String"
invalid="false"
width="310"
value="After editing press <Enter> to submit"
visible="true"
disabled="false"
required="true"
maxlength="30"
size="50"
>
</hbj:inputField>
<br><br>
<hbj:button id="oKbutton"
text="OK"
onClick="onOKClick"
design="EMPHASIZED"
width="100"
>
</hbj:button>
<hbj:button
id="Infobutton"
text="Info"
onClick="onInfoClick"
width="100"
/>
<hbj:button
id="Cancelbutton"
text="Cancel"
onClick="onCanClick"
width="100"
/>
</hbj:form>
pls Sort out this for me.
Regards
CSM Reddy
you also need to modify the hbj:inputField like below
<hbj:inputField
id="myInputField1"
type="String"
invalid="false"
width="310"
value="After editing press <Enter> to submit"
visible="true"
disabled="false"
required="true"
maxlength="30"
size="50"
<b>/</b>>
note that i have removed </hbj:inputField> and closing is done within the tag (highlighted / )
Regards
Raja
Similar Messages
-
How to disable the inputfield using radio button dynamically in module pool
How to disable the inputfield on the screen using radio button dynamically in module pool.
Please suggest .
Thanks.
Edited by: Lavanya YH1504 on Jul 30, 2010 1:20 PMI got it thank you.
LOOP AT SCREEN.
if screen-GROUP1 = 'LA1'.
If RADIO1 = 'X'.
SCREEN-INPUT = '0'.
MODIFY SCREEN.
ELSEIF RADIO2 = 'X'.
screen-input = '1'.
ENDIF.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDMODULE. " STATUS_0100 OUTPUT
Edited by: Lavanya YH1504 on Jul 30, 2010 1:51 PM -
Add hbj:table into hbj:tabstrip
Hi,
how is it possible to add a <hbj:table> into a <hbj:tabstrip>? When i put the code of my table into the tabstrip i get a rutime exception. The table works outside the tabstrip. What could be my mistake?
<hbj:tableView
id="mytableView"
model="myBean.model"
design="ALTERNATING"
headerVisible="true"
footerVisible="true"
visibleFirstRow="1"
visibleRowCount="5"
rowCount="16"
width="500px">
</hbj:tableView>
I put the piece of code inside <hbj:tabStripItemBody>.
regards,
Seedok, the mistake was the same id name.
regards,
sharam -
Logon Block Like SDN Logon Block
Hi,
We've added an Anonymous Page to our portal and we need to add a logon block same as SDN Logon Block on Left. We need this, as we do not want to use Login Link on MasterHead.
We've created a new layout which consists of 4 columns. We need this login module to be displayed in left column at up position. As the annoymous page will be accessed by Registered users, login block must disappear after successfull logon.
I tried to edit the layout jsp file and add the following code into it but not successful as Java knowledge is lack.
Does anybosy have an idea?
<%@ page session = "true"%>
<%@ taglib uri="prt:taglib:com.sap.portal.reserved.layout.TagLibHtmlb" prefix="hbj" %>
<%@ taglib uri="prt:taglib:com.sap.portal.reserved.layout.TagLibLayout" prefix="lyt" %>
<%@ page import = "com.sap.security.core.sapmimp.logon.*" %>
<%@ page import = "com.sap.security.core.sapmimp.rendering.Browsers" %>
<%@ page import = "com.sap.security.core.util.taglib.EncodeHtmlTag" %>
<%@ page import = "com.sap.security.api.UMFactory" %>
<%@ page import = "com.sap.security.api.logon.IAuthScheme" %>
<%@ page import = "com.sap.security.api.logon.ILoginConstants" %>
<%@ page import = "com.sap.security.api.UMFactory" %>
<jsp:useBean id="languages" class="com.sap.security.core.sapmimp.logon.LanguagesBean" scope="session"/>
<jsp:useBean id="logonLocale" class="com.sap.security.core.sapmimp.logon.LogonLocaleBean" scope="session"/>
<jsp:useBean id="logonMessage" class="com.sap.security.core.sapmimp.logon.LogonMessageBean" scope="session"/>
<jsp:useBean id="logonBean" class="com.sap.security.core.sapmimp.logon.LogonBean" scope="session"/>
<jsp:useBean id="error" class="com.sap.security.core.util.ErrorBean" scope='request'/>
<%@ include file="/logon_proxy.txt" %>
<lyt:template>
<hbj:content id="myContext" >
<hbj:page title="Portal Page">
<hbj:gridLayout id="GridLayout1" width="100%" cellSpacing="2">
<hbj:gridLayoutCell rowIndex="1" columnIndex="1" width="30%" verticalAlignment="top" horizontalAlignment="center">
<% if(!inPortal) { %>
<hbj:form
id="logonForm"
method="post"
target="_self"
encodingType="multipart/form-data"
action="http://temepdev.temsa.com.tr:50000/irj/portal"
>
<input name="no_cert_storing" type="hidden" value="on">
<hbj:textView id="message"
text="Kullanıcı"
design="HEADER4"/>
<hbj:inputField
id="j_user"
type="String"
invalid="false"
width="50"
value=""
visible="true"
disabled="false"
required="true"
maxlength="30"
size="50"
>
</hbj:inputField><br>
<hbj:textView id="message"
text="Şifre"
design="HEADER4"/>
<hbj:inputField
id="j_password"
type="String"
invalid="false"
width="50"
value=""
visible="true"
disabled="false"
required="true"
maxlength="30"
size="50"
>
</hbj:inputField><br>
<hbj:button
id="uidPasswordLogon"
text="Giriş"
onClick="onYetAnotherStateButtonClicked"/>
</hbj:form>
<% } else { %>
<hbj:textView id="message"
text="Portal'e Giris Yapmissiniz"
design="HEADER4"/>
<% } %>
<lyt:container id="column1" />
</hbj:gridLayoutCell>
<hbj:gridLayoutCell rowIndex="1" columnIndex="2" width="20%" verticalAlignment="top" horizontalAlignment="center">
<lyt:container id="column2" />
</hbj:gridLayoutCell>
<hbj:gridLayoutCell rowIndex="1" columnIndex="3" width="30%" verticalAlignment="top" horizontalAlignment="center">
<lyt:container id="column3" />
</hbj:gridLayoutCell>
<hbj:gridLayoutCell rowIndex="1" columnIndex="4" width="20%" verticalAlignment="top" horizontalAlignment="center">
<lyt:container id="column4" />
</hbj:gridLayoutCell>
</hbj:gridLayout>
</hbj:page>
</hbj:content>
</lyt:template>Hi,
Did you get information about?
I Want to do the same..
Thanks
JUAN -
Client side eventing with HTMLB in a jsp file
Hi All,
Can u give me the solution to work with client side eventing with HTMLB with a jsp page but not with a dynpage.
Regards,
sireesha.Hi sireesha,
Check this.
<%@ taglib uri="tagLib" prefix="hbj" %>
<%@ page import="com.sapportals.htmlb.enum.EventTrigger,com.sapportals.htmlb.event.Event" %>
<hbj:content id="myContext" >
<hbj:page title="PageTitle">
<script language="Javascript">
function checkinput(){
var funcName = htmlb_formid+"_getHtmlbElementId";
func = window[funcName];
var inputfield1 = eval(func("inf1"));
var input1 = inputfield1.getValue();
if (input1==""){
alert("Enter mandatory fields");
</script>
<hbj:form>
<hbj:textView id="tv1" text="Name"/>
<hbj:inputField id="inf1"
type="String"
required="true"
jsObjectNeeded="true">
<% inf1.setClientEvent(EventTrigger.ON_BLUR, "checkinput()"); %>
</hbj:inputField>
<br>
<hbj:textView id="tv2" text="City"/>
<hbj:inputField id="inf2" type="String"/>
<hbj:button id="b1" text ="submit" onClick="onSubmitclicked"/>
</hbj:form>
</hbj:page>
</hbj:content>
Regards,
Harini S -
Client side eventing with HTMLB
Hi All,
I am trying to access the HTMLB elements from jsp page to java script and failed to handle an event.
My requirement is, i have a form designed in First.jsp which is having 2 input fileds and both are mandatory. I want to display a msg to the user if he try to skip those 2 input fileds without value.
This i tried with dynpage it is working but i want to have with a JSP page, ie., all the presentation is in jsp file. so, how can i access those 2 input fileds in java scipt function?
If anybopdy is having an idea or a sample code please share here.
Thanks in advance,
Regards,
sireesha.Hi Harini,
Thanks for your reply.I tried the same code but it is not showing the alert, i couldn't find where exactly the problem is!
Here i am putting my code please go through it and help me.
JSP file:
<%@ taglib uri="tagLib" prefix="hbj" %>
<%@ page import="com.sapportals.htmlb.enum.EventTrigger,com.sapportals.htmlb.event.Event" %>
<hbj:content id="myContext" >
<hbj:page title="PageTitle">
<script language="Javascript">
function checkinput(){
var funcName = htmlb_formid+"_getHtmlbElementId";
func = window[funcName];
var inputfield1 = eval(func("inf1"));
var input1 = inputfield1.getValue();
if (input1==null)
alert("Enter mandatory fields");
</script>
<hbj:form>
<hbj:textView id="tv1" text="Name"/>
<hbj:inputField id="inf1"
type="String"
required="true">
<% inf1.setJsObjectNeeded(true);
inf1.setClientEvent(EventTrigger.ON_BLUR, "checkinput()"); %>
</hbj:inputField>
<br>
<hbj:textView id="tv2" text="City"/>
<hbj:inputField id="inf2" type="String"/>
<hbj:button id="b1" text ="submit" onClick="onSubmitclicked"/>
</hbj:form>
</hbj:page>
</hbj:content>
Regards,
sireesha. -
Hi,
I have a quick question about htmlb buttons in JSPs. I just have a test JSP like so:
<hbj:content id="myContext" >
<hbj:page title="PageTitle">
<hbj:form id="myFormId" >
<%-- used in the JSP DynPage to access the input field and retrieve the input of the user --%>
<hbj:inputField
id="user_name_input"
type="STRING"
design="STANDARD"
width="250"
maxlength="30"
/>
<hbj:button id="change_pass_button"
text"Change Password"
tooltip="Change Me"
width="100"
design="EMPHASIZED">
</hbj:button>
</hbj:form>
</hbj:page>
</hbj:content>
And I am unable to see the button. Does there need to be an onclick method associated with this button to see the actual button? Do I need to set myFormId.defaultButton(...) to the change_pass_button. When I did that, the PRT generated an error saying that change_pass_button was an unresolvable symbol. I just want to see what HTMLB buttons look like. Thanks!Hello,
You get very good help in Java Development ---> examples section. Here is the example
<hbj:button
id="Send_Button"
text="Save"
onClick="onSendButtonClicked"
width="70"
design="EMPHASIZED" >
</hbj:button>
Thanks,
Praveen
if you want to validate with javascript u need to use onClientClick event.
<hbj:button
id="Send_Button"
text="Save"
onClick="onSendButtonClicked"
onClientClick="confirm_save()"
width="70"
design="EMPHASIZED" >
</hbj:button> -
How to enable the InputField when press the Button
My sceanrio is by default the InputField is in disable .when ever i press the button it should enable.
Here is the sample code for HTMLB :
<hbj:inputField
id="InputText"
jsObjectNeeded="true"
type="string"
maxlength="30"
value="Text" >
<% String text = myContext.getParamIdForComponent(create_group); %>
<SCRIPT> var jsText = '<%=text%>'; </SCRIPT>
</hbj:inputField>
<hbj:button id="Enable_Button"
text="Enable"
tooltip="Enable InputField"
onClick="onEnableClick"
onClientClick="enableInputField()"
width="30px" >
</hbj:button>
</hbj:page>
</hbj:content>
<script language="javascript">
function enableInputField()
var funcName = htmlb_formid+"_getHtmlbElementId";
func = window[funcName];
var inputfield = eval(jsText);
inputfield.setEnabled();
</script>
Refer to the following links for more info...
http://help.sap.com/saphelp_nw04/helpdata/en/53/9d0e41a346ef6fe10000000a1550b0/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/43/067941a51a1a09e10000000a155106/content.htm
Regards,
Rajiv -
How to get value from a inputfield on button click in jspdynpage
Hi All
in the jsp page i hav
<hbj:inputField
id="InputName"
type="string"
maxlength="100"
value="Your name here"
/>
<hbj:button id="btnSubmit1" text="SUBMIT" onClick="btnSubmitClicked3" width="100" design="emphasized" />
this is my jsp-----
in the jspdynpage
public void onBtnSubmitClicked3(Event event) {
IPortalComponentResponse response =
(IPortalComponentResponse) this.getResponse();
String param = request.getServletRequest().getParameter("InputName");
i can't catch the param value?
plz help its urgentTry this ...
InputField fieldFirstName = (InputField) getComponentByName("FirstName");
String firstName = fieldFirstName.getValueAsDataType().toString();
Thanks
MMK -
Validating the htmlb inputfield using javascript
Hi,
I am trying to validate the htmlb inputfiels using the javascript,i want to get the value entered iin this inputfield in the javascript in order to validate
plz help me on how do i get the value of the inputfield in the script.
Thanks
AjayHi
please check the below example if it helps you
<script language='JavaScript'>
function validateInputField() {
var funcName = htmlb_formid+"_getHtmlbElementId";
func = window[funcName];
var inputfield = eval(func("xyzinputfield"));
var inputFieldValue = inputfield.getValue();
input = inputFieldValue.toLowerCase();
if ( input.checkforsomecondition ) {
true perform some action
else { false display some message
alert( "please......... give some message upon failure " ); }
</script>
use some hbj code similar to this
<tr><td width = 40%>
<hbj:inputField
id="xyzinputfield"
type="string"
maxlength="100"
value="Your name here"
jsObjectNeeded="true"
/>
<hbj:button
id="exbutton"
value="Your name here"
OnClientclick="validateInputField()"
/>
regards
jagdesh
Message was edited by: jagdeshwar Manipatruni -
Htmlb InputField+showHelp
Hi Friends,
I am using htmlb InputField with type"DATE" in a JSP DynPage.The code is
<hbj:inputField
id="input_verificationDate"
type="DATE"
showHelp="TRUE" />
With this code,I am getting the date picker button after the inputfield.But the problem is,when I click that button It is not opening the date pop up window.It is displaying a message saying that "Error on Page".
Can plz tell me the problem,Urgent.
Thanks
Sampath .gHi,
u shud use the model also.
here in my jsp file,i ve given model="myBean.model"
in bean u get & set the datenavigator model ,using getter & setter methods
for more help ,refer this help file.
http://help.sap.com/saphelp_nw04/helpdata/en/aa/9b0e41a346ef6fe10000000a1550b0/frameset.htm
Regards
Bhargava
try to award points if it is helpful -
Hi all,
How can get InputField value in abstract portal component?
Please, help me!
thanks in advance
StefanoHi Stefano,
Are you asking to get the value of an HTMLB input field in a javascript function before you submit the form? (for example to do client side validation). If so, here is a sample piece of code.
Hope this helps,
Marty
********************JAVASCRIPT FUNCTION ************
function searchSubmit(type)
var funcName = jsFormID+"_getHtmlbElementId";
func = window[funcName];
//get the query text string
var searchTextID = eval(jsSearchID);
var searchText = searchTextID.getValue();
//assign the values to a hidden form and submit the form to the search jsp
document.forms['submitSearch'].query.value = searchText;
document.forms['submitSearch'].submit();
<hbj:form id=search_form method="post" action="<%=searchURL%>" target="_blank">
<% String formID = PageContext.getParamIdForComponent(search_form);
%>
<SCRIPT> var jsFormID = "<%=formID%>"; </SCRIPT>
<hbj:inputField
id="searchText"
type="string"
maxlength="15"
width="75"
jsObjectNeeded="true"
>
% String searchID = PageContext.getParamIdForComponent(searchText); %>
<SCRIPT> var jsSearchID = '<%=searchID%>'; </SCRIPT>
</hbj:inputField>
<hbj:button
id="submit_basic_search"
text="Go"
width="45px"
tooltip="Click here to submit search"
onClientClick="searchSubmit('button')"
disabled="false"
design="STANDARD"
/>
..........place hidden form here if you are submitting form for another website or page outside of this portal component, if not you can access HTMLB field from Java class you are using and place back into a bean.... -
Hello ,
i am using the below code to dynamically create the TabStripItem.
<%
String chkAmt ="";
%>
<hbj:content id="myContext" >
<hbj:page title="Template for a portal component">
<hbj:form id="myFormId">
<%
String strI = String.valueOf(i);
String tabStripItemId="TabStripItem"+strI;
String TabStripTitle="Receipt "+strI;
String receiptAmount="ReceiptAmount"+strI;
String recAmtValue =(String)dataHash.get("Key_5");
// I am getting some value for recAmt here.
%>
<hbj:button
id="btnClose"
disabled="false"
onClientClick ="onNewCheck()"
jsObjectNeeded="TRUE"
width="90px"
text="Close"
design="STANDARD"
tooltip="Click here to quit"
/>
<hbj:tabStripItem
id="<%=tabStripItemId%>"
index="<%=strI%>"
height="120"
width="400"
title="<%=TabStripTitle%>"
>
<hbj:inputField
id="<%=receiptAmount%>"
type="string"
maxlength="15"
value="<%=recAmtValue%>"
disabled="false"
size="15" >
<% chkAmt = myContext.getParamIdForComponent(receiptAmount); %>
<hbj:inputField>
</hbj:tabStripItemBody>
</hbj:tabStripItem>
<script>
function onNewCheck()
var aa = document.getElementById
('<%=chkAmt%>').value;
alert("The Value : " + aa);
</script>
The problem is when i try to get the values of inputField
inside script giving object required error.
i Changed the code like below also not working,
<% chkAmt = myContext.getParamIdForComponent('<%=receiptAmount%>'); %>
how to get the inputField id value dynamically and pass it to javascript.
If i put the inputField id directly,(Like documentation example code) is working fine.
ur suggestions r most welcome.
Regds,
Jeyanth.Hi John,
Thanks for ur reply.
If i add jsObjectNeeded="TRUE" also not working. Still i am getting ( object required) error from script side.
i tried the below code is working.
<%
String formID ="";
String amountCheck ="";
%>
<hbj:content id="myContext" >
<hbj:page title="Template for a portal component">
<hbj:form id="myFormId">
<% formID=myContext.getCurrentFormId(); %>
<hbj:button
id="btnClose"
disabled="false"
onClientClick ="onNewCheck()"
jsObjectNeeded="TRUE"
width="90px"
text="Close"
design="STANDARD"
tooltip="Click here to quit"
/>
<hbj:inputField
id="Input_YEARTODATECLAIM"
type="string"
maxlength="8"
value="3456"
disabled="false"
size="8"
>
<% amountCheck =myContext.getParamIdForComponent(Input_YEARTODATECLAIM);%>
</hbj:inputField>
<script>
function onNewCheck()
alert("Welcome jeyanthan");
var aa = document.getElementById
('<%=amountCheck%>').value;
alert("The Value : " + aa);
</script>
</hbj:form>
</hbj:page>
</hbj:content>
Anything else i missed out here.....?
Regds,
Jeyanth -
Javascript Error in InputField Date Type
Hi,
We have migrated the Enterprise Portal Application EP5SP6 to NW2004s SP6.Everything works fine except one issue in a Manager Reports, Where we are using Date type InputField.
Code used:
<hbj:inputField
id="otherdate1"
type="DATE"
showHelp="TRUE"
size="10"
maxlength="10"
jsObjectNeeded="true"
disabled="TRUE"
>
<%
JSP-scriptlet-START----
otherPeriodFrom=myContext.getParamIdForComponent(otherdate1);
JSP-scriptlet-END----
%>
</hbj:inputField>
Javascript Error : Line : 3958 code: 2 Error: 'Undefined' is null or not an object
Above Error appears when the below option in IE is selected.And also, Error appears only when the user enters the date.Also, I cannot ask users to uncheck the settings in IE as most of the users doesn't have administrator access to their amchines
Error doesn't seem to appear when user selects the date from DataPicker component irrespective whether the below option in IE is selected or not.
IE Setting option :
Display a Notification about Every Script Error
I'm not able to find what could be the problem in EP 7.0 as it works perfectly in EP5.0.
Any ideas would be appreciated !!
Thanks,
JojoSent an OSS message to SAP.SAP found the problem and fixed the issue and will be available in NW2004s SPS9.
Jojo -
Bug in HTMLB JSP inputfield TAG ???
Hello,
we use SAP EP 6.0 NW 04 SPS16 (J2EE Cluster with 6 hosts and 2 j2ee
servers per host) with a R/3 Enterprise Backend HR system. For the UI
we use ISR forms. Platform is Windows 2003 Server with Oracle DB.
Within a self develop ISR JSP form running in the portal we have the
following problem:
The result of the htmlb tag below displays 09:00:00 in the browser. The
right time is 08:00:00
<hbj:inputField id='<%= inpufieldname %>'
type="TIME"
value='<%= ISR.getValue("ZP_BEG_DIS",i)
%>'
disabled='TRUE'
size="12"
jsObjectNeeded="true" />
When we use the coding below with type STRING the result, displayed in
the browser is 080000
<hbj:inputField id='<%= inpufieldname %>'
type="STRING"
value='<%= ISR.getValue("ZP_BEG_DIS",i)
%>'
disabled='TRUE'
size="12"
jsObjectNeeded="true" />
The crazy thing is: The coding above with type TIME works until
something in a J2EE server "breaks" from now on this server returns one
hour more tham <%= ISR.getValue("ZP_BEG_DIS",i) returns. The server
returns this wrong value until a J2EE server reboot.
Any experience with this "feature" ??
Regards,
Gerald EderThat doesn't seem to work. On the login page we have the line (uses our own custom tag called "form"):
<html:form method="post" action="<%=response.encodeURL("j_security_check")%>" >
OC4J complains about this (Tomcat is happy enough). If I change this to:
<html:form method="post" action="<%=response.encodeURL(\""j_security_check\"")%>" >
then it won't compile in either OC4J or Tomcat... which to be honest is what I expected. The quotes is inside a JSP expression; it's not really part of the attribute.
Or did you mean something else?
Thanks,
Phil
Maybe you are looking for
-
IPhone 4S running iOS 5.1.1 is not recognised by iTunes 10.6.3
Hi all, When I plug my iPhone 4S into my Mac Book Pro running Mac OS X Lion 10.7.4, iTunes 10.6.3 does not recognise the device. The iPhone is running iOS 5.1.1. I have read the steps within http://support.apple.com/kb/TS1591 and http://support.app
-
External hard drive disappeared and doesn't mount
Hi all, we're using a MacMini Server at work. As backup we use an external drive and Time Machine. It has been working nicely so far. However, two days ago the external drive just disappeared. It neither shows up on the desktop nor in finder or - and
-
Calling a web service reference from PL/SQL
Hello, could anyone give me a hint how to call a web service that is defined as web service reference from a PL/SQL page process (PL/SQL anonymous block). Many thanks in advance Lukasz
-
How to map different dataset with ESB
Hi All, We have an interface in which an application is exposing webservice, but the way the msg format defined at the Requestor is not as provider eg: wsdl of Service Requestor <s:element name="sample"> <s:complexType> <s:sequence> <s:element minOcc
-
The baseline iMac or the 1 499$ iMac?
Hi, I have used windows all my life, and I'm pretty tired of it. So, I want to switch to Apple and buy an iMac, but which one should I buy? The baseline iMac or the 1 499$ iMac? The 27" iMac is a bit too big for my room/ desk, and i don't feel the ne