Posted By

projettv007 on 03/24/10


Tagged


Versions (?)

Bug parsing


 / Published in: ASP
 

Parse content rule to {<ftv:DaletTextBox}>

before /> 2

insert Visible="false" after insert

** Script Error: | has no value ** Near: Parse content rule

>

  1. spacer: charset reduce [#" " newline]
  2. letter: charset reduce ["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890=_-" {#}]
  3.  
  4. content: {
  5.  
  6. <td>
  7. <%-- <ftv:DaletLink ID="HyperLink1" runat="server" IdDalet="FTV_Documents_Associes"/>
  8. <ftv:DaletLink ID="HyperLink2" runat="server" IdDalet="FTV_Documents_Associes"/>--%>
  9. <ftv:DaletTextBox ID="txtDocJoint" IdDalet="Documents_Associes" Width="400px"
  10. Rows="5" TextMode="MultiLine" runat="server" ReadOnly="true"
  11. BackColor="#AACBE0"/>
  12. </td>
  13. }
  14.  
  15. daletTextBoxes: []
  16. parse load/markup content [
  17. some [set tag tag! (
  18. block: parse to-string tag { <>#" "=}
  19. if not none? find block "Multiline" [
  20. append daletTextBoxes select block "ID"
  21. ]
  22. )
  23. | string! ]
  24. ]
  25.  
  26.  
  27. rule: [
  28. any [
  29.  
  30. to {<ftv:DaletTextBox} pos:
  31. (
  32. print {to {<ftv:DaletTextBox}}
  33.  
  34. )
  35.  
  36. {<ftv:DaletTextBox} pos: to "ID"
  37. to "=" "="
  38. to {"} {"} copy ID to {"} {"}
  39. (print rejoin ["ID=" ID])
  40. [
  41. (Multiline: false
  42. if not none? find daletTextBoxes ID [
  43. Multiline: true
  44. print join "Multiline: " ID
  45. ]
  46. )
  47.  
  48. [
  49. [
  50. temp: (print "before />" write clipboard:// temp input)
  51. [
  52. any [[any letter {"} any letter {"}] any spacer]
  53. ]
  54.  
  55. mark:
  56. (print "before /> 2" write clipboard:// mark input)
  57. "/>"
  58.  
  59. (write clipboard:// mark input
  60. skipsize: 0
  61. if Multiline [
  62. insert mark { Visible="false" }
  63. print {insert Visible="false"}
  64. skipsize: 17
  65. ]
  66. print "after insert" write clipboard:// mark input
  67. )
  68.  
  69. skip skipsize
  70. |
  71. to ">" mark: pos:
  72. (
  73. if Multiline [
  74. insert mark { Visible="false"}
  75. print {insert Visible="false"}
  76.  
  77. ]
  78. )
  79. thru {</ftv:DaletTextBox>}
  80.  
  81. ]
  82.  
  83. mark:
  84. (
  85. if Multiline [
  86. insert mark rejoin [newline {<asp:Literal ID="} rejoin ["Literal" replace ID "textBox" ""] {" runat="server"></asp:Literal>}]
  87. ]
  88. )
  89. ]
  90. ]
  91. ]
  92. to end
  93. ]
  94.  
  95. Parse content rule

Report this snippet  

You need to login to post a comment.