[Dspace-general] Adding attributes to Params/Select type
Wendy Bossons
wbossons at MIT.EDU
Mon Dec 21 14:20:03 EST 2009
Forgot to mention . . . this pertains to xmlui . . .
..\Wendy
Wendy Bossons
Web Developer
Contact Information:
wbossons at mit.edu
617-253-0770
On Dec 21, 2009, at 2:11 PM, Wendy Bossons wrote:
> How does one add a parameter to an html element in dspace?
>
> I tried adding an onchange parameter to the Select.java and to
> Params.java, as well as to the Structural.xsl templating rule(s),
> but
> do not see the results of this effort in the user interface. I know
> I'm missing something or perhaps I am not following the proper
> conventions.
> Here's a block of code from my Select.java:
> public void setOnchange(String change) {
> this.params.setOnchange(change);
> }
> Here's a block of code from my Params.java:
> /** The name of the change attribute */
> public static final String A_CHANGE = "onchange";
> ...
> /** The field onchange */
> protected String onchange = "";
> ...
> public void setOnchange(String change)
> {
>
> - Ignored:
> this.onchange = change;
> }
> ...
> if (!this.onchange.equals(""))
> {
> attributes.put(A_CHANGE, this.onchange);
> }
> ...
>
>
> And the structural.xsl:
>
> <xsl:template match="@onchange">
> <xsl:attribute name="onchange"><xsl:value-of select="."/></
> xsl:attribute>
> </xsl:template>
>
> ...
>
>
> The onchange attribute is not being applied, so I expect that it is
> not in the generated xml. Is this possible -- to add an attribute?
> Any help is appreciated. (I would prefer not to hack it in the
> structural.xsl . . . )
>
> ..\Wendy
> Wendy Bossons
> Web Developer
>
> Contact Information:
> wbossons at mit.edu
> 617-253-0770
>
>
>
>
>
>
> _______________________________________________
> Dspace-general mailing list
> Dspace-general at mit.edu
> http://mailman.mit.edu/mailman/listinfo/dspace-general
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1846 bytes
Desc: not available
Url : http://mailman.mit.edu/pipermail/dspace-general/attachments/20091221/d5fbbfc3/attachment.bin
More information about the Dspace-general
mailing list