on 2006 Apr 01 11:16 AM
Hi All
I have created a KM Search iview which does its job well, however at the moment when a user views the iview it is just a search box. I want to add to text in there and possibly a picture does any one know hoe do do this?
Many Thanks
Phil
Hello,
Don't try to put a picture in the iview. Use a document iview or an url iview to show the picture or text and hide its windowbar. By putting these two iviews next to each other in one role you get the effect you need.
Best
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Phil,
as an alternative, consider writing your own portal component that renders your desired user interface and offers a trex input field. Thd logic for performing the search is pretty easy. Clicking on "submit" simply calls a special URL with your search query. No need to do more for you. Thus, your component can be a simple JSP page. You can try this one for a starter:
<%@ taglib uri="tagLib" prefix="hbj" %>
<%@ page import="java.util.ResourceBundle" %>
<%@ page import="com.mycompany.global.util.Helpers" %>
<%
final String URL_SEARCH_RESULTS = "com.sap.km.cm.basicsearch?ConfigFileName=Navigation.xml&StartPage=SearchPage&Validate=False&layoutSetMode=exclusive&ResourceListType=com.sapportals.wcm.SearchResultList&SearchType=quick";
final String URL_SEARCH_ADVANCED= "com.sap.km.cm.basicsearch?layoutSetMode=exclusive&ResourceListType=com.sapportals.wcm.SearchResultList&SearchType=quick&Advanced=true";
final String SEARCH_INDEX=Helpers.getPropertyFromProfile(componentRequest, "com.mycompany.SearchIndex");
final String LAYOUTSET=Helpers.getPropertyFromProfile(componentRequest, "com.mycompany.LayoutSet");
final String SEARCH_VISIBLE=Helpers.getPropertyFromProfile(componentRequest, "com.mycompany.SearchVisible");
final String INPUTFIELD_SIZE =Helpers.getPropertyFromProfile(componentRequest, "com.mycompany.InputfieldSize");
final String SEARCH_OPTIONS =Helpers.getPropertyFromProfile(componentRequest, "com.mycompany.SearchOptions");
String completeURLResults = URL_SEARCH_RESULTS + "&SelectedSearchIndices=" + SEARCH_INDEX + "&SearchVisible=" + SEARCH_VISIBLE + "&rndLayoutSet=" + LAYOUTSET + "&SearchTerm=";
String completeURLAdvanced = URL_SEARCH_ADVANCED + "&SearchPluginName=" + SEARCH_OPTIONS + "&rndLayoutSet=" + LAYOUTSET;
final String IMAGE_PATH= componentRequest.getWebResourcePath() + "/images/";
ResourceBundle res = componentRequest.getResourceBundle();
%>
<hbj:content id="SimpleSearch" >
<hbj:page title="SimpleSearch">
<hbj:form id="frmSimpleSearch">
<table>
<tr valign="top">
<td>
<input id="inpSimpleSearchSearchfield"
type="text"
maxlength='<%= INPUTFIELD_SIZE %>'
class="urEdf2TxtEnbl"
title='<%= res.getString("TXT_SEARCHTERM_LONG") %>'
onkeydown="if(event.keyCode=='13') onSearch()"
/>
</td>
<td>
<img
src="<%= IMAGE_PATH %>go.gif"
width="18"
height="18"
alt='<%= res.getString("TXT_SEARCH") %>'
onclick="onSearch()"
/>
</td>
</tr>
<tr>
<td>
<hbj:link id="lnkAdvancedSearch"
reference='<%= completeURLAdvanced %>'
target="_blank"
text='<%= res.getString("TXT_ADVANCED_SEARCH") %>'
tooltip='<%= res.getString("TXT_ADVANCED_SEARCH") %>'
/>
</td>
</tr>
</table>
</hbj:form>
<!-- JavaScript -->
<script language="JavaScript">
function onSearch() {
var searchTerm = document.getElementById("inpSimpleSearchSearchfield").value;
if(searchTerm!="") {
// execute search
window.open("<%= completeURLResults %>"+ searchTerm);
}
else {
alert('<%= res.getString("ERR_ENTER_SEARCH_TERM") %>');
}
}
</script>
</hbj:page>
</hbj:content>
Regards,
Dominik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
12 | |
10 | |
10 | |
10 | |
9 | |
8 | |
7 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.