Leerzeichen in einem Label

BusinessServerPages; Erstellung von Webapplikationen.

Leerzeichen in einem Label

Postby Rune2809 » Tue Mar 14, 2006 12:42 pm

Hallo zusammen,

ich möchte ähnlich einem Tree eine Tabelle mit Radiobuttons dynamisch aufbauen, was auch nicht wirklich das Problem darstellt. Hier nur mal kurz zum Verständnis:

Ich lese die anzuzeigenden Felder in eine Tabelle die ich dann mit einem Loop auf der BSP-Seite einfüge. Wird jetzt auf eine übergeordnete Qualifikation geklickt, werden die untergeordneten Qualifikationen angezeigt. Zur besseren Übersicht sollen jedoch die untergeordneten Qualifikationen um ein paar Leerzeichen nach rechts eingerückt werden. Diese Leerzeichen sind auch schon im dem Textfeld was ausgegeben wird dem Text vorangesetzt. Leider erscheinen Sie jedoch nicht auf der BSP-Seite, so dass alle Texte untereinander stehen.

Ich habe es auch schon mit dem &nsbp; - Zeichen versucht, dieses einzubinden, aber dieses wird dann auch nur als Text angezeigt.

Hat jemand von euch einen Lösungsvorschlag?

Danke.

Hier mal noch ein kurzer Ausschnitt von meinem BSP-Coding.

[code]
<%
loop at controller->pt_quali_list into ls_quali_list.
%>

<htmlb:radioButtonGroup id = "<%= ls_quali_list-q_objid %>"
mode = "LOGICAL_GROUPING" >
<htmlb:gridLayoutCell columnIndex = "1"
rowIndex = "<%= row_index %>"
style = "<%= style %>"

<htmlb:label for = "<%= ls_quali_list-q_objid %>"
text = "<%= ls_quali_list-stext %>" />
</htmlb:gridLayoutCell>
<%
endloop
%>
[/code]
Rune2809
.
.
 
Posts: 3
Joined: Tue Mar 14, 2006 12:42 pm

Lösung zum Problem

Postby Rune2809 » Wed Mar 15, 2006 10:32 am

Hallo,

im SDN hat mir jemand die Lösung gepostet. Hier mal für Euch...

Grüße, Philipp

Dear Philipp,

Here is a very simple example showing you how to add spaces:

<%@page language="abap"%><%@extension name="htmlb" prefix="htmlb"%><htmlb:content design="design2003" > <htmlb:page title = "test "> <htmlb:form> <htmlb:gridLayout rowSize="5" columnSize="1"><%DATA: row_index type Int4, text type String.DO 5 TIMES.%> <htmlb:gridLayoutCell columnIndex = "1" rowIndex = "<%= row_index %>"><% MOVE row_index to text. CONCATENATE '&nbsp;&nbsp;&nbsp;' text into text. %> <htmlb:label for = "<%= row_index %>" text = "<%raw= text %>" encode = "false" /> </htmlb:gridLayoutCell><% add 1 to row_index.ENDDO.%> </htmlb:gridLayout> </htmlb:form> </htmlb:page></htmlb:content>



So you need to set the encoding parameter to false, and convert all your space characters to the '&nbsp;' string.
I hope it helps you.

Regards,
Dezso
[code][/code]
Rune2809
.
.
 
Posts: 3
Joined: Tue Mar 14, 2006 12:42 pm


Return to BSP + BHTML

Who is online

Users browsing this forum: No registered users and 4 guests