• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: WOGenericContainer convert elementName to lowercase automatically
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: WOGenericContainer convert elementName to lowercase automatically


  • Subject: Re: WOGenericContainer convert elementName to lowercase automatically
  • From: "Mr. Pierre Frisch" <email@hidden>
  • Date: Fri, 25 Apr 2008 14:50:58 -0700

Any tag generated by WO 5.4 is lowercase. I think we went too far and forcibly changed element name and attribute to lower case which is correct if you are generating HTML/XHTML but remove some XML capabilities. This was done to help old code be compliant with the new standard. We will roll that back in the next release i.e. if you element name or attribue name is upper case or mixed case we will not change it.

Pierre
--
Pierre Frisch
email@hidden


On Apr 25, 2008, at 10:05, Yung-Luen Lan wrote:

On Sat, Apr 26, 2008 at 12:48 AM, Yung-Luen Lan <email@hidden> wrote:
package your.app;

import com.webobjects.appserver.*;
import com.webobjects.appserver._private.WODynamicElementCreationException;
import com.webobjects.foundation.*;


public class MyGenericContainer extends WODynamicElement {
protected NSDictionary<String, WOAssociation> extraBindings = null;
protected WOAssociation elementName;
protected WOElement children;


public MyGenericContainer(String n, NSDictionary<String,
WOAssociation> m, WOElement t) {
super(n, m, t);
elementName = m.objectForKey("elementName");
if (elementName == null) {
throw new WODynamicElementCreationException("Need elementName.");
}


       if (m.count() > 1) {
           NSMutableDictionary<String, WOAssociation> tempBindings =
m.mutableClone();
               tempBindings.removeObjectForKey("elementName");
               extraBindings = tempBindings.immutableClone();
       }
       children = t;
       }

public void appendToResponse(WOResponse r, WOContext c) {
r.appendContentString("<" + elementName.valueInComponent(c.component()));
if (extraBindings != null) {
NSArray<String> allKeys = extraBindings.allKeys();
for (String k : allKeys) {
WOAssociation binding = extraBindings.objectForKey(k);
r.appendContentString(" " + k + "= \"" +
binding.valueInComponent(c.component()).toString() + "\"");
}
}
r.appendContentString(">");

Forgot to add this line: if (children != null)

               children.appendToResponse(r, c);
               r.appendContentString("</" +
elementName.valueInComponent(c.component()) + ">");
       }
}
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >WOGenericContainer convert elementName to lowercase automatically (From: "Yung-Luen Lan" <email@hidden>)
 >Re: WOGenericContainer convert elementName to lowercase automatically (From: "Yung-Luen Lan" <email@hidden>)
 >Re: WOGenericContainer convert elementName to lowercase automatically (From: Lachlan Deck <email@hidden>)
 >Re: WOGenericContainer convert elementName to lowercase automatically (From: "Yung-Luen Lan" <email@hidden>)
 >Re: WOGenericContainer convert elementName to lowercase automatically (From: "Yung-Luen Lan" <email@hidden>)

  • Prev by Date: split deployment
  • Next by Date: Re: D2WS still broken in 5.4.2 (was Re: What's the crack with 5.4.2?)
  • Previous by thread: Re: WOGenericContainer convert elementName to lowercase automatically
  • Next by thread: Unable to decrement snapshot count ....count is already 0 or does not exist
  • Index(es):
    • Date
    • Thread